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
;
160 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
161 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
162 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
163 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
164 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
165 gdbarch_register_name_ftype
*register_name
;
168 gdbarch_register_byte_ftype
*register_byte
;
169 gdbarch_register_raw_size_ftype
*register_raw_size
;
170 int max_register_raw_size
;
171 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
172 int max_register_virtual_size
;
173 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
174 gdbarch_do_registers_info_ftype
*do_registers_info
;
175 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
176 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
177 int use_generic_dummy_frames
;
178 int call_dummy_location
;
179 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
180 CORE_ADDR call_dummy_start_offset
;
181 CORE_ADDR call_dummy_breakpoint_offset
;
182 int call_dummy_breakpoint_offset_p
;
183 int call_dummy_length
;
184 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
186 LONGEST
* call_dummy_words
;
187 int sizeof_call_dummy_words
;
188 int call_dummy_stack_adjust_p
;
189 int call_dummy_stack_adjust
;
190 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
191 int believe_pcc_promotion
;
192 int believe_pcc_promotion_type
;
193 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
194 gdbarch_get_saved_register_ftype
*get_saved_register
;
195 gdbarch_register_convertible_ftype
*register_convertible
;
196 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
197 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
198 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
199 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
200 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
201 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
202 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
203 gdbarch_extract_return_value_ftype
*extract_return_value
;
204 gdbarch_push_arguments_ftype
*push_arguments
;
205 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
206 gdbarch_push_return_address_ftype
*push_return_address
;
207 gdbarch_pop_frame_ftype
*pop_frame
;
208 gdbarch_d10v_make_daddr_ftype
*d10v_make_daddr
;
209 gdbarch_d10v_make_iaddr_ftype
*d10v_make_iaddr
;
210 gdbarch_d10v_daddr_p_ftype
*d10v_daddr_p
;
211 gdbarch_d10v_iaddr_p_ftype
*d10v_iaddr_p
;
212 gdbarch_d10v_convert_daddr_to_raw_ftype
*d10v_convert_daddr_to_raw
;
213 gdbarch_d10v_convert_iaddr_to_raw_ftype
*d10v_convert_iaddr_to_raw
;
214 gdbarch_store_struct_return_ftype
*store_struct_return
;
215 gdbarch_store_return_value_ftype
*store_return_value
;
216 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
217 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
218 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
219 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
220 gdbarch_skip_prologue_ftype
*skip_prologue
;
221 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
222 gdbarch_inner_than_ftype
*inner_than
;
223 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
224 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
225 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
226 CORE_ADDR decr_pc_after_break
;
227 CORE_ADDR function_start_offset
;
228 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
229 CORE_ADDR frame_args_skip
;
230 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
231 gdbarch_frame_chain_ftype
*frame_chain
;
232 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
233 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
234 gdbarch_frame_args_address_ftype
*frame_args_address
;
235 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
236 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
237 gdbarch_frame_num_args_ftype
*frame_num_args
;
238 gdbarch_stack_align_ftype
*stack_align
;
239 int extra_stack_alignment_needed
;
240 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
241 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
243 const struct floatformat
* float_format
;
244 const struct floatformat
* double_format
;
245 const struct floatformat
* long_double_format
;
246 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
250 /* The default architecture uses host values (for want of a better
253 extern const struct bfd_arch_info bfd_default_arch_struct
;
255 struct gdbarch startup_gdbarch
=
257 /* basic architecture information */
258 &bfd_default_arch_struct
,
260 /* target specific vector and its dump routine */
262 /*per-architecture data-pointers and swap regions */
264 /* Multi-arch values */
268 8 * sizeof (LONGEST
),
271 8 * sizeof (long double),
324 generic_get_saved_register
,
377 /* startup_gdbarch() */
380 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
383 /* Create a new ``struct gdbarch'' based on information provided by
384 ``struct gdbarch_info''. */
387 gdbarch_alloc (const struct gdbarch_info
*info
,
388 struct gdbarch_tdep
*tdep
)
390 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
391 memset (gdbarch
, 0, sizeof (*gdbarch
));
393 alloc_gdbarch_data (gdbarch
);
395 gdbarch
->tdep
= tdep
;
397 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
398 gdbarch
->byte_order
= info
->byte_order
;
400 /* Force the explicit initialization of these. */
401 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
402 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
403 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
404 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
405 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
406 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
407 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
408 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
409 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
410 gdbarch
->read_pc
= generic_target_read_pc
;
411 gdbarch
->write_pc
= generic_target_write_pc
;
412 gdbarch
->read_fp
= generic_target_read_fp
;
413 gdbarch
->write_fp
= generic_target_write_fp
;
414 gdbarch
->read_sp
= generic_target_read_sp
;
415 gdbarch
->write_sp
= generic_target_write_sp
;
416 gdbarch
->num_regs
= -1;
417 gdbarch
->sp_regnum
= -1;
418 gdbarch
->fp_regnum
= -1;
419 gdbarch
->pc_regnum
= -1;
420 gdbarch
->fp0_regnum
= -1;
421 gdbarch
->npc_regnum
= -1;
422 gdbarch
->nnpc_regnum
= -1;
423 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
424 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
425 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
426 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
427 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
428 gdbarch
->register_name
= legacy_register_name
;
429 gdbarch
->register_size
= -1;
430 gdbarch
->register_bytes
= -1;
431 gdbarch
->max_register_raw_size
= -1;
432 gdbarch
->max_register_virtual_size
= -1;
433 gdbarch
->do_registers_info
= do_registers_info
;
434 gdbarch
->register_sim_regno
= default_register_sim_regno
;
435 gdbarch
->use_generic_dummy_frames
= -1;
436 gdbarch
->call_dummy_start_offset
= -1;
437 gdbarch
->call_dummy_breakpoint_offset
= -1;
438 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
439 gdbarch
->call_dummy_length
= -1;
440 gdbarch
->call_dummy_p
= -1;
441 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
442 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
443 gdbarch
->call_dummy_stack_adjust_p
= -1;
444 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
445 gdbarch
->register_convertible
= generic_register_convertible_not
;
446 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
447 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
448 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
449 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
450 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
451 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
452 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
453 gdbarch
->decr_pc_after_break
= -1;
454 gdbarch
->function_start_offset
= -1;
455 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
456 gdbarch
->frame_args_skip
= -1;
457 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
458 gdbarch
->extra_stack_alignment_needed
= 1;
459 gdbarch
->convert_from_func_ptr_addr
= default_convert_from_func_ptr_addr
;
460 /* gdbarch_alloc() */
466 /* Free a gdbarch struct. This should never happen in normal
467 operation --- once you've created a gdbarch, you keep it around.
468 However, if an architecture's init function encounters an error
469 building the structure, it may need to clean up a partially
470 constructed gdbarch. */
473 gdbarch_free (struct gdbarch
*arch
)
475 gdb_assert (arch
!= NULL
);
476 free_gdbarch_data (arch
);
481 /* Ensure that all values in a GDBARCH are reasonable. */
484 verify_gdbarch (struct gdbarch
*gdbarch
)
486 /* Only perform sanity checks on a multi-arch target. */
490 if (gdbarch
->byte_order
== 0)
491 internal_error (__FILE__
, __LINE__
,
492 "verify_gdbarch: byte-order unset");
493 if (gdbarch
->bfd_arch_info
== NULL
)
494 internal_error (__FILE__
, __LINE__
,
495 "verify_gdbarch: bfd_arch_info unset");
496 /* Check those that need to be defined for the given multi-arch level. */
497 /* Skip verify of short_bit, invalid_p == 0 */
498 /* Skip verify of int_bit, invalid_p == 0 */
499 /* Skip verify of long_bit, invalid_p == 0 */
500 /* Skip verify of long_long_bit, invalid_p == 0 */
501 /* Skip verify of float_bit, invalid_p == 0 */
502 /* Skip verify of double_bit, invalid_p == 0 */
503 /* Skip verify of long_double_bit, invalid_p == 0 */
504 /* Skip verify of ptr_bit, invalid_p == 0 */
505 if (gdbarch
->addr_bit
== 0)
506 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
507 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
508 /* Skip verify of ieee_float, invalid_p == 0 */
509 /* Skip verify of read_pc, invalid_p == 0 */
510 /* Skip verify of write_pc, invalid_p == 0 */
511 /* Skip verify of read_fp, invalid_p == 0 */
512 /* Skip verify of write_fp, invalid_p == 0 */
513 /* Skip verify of read_sp, invalid_p == 0 */
514 /* Skip verify of write_sp, invalid_p == 0 */
515 if ((GDB_MULTI_ARCH
>= 2)
516 && (gdbarch
->num_regs
== -1))
517 internal_error (__FILE__
, __LINE__
,
518 "gdbarch: verify_gdbarch: num_regs invalid");
519 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
520 if ((GDB_MULTI_ARCH
>= 2)
521 && (gdbarch
->sp_regnum
== -1))
522 internal_error (__FILE__
, __LINE__
,
523 "gdbarch: verify_gdbarch: sp_regnum invalid");
524 if ((GDB_MULTI_ARCH
>= 2)
525 && (gdbarch
->fp_regnum
== -1))
526 internal_error (__FILE__
, __LINE__
,
527 "gdbarch: verify_gdbarch: fp_regnum invalid");
528 if ((GDB_MULTI_ARCH
>= 2)
529 && (gdbarch
->pc_regnum
== -1))
530 internal_error (__FILE__
, __LINE__
,
531 "gdbarch: verify_gdbarch: pc_regnum invalid");
532 /* Skip verify of fp0_regnum, invalid_p == 0 */
533 /* Skip verify of npc_regnum, invalid_p == 0 */
534 /* Skip verify of nnpc_regnum, invalid_p == 0 */
535 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
536 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
537 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
538 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
539 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
540 /* Skip verify of register_name, invalid_p == 0 */
541 if ((GDB_MULTI_ARCH
>= 2)
542 && (gdbarch
->register_size
== -1))
543 internal_error (__FILE__
, __LINE__
,
544 "gdbarch: verify_gdbarch: register_size invalid");
545 if ((GDB_MULTI_ARCH
>= 2)
546 && (gdbarch
->register_bytes
== -1))
547 internal_error (__FILE__
, __LINE__
,
548 "gdbarch: verify_gdbarch: register_bytes invalid");
549 if ((GDB_MULTI_ARCH
>= 2)
550 && (gdbarch
->register_byte
== 0))
551 internal_error (__FILE__
, __LINE__
,
552 "gdbarch: verify_gdbarch: register_byte invalid");
553 if ((GDB_MULTI_ARCH
>= 2)
554 && (gdbarch
->register_raw_size
== 0))
555 internal_error (__FILE__
, __LINE__
,
556 "gdbarch: verify_gdbarch: register_raw_size invalid");
557 if ((GDB_MULTI_ARCH
>= 2)
558 && (gdbarch
->max_register_raw_size
== -1))
559 internal_error (__FILE__
, __LINE__
,
560 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
561 if ((GDB_MULTI_ARCH
>= 2)
562 && (gdbarch
->register_virtual_size
== 0))
563 internal_error (__FILE__
, __LINE__
,
564 "gdbarch: verify_gdbarch: register_virtual_size invalid");
565 if ((GDB_MULTI_ARCH
>= 2)
566 && (gdbarch
->max_register_virtual_size
== -1))
567 internal_error (__FILE__
, __LINE__
,
568 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
569 if ((GDB_MULTI_ARCH
>= 2)
570 && (gdbarch
->register_virtual_type
== 0))
571 internal_error (__FILE__
, __LINE__
,
572 "gdbarch: verify_gdbarch: register_virtual_type invalid");
573 /* Skip verify of do_registers_info, invalid_p == 0 */
574 /* Skip verify of register_sim_regno, invalid_p == 0 */
575 /* Skip verify of register_bytes_ok, has predicate */
576 if ((GDB_MULTI_ARCH
>= 1)
577 && (gdbarch
->use_generic_dummy_frames
== -1))
578 internal_error (__FILE__
, __LINE__
,
579 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
580 if ((GDB_MULTI_ARCH
>= 2)
581 && (gdbarch
->call_dummy_location
== 0))
582 internal_error (__FILE__
, __LINE__
,
583 "gdbarch: verify_gdbarch: call_dummy_location invalid");
584 if ((GDB_MULTI_ARCH
>= 2)
585 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
586 internal_error (__FILE__
, __LINE__
,
587 "gdbarch: verify_gdbarch: call_dummy_address invalid");
588 if ((GDB_MULTI_ARCH
>= 2)
589 && (gdbarch
->call_dummy_start_offset
== -1))
590 internal_error (__FILE__
, __LINE__
,
591 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
592 if ((GDB_MULTI_ARCH
>= 2)
593 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
594 internal_error (__FILE__
, __LINE__
,
595 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
596 if ((GDB_MULTI_ARCH
>= 1)
597 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
598 internal_error (__FILE__
, __LINE__
,
599 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
600 if ((GDB_MULTI_ARCH
>= 2)
601 && (gdbarch
->call_dummy_length
== -1))
602 internal_error (__FILE__
, __LINE__
,
603 "gdbarch: verify_gdbarch: call_dummy_length invalid");
604 if ((GDB_MULTI_ARCH
>= 2)
605 && (gdbarch
->pc_in_call_dummy
== 0))
606 internal_error (__FILE__
, __LINE__
,
607 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
608 if ((GDB_MULTI_ARCH
>= 1)
609 && (gdbarch
->call_dummy_p
== -1))
610 internal_error (__FILE__
, __LINE__
,
611 "gdbarch: verify_gdbarch: call_dummy_p invalid");
612 /* Skip verify of call_dummy_words, invalid_p == 0 */
613 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
614 if ((GDB_MULTI_ARCH
>= 1)
615 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
616 internal_error (__FILE__
, __LINE__
,
617 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
618 if ((GDB_MULTI_ARCH
>= 2)
619 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
620 internal_error (__FILE__
, __LINE__
,
621 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
622 if ((GDB_MULTI_ARCH
>= 2)
623 && (gdbarch
->fix_call_dummy
== 0))
624 internal_error (__FILE__
, __LINE__
,
625 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
626 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
627 if ((GDB_MULTI_ARCH
>= 1)
628 && (gdbarch
->get_saved_register
== 0))
629 internal_error (__FILE__
, __LINE__
,
630 "gdbarch: verify_gdbarch: get_saved_register invalid");
631 /* Skip verify of register_convertible, invalid_p == 0 */
632 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
633 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
634 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
635 /* Skip verify of store_pseudo_register, invalid_p == 0 */
636 /* Skip verify of pointer_to_address, invalid_p == 0 */
637 /* Skip verify of address_to_pointer, invalid_p == 0 */
638 /* Skip verify of return_value_on_stack, invalid_p == 0 */
639 if ((GDB_MULTI_ARCH
>= 2)
640 && (gdbarch
->extract_return_value
== 0))
641 internal_error (__FILE__
, __LINE__
,
642 "gdbarch: verify_gdbarch: extract_return_value invalid");
643 if ((GDB_MULTI_ARCH
>= 1)
644 && (gdbarch
->push_arguments
== 0))
645 internal_error (__FILE__
, __LINE__
,
646 "gdbarch: verify_gdbarch: push_arguments invalid");
647 if ((GDB_MULTI_ARCH
>= 2)
648 && (gdbarch
->push_dummy_frame
== 0))
649 internal_error (__FILE__
, __LINE__
,
650 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
651 if ((GDB_MULTI_ARCH
>= 1)
652 && (gdbarch
->push_return_address
== 0))
653 internal_error (__FILE__
, __LINE__
,
654 "gdbarch: verify_gdbarch: push_return_address invalid");
655 if ((GDB_MULTI_ARCH
>= 2)
656 && (gdbarch
->pop_frame
== 0))
657 internal_error (__FILE__
, __LINE__
,
658 "gdbarch: verify_gdbarch: pop_frame invalid");
659 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
660 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
661 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
662 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
663 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
664 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
665 if ((GDB_MULTI_ARCH
>= 2)
666 && (gdbarch
->store_struct_return
== 0))
667 internal_error (__FILE__
, __LINE__
,
668 "gdbarch: verify_gdbarch: store_struct_return invalid");
669 if ((GDB_MULTI_ARCH
>= 2)
670 && (gdbarch
->store_return_value
== 0))
671 internal_error (__FILE__
, __LINE__
,
672 "gdbarch: verify_gdbarch: store_return_value invalid");
673 if ((GDB_MULTI_ARCH
>= 2)
674 && (gdbarch
->extract_struct_value_address
== 0))
675 internal_error (__FILE__
, __LINE__
,
676 "gdbarch: verify_gdbarch: extract_struct_value_address invalid");
677 if ((GDB_MULTI_ARCH
>= 2)
678 && (gdbarch
->use_struct_convention
== 0))
679 internal_error (__FILE__
, __LINE__
,
680 "gdbarch: verify_gdbarch: use_struct_convention invalid");
681 if ((GDB_MULTI_ARCH
>= 2)
682 && (gdbarch
->frame_init_saved_regs
== 0))
683 internal_error (__FILE__
, __LINE__
,
684 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
685 if ((GDB_MULTI_ARCH
>= 2)
686 && (gdbarch
->init_extra_frame_info
== 0))
687 internal_error (__FILE__
, __LINE__
,
688 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
689 if ((GDB_MULTI_ARCH
>= 2)
690 && (gdbarch
->skip_prologue
== 0))
691 internal_error (__FILE__
, __LINE__
,
692 "gdbarch: verify_gdbarch: skip_prologue invalid");
693 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
694 if ((GDB_MULTI_ARCH
>= 2)
695 && (gdbarch
->inner_than
== 0))
696 internal_error (__FILE__
, __LINE__
,
697 "gdbarch: verify_gdbarch: inner_than invalid");
698 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
699 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
700 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
701 if ((GDB_MULTI_ARCH
>= 2)
702 && (gdbarch
->decr_pc_after_break
== -1))
703 internal_error (__FILE__
, __LINE__
,
704 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
705 if ((GDB_MULTI_ARCH
>= 2)
706 && (gdbarch
->function_start_offset
== -1))
707 internal_error (__FILE__
, __LINE__
,
708 "gdbarch: verify_gdbarch: function_start_offset invalid");
709 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
710 if ((GDB_MULTI_ARCH
>= 2)
711 && (gdbarch
->frame_args_skip
== -1))
712 internal_error (__FILE__
, __LINE__
,
713 "gdbarch: verify_gdbarch: frame_args_skip invalid");
714 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
715 if ((GDB_MULTI_ARCH
>= 2)
716 && (gdbarch
->frame_chain
== 0))
717 internal_error (__FILE__
, __LINE__
,
718 "gdbarch: verify_gdbarch: frame_chain invalid");
719 if ((GDB_MULTI_ARCH
>= 1)
720 && (gdbarch
->frame_chain_valid
== 0))
721 internal_error (__FILE__
, __LINE__
,
722 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
723 if ((GDB_MULTI_ARCH
>= 2)
724 && (gdbarch
->frame_saved_pc
== 0))
725 internal_error (__FILE__
, __LINE__
,
726 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
727 if ((GDB_MULTI_ARCH
>= 2)
728 && (gdbarch
->frame_args_address
== 0))
729 internal_error (__FILE__
, __LINE__
,
730 "gdbarch: verify_gdbarch: frame_args_address invalid");
731 if ((GDB_MULTI_ARCH
>= 2)
732 && (gdbarch
->frame_locals_address
== 0))
733 internal_error (__FILE__
, __LINE__
,
734 "gdbarch: verify_gdbarch: frame_locals_address invalid");
735 if ((GDB_MULTI_ARCH
>= 2)
736 && (gdbarch
->saved_pc_after_call
== 0))
737 internal_error (__FILE__
, __LINE__
,
738 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
739 if ((GDB_MULTI_ARCH
>= 2)
740 && (gdbarch
->frame_num_args
== 0))
741 internal_error (__FILE__
, __LINE__
,
742 "gdbarch: verify_gdbarch: frame_num_args invalid");
743 /* Skip verify of stack_align, has predicate */
744 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
745 /* Skip verify of reg_struct_has_addr, has predicate */
746 /* Skip verify of save_dummy_frame_tos, has predicate */
747 if (gdbarch
->float_format
== 0)
748 gdbarch
->float_format
= default_float_format (gdbarch
);
749 if (gdbarch
->double_format
== 0)
750 gdbarch
->double_format
= default_double_format (gdbarch
);
751 if (gdbarch
->long_double_format
== 0)
752 gdbarch
->long_double_format
= &floatformat_unknown
;
753 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
757 /* Print out the details of the current architecture. */
759 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
760 just happens to match the global variable ``current_gdbarch''. That
761 way macros refering to that variable get the local and not the global
762 version - ulgh. Once everything is parameterised with gdbarch, this
766 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
768 fprintf_unfiltered (file
,
769 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
771 #ifdef TARGET_ARCHITECTURE
772 fprintf_unfiltered (file
,
773 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
774 XSTRING (TARGET_ARCHITECTURE
));
776 #ifdef TARGET_BYTE_ORDER
777 fprintf_unfiltered (file
,
778 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
779 XSTRING (TARGET_BYTE_ORDER
));
781 #ifdef TARGET_SHORT_BIT
782 fprintf_unfiltered (file
,
783 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
784 XSTRING (TARGET_SHORT_BIT
));
786 #ifdef TARGET_INT_BIT
787 fprintf_unfiltered (file
,
788 "gdbarch_dump: TARGET_INT_BIT # %s\n",
789 XSTRING (TARGET_INT_BIT
));
791 #ifdef TARGET_LONG_BIT
792 fprintf_unfiltered (file
,
793 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
794 XSTRING (TARGET_LONG_BIT
));
796 #ifdef TARGET_LONG_LONG_BIT
797 fprintf_unfiltered (file
,
798 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
799 XSTRING (TARGET_LONG_LONG_BIT
));
801 #ifdef TARGET_FLOAT_BIT
802 fprintf_unfiltered (file
,
803 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
804 XSTRING (TARGET_FLOAT_BIT
));
806 #ifdef TARGET_DOUBLE_BIT
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
809 XSTRING (TARGET_DOUBLE_BIT
));
811 #ifdef TARGET_LONG_DOUBLE_BIT
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
814 XSTRING (TARGET_LONG_DOUBLE_BIT
));
816 #ifdef TARGET_PTR_BIT
817 fprintf_unfiltered (file
,
818 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
819 XSTRING (TARGET_PTR_BIT
));
821 #ifdef TARGET_ADDR_BIT
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
824 XSTRING (TARGET_ADDR_BIT
));
826 #ifdef TARGET_BFD_VMA_BIT
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
829 XSTRING (TARGET_BFD_VMA_BIT
));
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: IEEE_FLOAT # %s\n",
834 XSTRING (IEEE_FLOAT
));
836 #ifdef TARGET_READ_PC
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: %s # %s\n",
839 "TARGET_READ_PC(pid)",
840 XSTRING (TARGET_READ_PC (pid
)));
842 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
843 /* Macro might contain `[{}]' when not multi-arch */
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: %s # %s\n",
846 "TARGET_WRITE_PC(val, pid)",
847 XSTRING (TARGET_WRITE_PC (val
, pid
)));
849 #ifdef TARGET_READ_FP
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: %s # %s\n",
853 XSTRING (TARGET_READ_FP ()));
855 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
856 /* Macro might contain `[{}]' when not multi-arch */
857 fprintf_unfiltered (file
,
858 "gdbarch_dump: %s # %s\n",
859 "TARGET_WRITE_FP(val)",
860 XSTRING (TARGET_WRITE_FP (val
)));
862 #ifdef TARGET_READ_SP
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: %s # %s\n",
866 XSTRING (TARGET_READ_SP ()));
868 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
869 /* Macro might contain `[{}]' when not multi-arch */
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: %s # %s\n",
872 "TARGET_WRITE_SP(val)",
873 XSTRING (TARGET_WRITE_SP (val
)));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: NUM_REGS # %s\n",
880 #ifdef NUM_PSEUDO_REGS
881 fprintf_unfiltered (file
,
882 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
883 XSTRING (NUM_PSEUDO_REGS
));
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: SP_REGNUM # %s\n",
888 XSTRING (SP_REGNUM
));
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: FP_REGNUM # %s\n",
893 XSTRING (FP_REGNUM
));
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: PC_REGNUM # %s\n",
898 XSTRING (PC_REGNUM
));
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: FP0_REGNUM # %s\n",
903 XSTRING (FP0_REGNUM
));
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: NPC_REGNUM # %s\n",
908 XSTRING (NPC_REGNUM
));
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: NNPC_REGNUM # %s\n",
913 XSTRING (NNPC_REGNUM
));
915 #ifdef STAB_REG_TO_REGNUM
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: %s # %s\n",
918 "STAB_REG_TO_REGNUM(stab_regnr)",
919 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
921 #ifdef ECOFF_REG_TO_REGNUM
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: %s # %s\n",
924 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
925 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
927 #ifdef DWARF_REG_TO_REGNUM
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: %s # %s\n",
930 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
931 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
933 #ifdef SDB_REG_TO_REGNUM
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: %s # %s\n",
936 "SDB_REG_TO_REGNUM(sdb_regnr)",
937 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
939 #ifdef DWARF2_REG_TO_REGNUM
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: %s # %s\n",
942 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
943 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
946 fprintf_unfiltered (file
,
947 "gdbarch_dump: %s # %s\n",
948 "REGISTER_NAME(regnr)",
949 XSTRING (REGISTER_NAME (regnr
)));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: REGISTER_SIZE # %s\n",
954 XSTRING (REGISTER_SIZE
));
956 #ifdef REGISTER_BYTES
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: REGISTER_BYTES # %s\n",
959 XSTRING (REGISTER_BYTES
));
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: %s # %s\n",
964 "REGISTER_BYTE(reg_nr)",
965 XSTRING (REGISTER_BYTE (reg_nr
)));
967 #ifdef REGISTER_RAW_SIZE
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: %s # %s\n",
970 "REGISTER_RAW_SIZE(reg_nr)",
971 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
973 #ifdef MAX_REGISTER_RAW_SIZE
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
976 XSTRING (MAX_REGISTER_RAW_SIZE
));
978 #ifdef REGISTER_VIRTUAL_SIZE
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: %s # %s\n",
981 "REGISTER_VIRTUAL_SIZE(reg_nr)",
982 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
984 #ifdef MAX_REGISTER_VIRTUAL_SIZE
985 fprintf_unfiltered (file
,
986 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
987 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
989 #ifdef REGISTER_VIRTUAL_TYPE
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: %s # %s\n",
992 "REGISTER_VIRTUAL_TYPE(reg_nr)",
993 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
995 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
996 /* Macro might contain `[{}]' when not multi-arch */
997 fprintf_unfiltered (file
,
998 "gdbarch_dump: %s # %s\n",
999 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1000 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1002 #ifdef REGISTER_SIM_REGNO
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: %s # %s\n",
1005 "REGISTER_SIM_REGNO(reg_nr)",
1006 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1008 #ifdef REGISTER_BYTES_OK
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: %s # %s\n",
1011 "REGISTER_BYTES_OK(nr_bytes)",
1012 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1014 #ifdef USE_GENERIC_DUMMY_FRAMES
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1017 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1019 #ifdef CALL_DUMMY_LOCATION
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1022 XSTRING (CALL_DUMMY_LOCATION
));
1024 #ifdef CALL_DUMMY_ADDRESS
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: %s # %s\n",
1027 "CALL_DUMMY_ADDRESS()",
1028 XSTRING (CALL_DUMMY_ADDRESS ()));
1030 #ifdef CALL_DUMMY_START_OFFSET
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1033 XSTRING (CALL_DUMMY_START_OFFSET
));
1035 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1038 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1040 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1043 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1045 #ifdef CALL_DUMMY_LENGTH
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1048 XSTRING (CALL_DUMMY_LENGTH
));
1050 #ifdef PC_IN_CALL_DUMMY
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: %s # %s\n",
1053 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1054 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1057 fprintf_unfiltered (file
,
1058 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1059 XSTRING (CALL_DUMMY_P
));
1061 #ifdef CALL_DUMMY_WORDS
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1064 XSTRING (CALL_DUMMY_WORDS
));
1066 #ifdef SIZEOF_CALL_DUMMY_WORDS
1067 fprintf_unfiltered (file
,
1068 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1069 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1071 #ifdef CALL_DUMMY_STACK_ADJUST_P
1072 fprintf_unfiltered (file
,
1073 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1074 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1076 #ifdef CALL_DUMMY_STACK_ADJUST
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1079 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1081 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1082 /* Macro might contain `[{}]' when not multi-arch */
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: %s # %s\n",
1085 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1086 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1088 #ifdef BELIEVE_PCC_PROMOTION
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1091 XSTRING (BELIEVE_PCC_PROMOTION
));
1093 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1096 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1098 #ifdef COERCE_FLOAT_TO_DOUBLE
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: %s # %s\n",
1101 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1102 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1104 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1105 /* Macro might contain `[{}]' when not multi-arch */
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: %s # %s\n",
1108 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1109 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1111 #ifdef REGISTER_CONVERTIBLE
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: %s # %s\n",
1114 "REGISTER_CONVERTIBLE(nr)",
1115 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1117 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1118 /* Macro might contain `[{}]' when not multi-arch */
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: %s # %s\n",
1121 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1122 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1124 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1125 /* Macro might contain `[{}]' when not multi-arch */
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: %s # %s\n",
1128 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1129 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1131 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1132 /* Macro might contain `[{}]' when not multi-arch */
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: %s # %s\n",
1135 "FETCH_PSEUDO_REGISTER(regnum)",
1136 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1138 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1139 /* Macro might contain `[{}]' when not multi-arch */
1140 fprintf_unfiltered (file
,
1141 "gdbarch_dump: %s # %s\n",
1142 "STORE_PSEUDO_REGISTER(regnum)",
1143 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1145 #ifdef POINTER_TO_ADDRESS
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: %s # %s\n",
1148 "POINTER_TO_ADDRESS(type, buf)",
1149 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1151 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1152 /* Macro might contain `[{}]' when not multi-arch */
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: %s # %s\n",
1155 "ADDRESS_TO_POINTER(type, buf, addr)",
1156 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1158 #ifdef RETURN_VALUE_ON_STACK
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: %s # %s\n",
1161 "RETURN_VALUE_ON_STACK(type)",
1162 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1164 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1165 /* Macro might contain `[{}]' when not multi-arch */
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: %s # %s\n",
1168 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1169 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1171 #ifdef PUSH_ARGUMENTS
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: %s # %s\n",
1174 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1175 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1177 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1178 /* Macro might contain `[{}]' when not multi-arch */
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: %s # %s\n",
1181 "PUSH_DUMMY_FRAME(-)",
1182 XSTRING (PUSH_DUMMY_FRAME (-)));
1184 #ifdef PUSH_RETURN_ADDRESS
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: %s # %s\n",
1187 "PUSH_RETURN_ADDRESS(pc, sp)",
1188 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1190 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1191 /* Macro might contain `[{}]' when not multi-arch */
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: %s # %s\n",
1195 XSTRING (POP_FRAME (-)));
1197 #ifdef D10V_MAKE_DADDR
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: %s # %s\n",
1200 "D10V_MAKE_DADDR(x)",
1201 XSTRING (D10V_MAKE_DADDR (x
)));
1203 #ifdef D10V_MAKE_IADDR
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: %s # %s\n",
1206 "D10V_MAKE_IADDR(x)",
1207 XSTRING (D10V_MAKE_IADDR (x
)));
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: %s # %s\n",
1213 XSTRING (D10V_DADDR_P (x
)));
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: %s # %s\n",
1219 XSTRING (D10V_IADDR_P (x
)));
1221 #ifdef D10V_CONVERT_DADDR_TO_RAW
1222 fprintf_unfiltered (file
,
1223 "gdbarch_dump: %s # %s\n",
1224 "D10V_CONVERT_DADDR_TO_RAW(x)",
1225 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1227 #ifdef D10V_CONVERT_IADDR_TO_RAW
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: %s # %s\n",
1230 "D10V_CONVERT_IADDR_TO_RAW(x)",
1231 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1233 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1234 /* Macro might contain `[{}]' when not multi-arch */
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: %s # %s\n",
1237 "STORE_STRUCT_RETURN(addr, sp)",
1238 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1240 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1241 /* Macro might contain `[{}]' when not multi-arch */
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: %s # %s\n",
1244 "STORE_RETURN_VALUE(type, valbuf)",
1245 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1247 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: %s # %s\n",
1250 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1251 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1253 #ifdef USE_STRUCT_CONVENTION
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: %s # %s\n",
1256 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1257 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1259 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1260 /* Macro might contain `[{}]' when not multi-arch */
1261 fprintf_unfiltered (file
,
1262 "gdbarch_dump: %s # %s\n",
1263 "FRAME_INIT_SAVED_REGS(frame)",
1264 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1266 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1267 /* Macro might contain `[{}]' when not multi-arch */
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: %s # %s\n",
1270 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1271 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1273 #ifdef SKIP_PROLOGUE
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: %s # %s\n",
1276 "SKIP_PROLOGUE(ip)",
1277 XSTRING (SKIP_PROLOGUE (ip
)));
1279 #ifdef PROLOGUE_FRAMELESS_P
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: %s # %s\n",
1282 "PROLOGUE_FRAMELESS_P(ip)",
1283 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1286 fprintf_unfiltered (file
,
1287 "gdbarch_dump: %s # %s\n",
1288 "INNER_THAN(lhs, rhs)",
1289 XSTRING (INNER_THAN (lhs
, rhs
)));
1291 #ifdef BREAKPOINT_FROM_PC
1292 fprintf_unfiltered (file
,
1293 "gdbarch_dump: %s # %s\n",
1294 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1295 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1297 #ifdef MEMORY_INSERT_BREAKPOINT
1298 fprintf_unfiltered (file
,
1299 "gdbarch_dump: %s # %s\n",
1300 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1301 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1303 #ifdef MEMORY_REMOVE_BREAKPOINT
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: %s # %s\n",
1306 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1307 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1309 #ifdef DECR_PC_AFTER_BREAK
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1312 XSTRING (DECR_PC_AFTER_BREAK
));
1314 #ifdef FUNCTION_START_OFFSET
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1317 XSTRING (FUNCTION_START_OFFSET
));
1319 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1320 /* Macro might contain `[{}]' when not multi-arch */
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: %s # %s\n",
1323 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1324 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1326 #ifdef FRAME_ARGS_SKIP
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1329 XSTRING (FRAME_ARGS_SKIP
));
1331 #ifdef FRAMELESS_FUNCTION_INVOCATION
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: %s # %s\n",
1334 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1335 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: %s # %s\n",
1340 "FRAME_CHAIN(frame)",
1341 XSTRING (FRAME_CHAIN (frame
)));
1343 #ifdef FRAME_CHAIN_VALID
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: %s # %s\n",
1346 "FRAME_CHAIN_VALID(chain, thisframe)",
1347 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1349 #ifdef FRAME_SAVED_PC
1350 fprintf_unfiltered (file
,
1351 "gdbarch_dump: %s # %s\n",
1352 "FRAME_SAVED_PC(fi)",
1353 XSTRING (FRAME_SAVED_PC (fi
)));
1355 #ifdef FRAME_ARGS_ADDRESS
1356 fprintf_unfiltered (file
,
1357 "gdbarch_dump: %s # %s\n",
1358 "FRAME_ARGS_ADDRESS(fi)",
1359 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1361 #ifdef FRAME_LOCALS_ADDRESS
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: %s # %s\n",
1364 "FRAME_LOCALS_ADDRESS(fi)",
1365 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1367 #ifdef SAVED_PC_AFTER_CALL
1368 fprintf_unfiltered (file
,
1369 "gdbarch_dump: %s # %s\n",
1370 "SAVED_PC_AFTER_CALL(frame)",
1371 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1373 #ifdef FRAME_NUM_ARGS
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: %s # %s\n",
1376 "FRAME_NUM_ARGS(frame)",
1377 XSTRING (FRAME_NUM_ARGS (frame
)));
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: %s # %s\n",
1383 XSTRING (STACK_ALIGN (sp
)));
1385 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1388 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1390 #ifdef REG_STRUCT_HAS_ADDR
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: %s # %s\n",
1393 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1394 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1396 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1397 /* Macro might contain `[{}]' when not multi-arch */
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: %s # %s\n",
1400 "SAVE_DUMMY_FRAME_TOS(sp)",
1401 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1403 #ifdef PARM_BOUNDARY
1404 fprintf_unfiltered (file
,
1405 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1406 XSTRING (PARM_BOUNDARY
));
1408 #ifdef TARGET_FLOAT_FORMAT
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1411 XSTRING (TARGET_FLOAT_FORMAT
));
1413 #ifdef TARGET_DOUBLE_FORMAT
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1416 XSTRING (TARGET_DOUBLE_FORMAT
));
1418 #ifdef TARGET_LONG_DOUBLE_FORMAT
1419 fprintf_unfiltered (file
,
1420 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1421 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1423 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: %s # %s\n",
1426 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1427 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1429 #ifdef TARGET_ARCHITECTURE
1430 if (TARGET_ARCHITECTURE
!= NULL
)
1431 fprintf_unfiltered (file
,
1432 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1433 TARGET_ARCHITECTURE
->printable_name
);
1435 #ifdef TARGET_BYTE_ORDER
1436 fprintf_unfiltered (file
,
1437 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1438 (long) TARGET_BYTE_ORDER
);
1440 #ifdef TARGET_SHORT_BIT
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1443 (long) TARGET_SHORT_BIT
);
1445 #ifdef TARGET_INT_BIT
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1448 (long) TARGET_INT_BIT
);
1450 #ifdef TARGET_LONG_BIT
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1453 (long) TARGET_LONG_BIT
);
1455 #ifdef TARGET_LONG_LONG_BIT
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1458 (long) TARGET_LONG_LONG_BIT
);
1460 #ifdef TARGET_FLOAT_BIT
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1463 (long) TARGET_FLOAT_BIT
);
1465 #ifdef TARGET_DOUBLE_BIT
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1468 (long) TARGET_DOUBLE_BIT
);
1470 #ifdef TARGET_LONG_DOUBLE_BIT
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1473 (long) TARGET_LONG_DOUBLE_BIT
);
1475 #ifdef TARGET_PTR_BIT
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1478 (long) TARGET_PTR_BIT
);
1480 #ifdef TARGET_ADDR_BIT
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1483 (long) TARGET_ADDR_BIT
);
1485 #ifdef TARGET_BFD_VMA_BIT
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1488 (long) TARGET_BFD_VMA_BIT
);
1491 fprintf_unfiltered (file
,
1492 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1495 #ifdef TARGET_READ_PC
1497 fprintf_unfiltered (file
,
1498 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1499 (long) current_gdbarch
->read_pc
1500 /*TARGET_READ_PC ()*/);
1502 #ifdef TARGET_WRITE_PC
1504 fprintf_unfiltered (file
,
1505 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1506 (long) current_gdbarch
->write_pc
1507 /*TARGET_WRITE_PC ()*/);
1509 #ifdef TARGET_READ_FP
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1513 (long) current_gdbarch
->read_fp
1514 /*TARGET_READ_FP ()*/);
1516 #ifdef TARGET_WRITE_FP
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1520 (long) current_gdbarch
->write_fp
1521 /*TARGET_WRITE_FP ()*/);
1523 #ifdef TARGET_READ_SP
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1527 (long) current_gdbarch
->read_sp
1528 /*TARGET_READ_SP ()*/);
1530 #ifdef TARGET_WRITE_SP
1532 fprintf_unfiltered (file
,
1533 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1534 (long) current_gdbarch
->write_sp
1535 /*TARGET_WRITE_SP ()*/);
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: NUM_REGS = %ld\n",
1542 #ifdef NUM_PSEUDO_REGS
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1545 (long) NUM_PSEUDO_REGS
);
1548 fprintf_unfiltered (file
,
1549 "gdbarch_dump: SP_REGNUM = %ld\n",
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: FP_REGNUM = %ld\n",
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: PC_REGNUM = %ld\n",
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: FP0_REGNUM = %ld\n",
1568 fprintf_unfiltered (file
,
1569 "gdbarch_dump: NPC_REGNUM = %ld\n",
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1575 (long) NNPC_REGNUM
);
1577 #ifdef STAB_REG_TO_REGNUM
1579 fprintf_unfiltered (file
,
1580 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1581 (long) current_gdbarch
->stab_reg_to_regnum
1582 /*STAB_REG_TO_REGNUM ()*/);
1584 #ifdef ECOFF_REG_TO_REGNUM
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1588 (long) current_gdbarch
->ecoff_reg_to_regnum
1589 /*ECOFF_REG_TO_REGNUM ()*/);
1591 #ifdef DWARF_REG_TO_REGNUM
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1595 (long) current_gdbarch
->dwarf_reg_to_regnum
1596 /*DWARF_REG_TO_REGNUM ()*/);
1598 #ifdef SDB_REG_TO_REGNUM
1600 fprintf_unfiltered (file
,
1601 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1602 (long) current_gdbarch
->sdb_reg_to_regnum
1603 /*SDB_REG_TO_REGNUM ()*/);
1605 #ifdef DWARF2_REG_TO_REGNUM
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1609 (long) current_gdbarch
->dwarf2_reg_to_regnum
1610 /*DWARF2_REG_TO_REGNUM ()*/);
1612 #ifdef REGISTER_NAME
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1616 (long) current_gdbarch
->register_name
1617 /*REGISTER_NAME ()*/);
1619 #ifdef REGISTER_SIZE
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1622 (long) REGISTER_SIZE
);
1624 #ifdef REGISTER_BYTES
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1627 (long) REGISTER_BYTES
);
1629 #ifdef REGISTER_BYTE
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1633 (long) current_gdbarch
->register_byte
1634 /*REGISTER_BYTE ()*/);
1636 #ifdef REGISTER_RAW_SIZE
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1640 (long) current_gdbarch
->register_raw_size
1641 /*REGISTER_RAW_SIZE ()*/);
1643 #ifdef MAX_REGISTER_RAW_SIZE
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1646 (long) MAX_REGISTER_RAW_SIZE
);
1648 #ifdef REGISTER_VIRTUAL_SIZE
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1652 (long) current_gdbarch
->register_virtual_size
1653 /*REGISTER_VIRTUAL_SIZE ()*/);
1655 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1656 fprintf_unfiltered (file
,
1657 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1658 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1660 #ifdef REGISTER_VIRTUAL_TYPE
1662 fprintf_unfiltered (file
,
1663 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1664 (long) current_gdbarch
->register_virtual_type
1665 /*REGISTER_VIRTUAL_TYPE ()*/);
1667 #ifdef DO_REGISTERS_INFO
1669 fprintf_unfiltered (file
,
1670 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1671 (long) current_gdbarch
->do_registers_info
1672 /*DO_REGISTERS_INFO ()*/);
1674 #ifdef REGISTER_SIM_REGNO
1676 fprintf_unfiltered (file
,
1677 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1678 (long) current_gdbarch
->register_sim_regno
1679 /*REGISTER_SIM_REGNO ()*/);
1681 #ifdef REGISTER_BYTES_OK
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1685 (long) current_gdbarch
->register_bytes_ok
1686 /*REGISTER_BYTES_OK ()*/);
1688 #ifdef USE_GENERIC_DUMMY_FRAMES
1689 fprintf_unfiltered (file
,
1690 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1691 (long) USE_GENERIC_DUMMY_FRAMES
);
1693 #ifdef CALL_DUMMY_LOCATION
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1696 (long) CALL_DUMMY_LOCATION
);
1698 #ifdef CALL_DUMMY_ADDRESS
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1702 (long) current_gdbarch
->call_dummy_address
1703 /*CALL_DUMMY_ADDRESS ()*/);
1705 #ifdef CALL_DUMMY_START_OFFSET
1706 fprintf_unfiltered (file
,
1707 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1708 (long) CALL_DUMMY_START_OFFSET
);
1710 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1711 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1712 fprintf_unfiltered (file
,
1713 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1714 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1716 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1717 fprintf_unfiltered (file
,
1718 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1719 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1721 #ifdef CALL_DUMMY_LENGTH
1722 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1725 (long) CALL_DUMMY_LENGTH
);
1727 #ifdef PC_IN_CALL_DUMMY
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1731 (long) current_gdbarch
->pc_in_call_dummy
1732 /*PC_IN_CALL_DUMMY ()*/);
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1737 (long) CALL_DUMMY_P
);
1739 #ifdef CALL_DUMMY_WORDS
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1742 (long) CALL_DUMMY_WORDS
);
1744 #ifdef SIZEOF_CALL_DUMMY_WORDS
1745 fprintf_unfiltered (file
,
1746 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1747 (long) SIZEOF_CALL_DUMMY_WORDS
);
1749 #ifdef CALL_DUMMY_STACK_ADJUST_P
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1752 (long) CALL_DUMMY_STACK_ADJUST_P
);
1754 #ifdef CALL_DUMMY_STACK_ADJUST
1755 if (CALL_DUMMY_STACK_ADJUST_P
)
1756 fprintf_unfiltered (file
,
1757 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1758 (long) CALL_DUMMY_STACK_ADJUST
);
1760 #ifdef FIX_CALL_DUMMY
1762 fprintf_unfiltered (file
,
1763 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1764 (long) current_gdbarch
->fix_call_dummy
1765 /*FIX_CALL_DUMMY ()*/);
1767 #ifdef BELIEVE_PCC_PROMOTION
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1770 (long) BELIEVE_PCC_PROMOTION
);
1772 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1775 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1777 #ifdef COERCE_FLOAT_TO_DOUBLE
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1781 (long) current_gdbarch
->coerce_float_to_double
1782 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1784 #ifdef GET_SAVED_REGISTER
1786 fprintf_unfiltered (file
,
1787 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1788 (long) current_gdbarch
->get_saved_register
1789 /*GET_SAVED_REGISTER ()*/);
1791 #ifdef REGISTER_CONVERTIBLE
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1795 (long) current_gdbarch
->register_convertible
1796 /*REGISTER_CONVERTIBLE ()*/);
1798 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1802 (long) current_gdbarch
->register_convert_to_virtual
1803 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1805 #ifdef REGISTER_CONVERT_TO_RAW
1807 fprintf_unfiltered (file
,
1808 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1809 (long) current_gdbarch
->register_convert_to_raw
1810 /*REGISTER_CONVERT_TO_RAW ()*/);
1812 #ifdef FETCH_PSEUDO_REGISTER
1814 fprintf_unfiltered (file
,
1815 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1816 (long) current_gdbarch
->fetch_pseudo_register
1817 /*FETCH_PSEUDO_REGISTER ()*/);
1819 #ifdef STORE_PSEUDO_REGISTER
1821 fprintf_unfiltered (file
,
1822 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1823 (long) current_gdbarch
->store_pseudo_register
1824 /*STORE_PSEUDO_REGISTER ()*/);
1826 #ifdef POINTER_TO_ADDRESS
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1830 (long) current_gdbarch
->pointer_to_address
1831 /*POINTER_TO_ADDRESS ()*/);
1833 #ifdef ADDRESS_TO_POINTER
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1837 (long) current_gdbarch
->address_to_pointer
1838 /*ADDRESS_TO_POINTER ()*/);
1840 #ifdef RETURN_VALUE_ON_STACK
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1844 (long) current_gdbarch
->return_value_on_stack
1845 /*RETURN_VALUE_ON_STACK ()*/);
1847 #ifdef EXTRACT_RETURN_VALUE
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1851 (long) current_gdbarch
->extract_return_value
1852 /*EXTRACT_RETURN_VALUE ()*/);
1854 #ifdef PUSH_ARGUMENTS
1856 fprintf_unfiltered (file
,
1857 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1858 (long) current_gdbarch
->push_arguments
1859 /*PUSH_ARGUMENTS ()*/);
1861 #ifdef PUSH_DUMMY_FRAME
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1865 (long) current_gdbarch
->push_dummy_frame
1866 /*PUSH_DUMMY_FRAME ()*/);
1868 #ifdef PUSH_RETURN_ADDRESS
1870 fprintf_unfiltered (file
,
1871 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1872 (long) current_gdbarch
->push_return_address
1873 /*PUSH_RETURN_ADDRESS ()*/);
1877 fprintf_unfiltered (file
,
1878 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1879 (long) current_gdbarch
->pop_frame
1882 #ifdef D10V_MAKE_DADDR
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1886 (long) current_gdbarch
->d10v_make_daddr
1887 /*D10V_MAKE_DADDR ()*/);
1889 #ifdef D10V_MAKE_IADDR
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1893 (long) current_gdbarch
->d10v_make_iaddr
1894 /*D10V_MAKE_IADDR ()*/);
1898 fprintf_unfiltered (file
,
1899 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1900 (long) current_gdbarch
->d10v_daddr_p
1901 /*D10V_DADDR_P ()*/);
1905 fprintf_unfiltered (file
,
1906 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1907 (long) current_gdbarch
->d10v_iaddr_p
1908 /*D10V_IADDR_P ()*/);
1910 #ifdef D10V_CONVERT_DADDR_TO_RAW
1912 fprintf_unfiltered (file
,
1913 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1914 (long) current_gdbarch
->d10v_convert_daddr_to_raw
1915 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1917 #ifdef D10V_CONVERT_IADDR_TO_RAW
1919 fprintf_unfiltered (file
,
1920 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1921 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
1922 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1924 #ifdef STORE_STRUCT_RETURN
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1928 (long) current_gdbarch
->store_struct_return
1929 /*STORE_STRUCT_RETURN ()*/);
1931 #ifdef STORE_RETURN_VALUE
1933 fprintf_unfiltered (file
,
1934 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1935 (long) current_gdbarch
->store_return_value
1936 /*STORE_RETURN_VALUE ()*/);
1938 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1942 (long) current_gdbarch
->extract_struct_value_address
1943 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1945 #ifdef USE_STRUCT_CONVENTION
1947 fprintf_unfiltered (file
,
1948 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1949 (long) current_gdbarch
->use_struct_convention
1950 /*USE_STRUCT_CONVENTION ()*/);
1952 #ifdef FRAME_INIT_SAVED_REGS
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1956 (long) current_gdbarch
->frame_init_saved_regs
1957 /*FRAME_INIT_SAVED_REGS ()*/);
1959 #ifdef INIT_EXTRA_FRAME_INFO
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1963 (long) current_gdbarch
->init_extra_frame_info
1964 /*INIT_EXTRA_FRAME_INFO ()*/);
1966 #ifdef SKIP_PROLOGUE
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1970 (long) current_gdbarch
->skip_prologue
1971 /*SKIP_PROLOGUE ()*/);
1973 #ifdef PROLOGUE_FRAMELESS_P
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1977 (long) current_gdbarch
->prologue_frameless_p
1978 /*PROLOGUE_FRAMELESS_P ()*/);
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1984 (long) current_gdbarch
->inner_than
1987 #ifdef BREAKPOINT_FROM_PC
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
1991 (long) current_gdbarch
->breakpoint_from_pc
1992 /*BREAKPOINT_FROM_PC ()*/);
1994 #ifdef MEMORY_INSERT_BREAKPOINT
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1998 (long) current_gdbarch
->memory_insert_breakpoint
1999 /*MEMORY_INSERT_BREAKPOINT ()*/);
2001 #ifdef MEMORY_REMOVE_BREAKPOINT
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2005 (long) current_gdbarch
->memory_remove_breakpoint
2006 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2008 #ifdef DECR_PC_AFTER_BREAK
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2011 (long) DECR_PC_AFTER_BREAK
);
2013 #ifdef FUNCTION_START_OFFSET
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2016 (long) FUNCTION_START_OFFSET
);
2018 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2022 (long) current_gdbarch
->remote_translate_xfer_address
2023 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2025 #ifdef FRAME_ARGS_SKIP
2026 fprintf_unfiltered (file
,
2027 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2028 (long) FRAME_ARGS_SKIP
);
2030 #ifdef FRAMELESS_FUNCTION_INVOCATION
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2034 (long) current_gdbarch
->frameless_function_invocation
2035 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2041 (long) current_gdbarch
->frame_chain
2042 /*FRAME_CHAIN ()*/);
2044 #ifdef FRAME_CHAIN_VALID
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2048 (long) current_gdbarch
->frame_chain_valid
2049 /*FRAME_CHAIN_VALID ()*/);
2051 #ifdef FRAME_SAVED_PC
2053 fprintf_unfiltered (file
,
2054 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2055 (long) current_gdbarch
->frame_saved_pc
2056 /*FRAME_SAVED_PC ()*/);
2058 #ifdef FRAME_ARGS_ADDRESS
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2062 (long) current_gdbarch
->frame_args_address
2063 /*FRAME_ARGS_ADDRESS ()*/);
2065 #ifdef FRAME_LOCALS_ADDRESS
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2069 (long) current_gdbarch
->frame_locals_address
2070 /*FRAME_LOCALS_ADDRESS ()*/);
2072 #ifdef SAVED_PC_AFTER_CALL
2074 fprintf_unfiltered (file
,
2075 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2076 (long) current_gdbarch
->saved_pc_after_call
2077 /*SAVED_PC_AFTER_CALL ()*/);
2079 #ifdef FRAME_NUM_ARGS
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2083 (long) current_gdbarch
->frame_num_args
2084 /*FRAME_NUM_ARGS ()*/);
2088 fprintf_unfiltered (file
,
2089 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2090 (long) current_gdbarch
->stack_align
2091 /*STACK_ALIGN ()*/);
2093 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2094 fprintf_unfiltered (file
,
2095 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2096 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2098 #ifdef REG_STRUCT_HAS_ADDR
2100 fprintf_unfiltered (file
,
2101 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2102 (long) current_gdbarch
->reg_struct_has_addr
2103 /*REG_STRUCT_HAS_ADDR ()*/);
2105 #ifdef SAVE_DUMMY_FRAME_TOS
2107 fprintf_unfiltered (file
,
2108 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2109 (long) current_gdbarch
->save_dummy_frame_tos
2110 /*SAVE_DUMMY_FRAME_TOS ()*/);
2112 #ifdef PARM_BOUNDARY
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2115 (long) PARM_BOUNDARY
);
2117 #ifdef TARGET_FLOAT_FORMAT
2118 fprintf_unfiltered (file
,
2119 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2120 (long) TARGET_FLOAT_FORMAT
);
2122 #ifdef TARGET_DOUBLE_FORMAT
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2125 (long) TARGET_DOUBLE_FORMAT
);
2127 #ifdef TARGET_LONG_DOUBLE_FORMAT
2128 fprintf_unfiltered (file
,
2129 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2130 (long) TARGET_LONG_DOUBLE_FORMAT
);
2132 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2134 fprintf_unfiltered (file
,
2135 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2136 (long) current_gdbarch
->convert_from_func_ptr_addr
2137 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2139 if (current_gdbarch
->dump_tdep
!= NULL
)
2140 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2143 struct gdbarch_tdep
*
2144 gdbarch_tdep (struct gdbarch
*gdbarch
)
2146 if (gdbarch_debug
>= 2)
2147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2148 return gdbarch
->tdep
;
2152 const struct bfd_arch_info
*
2153 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2155 if (gdbarch_debug
>= 2)
2156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2157 return gdbarch
->bfd_arch_info
;
2161 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2163 if (gdbarch_debug
>= 2)
2164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2165 return gdbarch
->byte_order
;
2169 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2171 /* Skip verify of short_bit, invalid_p == 0 */
2172 if (gdbarch_debug
>= 2)
2173 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2174 return gdbarch
->short_bit
;
2178 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2181 gdbarch
->short_bit
= short_bit
;
2185 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2187 /* Skip verify of int_bit, invalid_p == 0 */
2188 if (gdbarch_debug
>= 2)
2189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2190 return gdbarch
->int_bit
;
2194 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2197 gdbarch
->int_bit
= int_bit
;
2201 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2203 /* Skip verify of long_bit, invalid_p == 0 */
2204 if (gdbarch_debug
>= 2)
2205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2206 return gdbarch
->long_bit
;
2210 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2213 gdbarch
->long_bit
= long_bit
;
2217 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2219 /* Skip verify of long_long_bit, invalid_p == 0 */
2220 if (gdbarch_debug
>= 2)
2221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2222 return gdbarch
->long_long_bit
;
2226 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2229 gdbarch
->long_long_bit
= long_long_bit
;
2233 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2235 /* Skip verify of float_bit, invalid_p == 0 */
2236 if (gdbarch_debug
>= 2)
2237 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2238 return gdbarch
->float_bit
;
2242 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2245 gdbarch
->float_bit
= float_bit
;
2249 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2251 /* Skip verify of double_bit, invalid_p == 0 */
2252 if (gdbarch_debug
>= 2)
2253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2254 return gdbarch
->double_bit
;
2258 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2261 gdbarch
->double_bit
= double_bit
;
2265 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2267 /* Skip verify of long_double_bit, invalid_p == 0 */
2268 if (gdbarch_debug
>= 2)
2269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2270 return gdbarch
->long_double_bit
;
2274 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2275 int long_double_bit
)
2277 gdbarch
->long_double_bit
= long_double_bit
;
2281 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2283 /* Skip verify of ptr_bit, invalid_p == 0 */
2284 if (gdbarch_debug
>= 2)
2285 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2286 return gdbarch
->ptr_bit
;
2290 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2293 gdbarch
->ptr_bit
= ptr_bit
;
2297 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2299 if (gdbarch
->addr_bit
== 0)
2300 internal_error (__FILE__
, __LINE__
,
2301 "gdbarch: gdbarch_addr_bit invalid");
2302 if (gdbarch_debug
>= 2)
2303 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2304 return gdbarch
->addr_bit
;
2308 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2311 gdbarch
->addr_bit
= addr_bit
;
2315 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2317 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2318 if (gdbarch_debug
>= 2)
2319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2320 return gdbarch
->bfd_vma_bit
;
2324 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2327 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2331 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2333 /* Skip verify of ieee_float, invalid_p == 0 */
2334 if (gdbarch_debug
>= 2)
2335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2336 return gdbarch
->ieee_float
;
2340 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2343 gdbarch
->ieee_float
= ieee_float
;
2347 gdbarch_read_pc (struct gdbarch
*gdbarch
, int pid
)
2349 if (gdbarch
->read_pc
== 0)
2350 internal_error (__FILE__
, __LINE__
,
2351 "gdbarch: gdbarch_read_pc invalid");
2352 if (gdbarch_debug
>= 2)
2353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2354 return gdbarch
->read_pc (pid
);
2358 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2359 gdbarch_read_pc_ftype read_pc
)
2361 gdbarch
->read_pc
= read_pc
;
2365 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, int pid
)
2367 if (gdbarch
->write_pc
== 0)
2368 internal_error (__FILE__
, __LINE__
,
2369 "gdbarch: gdbarch_write_pc invalid");
2370 if (gdbarch_debug
>= 2)
2371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2372 gdbarch
->write_pc (val
, pid
);
2376 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2377 gdbarch_write_pc_ftype write_pc
)
2379 gdbarch
->write_pc
= write_pc
;
2383 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2385 if (gdbarch
->read_fp
== 0)
2386 internal_error (__FILE__
, __LINE__
,
2387 "gdbarch: gdbarch_read_fp invalid");
2388 if (gdbarch_debug
>= 2)
2389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2390 return gdbarch
->read_fp ();
2394 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2395 gdbarch_read_fp_ftype read_fp
)
2397 gdbarch
->read_fp
= read_fp
;
2401 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2403 if (gdbarch
->write_fp
== 0)
2404 internal_error (__FILE__
, __LINE__
,
2405 "gdbarch: gdbarch_write_fp invalid");
2406 if (gdbarch_debug
>= 2)
2407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2408 gdbarch
->write_fp (val
);
2412 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2413 gdbarch_write_fp_ftype write_fp
)
2415 gdbarch
->write_fp
= write_fp
;
2419 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2421 if (gdbarch
->read_sp
== 0)
2422 internal_error (__FILE__
, __LINE__
,
2423 "gdbarch: gdbarch_read_sp invalid");
2424 if (gdbarch_debug
>= 2)
2425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2426 return gdbarch
->read_sp ();
2430 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2431 gdbarch_read_sp_ftype read_sp
)
2433 gdbarch
->read_sp
= read_sp
;
2437 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2439 if (gdbarch
->write_sp
== 0)
2440 internal_error (__FILE__
, __LINE__
,
2441 "gdbarch: gdbarch_write_sp invalid");
2442 if (gdbarch_debug
>= 2)
2443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2444 gdbarch
->write_sp (val
);
2448 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2449 gdbarch_write_sp_ftype write_sp
)
2451 gdbarch
->write_sp
= write_sp
;
2455 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2457 if (gdbarch
->num_regs
== -1)
2458 internal_error (__FILE__
, __LINE__
,
2459 "gdbarch: gdbarch_num_regs invalid");
2460 if (gdbarch_debug
>= 2)
2461 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2462 return gdbarch
->num_regs
;
2466 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2469 gdbarch
->num_regs
= num_regs
;
2473 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2475 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2476 if (gdbarch_debug
>= 2)
2477 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2478 return gdbarch
->num_pseudo_regs
;
2482 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2483 int num_pseudo_regs
)
2485 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2489 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2491 if (gdbarch
->sp_regnum
== -1)
2492 internal_error (__FILE__
, __LINE__
,
2493 "gdbarch: gdbarch_sp_regnum invalid");
2494 if (gdbarch_debug
>= 2)
2495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2496 return gdbarch
->sp_regnum
;
2500 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2503 gdbarch
->sp_regnum
= sp_regnum
;
2507 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2509 if (gdbarch
->fp_regnum
== -1)
2510 internal_error (__FILE__
, __LINE__
,
2511 "gdbarch: gdbarch_fp_regnum invalid");
2512 if (gdbarch_debug
>= 2)
2513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2514 return gdbarch
->fp_regnum
;
2518 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2521 gdbarch
->fp_regnum
= fp_regnum
;
2525 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2527 if (gdbarch
->pc_regnum
== -1)
2528 internal_error (__FILE__
, __LINE__
,
2529 "gdbarch: gdbarch_pc_regnum invalid");
2530 if (gdbarch_debug
>= 2)
2531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2532 return gdbarch
->pc_regnum
;
2536 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2539 gdbarch
->pc_regnum
= pc_regnum
;
2543 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2545 /* Skip verify of fp0_regnum, invalid_p == 0 */
2546 if (gdbarch_debug
>= 2)
2547 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2548 return gdbarch
->fp0_regnum
;
2552 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2555 gdbarch
->fp0_regnum
= fp0_regnum
;
2559 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2561 /* Skip verify of npc_regnum, invalid_p == 0 */
2562 if (gdbarch_debug
>= 2)
2563 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2564 return gdbarch
->npc_regnum
;
2568 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2571 gdbarch
->npc_regnum
= npc_regnum
;
2575 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2577 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2578 if (gdbarch_debug
>= 2)
2579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2580 return gdbarch
->nnpc_regnum
;
2584 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2587 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2591 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2593 if (gdbarch
->stab_reg_to_regnum
== 0)
2594 internal_error (__FILE__
, __LINE__
,
2595 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2596 if (gdbarch_debug
>= 2)
2597 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2598 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2602 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2603 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2605 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2609 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2611 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2612 internal_error (__FILE__
, __LINE__
,
2613 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2614 if (gdbarch_debug
>= 2)
2615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2616 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2620 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2621 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2623 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2627 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2629 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2630 internal_error (__FILE__
, __LINE__
,
2631 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2632 if (gdbarch_debug
>= 2)
2633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2634 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2638 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2639 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2641 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2645 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2647 if (gdbarch
->sdb_reg_to_regnum
== 0)
2648 internal_error (__FILE__
, __LINE__
,
2649 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2650 if (gdbarch_debug
>= 2)
2651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2652 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2656 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2657 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2659 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2663 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2665 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2666 internal_error (__FILE__
, __LINE__
,
2667 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2668 if (gdbarch_debug
>= 2)
2669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2670 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2674 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2675 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2677 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2681 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2683 if (gdbarch
->register_name
== 0)
2684 internal_error (__FILE__
, __LINE__
,
2685 "gdbarch: gdbarch_register_name invalid");
2686 if (gdbarch_debug
>= 2)
2687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2688 return gdbarch
->register_name (regnr
);
2692 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2693 gdbarch_register_name_ftype register_name
)
2695 gdbarch
->register_name
= register_name
;
2699 gdbarch_register_size (struct gdbarch
*gdbarch
)
2701 if (gdbarch
->register_size
== -1)
2702 internal_error (__FILE__
, __LINE__
,
2703 "gdbarch: gdbarch_register_size invalid");
2704 if (gdbarch_debug
>= 2)
2705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2706 return gdbarch
->register_size
;
2710 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2713 gdbarch
->register_size
= register_size
;
2717 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2719 if (gdbarch
->register_bytes
== -1)
2720 internal_error (__FILE__
, __LINE__
,
2721 "gdbarch: gdbarch_register_bytes invalid");
2722 if (gdbarch_debug
>= 2)
2723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2724 return gdbarch
->register_bytes
;
2728 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2731 gdbarch
->register_bytes
= register_bytes
;
2735 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2737 if (gdbarch
->register_byte
== 0)
2738 internal_error (__FILE__
, __LINE__
,
2739 "gdbarch: gdbarch_register_byte invalid");
2740 if (gdbarch_debug
>= 2)
2741 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2742 return gdbarch
->register_byte (reg_nr
);
2746 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2747 gdbarch_register_byte_ftype register_byte
)
2749 gdbarch
->register_byte
= register_byte
;
2753 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2755 if (gdbarch
->register_raw_size
== 0)
2756 internal_error (__FILE__
, __LINE__
,
2757 "gdbarch: gdbarch_register_raw_size invalid");
2758 if (gdbarch_debug
>= 2)
2759 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2760 return gdbarch
->register_raw_size (reg_nr
);
2764 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2765 gdbarch_register_raw_size_ftype register_raw_size
)
2767 gdbarch
->register_raw_size
= register_raw_size
;
2771 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2773 if (gdbarch
->max_register_raw_size
== -1)
2774 internal_error (__FILE__
, __LINE__
,
2775 "gdbarch: gdbarch_max_register_raw_size invalid");
2776 if (gdbarch_debug
>= 2)
2777 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2778 return gdbarch
->max_register_raw_size
;
2782 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2783 int max_register_raw_size
)
2785 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2789 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2791 if (gdbarch
->register_virtual_size
== 0)
2792 internal_error (__FILE__
, __LINE__
,
2793 "gdbarch: gdbarch_register_virtual_size invalid");
2794 if (gdbarch_debug
>= 2)
2795 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2796 return gdbarch
->register_virtual_size (reg_nr
);
2800 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2801 gdbarch_register_virtual_size_ftype register_virtual_size
)
2803 gdbarch
->register_virtual_size
= register_virtual_size
;
2807 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2809 if (gdbarch
->max_register_virtual_size
== -1)
2810 internal_error (__FILE__
, __LINE__
,
2811 "gdbarch: gdbarch_max_register_virtual_size invalid");
2812 if (gdbarch_debug
>= 2)
2813 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2814 return gdbarch
->max_register_virtual_size
;
2818 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2819 int max_register_virtual_size
)
2821 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2825 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2827 if (gdbarch
->register_virtual_type
== 0)
2828 internal_error (__FILE__
, __LINE__
,
2829 "gdbarch: gdbarch_register_virtual_type invalid");
2830 if (gdbarch_debug
>= 2)
2831 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2832 return gdbarch
->register_virtual_type (reg_nr
);
2836 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2837 gdbarch_register_virtual_type_ftype register_virtual_type
)
2839 gdbarch
->register_virtual_type
= register_virtual_type
;
2843 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2845 if (gdbarch
->do_registers_info
== 0)
2846 internal_error (__FILE__
, __LINE__
,
2847 "gdbarch: gdbarch_do_registers_info invalid");
2848 if (gdbarch_debug
>= 2)
2849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2850 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2854 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2855 gdbarch_do_registers_info_ftype do_registers_info
)
2857 gdbarch
->do_registers_info
= do_registers_info
;
2861 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2863 if (gdbarch
->register_sim_regno
== 0)
2864 internal_error (__FILE__
, __LINE__
,
2865 "gdbarch: gdbarch_register_sim_regno invalid");
2866 if (gdbarch_debug
>= 2)
2867 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2868 return gdbarch
->register_sim_regno (reg_nr
);
2872 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2873 gdbarch_register_sim_regno_ftype register_sim_regno
)
2875 gdbarch
->register_sim_regno
= register_sim_regno
;
2879 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2881 return gdbarch
->register_bytes_ok
!= 0;
2885 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2887 if (gdbarch
->register_bytes_ok
== 0)
2888 internal_error (__FILE__
, __LINE__
,
2889 "gdbarch: gdbarch_register_bytes_ok invalid");
2890 if (gdbarch_debug
>= 2)
2891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2892 return gdbarch
->register_bytes_ok (nr_bytes
);
2896 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2897 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2899 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2903 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2905 if (gdbarch
->use_generic_dummy_frames
== -1)
2906 internal_error (__FILE__
, __LINE__
,
2907 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2908 if (gdbarch_debug
>= 2)
2909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2910 return gdbarch
->use_generic_dummy_frames
;
2914 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2915 int use_generic_dummy_frames
)
2917 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2921 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2923 if (gdbarch
->call_dummy_location
== 0)
2924 internal_error (__FILE__
, __LINE__
,
2925 "gdbarch: gdbarch_call_dummy_location invalid");
2926 if (gdbarch_debug
>= 2)
2927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2928 return gdbarch
->call_dummy_location
;
2932 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2933 int call_dummy_location
)
2935 gdbarch
->call_dummy_location
= call_dummy_location
;
2939 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2941 if (gdbarch
->call_dummy_address
== 0)
2942 internal_error (__FILE__
, __LINE__
,
2943 "gdbarch: gdbarch_call_dummy_address invalid");
2944 if (gdbarch_debug
>= 2)
2945 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2946 return gdbarch
->call_dummy_address ();
2950 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2951 gdbarch_call_dummy_address_ftype call_dummy_address
)
2953 gdbarch
->call_dummy_address
= call_dummy_address
;
2957 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2959 if (gdbarch
->call_dummy_start_offset
== -1)
2960 internal_error (__FILE__
, __LINE__
,
2961 "gdbarch: gdbarch_call_dummy_start_offset invalid");
2962 if (gdbarch_debug
>= 2)
2963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2964 return gdbarch
->call_dummy_start_offset
;
2968 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
2969 CORE_ADDR call_dummy_start_offset
)
2971 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
2975 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
2977 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
2978 internal_error (__FILE__
, __LINE__
,
2979 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2980 if (gdbarch_debug
>= 2)
2981 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
2982 return gdbarch
->call_dummy_breakpoint_offset
;
2986 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
2987 CORE_ADDR call_dummy_breakpoint_offset
)
2989 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
2993 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
2995 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
2996 internal_error (__FILE__
, __LINE__
,
2997 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
2998 if (gdbarch_debug
>= 2)
2999 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3000 return gdbarch
->call_dummy_breakpoint_offset_p
;
3004 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3005 int call_dummy_breakpoint_offset_p
)
3007 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3011 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3013 if (gdbarch
->call_dummy_length
== -1)
3014 internal_error (__FILE__
, __LINE__
,
3015 "gdbarch: gdbarch_call_dummy_length invalid");
3016 if (gdbarch_debug
>= 2)
3017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3018 return gdbarch
->call_dummy_length
;
3022 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3023 int call_dummy_length
)
3025 gdbarch
->call_dummy_length
= call_dummy_length
;
3029 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3031 if (gdbarch
->pc_in_call_dummy
== 0)
3032 internal_error (__FILE__
, __LINE__
,
3033 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3034 if (gdbarch_debug
>= 2)
3035 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3036 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3040 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3041 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3043 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3047 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3049 if (gdbarch
->call_dummy_p
== -1)
3050 internal_error (__FILE__
, __LINE__
,
3051 "gdbarch: gdbarch_call_dummy_p invalid");
3052 if (gdbarch_debug
>= 2)
3053 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3054 return gdbarch
->call_dummy_p
;
3058 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3061 gdbarch
->call_dummy_p
= call_dummy_p
;
3065 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3067 /* Skip verify of call_dummy_words, invalid_p == 0 */
3068 if (gdbarch_debug
>= 2)
3069 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3070 return gdbarch
->call_dummy_words
;
3074 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3075 LONGEST
* call_dummy_words
)
3077 gdbarch
->call_dummy_words
= call_dummy_words
;
3081 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3083 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3084 if (gdbarch_debug
>= 2)
3085 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3086 return gdbarch
->sizeof_call_dummy_words
;
3090 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3091 int sizeof_call_dummy_words
)
3093 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3097 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3099 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3100 internal_error (__FILE__
, __LINE__
,
3101 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3102 if (gdbarch_debug
>= 2)
3103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3104 return gdbarch
->call_dummy_stack_adjust_p
;
3108 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3109 int call_dummy_stack_adjust_p
)
3111 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3115 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3117 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3118 internal_error (__FILE__
, __LINE__
,
3119 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3120 if (gdbarch_debug
>= 2)
3121 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3122 return gdbarch
->call_dummy_stack_adjust
;
3126 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3127 int call_dummy_stack_adjust
)
3129 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3133 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
)
3135 if (gdbarch
->fix_call_dummy
== 0)
3136 internal_error (__FILE__
, __LINE__
,
3137 "gdbarch: gdbarch_fix_call_dummy invalid");
3138 if (gdbarch_debug
>= 2)
3139 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3140 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3144 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3145 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3147 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3151 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3153 if (gdbarch_debug
>= 2)
3154 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3155 return gdbarch
->believe_pcc_promotion
;
3159 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3160 int believe_pcc_promotion
)
3162 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3166 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3168 if (gdbarch_debug
>= 2)
3169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3170 return gdbarch
->believe_pcc_promotion_type
;
3174 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3175 int believe_pcc_promotion_type
)
3177 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3181 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3183 if (gdbarch
->coerce_float_to_double
== 0)
3184 internal_error (__FILE__
, __LINE__
,
3185 "gdbarch: gdbarch_coerce_float_to_double invalid");
3186 if (gdbarch_debug
>= 2)
3187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3188 return gdbarch
->coerce_float_to_double (formal
, actual
);
3192 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3193 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3195 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3199 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
)
3201 if (gdbarch
->get_saved_register
== 0)
3202 internal_error (__FILE__
, __LINE__
,
3203 "gdbarch: gdbarch_get_saved_register invalid");
3204 if (gdbarch_debug
>= 2)
3205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3206 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3210 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3211 gdbarch_get_saved_register_ftype get_saved_register
)
3213 gdbarch
->get_saved_register
= get_saved_register
;
3217 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3219 if (gdbarch
->register_convertible
== 0)
3220 internal_error (__FILE__
, __LINE__
,
3221 "gdbarch: gdbarch_register_convertible invalid");
3222 if (gdbarch_debug
>= 2)
3223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3224 return gdbarch
->register_convertible (nr
);
3228 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3229 gdbarch_register_convertible_ftype register_convertible
)
3231 gdbarch
->register_convertible
= register_convertible
;
3235 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3237 if (gdbarch
->register_convert_to_virtual
== 0)
3238 internal_error (__FILE__
, __LINE__
,
3239 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3240 if (gdbarch_debug
>= 2)
3241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3242 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3246 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3247 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3249 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3253 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3255 if (gdbarch
->register_convert_to_raw
== 0)
3256 internal_error (__FILE__
, __LINE__
,
3257 "gdbarch: gdbarch_register_convert_to_raw invalid");
3258 if (gdbarch_debug
>= 2)
3259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3260 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3264 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3265 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3267 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3271 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3273 if (gdbarch
->fetch_pseudo_register
== 0)
3274 internal_error (__FILE__
, __LINE__
,
3275 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3276 if (gdbarch_debug
>= 2)
3277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3278 gdbarch
->fetch_pseudo_register (regnum
);
3282 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3283 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3285 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3289 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3291 if (gdbarch
->store_pseudo_register
== 0)
3292 internal_error (__FILE__
, __LINE__
,
3293 "gdbarch: gdbarch_store_pseudo_register invalid");
3294 if (gdbarch_debug
>= 2)
3295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3296 gdbarch
->store_pseudo_register (regnum
);
3300 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3301 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3303 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3307 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3309 if (gdbarch
->pointer_to_address
== 0)
3310 internal_error (__FILE__
, __LINE__
,
3311 "gdbarch: gdbarch_pointer_to_address invalid");
3312 if (gdbarch_debug
>= 2)
3313 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3314 return gdbarch
->pointer_to_address (type
, buf
);
3318 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3319 gdbarch_pointer_to_address_ftype pointer_to_address
)
3321 gdbarch
->pointer_to_address
= pointer_to_address
;
3325 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3327 if (gdbarch
->address_to_pointer
== 0)
3328 internal_error (__FILE__
, __LINE__
,
3329 "gdbarch: gdbarch_address_to_pointer invalid");
3330 if (gdbarch_debug
>= 2)
3331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3332 gdbarch
->address_to_pointer (type
, buf
, addr
);
3336 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3337 gdbarch_address_to_pointer_ftype address_to_pointer
)
3339 gdbarch
->address_to_pointer
= address_to_pointer
;
3343 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3345 if (gdbarch
->return_value_on_stack
== 0)
3346 internal_error (__FILE__
, __LINE__
,
3347 "gdbarch: gdbarch_return_value_on_stack invalid");
3348 if (gdbarch_debug
>= 2)
3349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3350 return gdbarch
->return_value_on_stack (type
);
3354 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3355 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3357 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3361 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3363 if (gdbarch
->extract_return_value
== 0)
3364 internal_error (__FILE__
, __LINE__
,
3365 "gdbarch: gdbarch_extract_return_value invalid");
3366 if (gdbarch_debug
>= 2)
3367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3368 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3372 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3373 gdbarch_extract_return_value_ftype extract_return_value
)
3375 gdbarch
->extract_return_value
= extract_return_value
;
3379 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3381 if (gdbarch
->push_arguments
== 0)
3382 internal_error (__FILE__
, __LINE__
,
3383 "gdbarch: gdbarch_push_arguments invalid");
3384 if (gdbarch_debug
>= 2)
3385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3386 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3390 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3391 gdbarch_push_arguments_ftype push_arguments
)
3393 gdbarch
->push_arguments
= push_arguments
;
3397 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3399 if (gdbarch
->push_dummy_frame
== 0)
3400 internal_error (__FILE__
, __LINE__
,
3401 "gdbarch: gdbarch_push_dummy_frame invalid");
3402 if (gdbarch_debug
>= 2)
3403 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3404 gdbarch
->push_dummy_frame ();
3408 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3409 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3411 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3415 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3417 if (gdbarch
->push_return_address
== 0)
3418 internal_error (__FILE__
, __LINE__
,
3419 "gdbarch: gdbarch_push_return_address invalid");
3420 if (gdbarch_debug
>= 2)
3421 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3422 return gdbarch
->push_return_address (pc
, sp
);
3426 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3427 gdbarch_push_return_address_ftype push_return_address
)
3429 gdbarch
->push_return_address
= push_return_address
;
3433 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3435 if (gdbarch
->pop_frame
== 0)
3436 internal_error (__FILE__
, __LINE__
,
3437 "gdbarch: gdbarch_pop_frame invalid");
3438 if (gdbarch_debug
>= 2)
3439 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3440 gdbarch
->pop_frame ();
3444 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3445 gdbarch_pop_frame_ftype pop_frame
)
3447 gdbarch
->pop_frame
= pop_frame
;
3451 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3453 if (gdbarch
->d10v_make_daddr
== 0)
3454 internal_error (__FILE__
, __LINE__
,
3455 "gdbarch: gdbarch_d10v_make_daddr invalid");
3456 if (gdbarch_debug
>= 2)
3457 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3458 return gdbarch
->d10v_make_daddr (x
);
3462 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3463 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3465 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3469 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3471 if (gdbarch
->d10v_make_iaddr
== 0)
3472 internal_error (__FILE__
, __LINE__
,
3473 "gdbarch: gdbarch_d10v_make_iaddr invalid");
3474 if (gdbarch_debug
>= 2)
3475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3476 return gdbarch
->d10v_make_iaddr (x
);
3480 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3481 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3483 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3487 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3489 if (gdbarch
->d10v_daddr_p
== 0)
3490 internal_error (__FILE__
, __LINE__
,
3491 "gdbarch: gdbarch_d10v_daddr_p invalid");
3492 if (gdbarch_debug
>= 2)
3493 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3494 return gdbarch
->d10v_daddr_p (x
);
3498 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3499 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3501 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3505 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3507 if (gdbarch
->d10v_iaddr_p
== 0)
3508 internal_error (__FILE__
, __LINE__
,
3509 "gdbarch: gdbarch_d10v_iaddr_p invalid");
3510 if (gdbarch_debug
>= 2)
3511 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3512 return gdbarch
->d10v_iaddr_p (x
);
3516 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3517 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3519 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3523 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3525 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3526 internal_error (__FILE__
, __LINE__
,
3527 "gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3528 if (gdbarch_debug
>= 2)
3529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3530 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3534 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3535 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3537 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3541 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3543 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3544 internal_error (__FILE__
, __LINE__
,
3545 "gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3546 if (gdbarch_debug
>= 2)
3547 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3548 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3552 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3553 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3555 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3559 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3561 if (gdbarch
->store_struct_return
== 0)
3562 internal_error (__FILE__
, __LINE__
,
3563 "gdbarch: gdbarch_store_struct_return invalid");
3564 if (gdbarch_debug
>= 2)
3565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3566 gdbarch
->store_struct_return (addr
, sp
);
3570 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3571 gdbarch_store_struct_return_ftype store_struct_return
)
3573 gdbarch
->store_struct_return
= store_struct_return
;
3577 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3579 if (gdbarch
->store_return_value
== 0)
3580 internal_error (__FILE__
, __LINE__
,
3581 "gdbarch: gdbarch_store_return_value invalid");
3582 if (gdbarch_debug
>= 2)
3583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3584 gdbarch
->store_return_value (type
, valbuf
);
3588 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3589 gdbarch_store_return_value_ftype store_return_value
)
3591 gdbarch
->store_return_value
= store_return_value
;
3595 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3597 if (gdbarch
->extract_struct_value_address
== 0)
3598 internal_error (__FILE__
, __LINE__
,
3599 "gdbarch: gdbarch_extract_struct_value_address invalid");
3600 if (gdbarch_debug
>= 2)
3601 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3602 return gdbarch
->extract_struct_value_address (regbuf
);
3606 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3607 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3609 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3613 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3615 if (gdbarch
->use_struct_convention
== 0)
3616 internal_error (__FILE__
, __LINE__
,
3617 "gdbarch: gdbarch_use_struct_convention invalid");
3618 if (gdbarch_debug
>= 2)
3619 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3620 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3624 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3625 gdbarch_use_struct_convention_ftype use_struct_convention
)
3627 gdbarch
->use_struct_convention
= use_struct_convention
;
3631 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3633 if (gdbarch
->frame_init_saved_regs
== 0)
3634 internal_error (__FILE__
, __LINE__
,
3635 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3636 if (gdbarch_debug
>= 2)
3637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3638 gdbarch
->frame_init_saved_regs (frame
);
3642 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3643 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3645 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3649 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3651 if (gdbarch
->init_extra_frame_info
== 0)
3652 internal_error (__FILE__
, __LINE__
,
3653 "gdbarch: gdbarch_init_extra_frame_info invalid");
3654 if (gdbarch_debug
>= 2)
3655 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3656 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3660 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3661 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3663 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3667 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3669 if (gdbarch
->skip_prologue
== 0)
3670 internal_error (__FILE__
, __LINE__
,
3671 "gdbarch: gdbarch_skip_prologue invalid");
3672 if (gdbarch_debug
>= 2)
3673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3674 return gdbarch
->skip_prologue (ip
);
3678 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3679 gdbarch_skip_prologue_ftype skip_prologue
)
3681 gdbarch
->skip_prologue
= skip_prologue
;
3685 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3687 if (gdbarch
->prologue_frameless_p
== 0)
3688 internal_error (__FILE__
, __LINE__
,
3689 "gdbarch: gdbarch_prologue_frameless_p invalid");
3690 if (gdbarch_debug
>= 2)
3691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3692 return gdbarch
->prologue_frameless_p (ip
);
3696 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3697 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3699 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3703 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3705 if (gdbarch
->inner_than
== 0)
3706 internal_error (__FILE__
, __LINE__
,
3707 "gdbarch: gdbarch_inner_than invalid");
3708 if (gdbarch_debug
>= 2)
3709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3710 return gdbarch
->inner_than (lhs
, rhs
);
3714 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3715 gdbarch_inner_than_ftype inner_than
)
3717 gdbarch
->inner_than
= inner_than
;
3721 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3723 if (gdbarch
->breakpoint_from_pc
== 0)
3724 internal_error (__FILE__
, __LINE__
,
3725 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3726 if (gdbarch_debug
>= 2)
3727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3728 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3732 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3733 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3735 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3739 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3741 if (gdbarch
->memory_insert_breakpoint
== 0)
3742 internal_error (__FILE__
, __LINE__
,
3743 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3744 if (gdbarch_debug
>= 2)
3745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3746 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3750 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3751 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3753 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3757 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3759 if (gdbarch
->memory_remove_breakpoint
== 0)
3760 internal_error (__FILE__
, __LINE__
,
3761 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3762 if (gdbarch_debug
>= 2)
3763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3764 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3768 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3769 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3771 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3775 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3777 if (gdbarch
->decr_pc_after_break
== -1)
3778 internal_error (__FILE__
, __LINE__
,
3779 "gdbarch: gdbarch_decr_pc_after_break invalid");
3780 if (gdbarch_debug
>= 2)
3781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3782 return gdbarch
->decr_pc_after_break
;
3786 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3787 CORE_ADDR decr_pc_after_break
)
3789 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3793 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3795 if (gdbarch
->function_start_offset
== -1)
3796 internal_error (__FILE__
, __LINE__
,
3797 "gdbarch: gdbarch_function_start_offset invalid");
3798 if (gdbarch_debug
>= 2)
3799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3800 return gdbarch
->function_start_offset
;
3804 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3805 CORE_ADDR function_start_offset
)
3807 gdbarch
->function_start_offset
= function_start_offset
;
3811 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3813 if (gdbarch
->remote_translate_xfer_address
== 0)
3814 internal_error (__FILE__
, __LINE__
,
3815 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3816 if (gdbarch_debug
>= 2)
3817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3818 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3822 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3823 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3825 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3829 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3831 if (gdbarch
->frame_args_skip
== -1)
3832 internal_error (__FILE__
, __LINE__
,
3833 "gdbarch: gdbarch_frame_args_skip invalid");
3834 if (gdbarch_debug
>= 2)
3835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3836 return gdbarch
->frame_args_skip
;
3840 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3841 CORE_ADDR frame_args_skip
)
3843 gdbarch
->frame_args_skip
= frame_args_skip
;
3847 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3849 if (gdbarch
->frameless_function_invocation
== 0)
3850 internal_error (__FILE__
, __LINE__
,
3851 "gdbarch: gdbarch_frameless_function_invocation invalid");
3852 if (gdbarch_debug
>= 2)
3853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3854 return gdbarch
->frameless_function_invocation (fi
);
3858 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3859 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3861 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3865 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3867 if (gdbarch
->frame_chain
== 0)
3868 internal_error (__FILE__
, __LINE__
,
3869 "gdbarch: gdbarch_frame_chain invalid");
3870 if (gdbarch_debug
>= 2)
3871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3872 return gdbarch
->frame_chain (frame
);
3876 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3877 gdbarch_frame_chain_ftype frame_chain
)
3879 gdbarch
->frame_chain
= frame_chain
;
3883 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3885 if (gdbarch
->frame_chain_valid
== 0)
3886 internal_error (__FILE__
, __LINE__
,
3887 "gdbarch: gdbarch_frame_chain_valid invalid");
3888 if (gdbarch_debug
>= 2)
3889 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3890 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3894 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3895 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3897 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3901 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3903 if (gdbarch
->frame_saved_pc
== 0)
3904 internal_error (__FILE__
, __LINE__
,
3905 "gdbarch: gdbarch_frame_saved_pc invalid");
3906 if (gdbarch_debug
>= 2)
3907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3908 return gdbarch
->frame_saved_pc (fi
);
3912 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3913 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3915 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3919 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3921 if (gdbarch
->frame_args_address
== 0)
3922 internal_error (__FILE__
, __LINE__
,
3923 "gdbarch: gdbarch_frame_args_address invalid");
3924 if (gdbarch_debug
>= 2)
3925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3926 return gdbarch
->frame_args_address (fi
);
3930 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3931 gdbarch_frame_args_address_ftype frame_args_address
)
3933 gdbarch
->frame_args_address
= frame_args_address
;
3937 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3939 if (gdbarch
->frame_locals_address
== 0)
3940 internal_error (__FILE__
, __LINE__
,
3941 "gdbarch: gdbarch_frame_locals_address invalid");
3942 if (gdbarch_debug
>= 2)
3943 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3944 return gdbarch
->frame_locals_address (fi
);
3948 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3949 gdbarch_frame_locals_address_ftype frame_locals_address
)
3951 gdbarch
->frame_locals_address
= frame_locals_address
;
3955 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3957 if (gdbarch
->saved_pc_after_call
== 0)
3958 internal_error (__FILE__
, __LINE__
,
3959 "gdbarch: gdbarch_saved_pc_after_call invalid");
3960 if (gdbarch_debug
>= 2)
3961 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3962 return gdbarch
->saved_pc_after_call (frame
);
3966 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3967 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3969 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3973 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3975 if (gdbarch
->frame_num_args
== 0)
3976 internal_error (__FILE__
, __LINE__
,
3977 "gdbarch: gdbarch_frame_num_args invalid");
3978 if (gdbarch_debug
>= 2)
3979 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3980 return gdbarch
->frame_num_args (frame
);
3984 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3985 gdbarch_frame_num_args_ftype frame_num_args
)
3987 gdbarch
->frame_num_args
= frame_num_args
;
3991 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
3993 return gdbarch
->stack_align
!= 0;
3997 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3999 if (gdbarch
->stack_align
== 0)
4000 internal_error (__FILE__
, __LINE__
,
4001 "gdbarch: gdbarch_stack_align invalid");
4002 if (gdbarch_debug
>= 2)
4003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4004 return gdbarch
->stack_align (sp
);
4008 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4009 gdbarch_stack_align_ftype stack_align
)
4011 gdbarch
->stack_align
= stack_align
;
4015 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4017 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4018 if (gdbarch_debug
>= 2)
4019 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4020 return gdbarch
->extra_stack_alignment_needed
;
4024 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4025 int extra_stack_alignment_needed
)
4027 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4031 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4033 return gdbarch
->reg_struct_has_addr
!= 0;
4037 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4039 if (gdbarch
->reg_struct_has_addr
== 0)
4040 internal_error (__FILE__
, __LINE__
,
4041 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4042 if (gdbarch_debug
>= 2)
4043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4044 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4048 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4049 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4051 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4055 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4057 return gdbarch
->save_dummy_frame_tos
!= 0;
4061 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4063 if (gdbarch
->save_dummy_frame_tos
== 0)
4064 internal_error (__FILE__
, __LINE__
,
4065 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4066 if (gdbarch_debug
>= 2)
4067 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4068 gdbarch
->save_dummy_frame_tos (sp
);
4072 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4073 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4075 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4079 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4081 if (gdbarch_debug
>= 2)
4082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4083 return gdbarch
->parm_boundary
;
4087 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4090 gdbarch
->parm_boundary
= parm_boundary
;
4093 const struct floatformat
*
4094 gdbarch_float_format (struct gdbarch
*gdbarch
)
4096 if (gdbarch_debug
>= 2)
4097 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4098 return gdbarch
->float_format
;
4102 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4103 const struct floatformat
* float_format
)
4105 gdbarch
->float_format
= float_format
;
4108 const struct floatformat
*
4109 gdbarch_double_format (struct gdbarch
*gdbarch
)
4111 if (gdbarch_debug
>= 2)
4112 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4113 return gdbarch
->double_format
;
4117 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4118 const struct floatformat
* double_format
)
4120 gdbarch
->double_format
= double_format
;
4123 const struct floatformat
*
4124 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4126 if (gdbarch_debug
>= 2)
4127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4128 return gdbarch
->long_double_format
;
4132 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4133 const struct floatformat
* long_double_format
)
4135 gdbarch
->long_double_format
= long_double_format
;
4139 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4141 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4142 internal_error (__FILE__
, __LINE__
,
4143 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4144 if (gdbarch_debug
>= 2)
4145 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4146 return gdbarch
->convert_from_func_ptr_addr (addr
);
4150 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4151 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4153 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4157 /* Keep a registry of per-architecture data-pointers required by GDB
4163 gdbarch_data_init_ftype
*init
;
4164 gdbarch_data_free_ftype
*free
;
4167 struct gdbarch_data_registration
4169 struct gdbarch_data
*data
;
4170 struct gdbarch_data_registration
*next
;
4173 struct gdbarch_data_registry
4176 struct gdbarch_data_registration
*registrations
;
4179 struct gdbarch_data_registry gdbarch_data_registry
=
4184 struct gdbarch_data
*
4185 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4186 gdbarch_data_free_ftype
*free
)
4188 struct gdbarch_data_registration
**curr
;
4189 for (curr
= &gdbarch_data_registry
.registrations
;
4191 curr
= &(*curr
)->next
);
4192 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4193 (*curr
)->next
= NULL
;
4194 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4195 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4196 (*curr
)->data
->init
= init
;
4197 (*curr
)->data
->free
= free
;
4198 return (*curr
)->data
;
4202 /* Walk through all the registered users initializing each in turn. */
4205 init_gdbarch_data (struct gdbarch
*gdbarch
)
4207 struct gdbarch_data_registration
*rego
;
4208 for (rego
= gdbarch_data_registry
.registrations
;
4212 struct gdbarch_data
*data
= rego
->data
;
4213 gdb_assert (data
->index
< gdbarch
->nr_data
);
4214 if (data
->init
!= NULL
)
4216 void *pointer
= data
->init (gdbarch
);
4217 set_gdbarch_data (gdbarch
, data
, pointer
);
4222 /* Create/delete the gdbarch data vector. */
4225 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4227 gdb_assert (gdbarch
->data
== NULL
);
4228 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4229 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4233 free_gdbarch_data (struct gdbarch
*gdbarch
)
4235 struct gdbarch_data_registration
*rego
;
4236 gdb_assert (gdbarch
->data
!= NULL
);
4237 for (rego
= gdbarch_data_registry
.registrations
;
4241 struct gdbarch_data
*data
= rego
->data
;
4242 gdb_assert (data
->index
< gdbarch
->nr_data
);
4243 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4245 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4246 gdbarch
->data
[data
->index
] = NULL
;
4249 xfree (gdbarch
->data
);
4250 gdbarch
->data
= NULL
;
4254 /* Initialize the current value of thee specified per-architecture
4258 set_gdbarch_data (struct gdbarch
*gdbarch
,
4259 struct gdbarch_data
*data
,
4262 gdb_assert (data
->index
< gdbarch
->nr_data
);
4263 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4264 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4265 gdbarch
->data
[data
->index
] = pointer
;
4268 /* Return the current value of the specified per-architecture
4272 gdbarch_data (struct gdbarch_data
*data
)
4274 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4275 return current_gdbarch
->data
[data
->index
];
4280 /* Keep a registry of swapped data required by GDB modules. */
4285 struct gdbarch_swap_registration
*source
;
4286 struct gdbarch_swap
*next
;
4289 struct gdbarch_swap_registration
4292 unsigned long sizeof_data
;
4293 gdbarch_swap_ftype
*init
;
4294 struct gdbarch_swap_registration
*next
;
4297 struct gdbarch_swap_registry
4300 struct gdbarch_swap_registration
*registrations
;
4303 struct gdbarch_swap_registry gdbarch_swap_registry
=
4309 register_gdbarch_swap (void *data
,
4310 unsigned long sizeof_data
,
4311 gdbarch_swap_ftype
*init
)
4313 struct gdbarch_swap_registration
**rego
;
4314 for (rego
= &gdbarch_swap_registry
.registrations
;
4316 rego
= &(*rego
)->next
);
4317 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4318 (*rego
)->next
= NULL
;
4319 (*rego
)->init
= init
;
4320 (*rego
)->data
= data
;
4321 (*rego
)->sizeof_data
= sizeof_data
;
4326 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4328 struct gdbarch_swap_registration
*rego
;
4329 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4330 for (rego
= gdbarch_swap_registry
.registrations
;
4334 if (rego
->data
!= NULL
)
4336 (*curr
) = XMALLOC (struct gdbarch_swap
);
4337 (*curr
)->source
= rego
;
4338 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4339 (*curr
)->next
= NULL
;
4340 memset (rego
->data
, 0, rego
->sizeof_data
);
4341 curr
= &(*curr
)->next
;
4343 if (rego
->init
!= NULL
)
4349 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4351 struct gdbarch_swap
*curr
;
4352 for (curr
= gdbarch
->swap
;
4355 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4359 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4361 struct gdbarch_swap
*curr
;
4362 for (curr
= gdbarch
->swap
;
4365 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4369 /* Keep a registry of the architectures known by GDB. */
4371 struct gdbarch_registration
4373 enum bfd_architecture bfd_architecture
;
4374 gdbarch_init_ftype
*init
;
4375 gdbarch_dump_tdep_ftype
*dump_tdep
;
4376 struct gdbarch_list
*arches
;
4377 struct gdbarch_registration
*next
;
4380 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4383 append_name (const char ***buf
, int *nr
, const char *name
)
4385 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4391 gdbarch_printable_names (void)
4395 /* Accumulate a list of names based on the registed list of
4397 enum bfd_architecture a
;
4399 const char **arches
= NULL
;
4400 struct gdbarch_registration
*rego
;
4401 for (rego
= gdbarch_registry
;
4405 const struct bfd_arch_info
*ap
;
4406 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4408 internal_error (__FILE__
, __LINE__
,
4409 "gdbarch_architecture_names: multi-arch unknown");
4412 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4417 append_name (&arches
, &nr_arches
, NULL
);
4421 /* Just return all the architectures that BFD knows. Assume that
4422 the legacy architecture framework supports them. */
4423 return bfd_arch_list ();
4428 gdbarch_register (enum bfd_architecture bfd_architecture
,
4429 gdbarch_init_ftype
*init
,
4430 gdbarch_dump_tdep_ftype
*dump_tdep
)
4432 struct gdbarch_registration
**curr
;
4433 const struct bfd_arch_info
*bfd_arch_info
;
4434 /* Check that BFD recognizes this architecture */
4435 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4436 if (bfd_arch_info
== NULL
)
4438 internal_error (__FILE__
, __LINE__
,
4439 "gdbarch: Attempt to register unknown architecture (%d)",
4442 /* Check that we haven't seen this architecture before */
4443 for (curr
= &gdbarch_registry
;
4445 curr
= &(*curr
)->next
)
4447 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4448 internal_error (__FILE__
, __LINE__
,
4449 "gdbarch: Duplicate registraration of architecture (%s)",
4450 bfd_arch_info
->printable_name
);
4454 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4455 bfd_arch_info
->printable_name
,
4458 (*curr
) = XMALLOC (struct gdbarch_registration
);
4459 (*curr
)->bfd_architecture
= bfd_architecture
;
4460 (*curr
)->init
= init
;
4461 (*curr
)->dump_tdep
= dump_tdep
;
4462 (*curr
)->arches
= NULL
;
4463 (*curr
)->next
= NULL
;
4464 /* When non- multi-arch, install whatever target dump routine we've
4465 been provided - hopefully that routine has been written correctly
4466 and works regardless of multi-arch. */
4467 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4468 && startup_gdbarch
.dump_tdep
== NULL
)
4469 startup_gdbarch
.dump_tdep
= dump_tdep
;
4473 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4474 gdbarch_init_ftype
*init
)
4476 gdbarch_register (bfd_architecture
, init
, NULL
);
4480 /* Look for an architecture using gdbarch_info. Base search on only
4481 BFD_ARCH_INFO and BYTE_ORDER. */
4483 struct gdbarch_list
*
4484 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4485 const struct gdbarch_info
*info
)
4487 for (; arches
!= NULL
; arches
= arches
->next
)
4489 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4491 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4499 /* Update the current architecture. Return ZERO if the update request
4503 gdbarch_update_p (struct gdbarch_info info
)
4505 struct gdbarch
*new_gdbarch
;
4506 struct gdbarch_list
**list
;
4507 struct gdbarch_registration
*rego
;
4509 /* Fill in any missing bits. Most important is the bfd_architecture
4510 which is used to select the target architecture. */
4511 if (info
.bfd_architecture
== bfd_arch_unknown
)
4513 if (info
.bfd_arch_info
!= NULL
)
4514 info
.bfd_architecture
= info
.bfd_arch_info
->arch
;
4515 else if (info
.abfd
!= NULL
)
4516 info
.bfd_architecture
= bfd_get_arch (info
.abfd
);
4517 /* FIXME - should query BFD for its default architecture. */
4519 info
.bfd_architecture
= current_gdbarch
->bfd_arch_info
->arch
;
4521 if (info
.bfd_arch_info
== NULL
)
4523 if (target_architecture_auto
&& info
.abfd
!= NULL
)
4524 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4526 info
.bfd_arch_info
= current_gdbarch
->bfd_arch_info
;
4528 if (info
.byte_order
== 0)
4530 if (target_byte_order_auto
&& info
.abfd
!= NULL
)
4531 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4532 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4535 info
.byte_order
= current_gdbarch
->byte_order
;
4536 /* FIXME - should query BFD for its default byte-order. */
4538 /* A default for abfd? */
4540 /* Find the target that knows about this architecture. */
4541 for (rego
= gdbarch_registry
;
4544 if (rego
->bfd_architecture
== info
.bfd_architecture
)
4549 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4555 fprintf_unfiltered (gdb_stdlog
,
4556 "gdbarch_update: info.bfd_architecture %d (%s)\n",
4557 info
.bfd_architecture
,
4558 bfd_lookup_arch (info
.bfd_architecture
, 0)->printable_name
);
4559 fprintf_unfiltered (gdb_stdlog
,
4560 "gdbarch_update: info.bfd_arch_info %s\n",
4561 (info
.bfd_arch_info
!= NULL
4562 ? info
.bfd_arch_info
->printable_name
4564 fprintf_unfiltered (gdb_stdlog
,
4565 "gdbarch_update: info.byte_order %d (%s)\n",
4567 (info
.byte_order
== BIG_ENDIAN
? "big"
4568 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4570 fprintf_unfiltered (gdb_stdlog
,
4571 "gdbarch_update: info.abfd 0x%lx\n",
4573 fprintf_unfiltered (gdb_stdlog
,
4574 "gdbarch_update: info.tdep_info 0x%lx\n",
4575 (long) info
.tdep_info
);
4578 /* Ask the target for a replacement architecture. */
4579 new_gdbarch
= rego
->init (info
, rego
->arches
);
4581 /* Did the target like it? No. Reject the change. */
4582 if (new_gdbarch
== NULL
)
4585 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4589 /* Did the architecture change? No. Do nothing. */
4590 if (current_gdbarch
== new_gdbarch
)
4593 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4595 new_gdbarch
->bfd_arch_info
->printable_name
);
4599 /* Swap all data belonging to the old target out */
4600 swapout_gdbarch_swap (current_gdbarch
);
4602 /* Is this a pre-existing architecture? Yes. Swap it in. */
4603 for (list
= ®o
->arches
;
4605 list
= &(*list
)->next
)
4607 if ((*list
)->gdbarch
== new_gdbarch
)
4610 fprintf_unfiltered (gdb_stdlog
,
4611 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4613 new_gdbarch
->bfd_arch_info
->printable_name
);
4614 current_gdbarch
= new_gdbarch
;
4615 swapin_gdbarch_swap (new_gdbarch
);
4620 /* Append this new architecture to this targets list. */
4621 (*list
) = XMALLOC (struct gdbarch_list
);
4622 (*list
)->next
= NULL
;
4623 (*list
)->gdbarch
= new_gdbarch
;
4625 /* Switch to this new architecture. Dump it out. */
4626 current_gdbarch
= new_gdbarch
;
4629 fprintf_unfiltered (gdb_stdlog
,
4630 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4632 new_gdbarch
->bfd_arch_info
->printable_name
);
4635 /* Check that the newly installed architecture is valid. Plug in
4636 any post init values. */
4637 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4638 verify_gdbarch (new_gdbarch
);
4640 /* Initialize the per-architecture memory (swap) areas.
4641 CURRENT_GDBARCH must be update before these modules are
4643 init_gdbarch_swap (new_gdbarch
);
4645 /* Initialize the per-architecture data-pointer of all parties that
4646 registered an interest in this architecture. CURRENT_GDBARCH
4647 must be updated before these modules are called. */
4648 init_gdbarch_data (new_gdbarch
);
4651 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4659 /* Pointer to the target-dependent disassembly function. */
4660 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4661 disassemble_info tm_print_insn_info
;
4664 extern void _initialize_gdbarch (void);
4667 _initialize_gdbarch (void)
4669 struct cmd_list_element
*c
;
4671 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4672 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4673 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4674 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4675 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4677 add_show_from_set (add_set_cmd ("arch",
4680 (char *)&gdbarch_debug
,
4681 "Set architecture debugging.\n\
4682 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4684 c
= add_set_cmd ("archdebug",
4687 (char *)&gdbarch_debug
,
4688 "Set architecture debugging.\n\
4689 When non-zero, architecture debugging is enabled.", &setlist
);
4691 deprecate_cmd (c
, "set debug arch");
4692 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");