1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 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 */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch
*gdbarch
);
70 static void alloc_gdbarch_data (struct gdbarch
*);
71 static void free_gdbarch_data (struct gdbarch
*);
72 static void init_gdbarch_swap (struct gdbarch
*);
73 static void clear_gdbarch_swap (struct gdbarch
*);
74 static void swapout_gdbarch_swap (struct gdbarch
*);
75 static void swapin_gdbarch_swap (struct gdbarch
*);
77 /* Non-zero if we want to trace architecture code. */
80 #define GDBARCH_DEBUG 0
82 int gdbarch_debug
= GDBARCH_DEBUG
;
85 /* Maintain the struct gdbarch object */
89 /* Has this architecture been fully initialized? */
91 /* basic architectural information */
92 const struct bfd_arch_info
* bfd_arch_info
;
95 /* target specific vector. */
96 struct gdbarch_tdep
*tdep
;
97 gdbarch_dump_tdep_ftype
*dump_tdep
;
99 /* per-architecture data-pointers */
103 /* per-architecture swap-regions */
104 struct gdbarch_swap
*swap
;
106 /* Multi-arch values.
108 When extending this structure you must:
112 Declare set/get functions and define the corresponding
115 gdbarch_alloc(): If zero/NULL is not a suitable default,
116 initialize the new field.
118 verify_gdbarch(): Confirm that the target updated the field
121 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
124 ``startup_gdbarch()'': Append an initial value to the static
125 variable (base values on the host's c-type system).
127 get_gdbarch(): Implement the set/get functions (probably using
128 the macro's as shortcuts).
143 gdbarch_read_pc_ftype
*read_pc
;
144 gdbarch_write_pc_ftype
*write_pc
;
145 gdbarch_read_fp_ftype
*read_fp
;
146 gdbarch_read_sp_ftype
*read_sp
;
147 gdbarch_write_sp_ftype
*write_sp
;
148 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
149 gdbarch_register_read_ftype
*register_read
;
150 gdbarch_register_write_ftype
*register_write
;
159 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
160 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
161 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
162 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
163 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
164 gdbarch_register_name_ftype
*register_name
;
167 gdbarch_register_byte_ftype
*register_byte
;
168 gdbarch_register_raw_size_ftype
*register_raw_size
;
169 int max_register_raw_size
;
170 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
171 int max_register_virtual_size
;
172 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
173 gdbarch_do_registers_info_ftype
*do_registers_info
;
174 gdbarch_print_float_info_ftype
*print_float_info
;
175 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
176 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
177 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
178 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
179 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
180 int use_generic_dummy_frames
;
181 int call_dummy_location
;
182 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
183 CORE_ADDR call_dummy_start_offset
;
184 CORE_ADDR call_dummy_breakpoint_offset
;
185 int call_dummy_breakpoint_offset_p
;
186 int call_dummy_length
;
187 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
189 LONGEST
* call_dummy_words
;
190 int sizeof_call_dummy_words
;
191 int call_dummy_stack_adjust_p
;
192 int call_dummy_stack_adjust
;
193 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
194 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
195 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
196 int believe_pcc_promotion
;
197 int believe_pcc_promotion_type
;
198 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
199 gdbarch_get_saved_register_ftype
*get_saved_register
;
200 gdbarch_register_convertible_ftype
*register_convertible
;
201 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
202 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
203 gdbarch_convert_register_p_ftype
*convert_register_p
;
204 gdbarch_register_to_value_ftype
*register_to_value
;
205 gdbarch_value_to_register_ftype
*value_to_register
;
206 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
207 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
208 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
209 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
210 gdbarch_integer_to_address_ftype
*integer_to_address
;
211 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
212 gdbarch_extract_return_value_ftype
*extract_return_value
;
213 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
214 gdbarch_push_arguments_ftype
*push_arguments
;
215 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
216 gdbarch_push_return_address_ftype
*push_return_address
;
217 gdbarch_pop_frame_ftype
*pop_frame
;
218 gdbarch_store_struct_return_ftype
*store_struct_return
;
219 gdbarch_store_return_value_ftype
*store_return_value
;
220 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
221 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
222 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
223 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
224 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
225 gdbarch_skip_prologue_ftype
*skip_prologue
;
226 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
227 gdbarch_inner_than_ftype
*inner_than
;
228 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
229 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
230 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
231 CORE_ADDR decr_pc_after_break
;
232 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
233 CORE_ADDR function_start_offset
;
234 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
235 CORE_ADDR frame_args_skip
;
236 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
237 gdbarch_frame_chain_ftype
*frame_chain
;
238 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
239 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
240 gdbarch_frame_args_address_ftype
*frame_args_address
;
241 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
242 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
243 gdbarch_frame_num_args_ftype
*frame_num_args
;
244 gdbarch_stack_align_ftype
*stack_align
;
245 int extra_stack_alignment_needed
;
246 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
247 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
249 const struct floatformat
* float_format
;
250 const struct floatformat
* double_format
;
251 const struct floatformat
* long_double_format
;
252 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
253 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
254 gdbarch_smash_text_address_ftype
*smash_text_address
;
255 gdbarch_software_single_step_ftype
*software_single_step
;
256 gdbarch_print_insn_ftype
*print_insn
;
257 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
258 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
259 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
260 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
261 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
262 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
263 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
264 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
268 /* The default architecture uses host values (for want of a better
271 extern const struct bfd_arch_info bfd_default_arch_struct
;
273 struct gdbarch startup_gdbarch
=
275 1, /* Always initialized. */
276 /* basic architecture information */
277 &bfd_default_arch_struct
,
279 /* target specific vector and its dump routine */
281 /*per-architecture data-pointers and swap regions */
283 /* Multi-arch values */
287 8 * sizeof (LONGEST
),
290 8 * sizeof (long double),
320 generic_register_size
,
322 generic_register_size
,
326 default_print_float_info
,
412 generic_in_function_epilogue_p
,
413 construct_inferior_arguments
,
417 /* startup_gdbarch() */
420 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
422 /* Do any initialization needed for a non-multiarch configuration
423 after the _initialize_MODULE functions have been run. */
425 initialize_non_multiarch ()
427 alloc_gdbarch_data (&startup_gdbarch
);
428 /* Ensure that all swap areas are zeroed so that they again think
429 they are starting from scratch. */
430 clear_gdbarch_swap (&startup_gdbarch
);
431 init_gdbarch_swap (&startup_gdbarch
);
435 /* Create a new ``struct gdbarch'' based on information provided by
436 ``struct gdbarch_info''. */
439 gdbarch_alloc (const struct gdbarch_info
*info
,
440 struct gdbarch_tdep
*tdep
)
442 /* NOTE: The new architecture variable is named ``current_gdbarch''
443 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
444 the current local architecture and not the previous global
445 architecture. This ensures that the new architectures initial
446 values are not influenced by the previous architecture. Once
447 everything is parameterised with gdbarch, this will go away. */
448 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
449 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
451 alloc_gdbarch_data (current_gdbarch
);
453 current_gdbarch
->tdep
= tdep
;
455 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
456 current_gdbarch
->byte_order
= info
->byte_order
;
458 /* Force the explicit initialization of these. */
459 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
460 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
461 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
462 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
463 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
464 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
465 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
466 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
467 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
468 current_gdbarch
->char_signed
= -1;
469 current_gdbarch
->read_pc
= generic_target_read_pc
;
470 current_gdbarch
->write_pc
= generic_target_write_pc
;
471 current_gdbarch
->read_fp
= generic_target_read_fp
;
472 current_gdbarch
->read_sp
= generic_target_read_sp
;
473 current_gdbarch
->write_sp
= generic_target_write_sp
;
474 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
475 current_gdbarch
->num_regs
= -1;
476 current_gdbarch
->sp_regnum
= -1;
477 current_gdbarch
->fp_regnum
= -1;
478 current_gdbarch
->pc_regnum
= -1;
479 current_gdbarch
->ps_regnum
= -1;
480 current_gdbarch
->fp0_regnum
= -1;
481 current_gdbarch
->npc_regnum
= -1;
482 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
483 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
484 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
485 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
486 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
487 current_gdbarch
->register_name
= legacy_register_name
;
488 current_gdbarch
->register_size
= -1;
489 current_gdbarch
->register_bytes
= -1;
490 current_gdbarch
->register_raw_size
= generic_register_size
;
491 current_gdbarch
->max_register_raw_size
= -1;
492 current_gdbarch
->register_virtual_size
= generic_register_size
;
493 current_gdbarch
->max_register_virtual_size
= -1;
494 current_gdbarch
->do_registers_info
= do_registers_info
;
495 current_gdbarch
->print_float_info
= default_print_float_info
;
496 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
497 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
498 current_gdbarch
->cannot_store_register
= cannot_register_not
;
499 current_gdbarch
->use_generic_dummy_frames
= -1;
500 current_gdbarch
->call_dummy_start_offset
= -1;
501 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
502 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
503 current_gdbarch
->call_dummy_length
= -1;
504 current_gdbarch
->call_dummy_p
= -1;
505 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
506 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
507 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
508 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
509 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
510 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
511 current_gdbarch
->get_saved_register
= generic_unwind_get_saved_register
;
512 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
513 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
514 current_gdbarch
->register_to_value
= legacy_register_to_value
;
515 current_gdbarch
->value_to_register
= legacy_value_to_register
;
516 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
517 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
518 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
519 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
520 current_gdbarch
->push_arguments
= default_push_arguments
;
521 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
522 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
523 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
524 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
525 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
526 current_gdbarch
->decr_pc_after_break
= -1;
527 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
528 current_gdbarch
->function_start_offset
= -1;
529 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
530 current_gdbarch
->frame_args_skip
= -1;
531 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
532 current_gdbarch
->frame_chain_valid
= generic_func_frame_chain_valid
;
533 current_gdbarch
->extra_stack_alignment_needed
= 1;
534 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
535 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
536 current_gdbarch
->smash_text_address
= core_addr_identity
;
537 current_gdbarch
->print_insn
= legacy_print_insn
;
538 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
539 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
540 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
541 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
542 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
543 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
544 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
545 /* gdbarch_alloc() */
547 return current_gdbarch
;
551 /* Free a gdbarch struct. This should never happen in normal
552 operation --- once you've created a gdbarch, you keep it around.
553 However, if an architecture's init function encounters an error
554 building the structure, it may need to clean up a partially
555 constructed gdbarch. */
558 gdbarch_free (struct gdbarch
*arch
)
560 gdb_assert (arch
!= NULL
);
561 free_gdbarch_data (arch
);
566 /* Ensure that all values in a GDBARCH are reasonable. */
569 verify_gdbarch (struct gdbarch
*gdbarch
)
572 struct cleanup
*cleanups
;
575 /* Only perform sanity checks on a multi-arch target. */
578 log
= mem_fileopen ();
579 cleanups
= make_cleanup_ui_file_delete (log
);
581 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
582 fprintf_unfiltered (log
, "\n\tbyte-order");
583 if (gdbarch
->bfd_arch_info
== NULL
)
584 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
585 /* Check those that need to be defined for the given multi-arch level. */
586 /* Skip verify of short_bit, invalid_p == 0 */
587 /* Skip verify of int_bit, invalid_p == 0 */
588 /* Skip verify of long_bit, invalid_p == 0 */
589 /* Skip verify of long_long_bit, invalid_p == 0 */
590 /* Skip verify of float_bit, invalid_p == 0 */
591 /* Skip verify of double_bit, invalid_p == 0 */
592 /* Skip verify of long_double_bit, invalid_p == 0 */
593 /* Skip verify of ptr_bit, invalid_p == 0 */
594 if (gdbarch
->addr_bit
== 0)
595 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
596 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
597 if (gdbarch
->char_signed
== -1)
598 gdbarch
->char_signed
= 1;
599 /* Skip verify of read_pc, invalid_p == 0 */
600 /* Skip verify of write_pc, invalid_p == 0 */
601 /* Skip verify of read_fp, invalid_p == 0 */
602 /* Skip verify of read_sp, invalid_p == 0 */
603 /* Skip verify of write_sp, invalid_p == 0 */
604 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
605 /* Skip verify of register_read, has predicate */
606 /* Skip verify of register_write, has predicate */
607 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
608 && (gdbarch
->num_regs
== -1))
609 fprintf_unfiltered (log
, "\n\tnum_regs");
610 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
611 /* Skip verify of sp_regnum, invalid_p == 0 */
612 /* Skip verify of fp_regnum, invalid_p == 0 */
613 /* Skip verify of pc_regnum, invalid_p == 0 */
614 /* Skip verify of ps_regnum, invalid_p == 0 */
615 /* Skip verify of fp0_regnum, invalid_p == 0 */
616 /* Skip verify of npc_regnum, invalid_p == 0 */
617 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
618 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
619 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
620 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
621 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
622 /* Skip verify of register_name, invalid_p == 0 */
623 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
624 && (gdbarch
->register_size
== -1))
625 fprintf_unfiltered (log
, "\n\tregister_size");
626 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
627 && (gdbarch
->register_bytes
== -1))
628 fprintf_unfiltered (log
, "\n\tregister_bytes");
629 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
630 && (gdbarch
->register_byte
== 0))
631 fprintf_unfiltered (log
, "\n\tregister_byte");
632 /* Skip verify of register_raw_size, invalid_p == 0 */
633 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
634 && (gdbarch
->max_register_raw_size
== -1))
635 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
636 /* Skip verify of register_virtual_size, invalid_p == 0 */
637 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
638 && (gdbarch
->max_register_virtual_size
== -1))
639 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
640 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
641 && (gdbarch
->register_virtual_type
== 0))
642 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
643 /* Skip verify of do_registers_info, invalid_p == 0 */
644 /* Skip verify of print_float_info, invalid_p == 0 */
645 /* Skip verify of register_sim_regno, invalid_p == 0 */
646 /* Skip verify of register_bytes_ok, has predicate */
647 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
648 /* Skip verify of cannot_store_register, invalid_p == 0 */
649 /* Skip verify of get_longjmp_target, has predicate */
650 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
651 && (gdbarch
->use_generic_dummy_frames
== -1))
652 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
653 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
654 && (gdbarch
->call_dummy_location
== 0))
655 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
656 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
657 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
658 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
659 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
660 && (gdbarch
->call_dummy_start_offset
== -1))
661 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
662 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
663 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
664 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
665 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
666 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
667 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
668 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
669 && (gdbarch
->call_dummy_length
== -1))
670 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
671 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
672 && (gdbarch
->pc_in_call_dummy
== 0))
673 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
674 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
675 && (gdbarch
->call_dummy_p
== -1))
676 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
677 /* Skip verify of call_dummy_words, invalid_p == 0 */
678 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
679 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
680 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
681 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
682 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
683 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
684 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
685 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
686 && (gdbarch
->fix_call_dummy
== 0))
687 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
688 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
689 /* Skip verify of init_frame_pc, invalid_p == 0 */
690 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
691 /* Skip verify of get_saved_register, invalid_p == 0 */
692 /* Skip verify of register_convertible, invalid_p == 0 */
693 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
694 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
695 /* Skip verify of convert_register_p, invalid_p == 0 */
696 /* Skip verify of register_to_value, invalid_p == 0 */
697 /* Skip verify of value_to_register, invalid_p == 0 */
698 /* Skip verify of fetch_pseudo_register, has predicate */
699 /* Skip verify of store_pseudo_register, has predicate */
700 /* Skip verify of pointer_to_address, invalid_p == 0 */
701 /* Skip verify of address_to_pointer, invalid_p == 0 */
702 /* Skip verify of integer_to_address, has predicate */
703 /* Skip verify of return_value_on_stack, invalid_p == 0 */
704 /* Skip verify of extract_return_value, invalid_p == 0 */
705 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
706 && (gdbarch
->deprecated_extract_return_value
== 0))
707 fprintf_unfiltered (log
, "\n\tdeprecated_extract_return_value");
708 /* Skip verify of push_arguments, invalid_p == 0 */
709 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
710 && (gdbarch
->push_dummy_frame
== 0))
711 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
712 /* Skip verify of push_return_address, has predicate */
713 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
714 && (gdbarch
->pop_frame
== 0))
715 fprintf_unfiltered (log
, "\n\tpop_frame");
716 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
717 && (gdbarch
->store_struct_return
== 0))
718 fprintf_unfiltered (log
, "\n\tstore_struct_return");
719 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
720 && (gdbarch
->store_return_value
== 0))
721 fprintf_unfiltered (log
, "\n\tstore_return_value");
722 /* Skip verify of extract_struct_value_address, has predicate */
723 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
724 /* Skip verify of use_struct_convention, invalid_p == 0 */
725 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
726 && (gdbarch
->frame_init_saved_regs
== 0))
727 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
728 /* Skip verify of init_extra_frame_info, has predicate */
729 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
730 && (gdbarch
->skip_prologue
== 0))
731 fprintf_unfiltered (log
, "\n\tskip_prologue");
732 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
733 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
734 && (gdbarch
->inner_than
== 0))
735 fprintf_unfiltered (log
, "\n\tinner_than");
736 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
737 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
738 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
740 && (gdbarch
->decr_pc_after_break
== -1))
741 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
742 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
743 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
744 && (gdbarch
->function_start_offset
== -1))
745 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
746 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
747 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
748 && (gdbarch
->frame_args_skip
== -1))
749 fprintf_unfiltered (log
, "\n\tframe_args_skip");
750 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
751 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
752 && (gdbarch
->frame_chain
== 0))
753 fprintf_unfiltered (log
, "\n\tframe_chain");
754 /* Skip verify of frame_chain_valid, invalid_p == 0 */
755 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
756 && (gdbarch
->frame_saved_pc
== 0))
757 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
758 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
759 && (gdbarch
->frame_args_address
== 0))
760 fprintf_unfiltered (log
, "\n\tframe_args_address");
761 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
762 && (gdbarch
->frame_locals_address
== 0))
763 fprintf_unfiltered (log
, "\n\tframe_locals_address");
764 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
765 && (gdbarch
->saved_pc_after_call
== 0))
766 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
767 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
768 && (gdbarch
->frame_num_args
== 0))
769 fprintf_unfiltered (log
, "\n\tframe_num_args");
770 /* Skip verify of stack_align, has predicate */
771 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
772 /* Skip verify of reg_struct_has_addr, has predicate */
773 /* Skip verify of save_dummy_frame_tos, has predicate */
774 if (gdbarch
->float_format
== 0)
775 gdbarch
->float_format
= default_float_format (gdbarch
);
776 if (gdbarch
->double_format
== 0)
777 gdbarch
->double_format
= default_double_format (gdbarch
);
778 if (gdbarch
->long_double_format
== 0)
779 gdbarch
->long_double_format
= default_double_format (gdbarch
);
780 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
781 /* Skip verify of addr_bits_remove, invalid_p == 0 */
782 /* Skip verify of smash_text_address, invalid_p == 0 */
783 /* Skip verify of software_single_step, has predicate */
784 /* Skip verify of print_insn, invalid_p == 0 */
785 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
786 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
787 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
788 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
789 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
790 /* Skip verify of dwarf2_build_frame_info, has predicate */
791 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
792 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
793 buf
= ui_file_xstrdup (log
, &dummy
);
794 make_cleanup (xfree
, buf
);
795 if (strlen (buf
) > 0)
796 internal_error (__FILE__
, __LINE__
,
797 "verify_gdbarch: the following are invalid ...%s",
799 do_cleanups (cleanups
);
803 /* Print out the details of the current architecture. */
805 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
806 just happens to match the global variable ``current_gdbarch''. That
807 way macros refering to that variable get the local and not the global
808 version - ulgh. Once everything is parameterised with gdbarch, this
812 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
820 (long) current_gdbarch
->in_function_epilogue_p
);
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: register_read = 0x%08lx\n",
824 (long) current_gdbarch
->register_read
);
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: register_write = 0x%08lx\n",
828 (long) current_gdbarch
->register_write
);
829 #ifdef ADDRESS_TO_POINTER
831 /* Macro might contain `[{}]' when not multi-arch */
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: %s # %s\n",
834 "ADDRESS_TO_POINTER(type, buf, addr)",
835 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
840 (long) current_gdbarch
->address_to_pointer
841 /*ADDRESS_TO_POINTER ()*/);
843 #ifdef ADDR_BITS_REMOVE
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: %s # %s\n",
846 "ADDR_BITS_REMOVE(addr)",
847 XSTRING (ADDR_BITS_REMOVE (addr
)));
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
851 (long) current_gdbarch
->addr_bits_remove
852 /*ADDR_BITS_REMOVE ()*/);
854 #ifdef BELIEVE_PCC_PROMOTION
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
857 XSTRING (BELIEVE_PCC_PROMOTION
));
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
860 BELIEVE_PCC_PROMOTION
);
862 #ifdef BELIEVE_PCC_PROMOTION_TYPE
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
865 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
868 BELIEVE_PCC_PROMOTION_TYPE
);
870 #ifdef BREAKPOINT_FROM_PC
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: %s # %s\n",
873 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
874 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
878 (long) current_gdbarch
->breakpoint_from_pc
879 /*BREAKPOINT_FROM_PC ()*/);
881 #ifdef CALL_DUMMY_ADDRESS
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: %s # %s\n",
884 "CALL_DUMMY_ADDRESS()",
885 XSTRING (CALL_DUMMY_ADDRESS ()));
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
889 (long) current_gdbarch
->call_dummy_address
890 /*CALL_DUMMY_ADDRESS ()*/);
892 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
895 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
896 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
899 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
901 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
904 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
907 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
909 #ifdef CALL_DUMMY_LENGTH
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
912 XSTRING (CALL_DUMMY_LENGTH
));
913 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
918 #ifdef CALL_DUMMY_LOCATION
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
921 XSTRING (CALL_DUMMY_LOCATION
));
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
924 CALL_DUMMY_LOCATION
);
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: CALL_DUMMY_P # %s\n",
929 XSTRING (CALL_DUMMY_P
));
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: CALL_DUMMY_P = %d\n",
934 #ifdef CALL_DUMMY_STACK_ADJUST
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
937 XSTRING (CALL_DUMMY_STACK_ADJUST
));
938 if (CALL_DUMMY_STACK_ADJUST_P
)
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
941 (long) CALL_DUMMY_STACK_ADJUST
);
943 #ifdef CALL_DUMMY_STACK_ADJUST_P
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
946 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
949 (long) CALL_DUMMY_STACK_ADJUST_P
);
951 #ifdef CALL_DUMMY_START_OFFSET
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
954 XSTRING (CALL_DUMMY_START_OFFSET
));
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
957 (long) CALL_DUMMY_START_OFFSET
);
959 #ifdef CALL_DUMMY_WORDS
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
962 XSTRING (CALL_DUMMY_WORDS
));
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
965 (long) CALL_DUMMY_WORDS
);
967 #ifdef CANNOT_FETCH_REGISTER
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: %s # %s\n",
970 "CANNOT_FETCH_REGISTER(regnum)",
971 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
975 (long) current_gdbarch
->cannot_fetch_register
976 /*CANNOT_FETCH_REGISTER ()*/);
978 #ifdef CANNOT_STORE_REGISTER
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: %s # %s\n",
981 "CANNOT_STORE_REGISTER(regnum)",
982 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
986 (long) current_gdbarch
->cannot_store_register
987 /*CANNOT_STORE_REGISTER ()*/);
989 #ifdef COERCE_FLOAT_TO_DOUBLE
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: %s # %s\n",
992 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
993 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
997 (long) current_gdbarch
->coerce_float_to_double
998 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1000 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1002 /* Macro might contain `[{}]' when not multi-arch */
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: %s # %s\n",
1005 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1006 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1011 (long) current_gdbarch
->coff_make_msymbol_special
1012 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1017 (long) current_gdbarch
->construct_inferior_arguments
);
1018 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1019 fprintf_unfiltered (file
,
1020 "gdbarch_dump: %s # %s\n",
1021 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1022 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1026 (long) current_gdbarch
->convert_from_func_ptr_addr
1027 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1029 #ifdef CONVERT_REGISTER_P
1030 fprintf_unfiltered (file
,
1031 "gdbarch_dump: %s # %s\n",
1032 "CONVERT_REGISTER_P(regnum)",
1033 XSTRING (CONVERT_REGISTER_P (regnum
)));
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1037 (long) current_gdbarch
->convert_register_p
1038 /*CONVERT_REGISTER_P ()*/);
1040 #ifdef DECR_PC_AFTER_BREAK
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1043 XSTRING (DECR_PC_AFTER_BREAK
));
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1046 (long) DECR_PC_AFTER_BREAK
);
1048 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1050 /* Macro might contain `[{}]' when not multi-arch */
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: %s # %s\n",
1053 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1054 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1057 fprintf_unfiltered (file
,
1058 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1059 (long) current_gdbarch
->deprecated_extract_return_value
1060 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1062 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: %s # %s\n",
1065 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1066 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1070 (long) current_gdbarch
->deprecated_extract_struct_value_address
1071 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1073 #ifdef DO_REGISTERS_INFO
1075 /* Macro might contain `[{}]' when not multi-arch */
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: %s # %s\n",
1078 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1079 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1084 (long) current_gdbarch
->do_registers_info
1085 /*DO_REGISTERS_INFO ()*/);
1087 #ifdef DWARF2_BUILD_FRAME_INFO
1089 /* Macro might contain `[{}]' when not multi-arch */
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: %s # %s\n",
1092 "DWARF2_BUILD_FRAME_INFO(objfile)",
1093 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1098 (long) current_gdbarch
->dwarf2_build_frame_info
1099 /*DWARF2_BUILD_FRAME_INFO ()*/);
1101 #ifdef DWARF2_REG_TO_REGNUM
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: %s # %s\n",
1104 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1105 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1109 (long) current_gdbarch
->dwarf2_reg_to_regnum
1110 /*DWARF2_REG_TO_REGNUM ()*/);
1112 #ifdef DWARF_REG_TO_REGNUM
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: %s # %s\n",
1115 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1116 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1120 (long) current_gdbarch
->dwarf_reg_to_regnum
1121 /*DWARF_REG_TO_REGNUM ()*/);
1123 #ifdef ECOFF_REG_TO_REGNUM
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: %s # %s\n",
1126 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1127 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1131 (long) current_gdbarch
->ecoff_reg_to_regnum
1132 /*ECOFF_REG_TO_REGNUM ()*/);
1134 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1136 /* Macro might contain `[{}]' when not multi-arch */
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: %s # %s\n",
1139 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1140 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1145 (long) current_gdbarch
->elf_make_msymbol_special
1146 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1148 #ifdef EXTRACT_RETURN_VALUE
1150 /* Macro might contain `[{}]' when not multi-arch */
1151 fprintf_unfiltered (file
,
1152 "gdbarch_dump: %s # %s\n",
1153 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1154 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1159 (long) current_gdbarch
->extract_return_value
1160 /*EXTRACT_RETURN_VALUE ()*/);
1162 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: %s # %s\n",
1165 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1166 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1170 (long) current_gdbarch
->extract_struct_value_address
1171 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1173 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1176 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1179 EXTRA_STACK_ALIGNMENT_NEEDED
);
1181 #ifdef FETCH_PSEUDO_REGISTER
1183 /* Macro might contain `[{}]' when not multi-arch */
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: %s # %s\n",
1186 "FETCH_PSEUDO_REGISTER(regnum)",
1187 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1192 (long) current_gdbarch
->fetch_pseudo_register
1193 /*FETCH_PSEUDO_REGISTER ()*/);
1195 #ifdef FIX_CALL_DUMMY
1197 /* Macro might contain `[{}]' when not multi-arch */
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: %s # %s\n",
1200 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1201 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1206 (long) current_gdbarch
->fix_call_dummy
1207 /*FIX_CALL_DUMMY ()*/);
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: FP0_REGNUM # %s\n",
1212 XSTRING (FP0_REGNUM
));
1213 fprintf_unfiltered (file
,
1214 "gdbarch_dump: FP0_REGNUM = %d\n",
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: FP_REGNUM # %s\n",
1220 XSTRING (FP_REGNUM
));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: FP_REGNUM = %d\n",
1225 #ifdef FRAMELESS_FUNCTION_INVOCATION
1226 fprintf_unfiltered (file
,
1227 "gdbarch_dump: %s # %s\n",
1228 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1229 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1231 fprintf_unfiltered (file
,
1232 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1233 (long) current_gdbarch
->frameless_function_invocation
1234 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1236 #ifdef FRAME_ARGS_ADDRESS
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: %s # %s\n",
1239 "FRAME_ARGS_ADDRESS(fi)",
1240 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1244 (long) current_gdbarch
->frame_args_address
1245 /*FRAME_ARGS_ADDRESS ()*/);
1247 #ifdef FRAME_ARGS_SKIP
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1250 XSTRING (FRAME_ARGS_SKIP
));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1253 (long) FRAME_ARGS_SKIP
);
1256 fprintf_unfiltered (file
,
1257 "gdbarch_dump: %s # %s\n",
1258 "FRAME_CHAIN(frame)",
1259 XSTRING (FRAME_CHAIN (frame
)));
1261 fprintf_unfiltered (file
,
1262 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1263 (long) current_gdbarch
->frame_chain
1264 /*FRAME_CHAIN ()*/);
1266 #ifdef FRAME_CHAIN_VALID
1267 fprintf_unfiltered (file
,
1268 "gdbarch_dump: %s # %s\n",
1269 "FRAME_CHAIN_VALID(chain, thisframe)",
1270 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1274 (long) current_gdbarch
->frame_chain_valid
1275 /*FRAME_CHAIN_VALID ()*/);
1277 #ifdef FRAME_INIT_SAVED_REGS
1279 /* Macro might contain `[{}]' when not multi-arch */
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: %s # %s\n",
1282 "FRAME_INIT_SAVED_REGS(frame)",
1283 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1286 fprintf_unfiltered (file
,
1287 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1288 (long) current_gdbarch
->frame_init_saved_regs
1289 /*FRAME_INIT_SAVED_REGS ()*/);
1291 #ifdef FRAME_LOCALS_ADDRESS
1292 fprintf_unfiltered (file
,
1293 "gdbarch_dump: %s # %s\n",
1294 "FRAME_LOCALS_ADDRESS(fi)",
1295 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1299 (long) current_gdbarch
->frame_locals_address
1300 /*FRAME_LOCALS_ADDRESS ()*/);
1302 #ifdef FRAME_NUM_ARGS
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: %s # %s\n",
1305 "FRAME_NUM_ARGS(frame)",
1306 XSTRING (FRAME_NUM_ARGS (frame
)));
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1310 (long) current_gdbarch
->frame_num_args
1311 /*FRAME_NUM_ARGS ()*/);
1313 #ifdef FRAME_SAVED_PC
1314 fprintf_unfiltered (file
,
1315 "gdbarch_dump: %s # %s\n",
1316 "FRAME_SAVED_PC(fi)",
1317 XSTRING (FRAME_SAVED_PC (fi
)));
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1321 (long) current_gdbarch
->frame_saved_pc
1322 /*FRAME_SAVED_PC ()*/);
1324 #ifdef FUNCTION_START_OFFSET
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1327 XSTRING (FUNCTION_START_OFFSET
));
1328 fprintf_unfiltered (file
,
1329 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1330 (long) FUNCTION_START_OFFSET
);
1332 #ifdef GET_LONGJMP_TARGET
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: %s # %s\n",
1335 "GET_LONGJMP_TARGET(pc)",
1336 XSTRING (GET_LONGJMP_TARGET (pc
)));
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1340 (long) current_gdbarch
->get_longjmp_target
1341 /*GET_LONGJMP_TARGET ()*/);
1343 #ifdef GET_SAVED_REGISTER
1345 /* Macro might contain `[{}]' when not multi-arch */
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: %s # %s\n",
1348 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1349 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1354 (long) current_gdbarch
->get_saved_register
1355 /*GET_SAVED_REGISTER ()*/);
1357 #ifdef INIT_EXTRA_FRAME_INFO
1359 /* Macro might contain `[{}]' when not multi-arch */
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: %s # %s\n",
1362 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1363 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1366 fprintf_unfiltered (file
,
1367 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1368 (long) current_gdbarch
->init_extra_frame_info
1369 /*INIT_EXTRA_FRAME_INFO ()*/);
1371 #ifdef INIT_FRAME_PC
1373 /* Macro might contain `[{}]' when not multi-arch */
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: %s # %s\n",
1376 "INIT_FRAME_PC(fromleaf, prev)",
1377 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1382 (long) current_gdbarch
->init_frame_pc
1383 /*INIT_FRAME_PC ()*/);
1385 #ifdef INIT_FRAME_PC_FIRST
1387 /* Macro might contain `[{}]' when not multi-arch */
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: %s # %s\n",
1390 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1391 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1396 (long) current_gdbarch
->init_frame_pc_first
1397 /*INIT_FRAME_PC_FIRST ()*/);
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: %s # %s\n",
1402 "INNER_THAN(lhs, rhs)",
1403 XSTRING (INNER_THAN (lhs
, rhs
)));
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1407 (long) current_gdbarch
->inner_than
1410 #ifdef INTEGER_TO_ADDRESS
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: %s # %s\n",
1413 "INTEGER_TO_ADDRESS(type, buf)",
1414 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1418 (long) current_gdbarch
->integer_to_address
1419 /*INTEGER_TO_ADDRESS ()*/);
1421 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1422 fprintf_unfiltered (file
,
1423 "gdbarch_dump: %s # %s\n",
1424 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1425 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1429 (long) current_gdbarch
->in_solib_call_trampoline
1430 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1432 #ifdef MAX_REGISTER_RAW_SIZE
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1435 XSTRING (MAX_REGISTER_RAW_SIZE
));
1436 fprintf_unfiltered (file
,
1437 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1438 MAX_REGISTER_RAW_SIZE
);
1440 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1443 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1444 fprintf_unfiltered (file
,
1445 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1446 MAX_REGISTER_VIRTUAL_SIZE
);
1448 #ifdef MEMORY_INSERT_BREAKPOINT
1449 fprintf_unfiltered (file
,
1450 "gdbarch_dump: %s # %s\n",
1451 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1452 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1456 (long) current_gdbarch
->memory_insert_breakpoint
1457 /*MEMORY_INSERT_BREAKPOINT ()*/);
1459 #ifdef MEMORY_REMOVE_BREAKPOINT
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: %s # %s\n",
1462 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1463 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1467 (long) current_gdbarch
->memory_remove_breakpoint
1468 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: NPC_REGNUM # %s\n",
1473 XSTRING (NPC_REGNUM
));
1474 fprintf_unfiltered (file
,
1475 "gdbarch_dump: NPC_REGNUM = %d\n",
1478 #ifdef NUM_PSEUDO_REGS
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1481 XSTRING (NUM_PSEUDO_REGS
));
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: NUM_REGS # %s\n",
1489 XSTRING (NUM_REGS
));
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: NUM_REGS = %d\n",
1494 #ifdef PARM_BOUNDARY
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1497 XSTRING (PARM_BOUNDARY
));
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1502 #ifdef PC_IN_CALL_DUMMY
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: %s # %s\n",
1505 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1506 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1510 (long) current_gdbarch
->pc_in_call_dummy
1511 /*PC_IN_CALL_DUMMY ()*/);
1513 #ifdef PC_IN_SIGTRAMP
1514 fprintf_unfiltered (file
,
1515 "gdbarch_dump: %s # %s\n",
1516 "PC_IN_SIGTRAMP(pc, name)",
1517 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1519 fprintf_unfiltered (file
,
1520 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1521 (long) current_gdbarch
->pc_in_sigtramp
1522 /*PC_IN_SIGTRAMP ()*/);
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: PC_REGNUM # %s\n",
1527 XSTRING (PC_REGNUM
));
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: PC_REGNUM = %d\n",
1532 #ifdef POINTER_TO_ADDRESS
1533 fprintf_unfiltered (file
,
1534 "gdbarch_dump: %s # %s\n",
1535 "POINTER_TO_ADDRESS(type, buf)",
1536 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1540 (long) current_gdbarch
->pointer_to_address
1541 /*POINTER_TO_ADDRESS ()*/);
1545 /* Macro might contain `[{}]' when not multi-arch */
1546 fprintf_unfiltered (file
,
1547 "gdbarch_dump: %s # %s\n",
1549 XSTRING (POP_FRAME (-)));
1552 fprintf_unfiltered (file
,
1553 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1554 (long) current_gdbarch
->pop_frame
1557 #ifdef PREPARE_TO_PROCEED
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: %s # %s\n",
1560 "PREPARE_TO_PROCEED(select_it)",
1561 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1565 (long) current_gdbarch
->prepare_to_proceed
1566 /*PREPARE_TO_PROCEED ()*/);
1569 fprintf_unfiltered (file
,
1570 "gdbarch_dump: print_float_info = 0x%08lx\n",
1571 (long) current_gdbarch
->print_float_info
);
1572 #ifdef PROLOGUE_FRAMELESS_P
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: %s # %s\n",
1575 "PROLOGUE_FRAMELESS_P(ip)",
1576 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1578 fprintf_unfiltered (file
,
1579 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1580 (long) current_gdbarch
->prologue_frameless_p
1581 /*PROLOGUE_FRAMELESS_P ()*/);
1584 fprintf_unfiltered (file
,
1585 "gdbarch_dump: PS_REGNUM # %s\n",
1586 XSTRING (PS_REGNUM
));
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: PS_REGNUM = %d\n",
1591 #ifdef PUSH_ARGUMENTS
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: %s # %s\n",
1594 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1595 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1599 (long) current_gdbarch
->push_arguments
1600 /*PUSH_ARGUMENTS ()*/);
1602 #ifdef PUSH_DUMMY_FRAME
1604 /* Macro might contain `[{}]' when not multi-arch */
1605 fprintf_unfiltered (file
,
1606 "gdbarch_dump: %s # %s\n",
1607 "PUSH_DUMMY_FRAME(-)",
1608 XSTRING (PUSH_DUMMY_FRAME (-)));
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1613 (long) current_gdbarch
->push_dummy_frame
1614 /*PUSH_DUMMY_FRAME ()*/);
1616 #ifdef PUSH_RETURN_ADDRESS
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: %s # %s\n",
1619 "PUSH_RETURN_ADDRESS(pc, sp)",
1620 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1624 (long) current_gdbarch
->push_return_address
1625 /*PUSH_RETURN_ADDRESS ()*/);
1627 #ifdef REGISTER_BYTE
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: %s # %s\n",
1630 "REGISTER_BYTE(reg_nr)",
1631 XSTRING (REGISTER_BYTE (reg_nr
)));
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1635 (long) current_gdbarch
->register_byte
1636 /*REGISTER_BYTE ()*/);
1638 #ifdef REGISTER_BYTES
1639 fprintf_unfiltered (file
,
1640 "gdbarch_dump: REGISTER_BYTES # %s\n",
1641 XSTRING (REGISTER_BYTES
));
1642 fprintf_unfiltered (file
,
1643 "gdbarch_dump: REGISTER_BYTES = %d\n",
1646 #ifdef REGISTER_BYTES_OK
1647 fprintf_unfiltered (file
,
1648 "gdbarch_dump: %s # %s\n",
1649 "REGISTER_BYTES_OK(nr_bytes)",
1650 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1654 (long) current_gdbarch
->register_bytes_ok
1655 /*REGISTER_BYTES_OK ()*/);
1657 #ifdef REGISTER_CONVERTIBLE
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: %s # %s\n",
1660 "REGISTER_CONVERTIBLE(nr)",
1661 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1665 (long) current_gdbarch
->register_convertible
1666 /*REGISTER_CONVERTIBLE ()*/);
1668 #ifdef REGISTER_CONVERT_TO_RAW
1670 /* Macro might contain `[{}]' when not multi-arch */
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: %s # %s\n",
1673 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1674 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1679 (long) current_gdbarch
->register_convert_to_raw
1680 /*REGISTER_CONVERT_TO_RAW ()*/);
1682 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1684 /* Macro might contain `[{}]' when not multi-arch */
1685 fprintf_unfiltered (file
,
1686 "gdbarch_dump: %s # %s\n",
1687 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1688 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1693 (long) current_gdbarch
->register_convert_to_virtual
1694 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1696 #ifdef REGISTER_NAME
1697 fprintf_unfiltered (file
,
1698 "gdbarch_dump: %s # %s\n",
1699 "REGISTER_NAME(regnr)",
1700 XSTRING (REGISTER_NAME (regnr
)));
1702 fprintf_unfiltered (file
,
1703 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1704 (long) current_gdbarch
->register_name
1705 /*REGISTER_NAME ()*/);
1707 #ifdef REGISTER_RAW_SIZE
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: %s # %s\n",
1710 "REGISTER_RAW_SIZE(reg_nr)",
1711 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1715 (long) current_gdbarch
->register_raw_size
1716 /*REGISTER_RAW_SIZE ()*/);
1718 #ifdef REGISTER_SIM_REGNO
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: %s # %s\n",
1721 "REGISTER_SIM_REGNO(reg_nr)",
1722 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1724 fprintf_unfiltered (file
,
1725 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1726 (long) current_gdbarch
->register_sim_regno
1727 /*REGISTER_SIM_REGNO ()*/);
1729 #ifdef REGISTER_SIZE
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: REGISTER_SIZE # %s\n",
1732 XSTRING (REGISTER_SIZE
));
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: REGISTER_SIZE = %d\n",
1737 #ifdef REGISTER_TO_VALUE
1739 /* Macro might contain `[{}]' when not multi-arch */
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: %s # %s\n",
1742 "REGISTER_TO_VALUE(regnum, type, from, to)",
1743 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1748 (long) current_gdbarch
->register_to_value
1749 /*REGISTER_TO_VALUE ()*/);
1751 #ifdef REGISTER_VIRTUAL_SIZE
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: %s # %s\n",
1754 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1755 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1759 (long) current_gdbarch
->register_virtual_size
1760 /*REGISTER_VIRTUAL_SIZE ()*/);
1762 #ifdef REGISTER_VIRTUAL_TYPE
1763 fprintf_unfiltered (file
,
1764 "gdbarch_dump: %s # %s\n",
1765 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1766 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1770 (long) current_gdbarch
->register_virtual_type
1771 /*REGISTER_VIRTUAL_TYPE ()*/);
1773 #ifdef REG_STRUCT_HAS_ADDR
1774 fprintf_unfiltered (file
,
1775 "gdbarch_dump: %s # %s\n",
1776 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1777 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1781 (long) current_gdbarch
->reg_struct_has_addr
1782 /*REG_STRUCT_HAS_ADDR ()*/);
1784 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1786 /* Macro might contain `[{}]' when not multi-arch */
1787 fprintf_unfiltered (file
,
1788 "gdbarch_dump: %s # %s\n",
1789 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1790 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1795 (long) current_gdbarch
->remote_translate_xfer_address
1796 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1798 #ifdef RETURN_VALUE_ON_STACK
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: %s # %s\n",
1801 "RETURN_VALUE_ON_STACK(type)",
1802 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1806 (long) current_gdbarch
->return_value_on_stack
1807 /*RETURN_VALUE_ON_STACK ()*/);
1809 #ifdef SAVED_PC_AFTER_CALL
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: %s # %s\n",
1812 "SAVED_PC_AFTER_CALL(frame)",
1813 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1817 (long) current_gdbarch
->saved_pc_after_call
1818 /*SAVED_PC_AFTER_CALL ()*/);
1820 #ifdef SAVE_DUMMY_FRAME_TOS
1822 /* Macro might contain `[{}]' when not multi-arch */
1823 fprintf_unfiltered (file
,
1824 "gdbarch_dump: %s # %s\n",
1825 "SAVE_DUMMY_FRAME_TOS(sp)",
1826 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1829 fprintf_unfiltered (file
,
1830 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1831 (long) current_gdbarch
->save_dummy_frame_tos
1832 /*SAVE_DUMMY_FRAME_TOS ()*/);
1834 #ifdef SDB_REG_TO_REGNUM
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: %s # %s\n",
1837 "SDB_REG_TO_REGNUM(sdb_regnr)",
1838 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1842 (long) current_gdbarch
->sdb_reg_to_regnum
1843 /*SDB_REG_TO_REGNUM ()*/);
1845 #ifdef SIZEOF_CALL_DUMMY_WORDS
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1848 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1851 (long) SIZEOF_CALL_DUMMY_WORDS
);
1853 #ifdef SKIP_PROLOGUE
1854 fprintf_unfiltered (file
,
1855 "gdbarch_dump: %s # %s\n",
1856 "SKIP_PROLOGUE(ip)",
1857 XSTRING (SKIP_PROLOGUE (ip
)));
1859 fprintf_unfiltered (file
,
1860 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1861 (long) current_gdbarch
->skip_prologue
1862 /*SKIP_PROLOGUE ()*/);
1864 #ifdef SKIP_TRAMPOLINE_CODE
1865 fprintf_unfiltered (file
,
1866 "gdbarch_dump: %s # %s\n",
1867 "SKIP_TRAMPOLINE_CODE(pc)",
1868 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1870 fprintf_unfiltered (file
,
1871 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1872 (long) current_gdbarch
->skip_trampoline_code
1873 /*SKIP_TRAMPOLINE_CODE ()*/);
1875 #ifdef SMASH_TEXT_ADDRESS
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: %s # %s\n",
1878 "SMASH_TEXT_ADDRESS(addr)",
1879 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1883 (long) current_gdbarch
->smash_text_address
1884 /*SMASH_TEXT_ADDRESS ()*/);
1886 #ifdef SOFTWARE_SINGLE_STEP
1888 /* Macro might contain `[{}]' when not multi-arch */
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: %s # %s\n",
1891 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1892 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1897 (long) current_gdbarch
->software_single_step
1898 /*SOFTWARE_SINGLE_STEP ()*/);
1901 fprintf_unfiltered (file
,
1902 "gdbarch_dump: SP_REGNUM # %s\n",
1903 XSTRING (SP_REGNUM
));
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: SP_REGNUM = %d\n",
1908 #ifdef STAB_REG_TO_REGNUM
1909 fprintf_unfiltered (file
,
1910 "gdbarch_dump: %s # %s\n",
1911 "STAB_REG_TO_REGNUM(stab_regnr)",
1912 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1916 (long) current_gdbarch
->stab_reg_to_regnum
1917 /*STAB_REG_TO_REGNUM ()*/);
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: %s # %s\n",
1923 XSTRING (STACK_ALIGN (sp
)));
1925 fprintf_unfiltered (file
,
1926 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1927 (long) current_gdbarch
->stack_align
1928 /*STACK_ALIGN ()*/);
1930 #ifdef STORE_PSEUDO_REGISTER
1932 /* Macro might contain `[{}]' when not multi-arch */
1933 fprintf_unfiltered (file
,
1934 "gdbarch_dump: %s # %s\n",
1935 "STORE_PSEUDO_REGISTER(regnum)",
1936 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1941 (long) current_gdbarch
->store_pseudo_register
1942 /*STORE_PSEUDO_REGISTER ()*/);
1944 #ifdef STORE_RETURN_VALUE
1946 /* Macro might contain `[{}]' when not multi-arch */
1947 fprintf_unfiltered (file
,
1948 "gdbarch_dump: %s # %s\n",
1949 "STORE_RETURN_VALUE(type, valbuf)",
1950 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1955 (long) current_gdbarch
->store_return_value
1956 /*STORE_RETURN_VALUE ()*/);
1958 #ifdef STORE_STRUCT_RETURN
1960 /* Macro might contain `[{}]' when not multi-arch */
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: %s # %s\n",
1963 "STORE_STRUCT_RETURN(addr, sp)",
1964 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1969 (long) current_gdbarch
->store_struct_return
1970 /*STORE_STRUCT_RETURN ()*/);
1972 #ifdef TARGET_ADDR_BIT
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1975 XSTRING (TARGET_ADDR_BIT
));
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1980 #ifdef TARGET_ARCHITECTURE
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1983 XSTRING (TARGET_ARCHITECTURE
));
1984 if (TARGET_ARCHITECTURE
!= NULL
)
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1987 TARGET_ARCHITECTURE
->printable_name
);
1989 #ifdef TARGET_BFD_VMA_BIT
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1992 XSTRING (TARGET_BFD_VMA_BIT
));
1993 fprintf_unfiltered (file
,
1994 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1995 TARGET_BFD_VMA_BIT
);
1997 #ifdef TARGET_BYTE_ORDER
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2000 XSTRING (TARGET_BYTE_ORDER
));
2001 fprintf_unfiltered (file
,
2002 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2003 (long) TARGET_BYTE_ORDER
);
2005 #ifdef TARGET_CHAR_SIGNED
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2008 XSTRING (TARGET_CHAR_SIGNED
));
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2011 TARGET_CHAR_SIGNED
);
2013 #ifdef TARGET_DOUBLE_BIT
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2016 XSTRING (TARGET_DOUBLE_BIT
));
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2021 #ifdef TARGET_DOUBLE_FORMAT
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2024 XSTRING (TARGET_DOUBLE_FORMAT
));
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2027 (long) TARGET_DOUBLE_FORMAT
);
2029 #ifdef TARGET_FLOAT_BIT
2030 fprintf_unfiltered (file
,
2031 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2032 XSTRING (TARGET_FLOAT_BIT
));
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2037 #ifdef TARGET_FLOAT_FORMAT
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2040 XSTRING (TARGET_FLOAT_FORMAT
));
2041 fprintf_unfiltered (file
,
2042 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2043 (long) TARGET_FLOAT_FORMAT
);
2045 #ifdef TARGET_INT_BIT
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2048 XSTRING (TARGET_INT_BIT
));
2049 fprintf_unfiltered (file
,
2050 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2053 #ifdef TARGET_LONG_BIT
2054 fprintf_unfiltered (file
,
2055 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2056 XSTRING (TARGET_LONG_BIT
));
2057 fprintf_unfiltered (file
,
2058 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2061 #ifdef TARGET_LONG_DOUBLE_BIT
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2064 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2067 TARGET_LONG_DOUBLE_BIT
);
2069 #ifdef TARGET_LONG_DOUBLE_FORMAT
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2072 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2073 fprintf_unfiltered (file
,
2074 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2075 (long) TARGET_LONG_DOUBLE_FORMAT
);
2077 #ifdef TARGET_LONG_LONG_BIT
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2080 XSTRING (TARGET_LONG_LONG_BIT
));
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2083 TARGET_LONG_LONG_BIT
);
2085 #ifdef TARGET_PRINT_INSN
2086 fprintf_unfiltered (file
,
2087 "gdbarch_dump: %s # %s\n",
2088 "TARGET_PRINT_INSN(vma, info)",
2089 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2091 fprintf_unfiltered (file
,
2092 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2093 (long) current_gdbarch
->print_insn
2094 /*TARGET_PRINT_INSN ()*/);
2096 #ifdef TARGET_PTR_BIT
2097 fprintf_unfiltered (file
,
2098 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2099 XSTRING (TARGET_PTR_BIT
));
2100 fprintf_unfiltered (file
,
2101 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2104 #ifdef TARGET_READ_FP
2105 fprintf_unfiltered (file
,
2106 "gdbarch_dump: %s # %s\n",
2108 XSTRING (TARGET_READ_FP ()));
2110 fprintf_unfiltered (file
,
2111 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2112 (long) current_gdbarch
->read_fp
2113 /*TARGET_READ_FP ()*/);
2115 #ifdef TARGET_READ_PC
2116 fprintf_unfiltered (file
,
2117 "gdbarch_dump: %s # %s\n",
2118 "TARGET_READ_PC(ptid)",
2119 XSTRING (TARGET_READ_PC (ptid
)));
2121 fprintf_unfiltered (file
,
2122 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2123 (long) current_gdbarch
->read_pc
2124 /*TARGET_READ_PC ()*/);
2126 #ifdef TARGET_READ_SP
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: %s # %s\n",
2130 XSTRING (TARGET_READ_SP ()));
2132 fprintf_unfiltered (file
,
2133 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2134 (long) current_gdbarch
->read_sp
2135 /*TARGET_READ_SP ()*/);
2137 #ifdef TARGET_SHORT_BIT
2138 fprintf_unfiltered (file
,
2139 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2140 XSTRING (TARGET_SHORT_BIT
));
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2145 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2147 /* Macro might contain `[{}]' when not multi-arch */
2148 fprintf_unfiltered (file
,
2149 "gdbarch_dump: %s # %s\n",
2150 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2151 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2156 (long) current_gdbarch
->virtual_frame_pointer
2157 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2159 #ifdef TARGET_WRITE_PC
2161 /* Macro might contain `[{}]' when not multi-arch */
2162 fprintf_unfiltered (file
,
2163 "gdbarch_dump: %s # %s\n",
2164 "TARGET_WRITE_PC(val, ptid)",
2165 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2168 fprintf_unfiltered (file
,
2169 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2170 (long) current_gdbarch
->write_pc
2171 /*TARGET_WRITE_PC ()*/);
2173 #ifdef TARGET_WRITE_SP
2175 /* Macro might contain `[{}]' when not multi-arch */
2176 fprintf_unfiltered (file
,
2177 "gdbarch_dump: %s # %s\n",
2178 "TARGET_WRITE_SP(val)",
2179 XSTRING (TARGET_WRITE_SP (val
)));
2182 fprintf_unfiltered (file
,
2183 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2184 (long) current_gdbarch
->write_sp
2185 /*TARGET_WRITE_SP ()*/);
2187 #ifdef USE_GENERIC_DUMMY_FRAMES
2188 fprintf_unfiltered (file
,
2189 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2190 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2191 fprintf_unfiltered (file
,
2192 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2193 USE_GENERIC_DUMMY_FRAMES
);
2195 #ifdef USE_STRUCT_CONVENTION
2196 fprintf_unfiltered (file
,
2197 "gdbarch_dump: %s # %s\n",
2198 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2199 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2201 fprintf_unfiltered (file
,
2202 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2203 (long) current_gdbarch
->use_struct_convention
2204 /*USE_STRUCT_CONVENTION ()*/);
2206 #ifdef VALUE_TO_REGISTER
2208 /* Macro might contain `[{}]' when not multi-arch */
2209 fprintf_unfiltered (file
,
2210 "gdbarch_dump: %s # %s\n",
2211 "VALUE_TO_REGISTER(type, regnum, from, to)",
2212 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2215 fprintf_unfiltered (file
,
2216 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2217 (long) current_gdbarch
->value_to_register
2218 /*VALUE_TO_REGISTER ()*/);
2220 if (current_gdbarch
->dump_tdep
!= NULL
)
2221 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2224 struct gdbarch_tdep
*
2225 gdbarch_tdep (struct gdbarch
*gdbarch
)
2227 if (gdbarch_debug
>= 2)
2228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2229 return gdbarch
->tdep
;
2233 const struct bfd_arch_info
*
2234 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2236 gdb_assert (gdbarch
!= NULL
);
2237 if (gdbarch_debug
>= 2)
2238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2239 return gdbarch
->bfd_arch_info
;
2243 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2245 gdb_assert (gdbarch
!= NULL
);
2246 if (gdbarch_debug
>= 2)
2247 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2248 return gdbarch
->byte_order
;
2252 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2254 gdb_assert (gdbarch
!= NULL
);
2255 /* Skip verify of short_bit, invalid_p == 0 */
2256 if (gdbarch_debug
>= 2)
2257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2258 return gdbarch
->short_bit
;
2262 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2265 gdbarch
->short_bit
= short_bit
;
2269 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2271 gdb_assert (gdbarch
!= NULL
);
2272 /* Skip verify of int_bit, invalid_p == 0 */
2273 if (gdbarch_debug
>= 2)
2274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2275 return gdbarch
->int_bit
;
2279 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2282 gdbarch
->int_bit
= int_bit
;
2286 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2288 gdb_assert (gdbarch
!= NULL
);
2289 /* Skip verify of long_bit, invalid_p == 0 */
2290 if (gdbarch_debug
>= 2)
2291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2292 return gdbarch
->long_bit
;
2296 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2299 gdbarch
->long_bit
= long_bit
;
2303 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2305 gdb_assert (gdbarch
!= NULL
);
2306 /* Skip verify of long_long_bit, invalid_p == 0 */
2307 if (gdbarch_debug
>= 2)
2308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2309 return gdbarch
->long_long_bit
;
2313 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2316 gdbarch
->long_long_bit
= long_long_bit
;
2320 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2322 gdb_assert (gdbarch
!= NULL
);
2323 /* Skip verify of float_bit, invalid_p == 0 */
2324 if (gdbarch_debug
>= 2)
2325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2326 return gdbarch
->float_bit
;
2330 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2333 gdbarch
->float_bit
= float_bit
;
2337 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2339 gdb_assert (gdbarch
!= NULL
);
2340 /* Skip verify of double_bit, invalid_p == 0 */
2341 if (gdbarch_debug
>= 2)
2342 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2343 return gdbarch
->double_bit
;
2347 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2350 gdbarch
->double_bit
= double_bit
;
2354 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2356 gdb_assert (gdbarch
!= NULL
);
2357 /* Skip verify of long_double_bit, invalid_p == 0 */
2358 if (gdbarch_debug
>= 2)
2359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2360 return gdbarch
->long_double_bit
;
2364 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2365 int long_double_bit
)
2367 gdbarch
->long_double_bit
= long_double_bit
;
2371 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2373 gdb_assert (gdbarch
!= NULL
);
2374 /* Skip verify of ptr_bit, invalid_p == 0 */
2375 if (gdbarch_debug
>= 2)
2376 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2377 return gdbarch
->ptr_bit
;
2381 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2384 gdbarch
->ptr_bit
= ptr_bit
;
2388 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2390 gdb_assert (gdbarch
!= NULL
);
2391 if (gdbarch
->addr_bit
== 0)
2392 internal_error (__FILE__
, __LINE__
,
2393 "gdbarch: gdbarch_addr_bit invalid");
2394 if (gdbarch_debug
>= 2)
2395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2396 return gdbarch
->addr_bit
;
2400 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2403 gdbarch
->addr_bit
= addr_bit
;
2407 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2409 gdb_assert (gdbarch
!= NULL
);
2410 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2411 if (gdbarch_debug
>= 2)
2412 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2413 return gdbarch
->bfd_vma_bit
;
2417 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2420 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2424 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2426 gdb_assert (gdbarch
!= NULL
);
2427 if (gdbarch
->char_signed
== -1)
2428 internal_error (__FILE__
, __LINE__
,
2429 "gdbarch: gdbarch_char_signed invalid");
2430 if (gdbarch_debug
>= 2)
2431 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2432 return gdbarch
->char_signed
;
2436 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2439 gdbarch
->char_signed
= char_signed
;
2443 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2445 gdb_assert (gdbarch
!= NULL
);
2446 if (gdbarch
->read_pc
== 0)
2447 internal_error (__FILE__
, __LINE__
,
2448 "gdbarch: gdbarch_read_pc invalid");
2449 if (gdbarch_debug
>= 2)
2450 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2451 return gdbarch
->read_pc (ptid
);
2455 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2456 gdbarch_read_pc_ftype read_pc
)
2458 gdbarch
->read_pc
= read_pc
;
2462 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2464 gdb_assert (gdbarch
!= NULL
);
2465 if (gdbarch
->write_pc
== 0)
2466 internal_error (__FILE__
, __LINE__
,
2467 "gdbarch: gdbarch_write_pc invalid");
2468 if (gdbarch_debug
>= 2)
2469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2470 gdbarch
->write_pc (val
, ptid
);
2474 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2475 gdbarch_write_pc_ftype write_pc
)
2477 gdbarch
->write_pc
= write_pc
;
2481 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2483 gdb_assert (gdbarch
!= NULL
);
2484 if (gdbarch
->read_fp
== 0)
2485 internal_error (__FILE__
, __LINE__
,
2486 "gdbarch: gdbarch_read_fp invalid");
2487 if (gdbarch_debug
>= 2)
2488 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2489 return gdbarch
->read_fp ();
2493 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2494 gdbarch_read_fp_ftype read_fp
)
2496 gdbarch
->read_fp
= read_fp
;
2500 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2502 gdb_assert (gdbarch
!= NULL
);
2503 if (gdbarch
->read_sp
== 0)
2504 internal_error (__FILE__
, __LINE__
,
2505 "gdbarch: gdbarch_read_sp invalid");
2506 if (gdbarch_debug
>= 2)
2507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2508 return gdbarch
->read_sp ();
2512 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2513 gdbarch_read_sp_ftype read_sp
)
2515 gdbarch
->read_sp
= read_sp
;
2519 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2521 gdb_assert (gdbarch
!= NULL
);
2522 if (gdbarch
->write_sp
== 0)
2523 internal_error (__FILE__
, __LINE__
,
2524 "gdbarch: gdbarch_write_sp invalid");
2525 if (gdbarch_debug
>= 2)
2526 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2527 gdbarch
->write_sp (val
);
2531 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2532 gdbarch_write_sp_ftype write_sp
)
2534 gdbarch
->write_sp
= write_sp
;
2538 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2540 gdb_assert (gdbarch
!= NULL
);
2541 if (gdbarch
->virtual_frame_pointer
== 0)
2542 internal_error (__FILE__
, __LINE__
,
2543 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2546 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2550 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2551 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2553 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2557 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2559 gdb_assert (gdbarch
!= NULL
);
2560 return gdbarch
->register_read
!= 0;
2564 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2566 gdb_assert (gdbarch
!= NULL
);
2567 if (gdbarch
->register_read
== 0)
2568 internal_error (__FILE__
, __LINE__
,
2569 "gdbarch: gdbarch_register_read invalid");
2570 if (gdbarch_debug
>= 2)
2571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2572 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2576 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2577 gdbarch_register_read_ftype register_read
)
2579 gdbarch
->register_read
= register_read
;
2583 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2585 gdb_assert (gdbarch
!= NULL
);
2586 return gdbarch
->register_write
!= 0;
2590 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2592 gdb_assert (gdbarch
!= NULL
);
2593 if (gdbarch
->register_write
== 0)
2594 internal_error (__FILE__
, __LINE__
,
2595 "gdbarch: gdbarch_register_write invalid");
2596 if (gdbarch_debug
>= 2)
2597 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2598 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2602 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2603 gdbarch_register_write_ftype register_write
)
2605 gdbarch
->register_write
= register_write
;
2609 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2611 gdb_assert (gdbarch
!= NULL
);
2612 if (gdbarch
->num_regs
== -1)
2613 internal_error (__FILE__
, __LINE__
,
2614 "gdbarch: gdbarch_num_regs invalid");
2615 if (gdbarch_debug
>= 2)
2616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2617 return gdbarch
->num_regs
;
2621 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2624 gdbarch
->num_regs
= num_regs
;
2628 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2630 gdb_assert (gdbarch
!= NULL
);
2631 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2632 if (gdbarch_debug
>= 2)
2633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2634 return gdbarch
->num_pseudo_regs
;
2638 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2639 int num_pseudo_regs
)
2641 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2645 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2647 gdb_assert (gdbarch
!= NULL
);
2648 /* Skip verify of sp_regnum, invalid_p == 0 */
2649 if (gdbarch_debug
>= 2)
2650 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2651 return gdbarch
->sp_regnum
;
2655 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2658 gdbarch
->sp_regnum
= sp_regnum
;
2662 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2664 gdb_assert (gdbarch
!= NULL
);
2665 /* Skip verify of fp_regnum, invalid_p == 0 */
2666 if (gdbarch_debug
>= 2)
2667 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2668 return gdbarch
->fp_regnum
;
2672 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2675 gdbarch
->fp_regnum
= fp_regnum
;
2679 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2681 gdb_assert (gdbarch
!= NULL
);
2682 /* Skip verify of pc_regnum, invalid_p == 0 */
2683 if (gdbarch_debug
>= 2)
2684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2685 return gdbarch
->pc_regnum
;
2689 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2692 gdbarch
->pc_regnum
= pc_regnum
;
2696 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2698 gdb_assert (gdbarch
!= NULL
);
2699 /* Skip verify of ps_regnum, invalid_p == 0 */
2700 if (gdbarch_debug
>= 2)
2701 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2702 return gdbarch
->ps_regnum
;
2706 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2709 gdbarch
->ps_regnum
= ps_regnum
;
2713 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2715 gdb_assert (gdbarch
!= NULL
);
2716 /* Skip verify of fp0_regnum, invalid_p == 0 */
2717 if (gdbarch_debug
>= 2)
2718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2719 return gdbarch
->fp0_regnum
;
2723 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2726 gdbarch
->fp0_regnum
= fp0_regnum
;
2730 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2732 gdb_assert (gdbarch
!= NULL
);
2733 /* Skip verify of npc_regnum, invalid_p == 0 */
2734 if (gdbarch_debug
>= 2)
2735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2736 return gdbarch
->npc_regnum
;
2740 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2743 gdbarch
->npc_regnum
= npc_regnum
;
2747 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2749 gdb_assert (gdbarch
!= NULL
);
2750 if (gdbarch
->stab_reg_to_regnum
== 0)
2751 internal_error (__FILE__
, __LINE__
,
2752 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2753 if (gdbarch_debug
>= 2)
2754 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2755 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2759 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2760 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2762 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2766 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2768 gdb_assert (gdbarch
!= NULL
);
2769 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2770 internal_error (__FILE__
, __LINE__
,
2771 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2772 if (gdbarch_debug
>= 2)
2773 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2774 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2778 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2779 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2781 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2785 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2787 gdb_assert (gdbarch
!= NULL
);
2788 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2789 internal_error (__FILE__
, __LINE__
,
2790 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2791 if (gdbarch_debug
>= 2)
2792 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2793 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2797 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2798 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2800 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2804 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2806 gdb_assert (gdbarch
!= NULL
);
2807 if (gdbarch
->sdb_reg_to_regnum
== 0)
2808 internal_error (__FILE__
, __LINE__
,
2809 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2810 if (gdbarch_debug
>= 2)
2811 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2812 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2816 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2817 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2819 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2823 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2825 gdb_assert (gdbarch
!= NULL
);
2826 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2827 internal_error (__FILE__
, __LINE__
,
2828 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2829 if (gdbarch_debug
>= 2)
2830 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2831 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2835 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2836 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2838 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2842 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2844 gdb_assert (gdbarch
!= NULL
);
2845 if (gdbarch
->register_name
== 0)
2846 internal_error (__FILE__
, __LINE__
,
2847 "gdbarch: gdbarch_register_name invalid");
2848 if (gdbarch_debug
>= 2)
2849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2850 return gdbarch
->register_name (regnr
);
2854 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2855 gdbarch_register_name_ftype register_name
)
2857 gdbarch
->register_name
= register_name
;
2861 gdbarch_register_size (struct gdbarch
*gdbarch
)
2863 gdb_assert (gdbarch
!= NULL
);
2864 if (gdbarch
->register_size
== -1)
2865 internal_error (__FILE__
, __LINE__
,
2866 "gdbarch: gdbarch_register_size invalid");
2867 if (gdbarch_debug
>= 2)
2868 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2869 return gdbarch
->register_size
;
2873 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2876 gdbarch
->register_size
= register_size
;
2880 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2882 gdb_assert (gdbarch
!= NULL
);
2883 if (gdbarch
->register_bytes
== -1)
2884 internal_error (__FILE__
, __LINE__
,
2885 "gdbarch: gdbarch_register_bytes invalid");
2886 if (gdbarch_debug
>= 2)
2887 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2888 return gdbarch
->register_bytes
;
2892 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2895 gdbarch
->register_bytes
= register_bytes
;
2899 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2901 gdb_assert (gdbarch
!= NULL
);
2902 if (gdbarch
->register_byte
== 0)
2903 internal_error (__FILE__
, __LINE__
,
2904 "gdbarch: gdbarch_register_byte invalid");
2905 if (gdbarch_debug
>= 2)
2906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2907 return gdbarch
->register_byte (reg_nr
);
2911 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2912 gdbarch_register_byte_ftype register_byte
)
2914 gdbarch
->register_byte
= register_byte
;
2918 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2920 gdb_assert (gdbarch
!= NULL
);
2921 if (gdbarch
->register_raw_size
== 0)
2922 internal_error (__FILE__
, __LINE__
,
2923 "gdbarch: gdbarch_register_raw_size invalid");
2924 if (gdbarch_debug
>= 2)
2925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2926 return gdbarch
->register_raw_size (reg_nr
);
2930 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2931 gdbarch_register_raw_size_ftype register_raw_size
)
2933 gdbarch
->register_raw_size
= register_raw_size
;
2937 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2939 gdb_assert (gdbarch
!= NULL
);
2940 if (gdbarch
->max_register_raw_size
== -1)
2941 internal_error (__FILE__
, __LINE__
,
2942 "gdbarch: gdbarch_max_register_raw_size invalid");
2943 if (gdbarch_debug
>= 2)
2944 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2945 return gdbarch
->max_register_raw_size
;
2949 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2950 int max_register_raw_size
)
2952 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2956 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2958 gdb_assert (gdbarch
!= NULL
);
2959 if (gdbarch
->register_virtual_size
== 0)
2960 internal_error (__FILE__
, __LINE__
,
2961 "gdbarch: gdbarch_register_virtual_size invalid");
2962 if (gdbarch_debug
>= 2)
2963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2964 return gdbarch
->register_virtual_size (reg_nr
);
2968 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2969 gdbarch_register_virtual_size_ftype register_virtual_size
)
2971 gdbarch
->register_virtual_size
= register_virtual_size
;
2975 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2977 gdb_assert (gdbarch
!= NULL
);
2978 if (gdbarch
->max_register_virtual_size
== -1)
2979 internal_error (__FILE__
, __LINE__
,
2980 "gdbarch: gdbarch_max_register_virtual_size invalid");
2981 if (gdbarch_debug
>= 2)
2982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2983 return gdbarch
->max_register_virtual_size
;
2987 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2988 int max_register_virtual_size
)
2990 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2994 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2996 gdb_assert (gdbarch
!= NULL
);
2997 if (gdbarch
->register_virtual_type
== 0)
2998 internal_error (__FILE__
, __LINE__
,
2999 "gdbarch: gdbarch_register_virtual_type invalid");
3000 if (gdbarch_debug
>= 2)
3001 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3002 return gdbarch
->register_virtual_type (reg_nr
);
3006 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3007 gdbarch_register_virtual_type_ftype register_virtual_type
)
3009 gdbarch
->register_virtual_type
= register_virtual_type
;
3013 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3015 gdb_assert (gdbarch
!= NULL
);
3016 if (gdbarch
->do_registers_info
== 0)
3017 internal_error (__FILE__
, __LINE__
,
3018 "gdbarch: gdbarch_do_registers_info invalid");
3019 if (gdbarch_debug
>= 2)
3020 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
3021 gdbarch
->do_registers_info (reg_nr
, fpregs
);
3025 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
3026 gdbarch_do_registers_info_ftype do_registers_info
)
3028 gdbarch
->do_registers_info
= do_registers_info
;
3032 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
)
3034 gdb_assert (gdbarch
!= NULL
);
3035 if (gdbarch
->print_float_info
== 0)
3036 internal_error (__FILE__
, __LINE__
,
3037 "gdbarch: gdbarch_print_float_info invalid");
3038 if (gdbarch_debug
>= 2)
3039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3040 gdbarch
->print_float_info (gdbarch
, file
, frame
);
3044 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3045 gdbarch_print_float_info_ftype print_float_info
)
3047 gdbarch
->print_float_info
= print_float_info
;
3051 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3053 gdb_assert (gdbarch
!= NULL
);
3054 if (gdbarch
->register_sim_regno
== 0)
3055 internal_error (__FILE__
, __LINE__
,
3056 "gdbarch: gdbarch_register_sim_regno invalid");
3057 if (gdbarch_debug
>= 2)
3058 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3059 return gdbarch
->register_sim_regno (reg_nr
);
3063 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3064 gdbarch_register_sim_regno_ftype register_sim_regno
)
3066 gdbarch
->register_sim_regno
= register_sim_regno
;
3070 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3072 gdb_assert (gdbarch
!= NULL
);
3073 return gdbarch
->register_bytes_ok
!= 0;
3077 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3079 gdb_assert (gdbarch
!= NULL
);
3080 if (gdbarch
->register_bytes_ok
== 0)
3081 internal_error (__FILE__
, __LINE__
,
3082 "gdbarch: gdbarch_register_bytes_ok invalid");
3083 if (gdbarch_debug
>= 2)
3084 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3085 return gdbarch
->register_bytes_ok (nr_bytes
);
3089 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3090 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3092 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3096 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3098 gdb_assert (gdbarch
!= NULL
);
3099 if (gdbarch
->cannot_fetch_register
== 0)
3100 internal_error (__FILE__
, __LINE__
,
3101 "gdbarch: gdbarch_cannot_fetch_register invalid");
3102 if (gdbarch_debug
>= 2)
3103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3104 return gdbarch
->cannot_fetch_register (regnum
);
3108 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3109 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3111 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3115 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3117 gdb_assert (gdbarch
!= NULL
);
3118 if (gdbarch
->cannot_store_register
== 0)
3119 internal_error (__FILE__
, __LINE__
,
3120 "gdbarch: gdbarch_cannot_store_register invalid");
3121 if (gdbarch_debug
>= 2)
3122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3123 return gdbarch
->cannot_store_register (regnum
);
3127 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3128 gdbarch_cannot_store_register_ftype cannot_store_register
)
3130 gdbarch
->cannot_store_register
= cannot_store_register
;
3134 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3136 gdb_assert (gdbarch
!= NULL
);
3137 return gdbarch
->get_longjmp_target
!= 0;
3141 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3143 gdb_assert (gdbarch
!= NULL
);
3144 if (gdbarch
->get_longjmp_target
== 0)
3145 internal_error (__FILE__
, __LINE__
,
3146 "gdbarch: gdbarch_get_longjmp_target invalid");
3147 if (gdbarch_debug
>= 2)
3148 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3149 return gdbarch
->get_longjmp_target (pc
);
3153 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3154 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3156 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3160 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3162 gdb_assert (gdbarch
!= NULL
);
3163 if (gdbarch
->use_generic_dummy_frames
== -1)
3164 internal_error (__FILE__
, __LINE__
,
3165 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3166 if (gdbarch_debug
>= 2)
3167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3168 return gdbarch
->use_generic_dummy_frames
;
3172 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3173 int use_generic_dummy_frames
)
3175 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3179 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3181 gdb_assert (gdbarch
!= NULL
);
3182 if (gdbarch
->call_dummy_location
== 0)
3183 internal_error (__FILE__
, __LINE__
,
3184 "gdbarch: gdbarch_call_dummy_location invalid");
3185 if (gdbarch_debug
>= 2)
3186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3187 return gdbarch
->call_dummy_location
;
3191 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3192 int call_dummy_location
)
3194 gdbarch
->call_dummy_location
= call_dummy_location
;
3198 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3200 gdb_assert (gdbarch
!= NULL
);
3201 if (gdbarch
->call_dummy_address
== 0)
3202 internal_error (__FILE__
, __LINE__
,
3203 "gdbarch: gdbarch_call_dummy_address invalid");
3204 if (gdbarch_debug
>= 2)
3205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3206 return gdbarch
->call_dummy_address ();
3210 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3211 gdbarch_call_dummy_address_ftype call_dummy_address
)
3213 gdbarch
->call_dummy_address
= call_dummy_address
;
3217 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3219 gdb_assert (gdbarch
!= NULL
);
3220 if (gdbarch
->call_dummy_start_offset
== -1)
3221 internal_error (__FILE__
, __LINE__
,
3222 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3223 if (gdbarch_debug
>= 2)
3224 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3225 return gdbarch
->call_dummy_start_offset
;
3229 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3230 CORE_ADDR call_dummy_start_offset
)
3232 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3236 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3238 gdb_assert (gdbarch
!= NULL
);
3239 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3240 internal_error (__FILE__
, __LINE__
,
3241 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3242 if (gdbarch_debug
>= 2)
3243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3244 return gdbarch
->call_dummy_breakpoint_offset
;
3248 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3249 CORE_ADDR call_dummy_breakpoint_offset
)
3251 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3255 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3257 gdb_assert (gdbarch
!= NULL
);
3258 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3259 internal_error (__FILE__
, __LINE__
,
3260 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3261 if (gdbarch_debug
>= 2)
3262 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3263 return gdbarch
->call_dummy_breakpoint_offset_p
;
3267 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3268 int call_dummy_breakpoint_offset_p
)
3270 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3274 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3276 gdb_assert (gdbarch
!= NULL
);
3277 if (gdbarch
->call_dummy_length
== -1)
3278 internal_error (__FILE__
, __LINE__
,
3279 "gdbarch: gdbarch_call_dummy_length invalid");
3280 if (gdbarch_debug
>= 2)
3281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3282 return gdbarch
->call_dummy_length
;
3286 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3287 int call_dummy_length
)
3289 gdbarch
->call_dummy_length
= call_dummy_length
;
3293 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3295 gdb_assert (gdbarch
!= NULL
);
3296 if (gdbarch
->pc_in_call_dummy
== 0)
3297 internal_error (__FILE__
, __LINE__
,
3298 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3299 if (gdbarch_debug
>= 2)
3300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3301 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3305 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3306 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3308 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3312 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3314 gdb_assert (gdbarch
!= NULL
);
3315 if (gdbarch
->call_dummy_p
== -1)
3316 internal_error (__FILE__
, __LINE__
,
3317 "gdbarch: gdbarch_call_dummy_p invalid");
3318 if (gdbarch_debug
>= 2)
3319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3320 return gdbarch
->call_dummy_p
;
3324 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3327 gdbarch
->call_dummy_p
= call_dummy_p
;
3331 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3333 gdb_assert (gdbarch
!= NULL
);
3334 /* Skip verify of call_dummy_words, invalid_p == 0 */
3335 if (gdbarch_debug
>= 2)
3336 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3337 return gdbarch
->call_dummy_words
;
3341 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3342 LONGEST
* call_dummy_words
)
3344 gdbarch
->call_dummy_words
= call_dummy_words
;
3348 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3350 gdb_assert (gdbarch
!= NULL
);
3351 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3352 if (gdbarch_debug
>= 2)
3353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3354 return gdbarch
->sizeof_call_dummy_words
;
3358 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3359 int sizeof_call_dummy_words
)
3361 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3365 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3367 gdb_assert (gdbarch
!= NULL
);
3368 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3369 internal_error (__FILE__
, __LINE__
,
3370 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3371 if (gdbarch_debug
>= 2)
3372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3373 return gdbarch
->call_dummy_stack_adjust_p
;
3377 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3378 int call_dummy_stack_adjust_p
)
3380 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3384 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3386 gdb_assert (gdbarch
!= NULL
);
3387 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3388 internal_error (__FILE__
, __LINE__
,
3389 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3390 if (gdbarch_debug
>= 2)
3391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3392 return gdbarch
->call_dummy_stack_adjust
;
3396 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3397 int call_dummy_stack_adjust
)
3399 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3403 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
)
3405 gdb_assert (gdbarch
!= NULL
);
3406 if (gdbarch
->fix_call_dummy
== 0)
3407 internal_error (__FILE__
, __LINE__
,
3408 "gdbarch: gdbarch_fix_call_dummy invalid");
3409 if (gdbarch_debug
>= 2)
3410 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3411 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3415 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3416 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3418 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3422 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3424 gdb_assert (gdbarch
!= NULL
);
3425 if (gdbarch
->init_frame_pc_first
== 0)
3426 internal_error (__FILE__
, __LINE__
,
3427 "gdbarch: gdbarch_init_frame_pc_first invalid");
3428 if (gdbarch_debug
>= 2)
3429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3430 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3434 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3435 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3437 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3441 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3443 gdb_assert (gdbarch
!= NULL
);
3444 if (gdbarch
->init_frame_pc
== 0)
3445 internal_error (__FILE__
, __LINE__
,
3446 "gdbarch: gdbarch_init_frame_pc invalid");
3447 if (gdbarch_debug
>= 2)
3448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3449 gdbarch
->init_frame_pc (fromleaf
, prev
);
3453 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3454 gdbarch_init_frame_pc_ftype init_frame_pc
)
3456 gdbarch
->init_frame_pc
= init_frame_pc
;
3460 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3462 gdb_assert (gdbarch
!= NULL
);
3463 if (gdbarch_debug
>= 2)
3464 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3465 return gdbarch
->believe_pcc_promotion
;
3469 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3470 int believe_pcc_promotion
)
3472 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3476 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3478 gdb_assert (gdbarch
!= NULL
);
3479 if (gdbarch_debug
>= 2)
3480 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3481 return gdbarch
->believe_pcc_promotion_type
;
3485 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3486 int believe_pcc_promotion_type
)
3488 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3492 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3494 gdb_assert (gdbarch
!= NULL
);
3495 if (gdbarch
->coerce_float_to_double
== 0)
3496 internal_error (__FILE__
, __LINE__
,
3497 "gdbarch: gdbarch_coerce_float_to_double invalid");
3498 if (gdbarch_debug
>= 2)
3499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3500 return gdbarch
->coerce_float_to_double (formal
, actual
);
3504 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3505 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3507 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3511 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
)
3513 gdb_assert (gdbarch
!= NULL
);
3514 if (gdbarch
->get_saved_register
== 0)
3515 internal_error (__FILE__
, __LINE__
,
3516 "gdbarch: gdbarch_get_saved_register invalid");
3517 if (gdbarch_debug
>= 2)
3518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3519 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3523 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3524 gdbarch_get_saved_register_ftype get_saved_register
)
3526 gdbarch
->get_saved_register
= get_saved_register
;
3530 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3532 gdb_assert (gdbarch
!= NULL
);
3533 if (gdbarch
->register_convertible
== 0)
3534 internal_error (__FILE__
, __LINE__
,
3535 "gdbarch: gdbarch_register_convertible invalid");
3536 if (gdbarch_debug
>= 2)
3537 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3538 return gdbarch
->register_convertible (nr
);
3542 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3543 gdbarch_register_convertible_ftype register_convertible
)
3545 gdbarch
->register_convertible
= register_convertible
;
3549 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3551 gdb_assert (gdbarch
!= NULL
);
3552 if (gdbarch
->register_convert_to_virtual
== 0)
3553 internal_error (__FILE__
, __LINE__
,
3554 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3555 if (gdbarch_debug
>= 2)
3556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3557 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3561 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3562 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3564 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3568 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3570 gdb_assert (gdbarch
!= NULL
);
3571 if (gdbarch
->register_convert_to_raw
== 0)
3572 internal_error (__FILE__
, __LINE__
,
3573 "gdbarch: gdbarch_register_convert_to_raw invalid");
3574 if (gdbarch_debug
>= 2)
3575 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3576 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3580 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3581 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3583 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3587 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3589 gdb_assert (gdbarch
!= NULL
);
3590 if (gdbarch
->convert_register_p
== 0)
3591 internal_error (__FILE__
, __LINE__
,
3592 "gdbarch: gdbarch_convert_register_p invalid");
3593 if (gdbarch_debug
>= 2)
3594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3595 return gdbarch
->convert_register_p (regnum
);
3599 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3600 gdbarch_convert_register_p_ftype convert_register_p
)
3602 gdbarch
->convert_register_p
= convert_register_p
;
3606 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3608 gdb_assert (gdbarch
!= NULL
);
3609 if (gdbarch
->register_to_value
== 0)
3610 internal_error (__FILE__
, __LINE__
,
3611 "gdbarch: gdbarch_register_to_value invalid");
3612 if (gdbarch_debug
>= 2)
3613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3614 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3618 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3619 gdbarch_register_to_value_ftype register_to_value
)
3621 gdbarch
->register_to_value
= register_to_value
;
3625 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3627 gdb_assert (gdbarch
!= NULL
);
3628 if (gdbarch
->value_to_register
== 0)
3629 internal_error (__FILE__
, __LINE__
,
3630 "gdbarch: gdbarch_value_to_register invalid");
3631 if (gdbarch_debug
>= 2)
3632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3633 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3637 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3638 gdbarch_value_to_register_ftype value_to_register
)
3640 gdbarch
->value_to_register
= value_to_register
;
3644 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3646 gdb_assert (gdbarch
!= NULL
);
3647 return gdbarch
->fetch_pseudo_register
!= 0;
3651 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3653 gdb_assert (gdbarch
!= NULL
);
3654 if (gdbarch
->fetch_pseudo_register
== 0)
3655 internal_error (__FILE__
, __LINE__
,
3656 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3657 if (gdbarch_debug
>= 2)
3658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3659 gdbarch
->fetch_pseudo_register (regnum
);
3663 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3664 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3666 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3670 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3672 gdb_assert (gdbarch
!= NULL
);
3673 return gdbarch
->store_pseudo_register
!= 0;
3677 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3679 gdb_assert (gdbarch
!= NULL
);
3680 if (gdbarch
->store_pseudo_register
== 0)
3681 internal_error (__FILE__
, __LINE__
,
3682 "gdbarch: gdbarch_store_pseudo_register invalid");
3683 if (gdbarch_debug
>= 2)
3684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3685 gdbarch
->store_pseudo_register (regnum
);
3689 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3690 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3692 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3696 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3698 gdb_assert (gdbarch
!= NULL
);
3699 if (gdbarch
->pointer_to_address
== 0)
3700 internal_error (__FILE__
, __LINE__
,
3701 "gdbarch: gdbarch_pointer_to_address invalid");
3702 if (gdbarch_debug
>= 2)
3703 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3704 return gdbarch
->pointer_to_address (type
, buf
);
3708 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3709 gdbarch_pointer_to_address_ftype pointer_to_address
)
3711 gdbarch
->pointer_to_address
= pointer_to_address
;
3715 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3717 gdb_assert (gdbarch
!= NULL
);
3718 if (gdbarch
->address_to_pointer
== 0)
3719 internal_error (__FILE__
, __LINE__
,
3720 "gdbarch: gdbarch_address_to_pointer invalid");
3721 if (gdbarch_debug
>= 2)
3722 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3723 gdbarch
->address_to_pointer (type
, buf
, addr
);
3727 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3728 gdbarch_address_to_pointer_ftype address_to_pointer
)
3730 gdbarch
->address_to_pointer
= address_to_pointer
;
3734 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3736 gdb_assert (gdbarch
!= NULL
);
3737 return gdbarch
->integer_to_address
!= 0;
3741 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3743 gdb_assert (gdbarch
!= NULL
);
3744 if (gdbarch
->integer_to_address
== 0)
3745 internal_error (__FILE__
, __LINE__
,
3746 "gdbarch: gdbarch_integer_to_address invalid");
3747 if (gdbarch_debug
>= 2)
3748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3749 return gdbarch
->integer_to_address (type
, buf
);
3753 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3754 gdbarch_integer_to_address_ftype integer_to_address
)
3756 gdbarch
->integer_to_address
= integer_to_address
;
3760 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3762 gdb_assert (gdbarch
!= NULL
);
3763 if (gdbarch
->return_value_on_stack
== 0)
3764 internal_error (__FILE__
, __LINE__
,
3765 "gdbarch: gdbarch_return_value_on_stack invalid");
3766 if (gdbarch_debug
>= 2)
3767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3768 return gdbarch
->return_value_on_stack (type
);
3772 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3773 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3775 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3779 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, char *valbuf
)
3781 gdb_assert (gdbarch
!= NULL
);
3782 if (gdbarch
->extract_return_value
== 0)
3783 internal_error (__FILE__
, __LINE__
,
3784 "gdbarch: gdbarch_extract_return_value invalid");
3785 if (gdbarch_debug
>= 2)
3786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3787 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3791 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3792 gdbarch_extract_return_value_ftype extract_return_value
)
3794 gdbarch
->extract_return_value
= extract_return_value
;
3798 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3800 gdb_assert (gdbarch
!= NULL
);
3801 if (gdbarch
->deprecated_extract_return_value
== 0)
3802 internal_error (__FILE__
, __LINE__
,
3803 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
3804 if (gdbarch_debug
>= 2)
3805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3806 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
3810 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
3811 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
3813 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
3817 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3819 gdb_assert (gdbarch
!= NULL
);
3820 if (gdbarch
->push_arguments
== 0)
3821 internal_error (__FILE__
, __LINE__
,
3822 "gdbarch: gdbarch_push_arguments invalid");
3823 if (gdbarch_debug
>= 2)
3824 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3825 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3829 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3830 gdbarch_push_arguments_ftype push_arguments
)
3832 gdbarch
->push_arguments
= push_arguments
;
3836 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3838 gdb_assert (gdbarch
!= NULL
);
3839 if (gdbarch
->push_dummy_frame
== 0)
3840 internal_error (__FILE__
, __LINE__
,
3841 "gdbarch: gdbarch_push_dummy_frame invalid");
3842 if (gdbarch_debug
>= 2)
3843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3844 gdbarch
->push_dummy_frame ();
3848 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3849 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3851 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3855 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3857 gdb_assert (gdbarch
!= NULL
);
3858 return gdbarch
->push_return_address
!= 0;
3862 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3864 gdb_assert (gdbarch
!= NULL
);
3865 if (gdbarch
->push_return_address
== 0)
3866 internal_error (__FILE__
, __LINE__
,
3867 "gdbarch: gdbarch_push_return_address invalid");
3868 if (gdbarch_debug
>= 2)
3869 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3870 return gdbarch
->push_return_address (pc
, sp
);
3874 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3875 gdbarch_push_return_address_ftype push_return_address
)
3877 gdbarch
->push_return_address
= push_return_address
;
3881 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3883 gdb_assert (gdbarch
!= NULL
);
3884 if (gdbarch
->pop_frame
== 0)
3885 internal_error (__FILE__
, __LINE__
,
3886 "gdbarch: gdbarch_pop_frame invalid");
3887 if (gdbarch_debug
>= 2)
3888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3889 gdbarch
->pop_frame ();
3893 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3894 gdbarch_pop_frame_ftype pop_frame
)
3896 gdbarch
->pop_frame
= pop_frame
;
3900 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3902 gdb_assert (gdbarch
!= NULL
);
3903 if (gdbarch
->store_struct_return
== 0)
3904 internal_error (__FILE__
, __LINE__
,
3905 "gdbarch: gdbarch_store_struct_return invalid");
3906 if (gdbarch_debug
>= 2)
3907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3908 gdbarch
->store_struct_return (addr
, sp
);
3912 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3913 gdbarch_store_struct_return_ftype store_struct_return
)
3915 gdbarch
->store_struct_return
= store_struct_return
;
3919 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3921 gdb_assert (gdbarch
!= NULL
);
3922 if (gdbarch
->store_return_value
== 0)
3923 internal_error (__FILE__
, __LINE__
,
3924 "gdbarch: gdbarch_store_return_value invalid");
3925 if (gdbarch_debug
>= 2)
3926 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3927 gdbarch
->store_return_value (type
, valbuf
);
3931 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3932 gdbarch_store_return_value_ftype store_return_value
)
3934 gdbarch
->store_return_value
= store_return_value
;
3938 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3940 gdb_assert (gdbarch
!= NULL
);
3941 return gdbarch
->extract_struct_value_address
!= 0;
3945 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3947 gdb_assert (gdbarch
!= NULL
);
3948 if (gdbarch
->extract_struct_value_address
== 0)
3949 internal_error (__FILE__
, __LINE__
,
3950 "gdbarch: gdbarch_extract_struct_value_address invalid");
3951 if (gdbarch_debug
>= 2)
3952 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3953 return gdbarch
->extract_struct_value_address (regcache
);
3957 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3958 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3960 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3964 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3966 gdb_assert (gdbarch
!= NULL
);
3967 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
3971 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3973 gdb_assert (gdbarch
!= NULL
);
3974 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
3975 internal_error (__FILE__
, __LINE__
,
3976 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
3977 if (gdbarch_debug
>= 2)
3978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
3979 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
3983 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
3984 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
3986 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
3990 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3992 gdb_assert (gdbarch
!= NULL
);
3993 if (gdbarch
->use_struct_convention
== 0)
3994 internal_error (__FILE__
, __LINE__
,
3995 "gdbarch: gdbarch_use_struct_convention invalid");
3996 if (gdbarch_debug
>= 2)
3997 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3998 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4002 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4003 gdbarch_use_struct_convention_ftype use_struct_convention
)
4005 gdbarch
->use_struct_convention
= use_struct_convention
;
4009 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4011 gdb_assert (gdbarch
!= NULL
);
4012 if (gdbarch
->frame_init_saved_regs
== 0)
4013 internal_error (__FILE__
, __LINE__
,
4014 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4015 if (gdbarch_debug
>= 2)
4016 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
4017 gdbarch
->frame_init_saved_regs (frame
);
4021 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4022 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
4024 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
4028 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4030 gdb_assert (gdbarch
!= NULL
);
4031 return gdbarch
->init_extra_frame_info
!= 0;
4035 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4037 gdb_assert (gdbarch
!= NULL
);
4038 if (gdbarch
->init_extra_frame_info
== 0)
4039 internal_error (__FILE__
, __LINE__
,
4040 "gdbarch: gdbarch_init_extra_frame_info invalid");
4041 if (gdbarch_debug
>= 2)
4042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
4043 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4047 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4048 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4050 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4054 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4056 gdb_assert (gdbarch
!= NULL
);
4057 if (gdbarch
->skip_prologue
== 0)
4058 internal_error (__FILE__
, __LINE__
,
4059 "gdbarch: gdbarch_skip_prologue invalid");
4060 if (gdbarch_debug
>= 2)
4061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4062 return gdbarch
->skip_prologue (ip
);
4066 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4067 gdbarch_skip_prologue_ftype skip_prologue
)
4069 gdbarch
->skip_prologue
= skip_prologue
;
4073 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4075 gdb_assert (gdbarch
!= NULL
);
4076 if (gdbarch
->prologue_frameless_p
== 0)
4077 internal_error (__FILE__
, __LINE__
,
4078 "gdbarch: gdbarch_prologue_frameless_p invalid");
4079 if (gdbarch_debug
>= 2)
4080 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4081 return gdbarch
->prologue_frameless_p (ip
);
4085 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4086 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4088 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4092 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4094 gdb_assert (gdbarch
!= NULL
);
4095 if (gdbarch
->inner_than
== 0)
4096 internal_error (__FILE__
, __LINE__
,
4097 "gdbarch: gdbarch_inner_than invalid");
4098 if (gdbarch_debug
>= 2)
4099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4100 return gdbarch
->inner_than (lhs
, rhs
);
4104 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4105 gdbarch_inner_than_ftype inner_than
)
4107 gdbarch
->inner_than
= inner_than
;
4110 const unsigned char *
4111 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4113 gdb_assert (gdbarch
!= NULL
);
4114 if (gdbarch
->breakpoint_from_pc
== 0)
4115 internal_error (__FILE__
, __LINE__
,
4116 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4117 if (gdbarch_debug
>= 2)
4118 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4119 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4123 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4124 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4126 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4130 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4132 gdb_assert (gdbarch
!= NULL
);
4133 if (gdbarch
->memory_insert_breakpoint
== 0)
4134 internal_error (__FILE__
, __LINE__
,
4135 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4136 if (gdbarch_debug
>= 2)
4137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4138 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4142 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4143 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4145 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4149 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4151 gdb_assert (gdbarch
!= NULL
);
4152 if (gdbarch
->memory_remove_breakpoint
== 0)
4153 internal_error (__FILE__
, __LINE__
,
4154 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4155 if (gdbarch_debug
>= 2)
4156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4157 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4161 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4162 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4164 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4168 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4170 gdb_assert (gdbarch
!= NULL
);
4171 if (gdbarch
->decr_pc_after_break
== -1)
4172 internal_error (__FILE__
, __LINE__
,
4173 "gdbarch: gdbarch_decr_pc_after_break invalid");
4174 if (gdbarch_debug
>= 2)
4175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4176 return gdbarch
->decr_pc_after_break
;
4180 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4181 CORE_ADDR decr_pc_after_break
)
4183 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4187 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4189 gdb_assert (gdbarch
!= NULL
);
4190 if (gdbarch
->prepare_to_proceed
== 0)
4191 internal_error (__FILE__
, __LINE__
,
4192 "gdbarch: gdbarch_prepare_to_proceed invalid");
4193 if (gdbarch_debug
>= 2)
4194 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4195 return gdbarch
->prepare_to_proceed (select_it
);
4199 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4200 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4202 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4206 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4208 gdb_assert (gdbarch
!= NULL
);
4209 if (gdbarch
->function_start_offset
== -1)
4210 internal_error (__FILE__
, __LINE__
,
4211 "gdbarch: gdbarch_function_start_offset invalid");
4212 if (gdbarch_debug
>= 2)
4213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4214 return gdbarch
->function_start_offset
;
4218 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4219 CORE_ADDR function_start_offset
)
4221 gdbarch
->function_start_offset
= function_start_offset
;
4225 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4227 gdb_assert (gdbarch
!= NULL
);
4228 if (gdbarch
->remote_translate_xfer_address
== 0)
4229 internal_error (__FILE__
, __LINE__
,
4230 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4231 if (gdbarch_debug
>= 2)
4232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4233 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4237 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4238 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4240 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4244 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4246 gdb_assert (gdbarch
!= NULL
);
4247 if (gdbarch
->frame_args_skip
== -1)
4248 internal_error (__FILE__
, __LINE__
,
4249 "gdbarch: gdbarch_frame_args_skip invalid");
4250 if (gdbarch_debug
>= 2)
4251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4252 return gdbarch
->frame_args_skip
;
4256 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4257 CORE_ADDR frame_args_skip
)
4259 gdbarch
->frame_args_skip
= frame_args_skip
;
4263 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4265 gdb_assert (gdbarch
!= NULL
);
4266 if (gdbarch
->frameless_function_invocation
== 0)
4267 internal_error (__FILE__
, __LINE__
,
4268 "gdbarch: gdbarch_frameless_function_invocation invalid");
4269 if (gdbarch_debug
>= 2)
4270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4271 return gdbarch
->frameless_function_invocation (fi
);
4275 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4276 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4278 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4282 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4284 gdb_assert (gdbarch
!= NULL
);
4285 if (gdbarch
->frame_chain
== 0)
4286 internal_error (__FILE__
, __LINE__
,
4287 "gdbarch: gdbarch_frame_chain invalid");
4288 if (gdbarch_debug
>= 2)
4289 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4290 return gdbarch
->frame_chain (frame
);
4294 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4295 gdbarch_frame_chain_ftype frame_chain
)
4297 gdbarch
->frame_chain
= frame_chain
;
4301 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4303 gdb_assert (gdbarch
!= NULL
);
4304 if (gdbarch
->frame_chain_valid
== 0)
4305 internal_error (__FILE__
, __LINE__
,
4306 "gdbarch: gdbarch_frame_chain_valid invalid");
4307 if (gdbarch_debug
>= 2)
4308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4309 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4313 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4314 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4316 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4320 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4322 gdb_assert (gdbarch
!= NULL
);
4323 if (gdbarch
->frame_saved_pc
== 0)
4324 internal_error (__FILE__
, __LINE__
,
4325 "gdbarch: gdbarch_frame_saved_pc invalid");
4326 if (gdbarch_debug
>= 2)
4327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4328 return gdbarch
->frame_saved_pc (fi
);
4332 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4333 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4335 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4339 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4341 gdb_assert (gdbarch
!= NULL
);
4342 if (gdbarch
->frame_args_address
== 0)
4343 internal_error (__FILE__
, __LINE__
,
4344 "gdbarch: gdbarch_frame_args_address invalid");
4345 if (gdbarch_debug
>= 2)
4346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4347 return gdbarch
->frame_args_address (fi
);
4351 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4352 gdbarch_frame_args_address_ftype frame_args_address
)
4354 gdbarch
->frame_args_address
= frame_args_address
;
4358 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4360 gdb_assert (gdbarch
!= NULL
);
4361 if (gdbarch
->frame_locals_address
== 0)
4362 internal_error (__FILE__
, __LINE__
,
4363 "gdbarch: gdbarch_frame_locals_address invalid");
4364 if (gdbarch_debug
>= 2)
4365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4366 return gdbarch
->frame_locals_address (fi
);
4370 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4371 gdbarch_frame_locals_address_ftype frame_locals_address
)
4373 gdbarch
->frame_locals_address
= frame_locals_address
;
4377 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4379 gdb_assert (gdbarch
!= NULL
);
4380 if (gdbarch
->saved_pc_after_call
== 0)
4381 internal_error (__FILE__
, __LINE__
,
4382 "gdbarch: gdbarch_saved_pc_after_call invalid");
4383 if (gdbarch_debug
>= 2)
4384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4385 return gdbarch
->saved_pc_after_call (frame
);
4389 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4390 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4392 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4396 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4398 gdb_assert (gdbarch
!= NULL
);
4399 if (gdbarch
->frame_num_args
== 0)
4400 internal_error (__FILE__
, __LINE__
,
4401 "gdbarch: gdbarch_frame_num_args invalid");
4402 if (gdbarch_debug
>= 2)
4403 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4404 return gdbarch
->frame_num_args (frame
);
4408 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4409 gdbarch_frame_num_args_ftype frame_num_args
)
4411 gdbarch
->frame_num_args
= frame_num_args
;
4415 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4417 gdb_assert (gdbarch
!= NULL
);
4418 return gdbarch
->stack_align
!= 0;
4422 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4424 gdb_assert (gdbarch
!= NULL
);
4425 if (gdbarch
->stack_align
== 0)
4426 internal_error (__FILE__
, __LINE__
,
4427 "gdbarch: gdbarch_stack_align invalid");
4428 if (gdbarch_debug
>= 2)
4429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4430 return gdbarch
->stack_align (sp
);
4434 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4435 gdbarch_stack_align_ftype stack_align
)
4437 gdbarch
->stack_align
= stack_align
;
4441 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4443 gdb_assert (gdbarch
!= NULL
);
4444 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4445 if (gdbarch_debug
>= 2)
4446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4447 return gdbarch
->extra_stack_alignment_needed
;
4451 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4452 int extra_stack_alignment_needed
)
4454 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4458 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4460 gdb_assert (gdbarch
!= NULL
);
4461 return gdbarch
->reg_struct_has_addr
!= 0;
4465 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4467 gdb_assert (gdbarch
!= NULL
);
4468 if (gdbarch
->reg_struct_has_addr
== 0)
4469 internal_error (__FILE__
, __LINE__
,
4470 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4471 if (gdbarch_debug
>= 2)
4472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4473 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4477 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4478 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4480 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4484 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4486 gdb_assert (gdbarch
!= NULL
);
4487 return gdbarch
->save_dummy_frame_tos
!= 0;
4491 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4493 gdb_assert (gdbarch
!= NULL
);
4494 if (gdbarch
->save_dummy_frame_tos
== 0)
4495 internal_error (__FILE__
, __LINE__
,
4496 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4497 if (gdbarch_debug
>= 2)
4498 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4499 gdbarch
->save_dummy_frame_tos (sp
);
4503 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4504 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4506 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4510 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4512 gdb_assert (gdbarch
!= NULL
);
4513 if (gdbarch_debug
>= 2)
4514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4515 return gdbarch
->parm_boundary
;
4519 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4522 gdbarch
->parm_boundary
= parm_boundary
;
4525 const struct floatformat
*
4526 gdbarch_float_format (struct gdbarch
*gdbarch
)
4528 gdb_assert (gdbarch
!= NULL
);
4529 if (gdbarch_debug
>= 2)
4530 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4531 return gdbarch
->float_format
;
4535 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4536 const struct floatformat
* float_format
)
4538 gdbarch
->float_format
= float_format
;
4541 const struct floatformat
*
4542 gdbarch_double_format (struct gdbarch
*gdbarch
)
4544 gdb_assert (gdbarch
!= NULL
);
4545 if (gdbarch_debug
>= 2)
4546 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4547 return gdbarch
->double_format
;
4551 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4552 const struct floatformat
* double_format
)
4554 gdbarch
->double_format
= double_format
;
4557 const struct floatformat
*
4558 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4560 gdb_assert (gdbarch
!= NULL
);
4561 if (gdbarch_debug
>= 2)
4562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4563 return gdbarch
->long_double_format
;
4567 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4568 const struct floatformat
* long_double_format
)
4570 gdbarch
->long_double_format
= long_double_format
;
4574 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4576 gdb_assert (gdbarch
!= NULL
);
4577 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4578 internal_error (__FILE__
, __LINE__
,
4579 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4580 if (gdbarch_debug
>= 2)
4581 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4582 return gdbarch
->convert_from_func_ptr_addr (addr
);
4586 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4587 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4589 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4593 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4595 gdb_assert (gdbarch
!= NULL
);
4596 if (gdbarch
->addr_bits_remove
== 0)
4597 internal_error (__FILE__
, __LINE__
,
4598 "gdbarch: gdbarch_addr_bits_remove invalid");
4599 if (gdbarch_debug
>= 2)
4600 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4601 return gdbarch
->addr_bits_remove (addr
);
4605 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4606 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4608 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4612 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4614 gdb_assert (gdbarch
!= NULL
);
4615 if (gdbarch
->smash_text_address
== 0)
4616 internal_error (__FILE__
, __LINE__
,
4617 "gdbarch: gdbarch_smash_text_address invalid");
4618 if (gdbarch_debug
>= 2)
4619 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4620 return gdbarch
->smash_text_address (addr
);
4624 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4625 gdbarch_smash_text_address_ftype smash_text_address
)
4627 gdbarch
->smash_text_address
= smash_text_address
;
4631 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4633 gdb_assert (gdbarch
!= NULL
);
4634 return gdbarch
->software_single_step
!= 0;
4638 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4640 gdb_assert (gdbarch
!= NULL
);
4641 if (gdbarch
->software_single_step
== 0)
4642 internal_error (__FILE__
, __LINE__
,
4643 "gdbarch: gdbarch_software_single_step invalid");
4644 if (gdbarch_debug
>= 2)
4645 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4646 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4650 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4651 gdbarch_software_single_step_ftype software_single_step
)
4653 gdbarch
->software_single_step
= software_single_step
;
4657 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4659 gdb_assert (gdbarch
!= NULL
);
4660 if (gdbarch
->print_insn
== 0)
4661 internal_error (__FILE__
, __LINE__
,
4662 "gdbarch: gdbarch_print_insn invalid");
4663 if (gdbarch_debug
>= 2)
4664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4665 return gdbarch
->print_insn (vma
, info
);
4669 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4670 gdbarch_print_insn_ftype print_insn
)
4672 gdbarch
->print_insn
= print_insn
;
4676 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4678 gdb_assert (gdbarch
!= NULL
);
4679 if (gdbarch
->skip_trampoline_code
== 0)
4680 internal_error (__FILE__
, __LINE__
,
4681 "gdbarch: gdbarch_skip_trampoline_code invalid");
4682 if (gdbarch_debug
>= 2)
4683 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4684 return gdbarch
->skip_trampoline_code (pc
);
4688 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4689 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4691 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4695 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4697 gdb_assert (gdbarch
!= NULL
);
4698 if (gdbarch
->in_solib_call_trampoline
== 0)
4699 internal_error (__FILE__
, __LINE__
,
4700 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4701 if (gdbarch_debug
>= 2)
4702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4703 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4707 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4708 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4710 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4714 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4716 gdb_assert (gdbarch
!= NULL
);
4717 if (gdbarch
->pc_in_sigtramp
== 0)
4718 internal_error (__FILE__
, __LINE__
,
4719 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4720 if (gdbarch_debug
>= 2)
4721 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4722 return gdbarch
->pc_in_sigtramp (pc
, name
);
4726 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4727 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4729 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4733 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4735 gdb_assert (gdbarch
!= NULL
);
4736 if (gdbarch
->in_function_epilogue_p
== 0)
4737 internal_error (__FILE__
, __LINE__
,
4738 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4739 if (gdbarch_debug
>= 2)
4740 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4741 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4745 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4746 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4748 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4752 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4754 gdb_assert (gdbarch
!= NULL
);
4755 if (gdbarch
->construct_inferior_arguments
== 0)
4756 internal_error (__FILE__
, __LINE__
,
4757 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4758 if (gdbarch_debug
>= 2)
4759 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4760 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4764 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4765 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4767 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4771 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4773 gdb_assert (gdbarch
!= NULL
);
4774 return gdbarch
->dwarf2_build_frame_info
!= 0;
4778 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4780 gdb_assert (gdbarch
!= NULL
);
4781 if (gdbarch
->dwarf2_build_frame_info
== 0)
4782 internal_error (__FILE__
, __LINE__
,
4783 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4784 if (gdbarch_debug
>= 2)
4785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4786 gdbarch
->dwarf2_build_frame_info (objfile
);
4790 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4791 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4793 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4797 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4799 gdb_assert (gdbarch
!= NULL
);
4800 if (gdbarch
->elf_make_msymbol_special
== 0)
4801 internal_error (__FILE__
, __LINE__
,
4802 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4803 if (gdbarch_debug
>= 2)
4804 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4805 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4809 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4810 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4812 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4816 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4818 gdb_assert (gdbarch
!= NULL
);
4819 if (gdbarch
->coff_make_msymbol_special
== 0)
4820 internal_error (__FILE__
, __LINE__
,
4821 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4822 if (gdbarch_debug
>= 2)
4823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4824 gdbarch
->coff_make_msymbol_special (val
, msym
);
4828 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4829 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4831 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4835 /* Keep a registry of per-architecture data-pointers required by GDB
4842 gdbarch_data_init_ftype
*init
;
4843 gdbarch_data_free_ftype
*free
;
4846 struct gdbarch_data_registration
4848 struct gdbarch_data
*data
;
4849 struct gdbarch_data_registration
*next
;
4852 struct gdbarch_data_registry
4855 struct gdbarch_data_registration
*registrations
;
4858 struct gdbarch_data_registry gdbarch_data_registry
=
4863 struct gdbarch_data
*
4864 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4865 gdbarch_data_free_ftype
*free
)
4867 struct gdbarch_data_registration
**curr
;
4868 /* Append the new registraration. */
4869 for (curr
= &gdbarch_data_registry
.registrations
;
4871 curr
= &(*curr
)->next
);
4872 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4873 (*curr
)->next
= NULL
;
4874 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4875 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4876 (*curr
)->data
->init
= init
;
4877 (*curr
)->data
->init_p
= 1;
4878 (*curr
)->data
->free
= free
;
4879 return (*curr
)->data
;
4883 /* Create/delete the gdbarch data vector. */
4886 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4888 gdb_assert (gdbarch
->data
== NULL
);
4889 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4890 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4894 free_gdbarch_data (struct gdbarch
*gdbarch
)
4896 struct gdbarch_data_registration
*rego
;
4897 gdb_assert (gdbarch
->data
!= NULL
);
4898 for (rego
= gdbarch_data_registry
.registrations
;
4902 struct gdbarch_data
*data
= rego
->data
;
4903 gdb_assert (data
->index
< gdbarch
->nr_data
);
4904 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4906 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4907 gdbarch
->data
[data
->index
] = NULL
;
4910 xfree (gdbarch
->data
);
4911 gdbarch
->data
= NULL
;
4915 /* Initialize the current value of the specified per-architecture
4919 set_gdbarch_data (struct gdbarch
*gdbarch
,
4920 struct gdbarch_data
*data
,
4923 gdb_assert (data
->index
< gdbarch
->nr_data
);
4924 if (gdbarch
->data
[data
->index
] != NULL
)
4926 gdb_assert (data
->free
!= NULL
);
4927 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4929 gdbarch
->data
[data
->index
] = pointer
;
4932 /* Return the current value of the specified per-architecture
4936 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4938 gdb_assert (data
->index
< gdbarch
->nr_data
);
4939 /* The data-pointer isn't initialized, call init() to get a value but
4940 only if the architecture initializaiton has completed. Otherwise
4941 punt - hope that the caller knows what they are doing. */
4942 if (gdbarch
->data
[data
->index
] == NULL
4943 && gdbarch
->initialized_p
)
4945 /* Be careful to detect an initialization cycle. */
4946 gdb_assert (data
->init_p
);
4948 gdb_assert (data
->init
!= NULL
);
4949 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
4951 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
4953 return gdbarch
->data
[data
->index
];
4958 /* Keep a registry of swapped data required by GDB modules. */
4963 struct gdbarch_swap_registration
*source
;
4964 struct gdbarch_swap
*next
;
4967 struct gdbarch_swap_registration
4970 unsigned long sizeof_data
;
4971 gdbarch_swap_ftype
*init
;
4972 struct gdbarch_swap_registration
*next
;
4975 struct gdbarch_swap_registry
4978 struct gdbarch_swap_registration
*registrations
;
4981 struct gdbarch_swap_registry gdbarch_swap_registry
=
4987 register_gdbarch_swap (void *data
,
4988 unsigned long sizeof_data
,
4989 gdbarch_swap_ftype
*init
)
4991 struct gdbarch_swap_registration
**rego
;
4992 for (rego
= &gdbarch_swap_registry
.registrations
;
4994 rego
= &(*rego
)->next
);
4995 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4996 (*rego
)->next
= NULL
;
4997 (*rego
)->init
= init
;
4998 (*rego
)->data
= data
;
4999 (*rego
)->sizeof_data
= sizeof_data
;
5003 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5005 struct gdbarch_swap
*curr
;
5006 for (curr
= gdbarch
->swap
;
5010 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5015 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5017 struct gdbarch_swap_registration
*rego
;
5018 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5019 for (rego
= gdbarch_swap_registry
.registrations
;
5023 if (rego
->data
!= NULL
)
5025 (*curr
) = XMALLOC (struct gdbarch_swap
);
5026 (*curr
)->source
= rego
;
5027 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5028 (*curr
)->next
= NULL
;
5029 curr
= &(*curr
)->next
;
5031 if (rego
->init
!= NULL
)
5037 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5039 struct gdbarch_swap
*curr
;
5040 for (curr
= gdbarch
->swap
;
5043 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5047 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5049 struct gdbarch_swap
*curr
;
5050 for (curr
= gdbarch
->swap
;
5053 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5057 /* Keep a registry of the architectures known by GDB. */
5059 struct gdbarch_registration
5061 enum bfd_architecture bfd_architecture
;
5062 gdbarch_init_ftype
*init
;
5063 gdbarch_dump_tdep_ftype
*dump_tdep
;
5064 struct gdbarch_list
*arches
;
5065 struct gdbarch_registration
*next
;
5068 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5071 append_name (const char ***buf
, int *nr
, const char *name
)
5073 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5079 gdbarch_printable_names (void)
5083 /* Accumulate a list of names based on the registed list of
5085 enum bfd_architecture a
;
5087 const char **arches
= NULL
;
5088 struct gdbarch_registration
*rego
;
5089 for (rego
= gdbarch_registry
;
5093 const struct bfd_arch_info
*ap
;
5094 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5096 internal_error (__FILE__
, __LINE__
,
5097 "gdbarch_architecture_names: multi-arch unknown");
5100 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5105 append_name (&arches
, &nr_arches
, NULL
);
5109 /* Just return all the architectures that BFD knows. Assume that
5110 the legacy architecture framework supports them. */
5111 return bfd_arch_list ();
5116 gdbarch_register (enum bfd_architecture bfd_architecture
,
5117 gdbarch_init_ftype
*init
,
5118 gdbarch_dump_tdep_ftype
*dump_tdep
)
5120 struct gdbarch_registration
**curr
;
5121 const struct bfd_arch_info
*bfd_arch_info
;
5122 /* Check that BFD recognizes this architecture */
5123 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5124 if (bfd_arch_info
== NULL
)
5126 internal_error (__FILE__
, __LINE__
,
5127 "gdbarch: Attempt to register unknown architecture (%d)",
5130 /* Check that we haven't seen this architecture before */
5131 for (curr
= &gdbarch_registry
;
5133 curr
= &(*curr
)->next
)
5135 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5136 internal_error (__FILE__
, __LINE__
,
5137 "gdbarch: Duplicate registraration of architecture (%s)",
5138 bfd_arch_info
->printable_name
);
5142 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5143 bfd_arch_info
->printable_name
,
5146 (*curr
) = XMALLOC (struct gdbarch_registration
);
5147 (*curr
)->bfd_architecture
= bfd_architecture
;
5148 (*curr
)->init
= init
;
5149 (*curr
)->dump_tdep
= dump_tdep
;
5150 (*curr
)->arches
= NULL
;
5151 (*curr
)->next
= NULL
;
5152 /* When non- multi-arch, install whatever target dump routine we've
5153 been provided - hopefully that routine has been written correctly
5154 and works regardless of multi-arch. */
5155 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5156 && startup_gdbarch
.dump_tdep
== NULL
)
5157 startup_gdbarch
.dump_tdep
= dump_tdep
;
5161 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5162 gdbarch_init_ftype
*init
)
5164 gdbarch_register (bfd_architecture
, init
, NULL
);
5168 /* Look for an architecture using gdbarch_info. Base search on only
5169 BFD_ARCH_INFO and BYTE_ORDER. */
5171 struct gdbarch_list
*
5172 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5173 const struct gdbarch_info
*info
)
5175 for (; arches
!= NULL
; arches
= arches
->next
)
5177 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5179 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5187 /* Update the current architecture. Return ZERO if the update request
5191 gdbarch_update_p (struct gdbarch_info info
)
5193 struct gdbarch
*new_gdbarch
;
5194 struct gdbarch
*old_gdbarch
;
5195 struct gdbarch_registration
*rego
;
5197 /* Fill in missing parts of the INFO struct using a number of
5198 sources: ``set ...''; INFOabfd supplied; existing target. */
5200 /* ``(gdb) set architecture ...'' */
5201 if (info
.bfd_arch_info
== NULL
5202 && !TARGET_ARCHITECTURE_AUTO
)
5203 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5204 if (info
.bfd_arch_info
== NULL
5205 && info
.abfd
!= NULL
5206 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5207 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5208 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5209 if (info
.bfd_arch_info
== NULL
)
5210 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5212 /* ``(gdb) set byte-order ...'' */
5213 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5214 && !TARGET_BYTE_ORDER_AUTO
)
5215 info
.byte_order
= TARGET_BYTE_ORDER
;
5216 /* From the INFO struct. */
5217 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5218 && info
.abfd
!= NULL
)
5219 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5220 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5221 : BFD_ENDIAN_UNKNOWN
);
5222 /* From the current target. */
5223 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5224 info
.byte_order
= TARGET_BYTE_ORDER
;
5226 /* Must have found some sort of architecture. */
5227 gdb_assert (info
.bfd_arch_info
!= NULL
);
5231 fprintf_unfiltered (gdb_stdlog
,
5232 "gdbarch_update: info.bfd_arch_info %s\n",
5233 (info
.bfd_arch_info
!= NULL
5234 ? info
.bfd_arch_info
->printable_name
5236 fprintf_unfiltered (gdb_stdlog
,
5237 "gdbarch_update: info.byte_order %d (%s)\n",
5239 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5240 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5242 fprintf_unfiltered (gdb_stdlog
,
5243 "gdbarch_update: info.abfd 0x%lx\n",
5245 fprintf_unfiltered (gdb_stdlog
,
5246 "gdbarch_update: info.tdep_info 0x%lx\n",
5247 (long) info
.tdep_info
);
5250 /* Find the target that knows about this architecture. */
5251 for (rego
= gdbarch_registry
;
5254 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5263 /* Swap the data belonging to the old target out setting the
5264 installed data to zero. This stops the ->init() function trying
5265 to refer to the previous architecture's global data structures. */
5266 swapout_gdbarch_swap (current_gdbarch
);
5267 clear_gdbarch_swap (current_gdbarch
);
5269 /* Save the previously selected architecture, setting the global to
5270 NULL. This stops ->init() trying to use the previous
5271 architecture's configuration. The previous architecture may not
5272 even be of the same architecture family. The most recent
5273 architecture of the same family is found at the head of the
5274 rego->arches list. */
5275 old_gdbarch
= current_gdbarch
;
5276 current_gdbarch
= NULL
;
5278 /* Ask the target for a replacement architecture. */
5279 new_gdbarch
= rego
->init (info
, rego
->arches
);
5281 /* Did the target like it? No. Reject the change and revert to the
5282 old architecture. */
5283 if (new_gdbarch
== NULL
)
5286 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5287 swapin_gdbarch_swap (old_gdbarch
);
5288 current_gdbarch
= old_gdbarch
;
5292 /* Did the architecture change? No. Oops, put the old architecture
5294 if (old_gdbarch
== new_gdbarch
)
5297 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5299 new_gdbarch
->bfd_arch_info
->printable_name
);
5300 swapin_gdbarch_swap (old_gdbarch
);
5301 current_gdbarch
= old_gdbarch
;
5305 /* Is this a pre-existing architecture? Yes. Move it to the front
5306 of the list of architectures (keeping the list sorted Most
5307 Recently Used) and then copy it in. */
5309 struct gdbarch_list
**list
;
5310 for (list
= ®o
->arches
;
5312 list
= &(*list
)->next
)
5314 if ((*list
)->gdbarch
== new_gdbarch
)
5316 struct gdbarch_list
*this;
5318 fprintf_unfiltered (gdb_stdlog
,
5319 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5321 new_gdbarch
->bfd_arch_info
->printable_name
);
5324 (*list
) = this->next
;
5325 /* Insert in the front. */
5326 this->next
= rego
->arches
;
5327 rego
->arches
= this;
5328 /* Copy the new architecture in. */
5329 current_gdbarch
= new_gdbarch
;
5330 swapin_gdbarch_swap (new_gdbarch
);
5331 architecture_changed_event ();
5337 /* Prepend this new architecture to the architecture list (keep the
5338 list sorted Most Recently Used). */
5340 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5341 this->next
= rego
->arches
;
5342 this->gdbarch
= new_gdbarch
;
5343 rego
->arches
= this;
5346 /* Switch to this new architecture marking it initialized. */
5347 current_gdbarch
= new_gdbarch
;
5348 current_gdbarch
->initialized_p
= 1;
5351 fprintf_unfiltered (gdb_stdlog
,
5352 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5354 new_gdbarch
->bfd_arch_info
->printable_name
);
5357 /* Check that the newly installed architecture is valid. Plug in
5358 any post init values. */
5359 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5360 verify_gdbarch (new_gdbarch
);
5362 /* Initialize the per-architecture memory (swap) areas.
5363 CURRENT_GDBARCH must be update before these modules are
5365 init_gdbarch_swap (new_gdbarch
);
5367 /* Initialize the per-architecture data. CURRENT_GDBARCH
5368 must be updated before these modules are called. */
5369 architecture_changed_event ();
5372 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5380 /* Pointer to the target-dependent disassembly function. */
5381 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5382 disassemble_info tm_print_insn_info
;
5385 extern void _initialize_gdbarch (void);
5388 _initialize_gdbarch (void)
5390 struct cmd_list_element
*c
;
5392 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5393 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5394 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5395 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5396 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5398 add_show_from_set (add_set_cmd ("arch",
5401 (char *)&gdbarch_debug
,
5402 "Set architecture debugging.\n\
5403 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5405 c
= add_set_cmd ("archdebug",
5408 (char *)&gdbarch_debug
,
5409 "Set architecture debugging.\n\
5410 When non-zero, architecture debugging is enabled.", &setlist
);
5412 deprecate_cmd (c
, "set debug arch");
5413 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");