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
;
391 /* Create a new ``struct gdbarch'' based on information provided by
392 ``struct gdbarch_info''. */
395 gdbarch_alloc (const struct gdbarch_info
*info
,
396 struct gdbarch_tdep
*tdep
)
398 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
399 memset (gdbarch
, 0, sizeof (*gdbarch
));
401 alloc_gdbarch_data (gdbarch
);
403 gdbarch
->tdep
= tdep
;
405 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
406 gdbarch
->byte_order
= info
->byte_order
;
408 /* Force the explicit initialization of these. */
409 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
410 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
411 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
412 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
413 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
414 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
415 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
416 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
417 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
418 gdbarch
->read_pc
= generic_target_read_pc
;
419 gdbarch
->write_pc
= generic_target_write_pc
;
420 gdbarch
->read_fp
= generic_target_read_fp
;
421 gdbarch
->write_fp
= generic_target_write_fp
;
422 gdbarch
->read_sp
= generic_target_read_sp
;
423 gdbarch
->write_sp
= generic_target_write_sp
;
424 gdbarch
->num_regs
= -1;
425 gdbarch
->sp_regnum
= -1;
426 gdbarch
->fp_regnum
= -1;
427 gdbarch
->pc_regnum
= -1;
428 gdbarch
->fp0_regnum
= -1;
429 gdbarch
->npc_regnum
= -1;
430 gdbarch
->nnpc_regnum
= -1;
431 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
432 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
433 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
434 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
435 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
436 gdbarch
->register_name
= legacy_register_name
;
437 gdbarch
->register_size
= -1;
438 gdbarch
->register_bytes
= -1;
439 gdbarch
->max_register_raw_size
= -1;
440 gdbarch
->max_register_virtual_size
= -1;
441 gdbarch
->do_registers_info
= do_registers_info
;
442 gdbarch
->register_sim_regno
= default_register_sim_regno
;
443 gdbarch
->use_generic_dummy_frames
= -1;
444 gdbarch
->call_dummy_start_offset
= -1;
445 gdbarch
->call_dummy_breakpoint_offset
= -1;
446 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
447 gdbarch
->call_dummy_length
= -1;
448 gdbarch
->call_dummy_p
= -1;
449 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
450 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
451 gdbarch
->call_dummy_stack_adjust_p
= -1;
452 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
453 gdbarch
->register_convertible
= generic_register_convertible_not
;
454 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
455 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
456 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
457 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
458 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
459 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
460 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
461 gdbarch
->decr_pc_after_break
= -1;
462 gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
463 gdbarch
->function_start_offset
= -1;
464 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
465 gdbarch
->frame_args_skip
= -1;
466 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
467 gdbarch
->extra_stack_alignment_needed
= 1;
468 gdbarch
->convert_from_func_ptr_addr
= default_convert_from_func_ptr_addr
;
469 /* gdbarch_alloc() */
475 /* Free a gdbarch struct. This should never happen in normal
476 operation --- once you've created a gdbarch, you keep it around.
477 However, if an architecture's init function encounters an error
478 building the structure, it may need to clean up a partially
479 constructed gdbarch. */
482 gdbarch_free (struct gdbarch
*arch
)
484 gdb_assert (arch
!= NULL
);
485 free_gdbarch_data (arch
);
490 /* Ensure that all values in a GDBARCH are reasonable. */
493 verify_gdbarch (struct gdbarch
*gdbarch
)
495 /* Only perform sanity checks on a multi-arch target. */
499 if (gdbarch
->byte_order
== 0)
500 internal_error (__FILE__
, __LINE__
,
501 "verify_gdbarch: byte-order unset");
502 if (gdbarch
->bfd_arch_info
== NULL
)
503 internal_error (__FILE__
, __LINE__
,
504 "verify_gdbarch: bfd_arch_info unset");
505 /* Check those that need to be defined for the given multi-arch level. */
506 /* Skip verify of short_bit, invalid_p == 0 */
507 /* Skip verify of int_bit, invalid_p == 0 */
508 /* Skip verify of long_bit, invalid_p == 0 */
509 /* Skip verify of long_long_bit, invalid_p == 0 */
510 /* Skip verify of float_bit, invalid_p == 0 */
511 /* Skip verify of double_bit, invalid_p == 0 */
512 /* Skip verify of long_double_bit, invalid_p == 0 */
513 /* Skip verify of ptr_bit, invalid_p == 0 */
514 if (gdbarch
->addr_bit
== 0)
515 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
516 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
517 /* Skip verify of ieee_float, invalid_p == 0 */
518 /* Skip verify of read_pc, invalid_p == 0 */
519 /* Skip verify of write_pc, invalid_p == 0 */
520 /* Skip verify of read_fp, invalid_p == 0 */
521 /* Skip verify of write_fp, invalid_p == 0 */
522 /* Skip verify of read_sp, invalid_p == 0 */
523 /* Skip verify of write_sp, invalid_p == 0 */
524 /* Skip verify of register_read, has predicate */
525 /* Skip verify of register_write, has predicate */
526 if ((GDB_MULTI_ARCH
>= 2)
527 && (gdbarch
->num_regs
== -1))
528 internal_error (__FILE__
, __LINE__
,
529 "gdbarch: verify_gdbarch: num_regs invalid");
530 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
531 if ((GDB_MULTI_ARCH
>= 2)
532 && (gdbarch
->sp_regnum
== -1))
533 internal_error (__FILE__
, __LINE__
,
534 "gdbarch: verify_gdbarch: sp_regnum invalid");
535 if ((GDB_MULTI_ARCH
>= 2)
536 && (gdbarch
->fp_regnum
== -1))
537 internal_error (__FILE__
, __LINE__
,
538 "gdbarch: verify_gdbarch: fp_regnum invalid");
539 if ((GDB_MULTI_ARCH
>= 2)
540 && (gdbarch
->pc_regnum
== -1))
541 internal_error (__FILE__
, __LINE__
,
542 "gdbarch: verify_gdbarch: pc_regnum invalid");
543 /* Skip verify of fp0_regnum, invalid_p == 0 */
544 /* Skip verify of npc_regnum, invalid_p == 0 */
545 /* Skip verify of nnpc_regnum, invalid_p == 0 */
546 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
547 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
548 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
549 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
550 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
551 /* Skip verify of register_name, invalid_p == 0 */
552 if ((GDB_MULTI_ARCH
>= 2)
553 && (gdbarch
->register_size
== -1))
554 internal_error (__FILE__
, __LINE__
,
555 "gdbarch: verify_gdbarch: register_size invalid");
556 if ((GDB_MULTI_ARCH
>= 2)
557 && (gdbarch
->register_bytes
== -1))
558 internal_error (__FILE__
, __LINE__
,
559 "gdbarch: verify_gdbarch: register_bytes invalid");
560 if ((GDB_MULTI_ARCH
>= 2)
561 && (gdbarch
->register_byte
== 0))
562 internal_error (__FILE__
, __LINE__
,
563 "gdbarch: verify_gdbarch: register_byte invalid");
564 if ((GDB_MULTI_ARCH
>= 2)
565 && (gdbarch
->register_raw_size
== 0))
566 internal_error (__FILE__
, __LINE__
,
567 "gdbarch: verify_gdbarch: register_raw_size invalid");
568 if ((GDB_MULTI_ARCH
>= 2)
569 && (gdbarch
->max_register_raw_size
== -1))
570 internal_error (__FILE__
, __LINE__
,
571 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
572 if ((GDB_MULTI_ARCH
>= 2)
573 && (gdbarch
->register_virtual_size
== 0))
574 internal_error (__FILE__
, __LINE__
,
575 "gdbarch: verify_gdbarch: register_virtual_size invalid");
576 if ((GDB_MULTI_ARCH
>= 2)
577 && (gdbarch
->max_register_virtual_size
== -1))
578 internal_error (__FILE__
, __LINE__
,
579 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
580 if ((GDB_MULTI_ARCH
>= 2)
581 && (gdbarch
->register_virtual_type
== 0))
582 internal_error (__FILE__
, __LINE__
,
583 "gdbarch: verify_gdbarch: register_virtual_type invalid");
584 /* Skip verify of do_registers_info, invalid_p == 0 */
585 /* Skip verify of register_sim_regno, invalid_p == 0 */
586 /* Skip verify of register_bytes_ok, has predicate */
587 if ((GDB_MULTI_ARCH
>= 1)
588 && (gdbarch
->use_generic_dummy_frames
== -1))
589 internal_error (__FILE__
, __LINE__
,
590 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
591 if ((GDB_MULTI_ARCH
>= 2)
592 && (gdbarch
->call_dummy_location
== 0))
593 internal_error (__FILE__
, __LINE__
,
594 "gdbarch: verify_gdbarch: call_dummy_location invalid");
595 if ((GDB_MULTI_ARCH
>= 2)
596 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
597 internal_error (__FILE__
, __LINE__
,
598 "gdbarch: verify_gdbarch: call_dummy_address invalid");
599 if ((GDB_MULTI_ARCH
>= 2)
600 && (gdbarch
->call_dummy_start_offset
== -1))
601 internal_error (__FILE__
, __LINE__
,
602 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
603 if ((GDB_MULTI_ARCH
>= 2)
604 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
605 internal_error (__FILE__
, __LINE__
,
606 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
607 if ((GDB_MULTI_ARCH
>= 1)
608 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
609 internal_error (__FILE__
, __LINE__
,
610 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
611 if ((GDB_MULTI_ARCH
>= 2)
612 && (gdbarch
->call_dummy_length
== -1))
613 internal_error (__FILE__
, __LINE__
,
614 "gdbarch: verify_gdbarch: call_dummy_length invalid");
615 if ((GDB_MULTI_ARCH
>= 2)
616 && (gdbarch
->pc_in_call_dummy
== 0))
617 internal_error (__FILE__
, __LINE__
,
618 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
619 if ((GDB_MULTI_ARCH
>= 1)
620 && (gdbarch
->call_dummy_p
== -1))
621 internal_error (__FILE__
, __LINE__
,
622 "gdbarch: verify_gdbarch: call_dummy_p invalid");
623 /* Skip verify of call_dummy_words, invalid_p == 0 */
624 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
625 if ((GDB_MULTI_ARCH
>= 1)
626 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
627 internal_error (__FILE__
, __LINE__
,
628 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
629 if ((GDB_MULTI_ARCH
>= 2)
630 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
631 internal_error (__FILE__
, __LINE__
,
632 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
633 if ((GDB_MULTI_ARCH
>= 2)
634 && (gdbarch
->fix_call_dummy
== 0))
635 internal_error (__FILE__
, __LINE__
,
636 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
637 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
638 if ((GDB_MULTI_ARCH
>= 1)
639 && (gdbarch
->get_saved_register
== 0))
640 internal_error (__FILE__
, __LINE__
,
641 "gdbarch: verify_gdbarch: get_saved_register invalid");
642 /* Skip verify of register_convertible, invalid_p == 0 */
643 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
644 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
645 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
646 /* Skip verify of store_pseudo_register, invalid_p == 0 */
647 /* Skip verify of pointer_to_address, invalid_p == 0 */
648 /* Skip verify of address_to_pointer, invalid_p == 0 */
649 /* Skip verify of return_value_on_stack, invalid_p == 0 */
650 if ((GDB_MULTI_ARCH
>= 2)
651 && (gdbarch
->extract_return_value
== 0))
652 internal_error (__FILE__
, __LINE__
,
653 "gdbarch: verify_gdbarch: extract_return_value invalid");
654 if ((GDB_MULTI_ARCH
>= 1)
655 && (gdbarch
->push_arguments
== 0))
656 internal_error (__FILE__
, __LINE__
,
657 "gdbarch: verify_gdbarch: push_arguments invalid");
658 if ((GDB_MULTI_ARCH
>= 2)
659 && (gdbarch
->push_dummy_frame
== 0))
660 internal_error (__FILE__
, __LINE__
,
661 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
662 if ((GDB_MULTI_ARCH
>= 1)
663 && (gdbarch
->push_return_address
== 0))
664 internal_error (__FILE__
, __LINE__
,
665 "gdbarch: verify_gdbarch: push_return_address invalid");
666 if ((GDB_MULTI_ARCH
>= 2)
667 && (gdbarch
->pop_frame
== 0))
668 internal_error (__FILE__
, __LINE__
,
669 "gdbarch: verify_gdbarch: pop_frame invalid");
670 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
671 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
672 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
673 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
674 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
675 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
676 if ((GDB_MULTI_ARCH
>= 2)
677 && (gdbarch
->store_struct_return
== 0))
678 internal_error (__FILE__
, __LINE__
,
679 "gdbarch: verify_gdbarch: store_struct_return invalid");
680 if ((GDB_MULTI_ARCH
>= 2)
681 && (gdbarch
->store_return_value
== 0))
682 internal_error (__FILE__
, __LINE__
,
683 "gdbarch: verify_gdbarch: store_return_value invalid");
684 if ((GDB_MULTI_ARCH
>= 2)
685 && (gdbarch
->extract_struct_value_address
== 0))
686 internal_error (__FILE__
, __LINE__
,
687 "gdbarch: verify_gdbarch: extract_struct_value_address invalid");
688 if ((GDB_MULTI_ARCH
>= 2)
689 && (gdbarch
->use_struct_convention
== 0))
690 internal_error (__FILE__
, __LINE__
,
691 "gdbarch: verify_gdbarch: use_struct_convention invalid");
692 if ((GDB_MULTI_ARCH
>= 2)
693 && (gdbarch
->frame_init_saved_regs
== 0))
694 internal_error (__FILE__
, __LINE__
,
695 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
696 if ((GDB_MULTI_ARCH
>= 2)
697 && (gdbarch
->init_extra_frame_info
== 0))
698 internal_error (__FILE__
, __LINE__
,
699 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
700 if ((GDB_MULTI_ARCH
>= 2)
701 && (gdbarch
->skip_prologue
== 0))
702 internal_error (__FILE__
, __LINE__
,
703 "gdbarch: verify_gdbarch: skip_prologue invalid");
704 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
705 if ((GDB_MULTI_ARCH
>= 2)
706 && (gdbarch
->inner_than
== 0))
707 internal_error (__FILE__
, __LINE__
,
708 "gdbarch: verify_gdbarch: inner_than invalid");
709 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
710 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
711 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
712 if ((GDB_MULTI_ARCH
>= 2)
713 && (gdbarch
->decr_pc_after_break
== -1))
714 internal_error (__FILE__
, __LINE__
,
715 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
716 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
717 if ((GDB_MULTI_ARCH
>= 2)
718 && (gdbarch
->function_start_offset
== -1))
719 internal_error (__FILE__
, __LINE__
,
720 "gdbarch: verify_gdbarch: function_start_offset invalid");
721 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
722 if ((GDB_MULTI_ARCH
>= 2)
723 && (gdbarch
->frame_args_skip
== -1))
724 internal_error (__FILE__
, __LINE__
,
725 "gdbarch: verify_gdbarch: frame_args_skip invalid");
726 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
727 if ((GDB_MULTI_ARCH
>= 2)
728 && (gdbarch
->frame_chain
== 0))
729 internal_error (__FILE__
, __LINE__
,
730 "gdbarch: verify_gdbarch: frame_chain invalid");
731 if ((GDB_MULTI_ARCH
>= 1)
732 && (gdbarch
->frame_chain_valid
== 0))
733 internal_error (__FILE__
, __LINE__
,
734 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
735 if ((GDB_MULTI_ARCH
>= 2)
736 && (gdbarch
->frame_saved_pc
== 0))
737 internal_error (__FILE__
, __LINE__
,
738 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
739 if ((GDB_MULTI_ARCH
>= 2)
740 && (gdbarch
->frame_args_address
== 0))
741 internal_error (__FILE__
, __LINE__
,
742 "gdbarch: verify_gdbarch: frame_args_address invalid");
743 if ((GDB_MULTI_ARCH
>= 2)
744 && (gdbarch
->frame_locals_address
== 0))
745 internal_error (__FILE__
, __LINE__
,
746 "gdbarch: verify_gdbarch: frame_locals_address invalid");
747 if ((GDB_MULTI_ARCH
>= 2)
748 && (gdbarch
->saved_pc_after_call
== 0))
749 internal_error (__FILE__
, __LINE__
,
750 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
751 if ((GDB_MULTI_ARCH
>= 2)
752 && (gdbarch
->frame_num_args
== 0))
753 internal_error (__FILE__
, __LINE__
,
754 "gdbarch: verify_gdbarch: frame_num_args invalid");
755 /* Skip verify of stack_align, has predicate */
756 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
757 /* Skip verify of reg_struct_has_addr, has predicate */
758 /* Skip verify of save_dummy_frame_tos, has predicate */
759 if (gdbarch
->float_format
== 0)
760 gdbarch
->float_format
= default_float_format (gdbarch
);
761 if (gdbarch
->double_format
== 0)
762 gdbarch
->double_format
= default_double_format (gdbarch
);
763 if (gdbarch
->long_double_format
== 0)
764 gdbarch
->long_double_format
= &floatformat_unknown
;
765 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
766 /* Skip verify of software_single_step, has predicate */
770 /* Print out the details of the current architecture. */
772 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
773 just happens to match the global variable ``current_gdbarch''. That
774 way macros refering to that variable get the local and not the global
775 version - ulgh. Once everything is parameterised with gdbarch, this
779 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
781 fprintf_unfiltered (file
,
782 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
784 #ifdef TARGET_ARCHITECTURE
785 fprintf_unfiltered (file
,
786 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
787 XSTRING (TARGET_ARCHITECTURE
));
789 #ifdef TARGET_BYTE_ORDER
790 fprintf_unfiltered (file
,
791 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
792 XSTRING (TARGET_BYTE_ORDER
));
794 #ifdef TARGET_SHORT_BIT
795 fprintf_unfiltered (file
,
796 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
797 XSTRING (TARGET_SHORT_BIT
));
799 #ifdef TARGET_INT_BIT
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: TARGET_INT_BIT # %s\n",
802 XSTRING (TARGET_INT_BIT
));
804 #ifdef TARGET_LONG_BIT
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
807 XSTRING (TARGET_LONG_BIT
));
809 #ifdef TARGET_LONG_LONG_BIT
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
812 XSTRING (TARGET_LONG_LONG_BIT
));
814 #ifdef TARGET_FLOAT_BIT
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
817 XSTRING (TARGET_FLOAT_BIT
));
819 #ifdef TARGET_DOUBLE_BIT
820 fprintf_unfiltered (file
,
821 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
822 XSTRING (TARGET_DOUBLE_BIT
));
824 #ifdef TARGET_LONG_DOUBLE_BIT
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
827 XSTRING (TARGET_LONG_DOUBLE_BIT
));
829 #ifdef TARGET_PTR_BIT
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
832 XSTRING (TARGET_PTR_BIT
));
834 #ifdef TARGET_ADDR_BIT
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
837 XSTRING (TARGET_ADDR_BIT
));
839 #ifdef TARGET_BFD_VMA_BIT
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
842 XSTRING (TARGET_BFD_VMA_BIT
));
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: IEEE_FLOAT # %s\n",
847 XSTRING (IEEE_FLOAT
));
849 #ifdef TARGET_READ_PC
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: %s # %s\n",
852 "TARGET_READ_PC(ptid)",
853 XSTRING (TARGET_READ_PC (ptid
)));
855 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
856 /* Macro might contain `[{}]' when not multi-arch */
857 fprintf_unfiltered (file
,
858 "gdbarch_dump: %s # %s\n",
859 "TARGET_WRITE_PC(val, ptid)",
860 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
862 #ifdef TARGET_READ_FP
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: %s # %s\n",
866 XSTRING (TARGET_READ_FP ()));
868 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
869 /* Macro might contain `[{}]' when not multi-arch */
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: %s # %s\n",
872 "TARGET_WRITE_FP(val)",
873 XSTRING (TARGET_WRITE_FP (val
)));
875 #ifdef TARGET_READ_SP
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: %s # %s\n",
879 XSTRING (TARGET_READ_SP ()));
881 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
882 /* Macro might contain `[{}]' when not multi-arch */
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: %s # %s\n",
885 "TARGET_WRITE_SP(val)",
886 XSTRING (TARGET_WRITE_SP (val
)));
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: NUM_REGS # %s\n",
893 #ifdef NUM_PSEUDO_REGS
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
896 XSTRING (NUM_PSEUDO_REGS
));
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: SP_REGNUM # %s\n",
901 XSTRING (SP_REGNUM
));
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: FP_REGNUM # %s\n",
906 XSTRING (FP_REGNUM
));
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: PC_REGNUM # %s\n",
911 XSTRING (PC_REGNUM
));
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: FP0_REGNUM # %s\n",
916 XSTRING (FP0_REGNUM
));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: NPC_REGNUM # %s\n",
921 XSTRING (NPC_REGNUM
));
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: NNPC_REGNUM # %s\n",
926 XSTRING (NNPC_REGNUM
));
928 #ifdef STAB_REG_TO_REGNUM
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: %s # %s\n",
931 "STAB_REG_TO_REGNUM(stab_regnr)",
932 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
934 #ifdef ECOFF_REG_TO_REGNUM
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: %s # %s\n",
937 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
938 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
940 #ifdef DWARF_REG_TO_REGNUM
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: %s # %s\n",
943 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
944 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
946 #ifdef SDB_REG_TO_REGNUM
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: %s # %s\n",
949 "SDB_REG_TO_REGNUM(sdb_regnr)",
950 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
952 #ifdef DWARF2_REG_TO_REGNUM
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: %s # %s\n",
955 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
956 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: %s # %s\n",
961 "REGISTER_NAME(regnr)",
962 XSTRING (REGISTER_NAME (regnr
)));
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: REGISTER_SIZE # %s\n",
967 XSTRING (REGISTER_SIZE
));
969 #ifdef REGISTER_BYTES
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: REGISTER_BYTES # %s\n",
972 XSTRING (REGISTER_BYTES
));
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: %s # %s\n",
977 "REGISTER_BYTE(reg_nr)",
978 XSTRING (REGISTER_BYTE (reg_nr
)));
980 #ifdef REGISTER_RAW_SIZE
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: %s # %s\n",
983 "REGISTER_RAW_SIZE(reg_nr)",
984 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
986 #ifdef MAX_REGISTER_RAW_SIZE
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
989 XSTRING (MAX_REGISTER_RAW_SIZE
));
991 #ifdef REGISTER_VIRTUAL_SIZE
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: %s # %s\n",
994 "REGISTER_VIRTUAL_SIZE(reg_nr)",
995 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
997 #ifdef MAX_REGISTER_VIRTUAL_SIZE
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1000 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1002 #ifdef REGISTER_VIRTUAL_TYPE
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: %s # %s\n",
1005 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1006 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1008 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1009 /* Macro might contain `[{}]' when not multi-arch */
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: %s # %s\n",
1012 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1013 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1015 #ifdef REGISTER_SIM_REGNO
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: %s # %s\n",
1018 "REGISTER_SIM_REGNO(reg_nr)",
1019 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1021 #ifdef REGISTER_BYTES_OK
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: %s # %s\n",
1024 "REGISTER_BYTES_OK(nr_bytes)",
1025 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1027 #ifdef USE_GENERIC_DUMMY_FRAMES
1028 fprintf_unfiltered (file
,
1029 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1030 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1032 #ifdef CALL_DUMMY_LOCATION
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1035 XSTRING (CALL_DUMMY_LOCATION
));
1037 #ifdef CALL_DUMMY_ADDRESS
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: %s # %s\n",
1040 "CALL_DUMMY_ADDRESS()",
1041 XSTRING (CALL_DUMMY_ADDRESS ()));
1043 #ifdef CALL_DUMMY_START_OFFSET
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1046 XSTRING (CALL_DUMMY_START_OFFSET
));
1048 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1051 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1053 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1056 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1058 #ifdef CALL_DUMMY_LENGTH
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1061 XSTRING (CALL_DUMMY_LENGTH
));
1063 #ifdef PC_IN_CALL_DUMMY
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: %s # %s\n",
1066 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1067 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1072 XSTRING (CALL_DUMMY_P
));
1074 #ifdef CALL_DUMMY_WORDS
1075 fprintf_unfiltered (file
,
1076 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1077 XSTRING (CALL_DUMMY_WORDS
));
1079 #ifdef SIZEOF_CALL_DUMMY_WORDS
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1082 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1084 #ifdef CALL_DUMMY_STACK_ADJUST_P
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1087 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1089 #ifdef CALL_DUMMY_STACK_ADJUST
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1092 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1094 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1095 /* Macro might contain `[{}]' when not multi-arch */
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: %s # %s\n",
1098 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1099 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1101 #ifdef BELIEVE_PCC_PROMOTION
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1104 XSTRING (BELIEVE_PCC_PROMOTION
));
1106 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1109 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1111 #ifdef COERCE_FLOAT_TO_DOUBLE
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: %s # %s\n",
1114 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1115 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1117 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1118 /* Macro might contain `[{}]' when not multi-arch */
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: %s # %s\n",
1121 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1122 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1124 #ifdef REGISTER_CONVERTIBLE
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: %s # %s\n",
1127 "REGISTER_CONVERTIBLE(nr)",
1128 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1130 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1131 /* Macro might contain `[{}]' when not multi-arch */
1132 fprintf_unfiltered (file
,
1133 "gdbarch_dump: %s # %s\n",
1134 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1135 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1137 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1138 /* Macro might contain `[{}]' when not multi-arch */
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: %s # %s\n",
1141 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1142 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1144 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1145 /* Macro might contain `[{}]' when not multi-arch */
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: %s # %s\n",
1148 "FETCH_PSEUDO_REGISTER(regnum)",
1149 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1151 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1152 /* Macro might contain `[{}]' when not multi-arch */
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: %s # %s\n",
1155 "STORE_PSEUDO_REGISTER(regnum)",
1156 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1158 #ifdef POINTER_TO_ADDRESS
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: %s # %s\n",
1161 "POINTER_TO_ADDRESS(type, buf)",
1162 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1164 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1165 /* Macro might contain `[{}]' when not multi-arch */
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: %s # %s\n",
1168 "ADDRESS_TO_POINTER(type, buf, addr)",
1169 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1171 #ifdef RETURN_VALUE_ON_STACK
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: %s # %s\n",
1174 "RETURN_VALUE_ON_STACK(type)",
1175 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1177 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1178 /* Macro might contain `[{}]' when not multi-arch */
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: %s # %s\n",
1181 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1182 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1184 #ifdef PUSH_ARGUMENTS
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: %s # %s\n",
1187 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1188 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1190 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1191 /* Macro might contain `[{}]' when not multi-arch */
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: %s # %s\n",
1194 "PUSH_DUMMY_FRAME(-)",
1195 XSTRING (PUSH_DUMMY_FRAME (-)));
1197 #ifdef PUSH_RETURN_ADDRESS
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: %s # %s\n",
1200 "PUSH_RETURN_ADDRESS(pc, sp)",
1201 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1203 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1204 /* Macro might contain `[{}]' when not multi-arch */
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: %s # %s\n",
1208 XSTRING (POP_FRAME (-)));
1210 #ifdef D10V_MAKE_DADDR
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1213 "D10V_MAKE_DADDR(x)",
1214 XSTRING (D10V_MAKE_DADDR (x
)));
1216 #ifdef D10V_MAKE_IADDR
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: %s # %s\n",
1219 "D10V_MAKE_IADDR(x)",
1220 XSTRING (D10V_MAKE_IADDR (x
)));
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: %s # %s\n",
1226 XSTRING (D10V_DADDR_P (x
)));
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: %s # %s\n",
1232 XSTRING (D10V_IADDR_P (x
)));
1234 #ifdef D10V_CONVERT_DADDR_TO_RAW
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: %s # %s\n",
1237 "D10V_CONVERT_DADDR_TO_RAW(x)",
1238 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1240 #ifdef D10V_CONVERT_IADDR_TO_RAW
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: %s # %s\n",
1243 "D10V_CONVERT_IADDR_TO_RAW(x)",
1244 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1246 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1247 /* Macro might contain `[{}]' when not multi-arch */
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: %s # %s\n",
1250 "STORE_STRUCT_RETURN(addr, sp)",
1251 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1253 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1254 /* Macro might contain `[{}]' when not multi-arch */
1255 fprintf_unfiltered (file
,
1256 "gdbarch_dump: %s # %s\n",
1257 "STORE_RETURN_VALUE(type, valbuf)",
1258 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1260 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1261 fprintf_unfiltered (file
,
1262 "gdbarch_dump: %s # %s\n",
1263 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1264 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1266 #ifdef USE_STRUCT_CONVENTION
1267 fprintf_unfiltered (file
,
1268 "gdbarch_dump: %s # %s\n",
1269 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1270 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1272 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1273 /* Macro might contain `[{}]' when not multi-arch */
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: %s # %s\n",
1276 "FRAME_INIT_SAVED_REGS(frame)",
1277 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1279 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1280 /* Macro might contain `[{}]' when not multi-arch */
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: %s # %s\n",
1283 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1284 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1286 #ifdef SKIP_PROLOGUE
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: %s # %s\n",
1289 "SKIP_PROLOGUE(ip)",
1290 XSTRING (SKIP_PROLOGUE (ip
)));
1292 #ifdef PROLOGUE_FRAMELESS_P
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "PROLOGUE_FRAMELESS_P(ip)",
1296 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: %s # %s\n",
1301 "INNER_THAN(lhs, rhs)",
1302 XSTRING (INNER_THAN (lhs
, rhs
)));
1304 #ifdef BREAKPOINT_FROM_PC
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1308 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1310 #ifdef MEMORY_INSERT_BREAKPOINT
1311 fprintf_unfiltered (file
,
1312 "gdbarch_dump: %s # %s\n",
1313 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1314 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1316 #ifdef MEMORY_REMOVE_BREAKPOINT
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: %s # %s\n",
1319 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1320 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1322 #ifdef DECR_PC_AFTER_BREAK
1323 fprintf_unfiltered (file
,
1324 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1325 XSTRING (DECR_PC_AFTER_BREAK
));
1327 #ifdef PREPARE_TO_PROCEED
1328 fprintf_unfiltered (file
,
1329 "gdbarch_dump: %s # %s\n",
1330 "PREPARE_TO_PROCEED(select_it)",
1331 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1333 #ifdef FUNCTION_START_OFFSET
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1336 XSTRING (FUNCTION_START_OFFSET
));
1338 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1339 /* Macro might contain `[{}]' when not multi-arch */
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: %s # %s\n",
1342 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1343 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1345 #ifdef FRAME_ARGS_SKIP
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1348 XSTRING (FRAME_ARGS_SKIP
));
1350 #ifdef FRAMELESS_FUNCTION_INVOCATION
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: %s # %s\n",
1353 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1354 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: %s # %s\n",
1359 "FRAME_CHAIN(frame)",
1360 XSTRING (FRAME_CHAIN (frame
)));
1362 #ifdef FRAME_CHAIN_VALID
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: %s # %s\n",
1365 "FRAME_CHAIN_VALID(chain, thisframe)",
1366 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1368 #ifdef FRAME_SAVED_PC
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: %s # %s\n",
1371 "FRAME_SAVED_PC(fi)",
1372 XSTRING (FRAME_SAVED_PC (fi
)));
1374 #ifdef FRAME_ARGS_ADDRESS
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: %s # %s\n",
1377 "FRAME_ARGS_ADDRESS(fi)",
1378 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1380 #ifdef FRAME_LOCALS_ADDRESS
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: %s # %s\n",
1383 "FRAME_LOCALS_ADDRESS(fi)",
1384 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1386 #ifdef SAVED_PC_AFTER_CALL
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: %s # %s\n",
1389 "SAVED_PC_AFTER_CALL(frame)",
1390 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1392 #ifdef FRAME_NUM_ARGS
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: %s # %s\n",
1395 "FRAME_NUM_ARGS(frame)",
1396 XSTRING (FRAME_NUM_ARGS (frame
)));
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: %s # %s\n",
1402 XSTRING (STACK_ALIGN (sp
)));
1404 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1407 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1409 #ifdef REG_STRUCT_HAS_ADDR
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: %s # %s\n",
1412 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1413 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1415 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1416 /* Macro might contain `[{}]' when not multi-arch */
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: %s # %s\n",
1419 "SAVE_DUMMY_FRAME_TOS(sp)",
1420 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1422 #ifdef PARM_BOUNDARY
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1425 XSTRING (PARM_BOUNDARY
));
1427 #ifdef TARGET_FLOAT_FORMAT
1428 fprintf_unfiltered (file
,
1429 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1430 XSTRING (TARGET_FLOAT_FORMAT
));
1432 #ifdef TARGET_DOUBLE_FORMAT
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1435 XSTRING (TARGET_DOUBLE_FORMAT
));
1437 #ifdef TARGET_LONG_DOUBLE_FORMAT
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1440 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1442 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: %s # %s\n",
1445 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1446 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1448 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1449 /* Macro might contain `[{}]' when not multi-arch */
1450 fprintf_unfiltered (file
,
1451 "gdbarch_dump: %s # %s\n",
1452 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1453 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1455 #ifdef TARGET_ARCHITECTURE
1456 if (TARGET_ARCHITECTURE
!= NULL
)
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1459 TARGET_ARCHITECTURE
->printable_name
);
1461 #ifdef TARGET_BYTE_ORDER
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1464 (long) TARGET_BYTE_ORDER
);
1466 #ifdef TARGET_SHORT_BIT
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1469 (long) TARGET_SHORT_BIT
);
1471 #ifdef TARGET_INT_BIT
1472 fprintf_unfiltered (file
,
1473 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1474 (long) TARGET_INT_BIT
);
1476 #ifdef TARGET_LONG_BIT
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1479 (long) TARGET_LONG_BIT
);
1481 #ifdef TARGET_LONG_LONG_BIT
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1484 (long) TARGET_LONG_LONG_BIT
);
1486 #ifdef TARGET_FLOAT_BIT
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1489 (long) TARGET_FLOAT_BIT
);
1491 #ifdef TARGET_DOUBLE_BIT
1492 fprintf_unfiltered (file
,
1493 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1494 (long) TARGET_DOUBLE_BIT
);
1496 #ifdef TARGET_LONG_DOUBLE_BIT
1497 fprintf_unfiltered (file
,
1498 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1499 (long) TARGET_LONG_DOUBLE_BIT
);
1501 #ifdef TARGET_PTR_BIT
1502 fprintf_unfiltered (file
,
1503 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1504 (long) TARGET_PTR_BIT
);
1506 #ifdef TARGET_ADDR_BIT
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1509 (long) TARGET_ADDR_BIT
);
1511 #ifdef TARGET_BFD_VMA_BIT
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1514 (long) TARGET_BFD_VMA_BIT
);
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1521 #ifdef TARGET_READ_PC
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1525 (long) current_gdbarch
->read_pc
1526 /*TARGET_READ_PC ()*/);
1528 #ifdef TARGET_WRITE_PC
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1532 (long) current_gdbarch
->write_pc
1533 /*TARGET_WRITE_PC ()*/);
1535 #ifdef TARGET_READ_FP
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1539 (long) current_gdbarch
->read_fp
1540 /*TARGET_READ_FP ()*/);
1542 #ifdef TARGET_WRITE_FP
1544 fprintf_unfiltered (file
,
1545 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1546 (long) current_gdbarch
->write_fp
1547 /*TARGET_WRITE_FP ()*/);
1549 #ifdef TARGET_READ_SP
1551 fprintf_unfiltered (file
,
1552 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1553 (long) current_gdbarch
->read_sp
1554 /*TARGET_READ_SP ()*/);
1556 #ifdef TARGET_WRITE_SP
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1560 (long) current_gdbarch
->write_sp
1561 /*TARGET_WRITE_SP ()*/);
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: register_read = 0x%08lx\n",
1566 (long) current_gdbarch
->register_read
);
1568 fprintf_unfiltered (file
,
1569 "gdbarch_dump: register_write = 0x%08lx\n",
1570 (long) current_gdbarch
->register_write
);
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: NUM_REGS = %ld\n",
1576 #ifdef NUM_PSEUDO_REGS
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1579 (long) NUM_PSEUDO_REGS
);
1582 fprintf_unfiltered (file
,
1583 "gdbarch_dump: SP_REGNUM = %ld\n",
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: FP_REGNUM = %ld\n",
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: PC_REGNUM = %ld\n",
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: FP0_REGNUM = %ld\n",
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: NPC_REGNUM = %ld\n",
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1609 (long) NNPC_REGNUM
);
1611 #ifdef STAB_REG_TO_REGNUM
1613 fprintf_unfiltered (file
,
1614 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1615 (long) current_gdbarch
->stab_reg_to_regnum
1616 /*STAB_REG_TO_REGNUM ()*/);
1618 #ifdef ECOFF_REG_TO_REGNUM
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1622 (long) current_gdbarch
->ecoff_reg_to_regnum
1623 /*ECOFF_REG_TO_REGNUM ()*/);
1625 #ifdef DWARF_REG_TO_REGNUM
1627 fprintf_unfiltered (file
,
1628 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1629 (long) current_gdbarch
->dwarf_reg_to_regnum
1630 /*DWARF_REG_TO_REGNUM ()*/);
1632 #ifdef SDB_REG_TO_REGNUM
1634 fprintf_unfiltered (file
,
1635 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1636 (long) current_gdbarch
->sdb_reg_to_regnum
1637 /*SDB_REG_TO_REGNUM ()*/);
1639 #ifdef DWARF2_REG_TO_REGNUM
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1643 (long) current_gdbarch
->dwarf2_reg_to_regnum
1644 /*DWARF2_REG_TO_REGNUM ()*/);
1646 #ifdef REGISTER_NAME
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1650 (long) current_gdbarch
->register_name
1651 /*REGISTER_NAME ()*/);
1653 #ifdef REGISTER_SIZE
1654 fprintf_unfiltered (file
,
1655 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1656 (long) REGISTER_SIZE
);
1658 #ifdef REGISTER_BYTES
1659 fprintf_unfiltered (file
,
1660 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1661 (long) REGISTER_BYTES
);
1663 #ifdef REGISTER_BYTE
1665 fprintf_unfiltered (file
,
1666 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1667 (long) current_gdbarch
->register_byte
1668 /*REGISTER_BYTE ()*/);
1670 #ifdef REGISTER_RAW_SIZE
1672 fprintf_unfiltered (file
,
1673 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1674 (long) current_gdbarch
->register_raw_size
1675 /*REGISTER_RAW_SIZE ()*/);
1677 #ifdef MAX_REGISTER_RAW_SIZE
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1680 (long) MAX_REGISTER_RAW_SIZE
);
1682 #ifdef REGISTER_VIRTUAL_SIZE
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1686 (long) current_gdbarch
->register_virtual_size
1687 /*REGISTER_VIRTUAL_SIZE ()*/);
1689 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1690 fprintf_unfiltered (file
,
1691 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1692 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1694 #ifdef REGISTER_VIRTUAL_TYPE
1696 fprintf_unfiltered (file
,
1697 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1698 (long) current_gdbarch
->register_virtual_type
1699 /*REGISTER_VIRTUAL_TYPE ()*/);
1701 #ifdef DO_REGISTERS_INFO
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1705 (long) current_gdbarch
->do_registers_info
1706 /*DO_REGISTERS_INFO ()*/);
1708 #ifdef REGISTER_SIM_REGNO
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1712 (long) current_gdbarch
->register_sim_regno
1713 /*REGISTER_SIM_REGNO ()*/);
1715 #ifdef REGISTER_BYTES_OK
1717 fprintf_unfiltered (file
,
1718 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1719 (long) current_gdbarch
->register_bytes_ok
1720 /*REGISTER_BYTES_OK ()*/);
1722 #ifdef USE_GENERIC_DUMMY_FRAMES
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1725 (long) USE_GENERIC_DUMMY_FRAMES
);
1727 #ifdef CALL_DUMMY_LOCATION
1728 fprintf_unfiltered (file
,
1729 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1730 (long) CALL_DUMMY_LOCATION
);
1732 #ifdef CALL_DUMMY_ADDRESS
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1736 (long) current_gdbarch
->call_dummy_address
1737 /*CALL_DUMMY_ADDRESS ()*/);
1739 #ifdef CALL_DUMMY_START_OFFSET
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1742 (long) CALL_DUMMY_START_OFFSET
);
1744 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1745 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1748 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1750 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1751 fprintf_unfiltered (file
,
1752 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1753 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1755 #ifdef CALL_DUMMY_LENGTH
1756 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1759 (long) CALL_DUMMY_LENGTH
);
1761 #ifdef PC_IN_CALL_DUMMY
1763 fprintf_unfiltered (file
,
1764 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1765 (long) current_gdbarch
->pc_in_call_dummy
1766 /*PC_IN_CALL_DUMMY ()*/);
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1771 (long) CALL_DUMMY_P
);
1773 #ifdef CALL_DUMMY_WORDS
1774 fprintf_unfiltered (file
,
1775 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1776 (long) CALL_DUMMY_WORDS
);
1778 #ifdef SIZEOF_CALL_DUMMY_WORDS
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1781 (long) SIZEOF_CALL_DUMMY_WORDS
);
1783 #ifdef CALL_DUMMY_STACK_ADJUST_P
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1786 (long) CALL_DUMMY_STACK_ADJUST_P
);
1788 #ifdef CALL_DUMMY_STACK_ADJUST
1789 if (CALL_DUMMY_STACK_ADJUST_P
)
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1792 (long) CALL_DUMMY_STACK_ADJUST
);
1794 #ifdef FIX_CALL_DUMMY
1796 fprintf_unfiltered (file
,
1797 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1798 (long) current_gdbarch
->fix_call_dummy
1799 /*FIX_CALL_DUMMY ()*/);
1801 #ifdef BELIEVE_PCC_PROMOTION
1802 fprintf_unfiltered (file
,
1803 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1804 (long) BELIEVE_PCC_PROMOTION
);
1806 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1807 fprintf_unfiltered (file
,
1808 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1809 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1811 #ifdef COERCE_FLOAT_TO_DOUBLE
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1815 (long) current_gdbarch
->coerce_float_to_double
1816 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1818 #ifdef GET_SAVED_REGISTER
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1822 (long) current_gdbarch
->get_saved_register
1823 /*GET_SAVED_REGISTER ()*/);
1825 #ifdef REGISTER_CONVERTIBLE
1827 fprintf_unfiltered (file
,
1828 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1829 (long) current_gdbarch
->register_convertible
1830 /*REGISTER_CONVERTIBLE ()*/);
1832 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1836 (long) current_gdbarch
->register_convert_to_virtual
1837 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1839 #ifdef REGISTER_CONVERT_TO_RAW
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1843 (long) current_gdbarch
->register_convert_to_raw
1844 /*REGISTER_CONVERT_TO_RAW ()*/);
1846 #ifdef FETCH_PSEUDO_REGISTER
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1850 (long) current_gdbarch
->fetch_pseudo_register
1851 /*FETCH_PSEUDO_REGISTER ()*/);
1853 #ifdef STORE_PSEUDO_REGISTER
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1857 (long) current_gdbarch
->store_pseudo_register
1858 /*STORE_PSEUDO_REGISTER ()*/);
1860 #ifdef POINTER_TO_ADDRESS
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1864 (long) current_gdbarch
->pointer_to_address
1865 /*POINTER_TO_ADDRESS ()*/);
1867 #ifdef ADDRESS_TO_POINTER
1869 fprintf_unfiltered (file
,
1870 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1871 (long) current_gdbarch
->address_to_pointer
1872 /*ADDRESS_TO_POINTER ()*/);
1874 #ifdef RETURN_VALUE_ON_STACK
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1878 (long) current_gdbarch
->return_value_on_stack
1879 /*RETURN_VALUE_ON_STACK ()*/);
1881 #ifdef EXTRACT_RETURN_VALUE
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1885 (long) current_gdbarch
->extract_return_value
1886 /*EXTRACT_RETURN_VALUE ()*/);
1888 #ifdef PUSH_ARGUMENTS
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1892 (long) current_gdbarch
->push_arguments
1893 /*PUSH_ARGUMENTS ()*/);
1895 #ifdef PUSH_DUMMY_FRAME
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1899 (long) current_gdbarch
->push_dummy_frame
1900 /*PUSH_DUMMY_FRAME ()*/);
1902 #ifdef PUSH_RETURN_ADDRESS
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1906 (long) current_gdbarch
->push_return_address
1907 /*PUSH_RETURN_ADDRESS ()*/);
1911 fprintf_unfiltered (file
,
1912 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1913 (long) current_gdbarch
->pop_frame
1916 #ifdef D10V_MAKE_DADDR
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1920 (long) current_gdbarch
->d10v_make_daddr
1921 /*D10V_MAKE_DADDR ()*/);
1923 #ifdef D10V_MAKE_IADDR
1925 fprintf_unfiltered (file
,
1926 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1927 (long) current_gdbarch
->d10v_make_iaddr
1928 /*D10V_MAKE_IADDR ()*/);
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1934 (long) current_gdbarch
->d10v_daddr_p
1935 /*D10V_DADDR_P ()*/);
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1941 (long) current_gdbarch
->d10v_iaddr_p
1942 /*D10V_IADDR_P ()*/);
1944 #ifdef D10V_CONVERT_DADDR_TO_RAW
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1948 (long) current_gdbarch
->d10v_convert_daddr_to_raw
1949 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1951 #ifdef D10V_CONVERT_IADDR_TO_RAW
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1955 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
1956 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1958 #ifdef STORE_STRUCT_RETURN
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1962 (long) current_gdbarch
->store_struct_return
1963 /*STORE_STRUCT_RETURN ()*/);
1965 #ifdef STORE_RETURN_VALUE
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1969 (long) current_gdbarch
->store_return_value
1970 /*STORE_RETURN_VALUE ()*/);
1972 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1974 fprintf_unfiltered (file
,
1975 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1976 (long) current_gdbarch
->extract_struct_value_address
1977 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1979 #ifdef USE_STRUCT_CONVENTION
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1983 (long) current_gdbarch
->use_struct_convention
1984 /*USE_STRUCT_CONVENTION ()*/);
1986 #ifdef FRAME_INIT_SAVED_REGS
1988 fprintf_unfiltered (file
,
1989 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1990 (long) current_gdbarch
->frame_init_saved_regs
1991 /*FRAME_INIT_SAVED_REGS ()*/);
1993 #ifdef INIT_EXTRA_FRAME_INFO
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1997 (long) current_gdbarch
->init_extra_frame_info
1998 /*INIT_EXTRA_FRAME_INFO ()*/);
2000 #ifdef SKIP_PROLOGUE
2002 fprintf_unfiltered (file
,
2003 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
2004 (long) current_gdbarch
->skip_prologue
2005 /*SKIP_PROLOGUE ()*/);
2007 #ifdef PROLOGUE_FRAMELESS_P
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2011 (long) current_gdbarch
->prologue_frameless_p
2012 /*PROLOGUE_FRAMELESS_P ()*/);
2016 fprintf_unfiltered (file
,
2017 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2018 (long) current_gdbarch
->inner_than
2021 #ifdef BREAKPOINT_FROM_PC
2023 fprintf_unfiltered (file
,
2024 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2025 (long) current_gdbarch
->breakpoint_from_pc
2026 /*BREAKPOINT_FROM_PC ()*/);
2028 #ifdef MEMORY_INSERT_BREAKPOINT
2030 fprintf_unfiltered (file
,
2031 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2032 (long) current_gdbarch
->memory_insert_breakpoint
2033 /*MEMORY_INSERT_BREAKPOINT ()*/);
2035 #ifdef MEMORY_REMOVE_BREAKPOINT
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2039 (long) current_gdbarch
->memory_remove_breakpoint
2040 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2042 #ifdef DECR_PC_AFTER_BREAK
2043 fprintf_unfiltered (file
,
2044 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2045 (long) DECR_PC_AFTER_BREAK
);
2047 #ifdef PREPARE_TO_PROCEED
2049 fprintf_unfiltered (file
,
2050 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2051 (long) current_gdbarch
->prepare_to_proceed
2052 /*PREPARE_TO_PROCEED ()*/);
2054 #ifdef FUNCTION_START_OFFSET
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2057 (long) FUNCTION_START_OFFSET
);
2059 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2063 (long) current_gdbarch
->remote_translate_xfer_address
2064 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2066 #ifdef FRAME_ARGS_SKIP
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2069 (long) FRAME_ARGS_SKIP
);
2071 #ifdef FRAMELESS_FUNCTION_INVOCATION
2073 fprintf_unfiltered (file
,
2074 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2075 (long) current_gdbarch
->frameless_function_invocation
2076 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2080 fprintf_unfiltered (file
,
2081 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2082 (long) current_gdbarch
->frame_chain
2083 /*FRAME_CHAIN ()*/);
2085 #ifdef FRAME_CHAIN_VALID
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2089 (long) current_gdbarch
->frame_chain_valid
2090 /*FRAME_CHAIN_VALID ()*/);
2092 #ifdef FRAME_SAVED_PC
2094 fprintf_unfiltered (file
,
2095 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2096 (long) current_gdbarch
->frame_saved_pc
2097 /*FRAME_SAVED_PC ()*/);
2099 #ifdef FRAME_ARGS_ADDRESS
2101 fprintf_unfiltered (file
,
2102 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2103 (long) current_gdbarch
->frame_args_address
2104 /*FRAME_ARGS_ADDRESS ()*/);
2106 #ifdef FRAME_LOCALS_ADDRESS
2108 fprintf_unfiltered (file
,
2109 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2110 (long) current_gdbarch
->frame_locals_address
2111 /*FRAME_LOCALS_ADDRESS ()*/);
2113 #ifdef SAVED_PC_AFTER_CALL
2115 fprintf_unfiltered (file
,
2116 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2117 (long) current_gdbarch
->saved_pc_after_call
2118 /*SAVED_PC_AFTER_CALL ()*/);
2120 #ifdef FRAME_NUM_ARGS
2122 fprintf_unfiltered (file
,
2123 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2124 (long) current_gdbarch
->frame_num_args
2125 /*FRAME_NUM_ARGS ()*/);
2129 fprintf_unfiltered (file
,
2130 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2131 (long) current_gdbarch
->stack_align
2132 /*STACK_ALIGN ()*/);
2134 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2135 fprintf_unfiltered (file
,
2136 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2137 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2139 #ifdef REG_STRUCT_HAS_ADDR
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2143 (long) current_gdbarch
->reg_struct_has_addr
2144 /*REG_STRUCT_HAS_ADDR ()*/);
2146 #ifdef SAVE_DUMMY_FRAME_TOS
2148 fprintf_unfiltered (file
,
2149 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2150 (long) current_gdbarch
->save_dummy_frame_tos
2151 /*SAVE_DUMMY_FRAME_TOS ()*/);
2153 #ifdef PARM_BOUNDARY
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2156 (long) PARM_BOUNDARY
);
2158 #ifdef TARGET_FLOAT_FORMAT
2159 fprintf_unfiltered (file
,
2160 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2161 (long) TARGET_FLOAT_FORMAT
);
2163 #ifdef TARGET_DOUBLE_FORMAT
2164 fprintf_unfiltered (file
,
2165 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2166 (long) TARGET_DOUBLE_FORMAT
);
2168 #ifdef TARGET_LONG_DOUBLE_FORMAT
2169 fprintf_unfiltered (file
,
2170 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2171 (long) TARGET_LONG_DOUBLE_FORMAT
);
2173 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2175 fprintf_unfiltered (file
,
2176 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2177 (long) current_gdbarch
->convert_from_func_ptr_addr
2178 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2180 #ifdef SOFTWARE_SINGLE_STEP
2182 fprintf_unfiltered (file
,
2183 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2184 (long) current_gdbarch
->software_single_step
2185 /*SOFTWARE_SINGLE_STEP ()*/);
2187 if (current_gdbarch
->dump_tdep
!= NULL
)
2188 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2191 struct gdbarch_tdep
*
2192 gdbarch_tdep (struct gdbarch
*gdbarch
)
2194 if (gdbarch_debug
>= 2)
2195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2196 return gdbarch
->tdep
;
2200 const struct bfd_arch_info
*
2201 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2203 if (gdbarch_debug
>= 2)
2204 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2205 return gdbarch
->bfd_arch_info
;
2209 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2211 if (gdbarch_debug
>= 2)
2212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2213 return gdbarch
->byte_order
;
2217 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2219 /* Skip verify of short_bit, invalid_p == 0 */
2220 if (gdbarch_debug
>= 2)
2221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2222 return gdbarch
->short_bit
;
2226 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2229 gdbarch
->short_bit
= short_bit
;
2233 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2235 /* Skip verify of int_bit, invalid_p == 0 */
2236 if (gdbarch_debug
>= 2)
2237 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2238 return gdbarch
->int_bit
;
2242 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2245 gdbarch
->int_bit
= int_bit
;
2249 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2251 /* Skip verify of long_bit, invalid_p == 0 */
2252 if (gdbarch_debug
>= 2)
2253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2254 return gdbarch
->long_bit
;
2258 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2261 gdbarch
->long_bit
= long_bit
;
2265 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2267 /* Skip verify of long_long_bit, invalid_p == 0 */
2268 if (gdbarch_debug
>= 2)
2269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2270 return gdbarch
->long_long_bit
;
2274 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2277 gdbarch
->long_long_bit
= long_long_bit
;
2281 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2283 /* Skip verify of float_bit, invalid_p == 0 */
2284 if (gdbarch_debug
>= 2)
2285 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2286 return gdbarch
->float_bit
;
2290 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2293 gdbarch
->float_bit
= float_bit
;
2297 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2299 /* Skip verify of double_bit, invalid_p == 0 */
2300 if (gdbarch_debug
>= 2)
2301 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2302 return gdbarch
->double_bit
;
2306 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2309 gdbarch
->double_bit
= double_bit
;
2313 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2315 /* Skip verify of long_double_bit, invalid_p == 0 */
2316 if (gdbarch_debug
>= 2)
2317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2318 return gdbarch
->long_double_bit
;
2322 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2323 int long_double_bit
)
2325 gdbarch
->long_double_bit
= long_double_bit
;
2329 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2331 /* Skip verify of ptr_bit, invalid_p == 0 */
2332 if (gdbarch_debug
>= 2)
2333 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2334 return gdbarch
->ptr_bit
;
2338 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2341 gdbarch
->ptr_bit
= ptr_bit
;
2345 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2347 if (gdbarch
->addr_bit
== 0)
2348 internal_error (__FILE__
, __LINE__
,
2349 "gdbarch: gdbarch_addr_bit invalid");
2350 if (gdbarch_debug
>= 2)
2351 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2352 return gdbarch
->addr_bit
;
2356 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2359 gdbarch
->addr_bit
= addr_bit
;
2363 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2365 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2366 if (gdbarch_debug
>= 2)
2367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2368 return gdbarch
->bfd_vma_bit
;
2372 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2375 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2379 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2381 /* Skip verify of ieee_float, invalid_p == 0 */
2382 if (gdbarch_debug
>= 2)
2383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2384 return gdbarch
->ieee_float
;
2388 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2391 gdbarch
->ieee_float
= ieee_float
;
2395 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2397 if (gdbarch
->read_pc
== 0)
2398 internal_error (__FILE__
, __LINE__
,
2399 "gdbarch: gdbarch_read_pc invalid");
2400 if (gdbarch_debug
>= 2)
2401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2402 return gdbarch
->read_pc (ptid
);
2406 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2407 gdbarch_read_pc_ftype read_pc
)
2409 gdbarch
->read_pc
= read_pc
;
2413 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2415 if (gdbarch
->write_pc
== 0)
2416 internal_error (__FILE__
, __LINE__
,
2417 "gdbarch: gdbarch_write_pc invalid");
2418 if (gdbarch_debug
>= 2)
2419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2420 gdbarch
->write_pc (val
, ptid
);
2424 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2425 gdbarch_write_pc_ftype write_pc
)
2427 gdbarch
->write_pc
= write_pc
;
2431 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2433 if (gdbarch
->read_fp
== 0)
2434 internal_error (__FILE__
, __LINE__
,
2435 "gdbarch: gdbarch_read_fp invalid");
2436 if (gdbarch_debug
>= 2)
2437 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2438 return gdbarch
->read_fp ();
2442 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2443 gdbarch_read_fp_ftype read_fp
)
2445 gdbarch
->read_fp
= read_fp
;
2449 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2451 if (gdbarch
->write_fp
== 0)
2452 internal_error (__FILE__
, __LINE__
,
2453 "gdbarch: gdbarch_write_fp invalid");
2454 if (gdbarch_debug
>= 2)
2455 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2456 gdbarch
->write_fp (val
);
2460 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2461 gdbarch_write_fp_ftype write_fp
)
2463 gdbarch
->write_fp
= write_fp
;
2467 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2469 if (gdbarch
->read_sp
== 0)
2470 internal_error (__FILE__
, __LINE__
,
2471 "gdbarch: gdbarch_read_sp invalid");
2472 if (gdbarch_debug
>= 2)
2473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2474 return gdbarch
->read_sp ();
2478 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2479 gdbarch_read_sp_ftype read_sp
)
2481 gdbarch
->read_sp
= read_sp
;
2485 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2487 if (gdbarch
->write_sp
== 0)
2488 internal_error (__FILE__
, __LINE__
,
2489 "gdbarch: gdbarch_write_sp invalid");
2490 if (gdbarch_debug
>= 2)
2491 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2492 gdbarch
->write_sp (val
);
2496 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2497 gdbarch_write_sp_ftype write_sp
)
2499 gdbarch
->write_sp
= write_sp
;
2503 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2505 return gdbarch
->register_read
!= 0;
2509 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2511 if (gdbarch
->register_read
== 0)
2512 internal_error (__FILE__
, __LINE__
,
2513 "gdbarch: gdbarch_register_read invalid");
2514 if (gdbarch_debug
>= 2)
2515 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2516 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2520 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2521 gdbarch_register_read_ftype register_read
)
2523 gdbarch
->register_read
= register_read
;
2527 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2529 return gdbarch
->register_write
!= 0;
2533 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2535 if (gdbarch
->register_write
== 0)
2536 internal_error (__FILE__
, __LINE__
,
2537 "gdbarch: gdbarch_register_write invalid");
2538 if (gdbarch_debug
>= 2)
2539 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2540 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2544 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2545 gdbarch_register_write_ftype register_write
)
2547 gdbarch
->register_write
= register_write
;
2551 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2553 if (gdbarch
->num_regs
== -1)
2554 internal_error (__FILE__
, __LINE__
,
2555 "gdbarch: gdbarch_num_regs invalid");
2556 if (gdbarch_debug
>= 2)
2557 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2558 return gdbarch
->num_regs
;
2562 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2565 gdbarch
->num_regs
= num_regs
;
2569 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2571 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2572 if (gdbarch_debug
>= 2)
2573 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2574 return gdbarch
->num_pseudo_regs
;
2578 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2579 int num_pseudo_regs
)
2581 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2585 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2587 if (gdbarch
->sp_regnum
== -1)
2588 internal_error (__FILE__
, __LINE__
,
2589 "gdbarch: gdbarch_sp_regnum invalid");
2590 if (gdbarch_debug
>= 2)
2591 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2592 return gdbarch
->sp_regnum
;
2596 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2599 gdbarch
->sp_regnum
= sp_regnum
;
2603 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2605 if (gdbarch
->fp_regnum
== -1)
2606 internal_error (__FILE__
, __LINE__
,
2607 "gdbarch: gdbarch_fp_regnum invalid");
2608 if (gdbarch_debug
>= 2)
2609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2610 return gdbarch
->fp_regnum
;
2614 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2617 gdbarch
->fp_regnum
= fp_regnum
;
2621 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2623 if (gdbarch
->pc_regnum
== -1)
2624 internal_error (__FILE__
, __LINE__
,
2625 "gdbarch: gdbarch_pc_regnum invalid");
2626 if (gdbarch_debug
>= 2)
2627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2628 return gdbarch
->pc_regnum
;
2632 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2635 gdbarch
->pc_regnum
= pc_regnum
;
2639 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2641 /* Skip verify of fp0_regnum, invalid_p == 0 */
2642 if (gdbarch_debug
>= 2)
2643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2644 return gdbarch
->fp0_regnum
;
2648 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2651 gdbarch
->fp0_regnum
= fp0_regnum
;
2655 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2657 /* Skip verify of npc_regnum, invalid_p == 0 */
2658 if (gdbarch_debug
>= 2)
2659 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2660 return gdbarch
->npc_regnum
;
2664 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2667 gdbarch
->npc_regnum
= npc_regnum
;
2671 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2673 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2674 if (gdbarch_debug
>= 2)
2675 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2676 return gdbarch
->nnpc_regnum
;
2680 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2683 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2687 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2689 if (gdbarch
->stab_reg_to_regnum
== 0)
2690 internal_error (__FILE__
, __LINE__
,
2691 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2692 if (gdbarch_debug
>= 2)
2693 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2694 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2698 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2699 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2701 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2705 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2707 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2708 internal_error (__FILE__
, __LINE__
,
2709 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2710 if (gdbarch_debug
>= 2)
2711 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2712 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2716 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2717 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2719 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2723 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2725 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2726 internal_error (__FILE__
, __LINE__
,
2727 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2728 if (gdbarch_debug
>= 2)
2729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2730 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2734 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2735 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2737 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2741 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2743 if (gdbarch
->sdb_reg_to_regnum
== 0)
2744 internal_error (__FILE__
, __LINE__
,
2745 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2746 if (gdbarch_debug
>= 2)
2747 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2748 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2752 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2753 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2755 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2759 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2761 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2762 internal_error (__FILE__
, __LINE__
,
2763 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2764 if (gdbarch_debug
>= 2)
2765 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2766 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2770 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2771 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2773 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2777 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2779 if (gdbarch
->register_name
== 0)
2780 internal_error (__FILE__
, __LINE__
,
2781 "gdbarch: gdbarch_register_name invalid");
2782 if (gdbarch_debug
>= 2)
2783 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2784 return gdbarch
->register_name (regnr
);
2788 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2789 gdbarch_register_name_ftype register_name
)
2791 gdbarch
->register_name
= register_name
;
2795 gdbarch_register_size (struct gdbarch
*gdbarch
)
2797 if (gdbarch
->register_size
== -1)
2798 internal_error (__FILE__
, __LINE__
,
2799 "gdbarch: gdbarch_register_size invalid");
2800 if (gdbarch_debug
>= 2)
2801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2802 return gdbarch
->register_size
;
2806 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2809 gdbarch
->register_size
= register_size
;
2813 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2815 if (gdbarch
->register_bytes
== -1)
2816 internal_error (__FILE__
, __LINE__
,
2817 "gdbarch: gdbarch_register_bytes invalid");
2818 if (gdbarch_debug
>= 2)
2819 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2820 return gdbarch
->register_bytes
;
2824 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2827 gdbarch
->register_bytes
= register_bytes
;
2831 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2833 if (gdbarch
->register_byte
== 0)
2834 internal_error (__FILE__
, __LINE__
,
2835 "gdbarch: gdbarch_register_byte invalid");
2836 if (gdbarch_debug
>= 2)
2837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2838 return gdbarch
->register_byte (reg_nr
);
2842 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2843 gdbarch_register_byte_ftype register_byte
)
2845 gdbarch
->register_byte
= register_byte
;
2849 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2851 if (gdbarch
->register_raw_size
== 0)
2852 internal_error (__FILE__
, __LINE__
,
2853 "gdbarch: gdbarch_register_raw_size invalid");
2854 if (gdbarch_debug
>= 2)
2855 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2856 return gdbarch
->register_raw_size (reg_nr
);
2860 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2861 gdbarch_register_raw_size_ftype register_raw_size
)
2863 gdbarch
->register_raw_size
= register_raw_size
;
2867 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2869 if (gdbarch
->max_register_raw_size
== -1)
2870 internal_error (__FILE__
, __LINE__
,
2871 "gdbarch: gdbarch_max_register_raw_size invalid");
2872 if (gdbarch_debug
>= 2)
2873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2874 return gdbarch
->max_register_raw_size
;
2878 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2879 int max_register_raw_size
)
2881 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2885 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2887 if (gdbarch
->register_virtual_size
== 0)
2888 internal_error (__FILE__
, __LINE__
,
2889 "gdbarch: gdbarch_register_virtual_size invalid");
2890 if (gdbarch_debug
>= 2)
2891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2892 return gdbarch
->register_virtual_size (reg_nr
);
2896 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2897 gdbarch_register_virtual_size_ftype register_virtual_size
)
2899 gdbarch
->register_virtual_size
= register_virtual_size
;
2903 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2905 if (gdbarch
->max_register_virtual_size
== -1)
2906 internal_error (__FILE__
, __LINE__
,
2907 "gdbarch: gdbarch_max_register_virtual_size invalid");
2908 if (gdbarch_debug
>= 2)
2909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2910 return gdbarch
->max_register_virtual_size
;
2914 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2915 int max_register_virtual_size
)
2917 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2921 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2923 if (gdbarch
->register_virtual_type
== 0)
2924 internal_error (__FILE__
, __LINE__
,
2925 "gdbarch: gdbarch_register_virtual_type invalid");
2926 if (gdbarch_debug
>= 2)
2927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2928 return gdbarch
->register_virtual_type (reg_nr
);
2932 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2933 gdbarch_register_virtual_type_ftype register_virtual_type
)
2935 gdbarch
->register_virtual_type
= register_virtual_type
;
2939 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2941 if (gdbarch
->do_registers_info
== 0)
2942 internal_error (__FILE__
, __LINE__
,
2943 "gdbarch: gdbarch_do_registers_info invalid");
2944 if (gdbarch_debug
>= 2)
2945 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2946 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2950 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2951 gdbarch_do_registers_info_ftype do_registers_info
)
2953 gdbarch
->do_registers_info
= do_registers_info
;
2957 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2959 if (gdbarch
->register_sim_regno
== 0)
2960 internal_error (__FILE__
, __LINE__
,
2961 "gdbarch: gdbarch_register_sim_regno invalid");
2962 if (gdbarch_debug
>= 2)
2963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2964 return gdbarch
->register_sim_regno (reg_nr
);
2968 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2969 gdbarch_register_sim_regno_ftype register_sim_regno
)
2971 gdbarch
->register_sim_regno
= register_sim_regno
;
2975 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2977 return gdbarch
->register_bytes_ok
!= 0;
2981 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2983 if (gdbarch
->register_bytes_ok
== 0)
2984 internal_error (__FILE__
, __LINE__
,
2985 "gdbarch: gdbarch_register_bytes_ok invalid");
2986 if (gdbarch_debug
>= 2)
2987 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2988 return gdbarch
->register_bytes_ok (nr_bytes
);
2992 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2993 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2995 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2999 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3001 if (gdbarch
->use_generic_dummy_frames
== -1)
3002 internal_error (__FILE__
, __LINE__
,
3003 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3004 if (gdbarch_debug
>= 2)
3005 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3006 return gdbarch
->use_generic_dummy_frames
;
3010 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3011 int use_generic_dummy_frames
)
3013 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3017 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3019 if (gdbarch
->call_dummy_location
== 0)
3020 internal_error (__FILE__
, __LINE__
,
3021 "gdbarch: gdbarch_call_dummy_location invalid");
3022 if (gdbarch_debug
>= 2)
3023 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3024 return gdbarch
->call_dummy_location
;
3028 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3029 int call_dummy_location
)
3031 gdbarch
->call_dummy_location
= call_dummy_location
;
3035 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3037 if (gdbarch
->call_dummy_address
== 0)
3038 internal_error (__FILE__
, __LINE__
,
3039 "gdbarch: gdbarch_call_dummy_address invalid");
3040 if (gdbarch_debug
>= 2)
3041 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3042 return gdbarch
->call_dummy_address ();
3046 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3047 gdbarch_call_dummy_address_ftype call_dummy_address
)
3049 gdbarch
->call_dummy_address
= call_dummy_address
;
3053 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3055 if (gdbarch
->call_dummy_start_offset
== -1)
3056 internal_error (__FILE__
, __LINE__
,
3057 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3058 if (gdbarch_debug
>= 2)
3059 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3060 return gdbarch
->call_dummy_start_offset
;
3064 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3065 CORE_ADDR call_dummy_start_offset
)
3067 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3071 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3073 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3074 internal_error (__FILE__
, __LINE__
,
3075 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3076 if (gdbarch_debug
>= 2)
3077 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3078 return gdbarch
->call_dummy_breakpoint_offset
;
3082 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3083 CORE_ADDR call_dummy_breakpoint_offset
)
3085 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3089 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3091 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3092 internal_error (__FILE__
, __LINE__
,
3093 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3094 if (gdbarch_debug
>= 2)
3095 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3096 return gdbarch
->call_dummy_breakpoint_offset_p
;
3100 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3101 int call_dummy_breakpoint_offset_p
)
3103 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3107 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3109 if (gdbarch
->call_dummy_length
== -1)
3110 internal_error (__FILE__
, __LINE__
,
3111 "gdbarch: gdbarch_call_dummy_length invalid");
3112 if (gdbarch_debug
>= 2)
3113 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3114 return gdbarch
->call_dummy_length
;
3118 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3119 int call_dummy_length
)
3121 gdbarch
->call_dummy_length
= call_dummy_length
;
3125 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3127 if (gdbarch
->pc_in_call_dummy
== 0)
3128 internal_error (__FILE__
, __LINE__
,
3129 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3130 if (gdbarch_debug
>= 2)
3131 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3132 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3136 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3137 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3139 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3143 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3145 if (gdbarch
->call_dummy_p
== -1)
3146 internal_error (__FILE__
, __LINE__
,
3147 "gdbarch: gdbarch_call_dummy_p invalid");
3148 if (gdbarch_debug
>= 2)
3149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3150 return gdbarch
->call_dummy_p
;
3154 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3157 gdbarch
->call_dummy_p
= call_dummy_p
;
3161 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3163 /* Skip verify of call_dummy_words, invalid_p == 0 */
3164 if (gdbarch_debug
>= 2)
3165 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3166 return gdbarch
->call_dummy_words
;
3170 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3171 LONGEST
* call_dummy_words
)
3173 gdbarch
->call_dummy_words
= call_dummy_words
;
3177 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3179 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3180 if (gdbarch_debug
>= 2)
3181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3182 return gdbarch
->sizeof_call_dummy_words
;
3186 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3187 int sizeof_call_dummy_words
)
3189 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3193 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3195 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3196 internal_error (__FILE__
, __LINE__
,
3197 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3198 if (gdbarch_debug
>= 2)
3199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3200 return gdbarch
->call_dummy_stack_adjust_p
;
3204 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3205 int call_dummy_stack_adjust_p
)
3207 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3211 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3213 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3214 internal_error (__FILE__
, __LINE__
,
3215 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3216 if (gdbarch_debug
>= 2)
3217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3218 return gdbarch
->call_dummy_stack_adjust
;
3222 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3223 int call_dummy_stack_adjust
)
3225 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3229 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
)
3231 if (gdbarch
->fix_call_dummy
== 0)
3232 internal_error (__FILE__
, __LINE__
,
3233 "gdbarch: gdbarch_fix_call_dummy invalid");
3234 if (gdbarch_debug
>= 2)
3235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3236 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3240 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3241 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3243 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3247 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3249 if (gdbarch_debug
>= 2)
3250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3251 return gdbarch
->believe_pcc_promotion
;
3255 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3256 int believe_pcc_promotion
)
3258 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3262 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3264 if (gdbarch_debug
>= 2)
3265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3266 return gdbarch
->believe_pcc_promotion_type
;
3270 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3271 int believe_pcc_promotion_type
)
3273 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3277 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3279 if (gdbarch
->coerce_float_to_double
== 0)
3280 internal_error (__FILE__
, __LINE__
,
3281 "gdbarch: gdbarch_coerce_float_to_double invalid");
3282 if (gdbarch_debug
>= 2)
3283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3284 return gdbarch
->coerce_float_to_double (formal
, actual
);
3288 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3289 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3291 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3295 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
)
3297 if (gdbarch
->get_saved_register
== 0)
3298 internal_error (__FILE__
, __LINE__
,
3299 "gdbarch: gdbarch_get_saved_register invalid");
3300 if (gdbarch_debug
>= 2)
3301 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3302 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3306 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3307 gdbarch_get_saved_register_ftype get_saved_register
)
3309 gdbarch
->get_saved_register
= get_saved_register
;
3313 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3315 if (gdbarch
->register_convertible
== 0)
3316 internal_error (__FILE__
, __LINE__
,
3317 "gdbarch: gdbarch_register_convertible invalid");
3318 if (gdbarch_debug
>= 2)
3319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3320 return gdbarch
->register_convertible (nr
);
3324 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3325 gdbarch_register_convertible_ftype register_convertible
)
3327 gdbarch
->register_convertible
= register_convertible
;
3331 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3333 if (gdbarch
->register_convert_to_virtual
== 0)
3334 internal_error (__FILE__
, __LINE__
,
3335 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3336 if (gdbarch_debug
>= 2)
3337 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3338 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3342 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3343 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3345 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3349 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3351 if (gdbarch
->register_convert_to_raw
== 0)
3352 internal_error (__FILE__
, __LINE__
,
3353 "gdbarch: gdbarch_register_convert_to_raw invalid");
3354 if (gdbarch_debug
>= 2)
3355 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3356 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3360 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3361 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3363 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3367 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3369 if (gdbarch
->fetch_pseudo_register
== 0)
3370 internal_error (__FILE__
, __LINE__
,
3371 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3372 if (gdbarch_debug
>= 2)
3373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3374 gdbarch
->fetch_pseudo_register (regnum
);
3378 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3379 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3381 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3385 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3387 if (gdbarch
->store_pseudo_register
== 0)
3388 internal_error (__FILE__
, __LINE__
,
3389 "gdbarch: gdbarch_store_pseudo_register invalid");
3390 if (gdbarch_debug
>= 2)
3391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3392 gdbarch
->store_pseudo_register (regnum
);
3396 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3397 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3399 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3403 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3405 if (gdbarch
->pointer_to_address
== 0)
3406 internal_error (__FILE__
, __LINE__
,
3407 "gdbarch: gdbarch_pointer_to_address invalid");
3408 if (gdbarch_debug
>= 2)
3409 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3410 return gdbarch
->pointer_to_address (type
, buf
);
3414 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3415 gdbarch_pointer_to_address_ftype pointer_to_address
)
3417 gdbarch
->pointer_to_address
= pointer_to_address
;
3421 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3423 if (gdbarch
->address_to_pointer
== 0)
3424 internal_error (__FILE__
, __LINE__
,
3425 "gdbarch: gdbarch_address_to_pointer invalid");
3426 if (gdbarch_debug
>= 2)
3427 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3428 gdbarch
->address_to_pointer (type
, buf
, addr
);
3432 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3433 gdbarch_address_to_pointer_ftype address_to_pointer
)
3435 gdbarch
->address_to_pointer
= address_to_pointer
;
3439 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3441 if (gdbarch
->return_value_on_stack
== 0)
3442 internal_error (__FILE__
, __LINE__
,
3443 "gdbarch: gdbarch_return_value_on_stack invalid");
3444 if (gdbarch_debug
>= 2)
3445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3446 return gdbarch
->return_value_on_stack (type
);
3450 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3451 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3453 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3457 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3459 if (gdbarch
->extract_return_value
== 0)
3460 internal_error (__FILE__
, __LINE__
,
3461 "gdbarch: gdbarch_extract_return_value invalid");
3462 if (gdbarch_debug
>= 2)
3463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3464 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3468 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3469 gdbarch_extract_return_value_ftype extract_return_value
)
3471 gdbarch
->extract_return_value
= extract_return_value
;
3475 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3477 if (gdbarch
->push_arguments
== 0)
3478 internal_error (__FILE__
, __LINE__
,
3479 "gdbarch: gdbarch_push_arguments invalid");
3480 if (gdbarch_debug
>= 2)
3481 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3482 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3486 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3487 gdbarch_push_arguments_ftype push_arguments
)
3489 gdbarch
->push_arguments
= push_arguments
;
3493 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3495 if (gdbarch
->push_dummy_frame
== 0)
3496 internal_error (__FILE__
, __LINE__
,
3497 "gdbarch: gdbarch_push_dummy_frame invalid");
3498 if (gdbarch_debug
>= 2)
3499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3500 gdbarch
->push_dummy_frame ();
3504 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3505 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3507 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3511 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3513 if (gdbarch
->push_return_address
== 0)
3514 internal_error (__FILE__
, __LINE__
,
3515 "gdbarch: gdbarch_push_return_address invalid");
3516 if (gdbarch_debug
>= 2)
3517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3518 return gdbarch
->push_return_address (pc
, sp
);
3522 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3523 gdbarch_push_return_address_ftype push_return_address
)
3525 gdbarch
->push_return_address
= push_return_address
;
3529 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3531 if (gdbarch
->pop_frame
== 0)
3532 internal_error (__FILE__
, __LINE__
,
3533 "gdbarch: gdbarch_pop_frame invalid");
3534 if (gdbarch_debug
>= 2)
3535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3536 gdbarch
->pop_frame ();
3540 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3541 gdbarch_pop_frame_ftype pop_frame
)
3543 gdbarch
->pop_frame
= pop_frame
;
3547 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3549 if (gdbarch
->d10v_make_daddr
== 0)
3550 internal_error (__FILE__
, __LINE__
,
3551 "gdbarch: gdbarch_d10v_make_daddr invalid");
3552 if (gdbarch_debug
>= 2)
3553 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3554 return gdbarch
->d10v_make_daddr (x
);
3558 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3559 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3561 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3565 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3567 if (gdbarch
->d10v_make_iaddr
== 0)
3568 internal_error (__FILE__
, __LINE__
,
3569 "gdbarch: gdbarch_d10v_make_iaddr invalid");
3570 if (gdbarch_debug
>= 2)
3571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3572 return gdbarch
->d10v_make_iaddr (x
);
3576 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3577 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3579 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3583 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3585 if (gdbarch
->d10v_daddr_p
== 0)
3586 internal_error (__FILE__
, __LINE__
,
3587 "gdbarch: gdbarch_d10v_daddr_p invalid");
3588 if (gdbarch_debug
>= 2)
3589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3590 return gdbarch
->d10v_daddr_p (x
);
3594 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3595 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3597 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3601 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3603 if (gdbarch
->d10v_iaddr_p
== 0)
3604 internal_error (__FILE__
, __LINE__
,
3605 "gdbarch: gdbarch_d10v_iaddr_p invalid");
3606 if (gdbarch_debug
>= 2)
3607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3608 return gdbarch
->d10v_iaddr_p (x
);
3612 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3613 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3615 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3619 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3621 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3622 internal_error (__FILE__
, __LINE__
,
3623 "gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3624 if (gdbarch_debug
>= 2)
3625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3626 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3630 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3631 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3633 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3637 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3639 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3640 internal_error (__FILE__
, __LINE__
,
3641 "gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3642 if (gdbarch_debug
>= 2)
3643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3644 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3648 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3649 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3651 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3655 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3657 if (gdbarch
->store_struct_return
== 0)
3658 internal_error (__FILE__
, __LINE__
,
3659 "gdbarch: gdbarch_store_struct_return invalid");
3660 if (gdbarch_debug
>= 2)
3661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3662 gdbarch
->store_struct_return (addr
, sp
);
3666 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3667 gdbarch_store_struct_return_ftype store_struct_return
)
3669 gdbarch
->store_struct_return
= store_struct_return
;
3673 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3675 if (gdbarch
->store_return_value
== 0)
3676 internal_error (__FILE__
, __LINE__
,
3677 "gdbarch: gdbarch_store_return_value invalid");
3678 if (gdbarch_debug
>= 2)
3679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3680 gdbarch
->store_return_value (type
, valbuf
);
3684 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3685 gdbarch_store_return_value_ftype store_return_value
)
3687 gdbarch
->store_return_value
= store_return_value
;
3691 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3693 if (gdbarch
->extract_struct_value_address
== 0)
3694 internal_error (__FILE__
, __LINE__
,
3695 "gdbarch: gdbarch_extract_struct_value_address invalid");
3696 if (gdbarch_debug
>= 2)
3697 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3698 return gdbarch
->extract_struct_value_address (regbuf
);
3702 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3703 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3705 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3709 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3711 if (gdbarch
->use_struct_convention
== 0)
3712 internal_error (__FILE__
, __LINE__
,
3713 "gdbarch: gdbarch_use_struct_convention invalid");
3714 if (gdbarch_debug
>= 2)
3715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3716 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3720 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3721 gdbarch_use_struct_convention_ftype use_struct_convention
)
3723 gdbarch
->use_struct_convention
= use_struct_convention
;
3727 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3729 if (gdbarch
->frame_init_saved_regs
== 0)
3730 internal_error (__FILE__
, __LINE__
,
3731 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3732 if (gdbarch_debug
>= 2)
3733 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3734 gdbarch
->frame_init_saved_regs (frame
);
3738 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3739 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3741 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3745 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3747 if (gdbarch
->init_extra_frame_info
== 0)
3748 internal_error (__FILE__
, __LINE__
,
3749 "gdbarch: gdbarch_init_extra_frame_info invalid");
3750 if (gdbarch_debug
>= 2)
3751 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3752 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3756 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3757 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3759 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3763 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3765 if (gdbarch
->skip_prologue
== 0)
3766 internal_error (__FILE__
, __LINE__
,
3767 "gdbarch: gdbarch_skip_prologue invalid");
3768 if (gdbarch_debug
>= 2)
3769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3770 return gdbarch
->skip_prologue (ip
);
3774 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3775 gdbarch_skip_prologue_ftype skip_prologue
)
3777 gdbarch
->skip_prologue
= skip_prologue
;
3781 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3783 if (gdbarch
->prologue_frameless_p
== 0)
3784 internal_error (__FILE__
, __LINE__
,
3785 "gdbarch: gdbarch_prologue_frameless_p invalid");
3786 if (gdbarch_debug
>= 2)
3787 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3788 return gdbarch
->prologue_frameless_p (ip
);
3792 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3793 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3795 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3799 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3801 if (gdbarch
->inner_than
== 0)
3802 internal_error (__FILE__
, __LINE__
,
3803 "gdbarch: gdbarch_inner_than invalid");
3804 if (gdbarch_debug
>= 2)
3805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3806 return gdbarch
->inner_than (lhs
, rhs
);
3810 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3811 gdbarch_inner_than_ftype inner_than
)
3813 gdbarch
->inner_than
= inner_than
;
3817 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3819 if (gdbarch
->breakpoint_from_pc
== 0)
3820 internal_error (__FILE__
, __LINE__
,
3821 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3822 if (gdbarch_debug
>= 2)
3823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3824 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3828 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3829 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3831 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3835 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3837 if (gdbarch
->memory_insert_breakpoint
== 0)
3838 internal_error (__FILE__
, __LINE__
,
3839 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3840 if (gdbarch_debug
>= 2)
3841 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3842 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3846 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3847 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3849 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3853 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3855 if (gdbarch
->memory_remove_breakpoint
== 0)
3856 internal_error (__FILE__
, __LINE__
,
3857 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3858 if (gdbarch_debug
>= 2)
3859 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3860 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3864 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3865 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3867 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3871 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3873 if (gdbarch
->decr_pc_after_break
== -1)
3874 internal_error (__FILE__
, __LINE__
,
3875 "gdbarch: gdbarch_decr_pc_after_break invalid");
3876 if (gdbarch_debug
>= 2)
3877 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3878 return gdbarch
->decr_pc_after_break
;
3882 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3883 CORE_ADDR decr_pc_after_break
)
3885 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3889 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3891 if (gdbarch
->prepare_to_proceed
== 0)
3892 internal_error (__FILE__
, __LINE__
,
3893 "gdbarch: gdbarch_prepare_to_proceed invalid");
3894 if (gdbarch_debug
>= 2)
3895 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3896 return gdbarch
->prepare_to_proceed (select_it
);
3900 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3901 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3903 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3907 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3909 if (gdbarch
->function_start_offset
== -1)
3910 internal_error (__FILE__
, __LINE__
,
3911 "gdbarch: gdbarch_function_start_offset invalid");
3912 if (gdbarch_debug
>= 2)
3913 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3914 return gdbarch
->function_start_offset
;
3918 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3919 CORE_ADDR function_start_offset
)
3921 gdbarch
->function_start_offset
= function_start_offset
;
3925 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3927 if (gdbarch
->remote_translate_xfer_address
== 0)
3928 internal_error (__FILE__
, __LINE__
,
3929 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3930 if (gdbarch_debug
>= 2)
3931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3932 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3936 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3937 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3939 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3943 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3945 if (gdbarch
->frame_args_skip
== -1)
3946 internal_error (__FILE__
, __LINE__
,
3947 "gdbarch: gdbarch_frame_args_skip invalid");
3948 if (gdbarch_debug
>= 2)
3949 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3950 return gdbarch
->frame_args_skip
;
3954 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3955 CORE_ADDR frame_args_skip
)
3957 gdbarch
->frame_args_skip
= frame_args_skip
;
3961 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3963 if (gdbarch
->frameless_function_invocation
== 0)
3964 internal_error (__FILE__
, __LINE__
,
3965 "gdbarch: gdbarch_frameless_function_invocation invalid");
3966 if (gdbarch_debug
>= 2)
3967 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3968 return gdbarch
->frameless_function_invocation (fi
);
3972 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3973 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3975 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3979 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3981 if (gdbarch
->frame_chain
== 0)
3982 internal_error (__FILE__
, __LINE__
,
3983 "gdbarch: gdbarch_frame_chain invalid");
3984 if (gdbarch_debug
>= 2)
3985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3986 return gdbarch
->frame_chain (frame
);
3990 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3991 gdbarch_frame_chain_ftype frame_chain
)
3993 gdbarch
->frame_chain
= frame_chain
;
3997 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3999 if (gdbarch
->frame_chain_valid
== 0)
4000 internal_error (__FILE__
, __LINE__
,
4001 "gdbarch: gdbarch_frame_chain_valid invalid");
4002 if (gdbarch_debug
>= 2)
4003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4004 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4008 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4009 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4011 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4015 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4017 if (gdbarch
->frame_saved_pc
== 0)
4018 internal_error (__FILE__
, __LINE__
,
4019 "gdbarch: gdbarch_frame_saved_pc invalid");
4020 if (gdbarch_debug
>= 2)
4021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4022 return gdbarch
->frame_saved_pc (fi
);
4026 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4027 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4029 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4033 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4035 if (gdbarch
->frame_args_address
== 0)
4036 internal_error (__FILE__
, __LINE__
,
4037 "gdbarch: gdbarch_frame_args_address invalid");
4038 if (gdbarch_debug
>= 2)
4039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4040 return gdbarch
->frame_args_address (fi
);
4044 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4045 gdbarch_frame_args_address_ftype frame_args_address
)
4047 gdbarch
->frame_args_address
= frame_args_address
;
4051 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4053 if (gdbarch
->frame_locals_address
== 0)
4054 internal_error (__FILE__
, __LINE__
,
4055 "gdbarch: gdbarch_frame_locals_address invalid");
4056 if (gdbarch_debug
>= 2)
4057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4058 return gdbarch
->frame_locals_address (fi
);
4062 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4063 gdbarch_frame_locals_address_ftype frame_locals_address
)
4065 gdbarch
->frame_locals_address
= frame_locals_address
;
4069 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4071 if (gdbarch
->saved_pc_after_call
== 0)
4072 internal_error (__FILE__
, __LINE__
,
4073 "gdbarch: gdbarch_saved_pc_after_call invalid");
4074 if (gdbarch_debug
>= 2)
4075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4076 return gdbarch
->saved_pc_after_call (frame
);
4080 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4081 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4083 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4087 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4089 if (gdbarch
->frame_num_args
== 0)
4090 internal_error (__FILE__
, __LINE__
,
4091 "gdbarch: gdbarch_frame_num_args invalid");
4092 if (gdbarch_debug
>= 2)
4093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4094 return gdbarch
->frame_num_args (frame
);
4098 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4099 gdbarch_frame_num_args_ftype frame_num_args
)
4101 gdbarch
->frame_num_args
= frame_num_args
;
4105 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4107 return gdbarch
->stack_align
!= 0;
4111 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4113 if (gdbarch
->stack_align
== 0)
4114 internal_error (__FILE__
, __LINE__
,
4115 "gdbarch: gdbarch_stack_align invalid");
4116 if (gdbarch_debug
>= 2)
4117 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4118 return gdbarch
->stack_align (sp
);
4122 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4123 gdbarch_stack_align_ftype stack_align
)
4125 gdbarch
->stack_align
= stack_align
;
4129 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4131 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4132 if (gdbarch_debug
>= 2)
4133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4134 return gdbarch
->extra_stack_alignment_needed
;
4138 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4139 int extra_stack_alignment_needed
)
4141 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4145 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4147 return gdbarch
->reg_struct_has_addr
!= 0;
4151 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4153 if (gdbarch
->reg_struct_has_addr
== 0)
4154 internal_error (__FILE__
, __LINE__
,
4155 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4156 if (gdbarch_debug
>= 2)
4157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4158 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4162 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4163 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4165 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4169 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4171 return gdbarch
->save_dummy_frame_tos
!= 0;
4175 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4177 if (gdbarch
->save_dummy_frame_tos
== 0)
4178 internal_error (__FILE__
, __LINE__
,
4179 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4180 if (gdbarch_debug
>= 2)
4181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4182 gdbarch
->save_dummy_frame_tos (sp
);
4186 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4187 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4189 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4193 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4195 if (gdbarch_debug
>= 2)
4196 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4197 return gdbarch
->parm_boundary
;
4201 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4204 gdbarch
->parm_boundary
= parm_boundary
;
4207 const struct floatformat
*
4208 gdbarch_float_format (struct gdbarch
*gdbarch
)
4210 if (gdbarch_debug
>= 2)
4211 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4212 return gdbarch
->float_format
;
4216 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4217 const struct floatformat
* float_format
)
4219 gdbarch
->float_format
= float_format
;
4222 const struct floatformat
*
4223 gdbarch_double_format (struct gdbarch
*gdbarch
)
4225 if (gdbarch_debug
>= 2)
4226 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4227 return gdbarch
->double_format
;
4231 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4232 const struct floatformat
* double_format
)
4234 gdbarch
->double_format
= double_format
;
4237 const struct floatformat
*
4238 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4240 if (gdbarch_debug
>= 2)
4241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4242 return gdbarch
->long_double_format
;
4246 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4247 const struct floatformat
* long_double_format
)
4249 gdbarch
->long_double_format
= long_double_format
;
4253 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4255 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4256 internal_error (__FILE__
, __LINE__
,
4257 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4258 if (gdbarch_debug
>= 2)
4259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4260 return gdbarch
->convert_from_func_ptr_addr (addr
);
4264 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4265 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4267 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4271 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4273 return gdbarch
->software_single_step
!= 0;
4277 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4279 if (gdbarch
->software_single_step
== 0)
4280 internal_error (__FILE__
, __LINE__
,
4281 "gdbarch: gdbarch_software_single_step invalid");
4282 if (gdbarch_debug
>= 2)
4283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4284 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4288 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4289 gdbarch_software_single_step_ftype software_single_step
)
4291 gdbarch
->software_single_step
= software_single_step
;
4295 /* Keep a registry of per-architecture data-pointers required by GDB
4301 gdbarch_data_init_ftype
*init
;
4302 gdbarch_data_free_ftype
*free
;
4305 struct gdbarch_data_registration
4307 struct gdbarch_data
*data
;
4308 struct gdbarch_data_registration
*next
;
4311 struct gdbarch_data_registry
4314 struct gdbarch_data_registration
*registrations
;
4317 struct gdbarch_data_registry gdbarch_data_registry
=
4322 struct gdbarch_data
*
4323 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4324 gdbarch_data_free_ftype
*free
)
4326 struct gdbarch_data_registration
**curr
;
4327 for (curr
= &gdbarch_data_registry
.registrations
;
4329 curr
= &(*curr
)->next
);
4330 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4331 (*curr
)->next
= NULL
;
4332 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4333 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4334 (*curr
)->data
->init
= init
;
4335 (*curr
)->data
->free
= free
;
4336 return (*curr
)->data
;
4340 /* Walk through all the registered users initializing each in turn. */
4343 init_gdbarch_data (struct gdbarch
*gdbarch
)
4345 struct gdbarch_data_registration
*rego
;
4346 for (rego
= gdbarch_data_registry
.registrations
;
4350 struct gdbarch_data
*data
= rego
->data
;
4351 gdb_assert (data
->index
< gdbarch
->nr_data
);
4352 if (data
->init
!= NULL
)
4354 void *pointer
= data
->init (gdbarch
);
4355 set_gdbarch_data (gdbarch
, data
, pointer
);
4360 /* Create/delete the gdbarch data vector. */
4363 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4365 gdb_assert (gdbarch
->data
== NULL
);
4366 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4367 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4371 free_gdbarch_data (struct gdbarch
*gdbarch
)
4373 struct gdbarch_data_registration
*rego
;
4374 gdb_assert (gdbarch
->data
!= NULL
);
4375 for (rego
= gdbarch_data_registry
.registrations
;
4379 struct gdbarch_data
*data
= rego
->data
;
4380 gdb_assert (data
->index
< gdbarch
->nr_data
);
4381 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4383 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4384 gdbarch
->data
[data
->index
] = NULL
;
4387 xfree (gdbarch
->data
);
4388 gdbarch
->data
= NULL
;
4392 /* Initialize the current value of thee specified per-architecture
4396 set_gdbarch_data (struct gdbarch
*gdbarch
,
4397 struct gdbarch_data
*data
,
4400 gdb_assert (data
->index
< gdbarch
->nr_data
);
4401 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4402 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4403 gdbarch
->data
[data
->index
] = pointer
;
4406 /* Return the current value of the specified per-architecture
4410 gdbarch_data (struct gdbarch_data
*data
)
4412 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4413 return current_gdbarch
->data
[data
->index
];
4418 /* Keep a registry of swapped data required by GDB modules. */
4423 struct gdbarch_swap_registration
*source
;
4424 struct gdbarch_swap
*next
;
4427 struct gdbarch_swap_registration
4430 unsigned long sizeof_data
;
4431 gdbarch_swap_ftype
*init
;
4432 struct gdbarch_swap_registration
*next
;
4435 struct gdbarch_swap_registry
4438 struct gdbarch_swap_registration
*registrations
;
4441 struct gdbarch_swap_registry gdbarch_swap_registry
=
4447 register_gdbarch_swap (void *data
,
4448 unsigned long sizeof_data
,
4449 gdbarch_swap_ftype
*init
)
4451 struct gdbarch_swap_registration
**rego
;
4452 for (rego
= &gdbarch_swap_registry
.registrations
;
4454 rego
= &(*rego
)->next
);
4455 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4456 (*rego
)->next
= NULL
;
4457 (*rego
)->init
= init
;
4458 (*rego
)->data
= data
;
4459 (*rego
)->sizeof_data
= sizeof_data
;
4464 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4466 struct gdbarch_swap_registration
*rego
;
4467 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4468 for (rego
= gdbarch_swap_registry
.registrations
;
4472 if (rego
->data
!= NULL
)
4474 (*curr
) = XMALLOC (struct gdbarch_swap
);
4475 (*curr
)->source
= rego
;
4476 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4477 (*curr
)->next
= NULL
;
4478 memset (rego
->data
, 0, rego
->sizeof_data
);
4479 curr
= &(*curr
)->next
;
4481 if (rego
->init
!= NULL
)
4487 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4489 struct gdbarch_swap
*curr
;
4490 for (curr
= gdbarch
->swap
;
4493 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4497 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4499 struct gdbarch_swap
*curr
;
4500 for (curr
= gdbarch
->swap
;
4503 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4507 /* Keep a registry of the architectures known by GDB. */
4509 struct gdbarch_registration
4511 enum bfd_architecture bfd_architecture
;
4512 gdbarch_init_ftype
*init
;
4513 gdbarch_dump_tdep_ftype
*dump_tdep
;
4514 struct gdbarch_list
*arches
;
4515 struct gdbarch_registration
*next
;
4518 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4521 append_name (const char ***buf
, int *nr
, const char *name
)
4523 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4529 gdbarch_printable_names (void)
4533 /* Accumulate a list of names based on the registed list of
4535 enum bfd_architecture a
;
4537 const char **arches
= NULL
;
4538 struct gdbarch_registration
*rego
;
4539 for (rego
= gdbarch_registry
;
4543 const struct bfd_arch_info
*ap
;
4544 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4546 internal_error (__FILE__
, __LINE__
,
4547 "gdbarch_architecture_names: multi-arch unknown");
4550 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4555 append_name (&arches
, &nr_arches
, NULL
);
4559 /* Just return all the architectures that BFD knows. Assume that
4560 the legacy architecture framework supports them. */
4561 return bfd_arch_list ();
4566 gdbarch_register (enum bfd_architecture bfd_architecture
,
4567 gdbarch_init_ftype
*init
,
4568 gdbarch_dump_tdep_ftype
*dump_tdep
)
4570 struct gdbarch_registration
**curr
;
4571 const struct bfd_arch_info
*bfd_arch_info
;
4572 /* Check that BFD recognizes this architecture */
4573 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4574 if (bfd_arch_info
== NULL
)
4576 internal_error (__FILE__
, __LINE__
,
4577 "gdbarch: Attempt to register unknown architecture (%d)",
4580 /* Check that we haven't seen this architecture before */
4581 for (curr
= &gdbarch_registry
;
4583 curr
= &(*curr
)->next
)
4585 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4586 internal_error (__FILE__
, __LINE__
,
4587 "gdbarch: Duplicate registraration of architecture (%s)",
4588 bfd_arch_info
->printable_name
);
4592 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4593 bfd_arch_info
->printable_name
,
4596 (*curr
) = XMALLOC (struct gdbarch_registration
);
4597 (*curr
)->bfd_architecture
= bfd_architecture
;
4598 (*curr
)->init
= init
;
4599 (*curr
)->dump_tdep
= dump_tdep
;
4600 (*curr
)->arches
= NULL
;
4601 (*curr
)->next
= NULL
;
4602 /* When non- multi-arch, install whatever target dump routine we've
4603 been provided - hopefully that routine has been written correctly
4604 and works regardless of multi-arch. */
4605 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4606 && startup_gdbarch
.dump_tdep
== NULL
)
4607 startup_gdbarch
.dump_tdep
= dump_tdep
;
4611 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4612 gdbarch_init_ftype
*init
)
4614 gdbarch_register (bfd_architecture
, init
, NULL
);
4618 /* Look for an architecture using gdbarch_info. Base search on only
4619 BFD_ARCH_INFO and BYTE_ORDER. */
4621 struct gdbarch_list
*
4622 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4623 const struct gdbarch_info
*info
)
4625 for (; arches
!= NULL
; arches
= arches
->next
)
4627 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4629 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4637 /* Update the current architecture. Return ZERO if the update request
4641 gdbarch_update_p (struct gdbarch_info info
)
4643 struct gdbarch
*new_gdbarch
;
4644 struct gdbarch_list
**list
;
4645 struct gdbarch_registration
*rego
;
4647 /* Fill in missing parts of the INFO struct using a number of
4648 sources: ``set ...''; INFOabfd supplied; existing target. */
4650 /* ``(gdb) set architecture ...'' */
4651 if (info
.bfd_arch_info
== NULL
4652 && !TARGET_ARCHITECTURE_AUTO
)
4653 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4654 if (info
.bfd_arch_info
== NULL
4655 && info
.abfd
!= NULL
4656 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4657 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4658 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4659 if (info
.bfd_arch_info
== NULL
)
4660 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4662 /* ``(gdb) set byte-order ...'' */
4663 if (info
.byte_order
== 0
4664 && !TARGET_BYTE_ORDER_AUTO
)
4665 info
.byte_order
= TARGET_BYTE_ORDER
;
4666 /* From the INFO struct. */
4667 if (info
.byte_order
== 0
4668 && info
.abfd
!= NULL
)
4669 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4670 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4672 /* From the current target. */
4673 if (info
.byte_order
== 0)
4674 info
.byte_order
= TARGET_BYTE_ORDER
;
4676 /* Must have found some sort of architecture. */
4677 gdb_assert (info
.bfd_arch_info
!= NULL
);
4681 fprintf_unfiltered (gdb_stdlog
,
4682 "gdbarch_update: info.bfd_arch_info %s\n",
4683 (info
.bfd_arch_info
!= NULL
4684 ? info
.bfd_arch_info
->printable_name
4686 fprintf_unfiltered (gdb_stdlog
,
4687 "gdbarch_update: info.byte_order %d (%s)\n",
4689 (info
.byte_order
== BIG_ENDIAN
? "big"
4690 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4692 fprintf_unfiltered (gdb_stdlog
,
4693 "gdbarch_update: info.abfd 0x%lx\n",
4695 fprintf_unfiltered (gdb_stdlog
,
4696 "gdbarch_update: info.tdep_info 0x%lx\n",
4697 (long) info
.tdep_info
);
4700 /* Find the target that knows about this architecture. */
4701 for (rego
= gdbarch_registry
;
4704 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4713 /* Ask the target for a replacement architecture. */
4714 new_gdbarch
= rego
->init (info
, rego
->arches
);
4716 /* Did the target like it? No. Reject the change. */
4717 if (new_gdbarch
== NULL
)
4720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4724 /* Did the architecture change? No. Do nothing. */
4725 if (current_gdbarch
== new_gdbarch
)
4728 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4730 new_gdbarch
->bfd_arch_info
->printable_name
);
4734 /* Swap all data belonging to the old target out */
4735 swapout_gdbarch_swap (current_gdbarch
);
4737 /* Is this a pre-existing architecture? Yes. Swap it in. */
4738 for (list
= ®o
->arches
;
4740 list
= &(*list
)->next
)
4742 if ((*list
)->gdbarch
== new_gdbarch
)
4745 fprintf_unfiltered (gdb_stdlog
,
4746 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4748 new_gdbarch
->bfd_arch_info
->printable_name
);
4749 current_gdbarch
= new_gdbarch
;
4750 swapin_gdbarch_swap (new_gdbarch
);
4755 /* Append this new architecture to this targets list. */
4756 (*list
) = XMALLOC (struct gdbarch_list
);
4757 (*list
)->next
= NULL
;
4758 (*list
)->gdbarch
= new_gdbarch
;
4760 /* Switch to this new architecture. Dump it out. */
4761 current_gdbarch
= new_gdbarch
;
4764 fprintf_unfiltered (gdb_stdlog
,
4765 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4767 new_gdbarch
->bfd_arch_info
->printable_name
);
4770 /* Check that the newly installed architecture is valid. Plug in
4771 any post init values. */
4772 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4773 verify_gdbarch (new_gdbarch
);
4775 /* Initialize the per-architecture memory (swap) areas.
4776 CURRENT_GDBARCH must be update before these modules are
4778 init_gdbarch_swap (new_gdbarch
);
4780 /* Initialize the per-architecture data-pointer of all parties that
4781 registered an interest in this architecture. CURRENT_GDBARCH
4782 must be updated before these modules are called. */
4783 init_gdbarch_data (new_gdbarch
);
4786 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4794 /* Pointer to the target-dependent disassembly function. */
4795 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4796 disassemble_info tm_print_insn_info
;
4799 extern void _initialize_gdbarch (void);
4802 _initialize_gdbarch (void)
4804 struct cmd_list_element
*c
;
4806 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4807 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4808 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4809 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4810 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4812 add_show_from_set (add_set_cmd ("arch",
4815 (char *)&gdbarch_debug
,
4816 "Set architecture debugging.\n\
4817 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4819 c
= add_set_cmd ("archdebug",
4822 (char *)&gdbarch_debug
,
4823 "Set architecture debugging.\n\
4824 When non-zero, architecture debugging is enabled.", &setlist
);
4826 deprecate_cmd (c
, "set debug arch");
4827 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");