1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 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_string.h"
66 #include "gdb-events.h"
67 #include "reggroups.h"
70 /* Static function declarations */
72 static void verify_gdbarch (struct gdbarch
*gdbarch
);
73 static void alloc_gdbarch_data (struct gdbarch
*);
74 static void free_gdbarch_data (struct gdbarch
*);
75 static void init_gdbarch_swap (struct gdbarch
*);
76 static void clear_gdbarch_swap (struct gdbarch
*);
77 static void swapout_gdbarch_swap (struct gdbarch
*);
78 static void swapin_gdbarch_swap (struct gdbarch
*);
80 /* Non-zero if we want to trace architecture code. */
83 #define GDBARCH_DEBUG 0
85 int gdbarch_debug
= GDBARCH_DEBUG
;
88 /* Maintain the struct gdbarch object */
92 /* Has this architecture been fully initialized? */
94 /* basic architectural information */
95 const struct bfd_arch_info
* bfd_arch_info
;
99 /* target specific vector. */
100 struct gdbarch_tdep
*tdep
;
101 gdbarch_dump_tdep_ftype
*dump_tdep
;
103 /* per-architecture data-pointers */
107 /* per-architecture swap-regions */
108 struct gdbarch_swap
*swap
;
110 /* Multi-arch values.
112 When extending this structure you must:
116 Declare set/get functions and define the corresponding
119 gdbarch_alloc(): If zero/NULL is not a suitable default,
120 initialize the new field.
122 verify_gdbarch(): Confirm that the target updated the field
125 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
128 ``startup_gdbarch()'': Append an initial value to the static
129 variable (base values on the host's c-type system).
131 get_gdbarch(): Implement the set/get functions (probably using
132 the macro's as shortcuts).
147 gdbarch_read_pc_ftype
*read_pc
;
148 gdbarch_write_pc_ftype
*write_pc
;
149 gdbarch_read_fp_ftype
*read_fp
;
150 gdbarch_read_sp_ftype
*read_sp
;
151 gdbarch_write_sp_ftype
*write_sp
;
152 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
153 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
154 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
163 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
164 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
165 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
166 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
167 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
168 gdbarch_register_name_ftype
*register_name
;
171 gdbarch_register_byte_ftype
*register_byte
;
172 gdbarch_register_raw_size_ftype
*register_raw_size
;
173 int deprecated_max_register_raw_size
;
174 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
175 int deprecated_max_register_virtual_size
;
176 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
177 gdbarch_register_type_ftype
*register_type
;
178 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
179 gdbarch_print_registers_info_ftype
*print_registers_info
;
180 gdbarch_print_float_info_ftype
*print_float_info
;
181 gdbarch_print_vector_info_ftype
*print_vector_info
;
182 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
183 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
184 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
185 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
186 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
187 int deprecated_use_generic_dummy_frames
;
188 int call_dummy_location
;
189 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
190 CORE_ADDR call_dummy_start_offset
;
191 CORE_ADDR call_dummy_breakpoint_offset
;
192 int call_dummy_breakpoint_offset_p
;
193 int call_dummy_length
;
194 gdbarch_deprecated_pc_in_call_dummy_ftype
*deprecated_pc_in_call_dummy
;
196 LONGEST
* call_dummy_words
;
197 int sizeof_call_dummy_words
;
198 int call_dummy_stack_adjust_p
;
199 int call_dummy_stack_adjust
;
200 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
201 gdbarch_deprecated_init_frame_pc_first_ftype
*deprecated_init_frame_pc_first
;
202 gdbarch_deprecated_init_frame_pc_ftype
*deprecated_init_frame_pc
;
203 int believe_pcc_promotion
;
204 int believe_pcc_promotion_type
;
205 gdbarch_get_saved_register_ftype
*get_saved_register
;
206 gdbarch_register_convertible_ftype
*register_convertible
;
207 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
208 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
209 gdbarch_convert_register_p_ftype
*convert_register_p
;
210 gdbarch_register_to_value_ftype
*register_to_value
;
211 gdbarch_value_to_register_ftype
*value_to_register
;
212 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
213 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
214 gdbarch_integer_to_address_ftype
*integer_to_address
;
215 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
216 gdbarch_push_arguments_ftype
*push_arguments
;
217 gdbarch_deprecated_push_dummy_frame_ftype
*deprecated_push_dummy_frame
;
218 gdbarch_push_return_address_ftype
*push_return_address
;
219 gdbarch_pop_frame_ftype
*pop_frame
;
220 gdbarch_store_struct_return_ftype
*store_struct_return
;
221 gdbarch_extract_return_value_ftype
*extract_return_value
;
222 gdbarch_store_return_value_ftype
*store_return_value
;
223 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
224 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
225 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
226 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
227 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
228 gdbarch_deprecated_frame_init_saved_regs_ftype
*deprecated_frame_init_saved_regs
;
229 gdbarch_deprecated_init_extra_frame_info_ftype
*deprecated_init_extra_frame_info
;
230 gdbarch_skip_prologue_ftype
*skip_prologue
;
231 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
232 gdbarch_inner_than_ftype
*inner_than
;
233 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
234 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
235 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
236 CORE_ADDR decr_pc_after_break
;
237 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
238 CORE_ADDR function_start_offset
;
239 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
240 CORE_ADDR frame_args_skip
;
241 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
242 gdbarch_frame_chain_ftype
*frame_chain
;
243 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
244 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
245 gdbarch_frame_args_address_ftype
*frame_args_address
;
246 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
247 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
248 gdbarch_frame_num_args_ftype
*frame_num_args
;
249 gdbarch_stack_align_ftype
*stack_align
;
250 gdbarch_frame_align_ftype
*frame_align
;
251 int extra_stack_alignment_needed
;
252 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
253 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
255 const struct floatformat
* float_format
;
256 const struct floatformat
* double_format
;
257 const struct floatformat
* long_double_format
;
258 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
259 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
260 gdbarch_smash_text_address_ftype
*smash_text_address
;
261 gdbarch_software_single_step_ftype
*software_single_step
;
262 gdbarch_print_insn_ftype
*print_insn
;
263 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
264 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
265 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
266 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
267 gdbarch_sigtramp_start_ftype
*sigtramp_start
;
268 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
269 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
270 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
271 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
272 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
273 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
274 const char * name_of_malloc
;
275 int cannot_step_breakpoint
;
276 int have_nonsteppable_watchpoint
;
277 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
278 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
279 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
280 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
284 /* The default architecture uses host values (for want of a better
287 extern const struct bfd_arch_info bfd_default_arch_struct
;
289 struct gdbarch startup_gdbarch
=
291 1, /* Always initialized. */
292 /* basic architecture information */
293 &bfd_default_arch_struct
,
296 /* target specific vector and its dump routine */
298 /*per-architecture data-pointers and swap regions */
300 /* Multi-arch values */
304 8 * sizeof (LONGEST
),
307 8 * sizeof (long double),
336 generic_register_byte
,
337 generic_register_size
,
339 generic_register_size
,
344 default_print_registers_info
,
359 generic_pc_in_call_dummy
,
434 generic_in_function_epilogue_p
,
435 construct_inferior_arguments
,
445 default_register_reggroup_p
,
446 /* startup_gdbarch() */
449 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
451 /* Do any initialization needed for a non-multiarch configuration
452 after the _initialize_MODULE functions have been run. */
454 initialize_non_multiarch (void)
456 alloc_gdbarch_data (&startup_gdbarch
);
457 /* Ensure that all swap areas are zeroed so that they again think
458 they are starting from scratch. */
459 clear_gdbarch_swap (&startup_gdbarch
);
460 init_gdbarch_swap (&startup_gdbarch
);
464 /* Create a new ``struct gdbarch'' based on information provided by
465 ``struct gdbarch_info''. */
468 gdbarch_alloc (const struct gdbarch_info
*info
,
469 struct gdbarch_tdep
*tdep
)
471 /* NOTE: The new architecture variable is named ``current_gdbarch''
472 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
473 the current local architecture and not the previous global
474 architecture. This ensures that the new architectures initial
475 values are not influenced by the previous architecture. Once
476 everything is parameterised with gdbarch, this will go away. */
477 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
478 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
480 alloc_gdbarch_data (current_gdbarch
);
482 current_gdbarch
->tdep
= tdep
;
484 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
485 current_gdbarch
->byte_order
= info
->byte_order
;
486 current_gdbarch
->osabi
= info
->osabi
;
488 /* Force the explicit initialization of these. */
489 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
490 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
491 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
492 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
493 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
494 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
495 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
496 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
497 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
498 current_gdbarch
->char_signed
= -1;
499 current_gdbarch
->read_pc
= generic_target_read_pc
;
500 current_gdbarch
->write_pc
= generic_target_write_pc
;
501 current_gdbarch
->read_fp
= generic_target_read_fp
;
502 current_gdbarch
->read_sp
= generic_target_read_sp
;
503 current_gdbarch
->write_sp
= generic_target_write_sp
;
504 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
505 current_gdbarch
->num_regs
= -1;
506 current_gdbarch
->sp_regnum
= -1;
507 current_gdbarch
->fp_regnum
= -1;
508 current_gdbarch
->pc_regnum
= -1;
509 current_gdbarch
->ps_regnum
= -1;
510 current_gdbarch
->fp0_regnum
= -1;
511 current_gdbarch
->npc_regnum
= -1;
512 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
513 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
514 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
515 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
516 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
517 current_gdbarch
->register_name
= legacy_register_name
;
518 current_gdbarch
->register_size
= -1;
519 current_gdbarch
->register_bytes
= -1;
520 current_gdbarch
->register_byte
= generic_register_byte
;
521 current_gdbarch
->register_raw_size
= generic_register_size
;
522 current_gdbarch
->register_virtual_size
= generic_register_size
;
523 current_gdbarch
->print_registers_info
= default_print_registers_info
;
524 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
525 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
526 current_gdbarch
->cannot_store_register
= cannot_register_not
;
527 current_gdbarch
->deprecated_use_generic_dummy_frames
= 1;
528 current_gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
529 current_gdbarch
->call_dummy_start_offset
= -1;
530 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
531 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
532 current_gdbarch
->call_dummy_length
= -1;
533 current_gdbarch
->deprecated_pc_in_call_dummy
= generic_pc_in_call_dummy
;
534 current_gdbarch
->call_dummy_p
= -1;
535 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
536 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
537 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
538 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
539 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
540 current_gdbarch
->register_to_value
= legacy_register_to_value
;
541 current_gdbarch
->value_to_register
= legacy_value_to_register
;
542 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
543 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
544 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
545 current_gdbarch
->push_arguments
= default_push_arguments
;
546 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
547 current_gdbarch
->store_return_value
= legacy_store_return_value
;
548 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
549 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
550 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
551 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
552 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
553 current_gdbarch
->decr_pc_after_break
= -1;
554 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
555 current_gdbarch
->function_start_offset
= -1;
556 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
557 current_gdbarch
->frame_args_skip
= -1;
558 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
559 current_gdbarch
->frame_args_address
= get_frame_base
;
560 current_gdbarch
->frame_locals_address
= get_frame_base
;
561 current_gdbarch
->extra_stack_alignment_needed
= 1;
562 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
563 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
564 current_gdbarch
->smash_text_address
= core_addr_identity
;
565 current_gdbarch
->print_insn
= legacy_print_insn
;
566 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
567 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
568 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
569 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
570 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
571 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
572 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
573 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
574 current_gdbarch
->name_of_malloc
= "malloc";
575 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
576 /* gdbarch_alloc() */
578 return current_gdbarch
;
582 /* Free a gdbarch struct. This should never happen in normal
583 operation --- once you've created a gdbarch, you keep it around.
584 However, if an architecture's init function encounters an error
585 building the structure, it may need to clean up a partially
586 constructed gdbarch. */
589 gdbarch_free (struct gdbarch
*arch
)
591 gdb_assert (arch
!= NULL
);
592 free_gdbarch_data (arch
);
597 /* Ensure that all values in a GDBARCH are reasonable. */
600 verify_gdbarch (struct gdbarch
*gdbarch
)
603 struct cleanup
*cleanups
;
606 /* Only perform sanity checks on a multi-arch target. */
609 log
= mem_fileopen ();
610 cleanups
= make_cleanup_ui_file_delete (log
);
612 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
613 fprintf_unfiltered (log
, "\n\tbyte-order");
614 if (gdbarch
->bfd_arch_info
== NULL
)
615 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
616 /* Check those that need to be defined for the given multi-arch level. */
617 /* Skip verify of short_bit, invalid_p == 0 */
618 /* Skip verify of int_bit, invalid_p == 0 */
619 /* Skip verify of long_bit, invalid_p == 0 */
620 /* Skip verify of long_long_bit, invalid_p == 0 */
621 /* Skip verify of float_bit, invalid_p == 0 */
622 /* Skip verify of double_bit, invalid_p == 0 */
623 /* Skip verify of long_double_bit, invalid_p == 0 */
624 /* Skip verify of ptr_bit, invalid_p == 0 */
625 if (gdbarch
->addr_bit
== 0)
626 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
627 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
628 if (gdbarch
->char_signed
== -1)
629 gdbarch
->char_signed
= 1;
630 /* Skip verify of read_pc, invalid_p == 0 */
631 /* Skip verify of write_pc, invalid_p == 0 */
632 /* Skip verify of read_fp, invalid_p == 0 */
633 /* Skip verify of read_sp, invalid_p == 0 */
634 /* Skip verify of write_sp, invalid_p == 0 */
635 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
636 /* Skip verify of pseudo_register_read, has predicate */
637 /* Skip verify of pseudo_register_write, has predicate */
638 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
639 && (gdbarch
->num_regs
== -1))
640 fprintf_unfiltered (log
, "\n\tnum_regs");
641 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
642 /* Skip verify of sp_regnum, invalid_p == 0 */
643 /* Skip verify of fp_regnum, invalid_p == 0 */
644 /* Skip verify of pc_regnum, invalid_p == 0 */
645 /* Skip verify of ps_regnum, invalid_p == 0 */
646 /* Skip verify of fp0_regnum, invalid_p == 0 */
647 /* Skip verify of npc_regnum, invalid_p == 0 */
648 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
649 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
650 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
651 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
652 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
653 /* Skip verify of register_name, invalid_p == 0 */
654 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
655 && (gdbarch
->register_size
== -1))
656 fprintf_unfiltered (log
, "\n\tregister_size");
657 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
658 && (gdbarch
->register_bytes
== -1))
659 fprintf_unfiltered (log
, "\n\tregister_bytes");
660 /* Skip verify of register_byte, invalid_p == 0 */
661 /* Skip verify of register_raw_size, invalid_p == 0 */
662 /* Skip verify of deprecated_max_register_raw_size, has predicate */
663 /* Skip verify of register_virtual_size, invalid_p == 0 */
664 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
665 /* Skip verify of register_virtual_type, has predicate */
666 /* Skip verify of register_type, has predicate */
667 /* Skip verify of deprecated_do_registers_info, has predicate */
668 /* Skip verify of print_registers_info, invalid_p == 0 */
669 /* Skip verify of print_float_info, has predicate */
670 /* Skip verify of print_vector_info, has predicate */
671 /* Skip verify of register_sim_regno, invalid_p == 0 */
672 /* Skip verify of register_bytes_ok, has predicate */
673 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
674 /* Skip verify of cannot_store_register, invalid_p == 0 */
675 /* Skip verify of get_longjmp_target, has predicate */
676 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
677 /* Skip verify of call_dummy_location, invalid_p == 0 */
678 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
679 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
680 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
681 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
682 && (gdbarch
->call_dummy_start_offset
== -1))
683 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
684 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
685 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
686 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
687 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
688 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
689 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
690 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
691 && (gdbarch
->call_dummy_length
== -1))
692 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
693 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
694 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
695 && (gdbarch
->call_dummy_p
== -1))
696 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
697 /* Skip verify of call_dummy_words, invalid_p == 0 */
698 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
699 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
700 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
701 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
702 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
703 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
704 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
705 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
706 && (gdbarch
->fix_call_dummy
== 0))
707 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
708 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
709 /* Skip verify of deprecated_init_frame_pc, has predicate */
710 /* Skip verify of get_saved_register, has predicate */
711 /* Skip verify of register_convertible, invalid_p == 0 */
712 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
713 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
714 /* Skip verify of convert_register_p, invalid_p == 0 */
715 /* Skip verify of register_to_value, invalid_p == 0 */
716 /* Skip verify of value_to_register, invalid_p == 0 */
717 /* Skip verify of pointer_to_address, invalid_p == 0 */
718 /* Skip verify of address_to_pointer, invalid_p == 0 */
719 /* Skip verify of integer_to_address, has predicate */
720 /* Skip verify of return_value_on_stack, invalid_p == 0 */
721 /* Skip verify of push_arguments, invalid_p == 0 */
722 /* Skip verify of deprecated_push_dummy_frame, has predicate */
723 /* Skip verify of push_return_address, has predicate */
724 /* Skip verify of pop_frame, has predicate */
725 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
726 && (gdbarch
->store_struct_return
== 0))
727 fprintf_unfiltered (log
, "\n\tstore_struct_return");
728 /* Skip verify of extract_return_value, invalid_p == 0 */
729 /* Skip verify of store_return_value, invalid_p == 0 */
730 /* Skip verify of extract_struct_value_address, has predicate */
731 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
732 /* Skip verify of use_struct_convention, invalid_p == 0 */
733 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
734 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
735 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
736 && (gdbarch
->skip_prologue
== 0))
737 fprintf_unfiltered (log
, "\n\tskip_prologue");
738 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
740 && (gdbarch
->inner_than
== 0))
741 fprintf_unfiltered (log
, "\n\tinner_than");
742 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
743 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
744 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
745 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
746 && (gdbarch
->decr_pc_after_break
== -1))
747 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
748 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
749 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
750 && (gdbarch
->function_start_offset
== -1))
751 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
752 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
753 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
754 && (gdbarch
->frame_args_skip
== -1))
755 fprintf_unfiltered (log
, "\n\tframe_args_skip");
756 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
757 /* Skip verify of frame_chain, has predicate */
758 /* Skip verify of frame_chain_valid, has predicate */
759 /* Skip verify of frame_saved_pc, has predicate */
760 /* Skip verify of frame_args_address, invalid_p == 0 */
761 /* Skip verify of frame_locals_address, invalid_p == 0 */
762 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
763 && (gdbarch
->saved_pc_after_call
== 0))
764 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
765 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
766 && (gdbarch
->frame_num_args
== 0))
767 fprintf_unfiltered (log
, "\n\tframe_num_args");
768 /* Skip verify of stack_align, has predicate */
769 /* Skip verify of frame_align, has predicate */
770 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
771 /* Skip verify of reg_struct_has_addr, has predicate */
772 /* Skip verify of save_dummy_frame_tos, has predicate */
773 if (gdbarch
->float_format
== 0)
774 gdbarch
->float_format
= default_float_format (gdbarch
);
775 if (gdbarch
->double_format
== 0)
776 gdbarch
->double_format
= default_double_format (gdbarch
);
777 if (gdbarch
->long_double_format
== 0)
778 gdbarch
->long_double_format
= default_double_format (gdbarch
);
779 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
780 /* Skip verify of addr_bits_remove, invalid_p == 0 */
781 /* Skip verify of smash_text_address, invalid_p == 0 */
782 /* Skip verify of software_single_step, has predicate */
783 /* Skip verify of print_insn, invalid_p == 0 */
784 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
785 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
786 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
787 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
788 /* Skip verify of sigtramp_start, has predicate */
789 /* Skip verify of sigtramp_end, has predicate */
790 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
791 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
792 /* Skip verify of dwarf2_build_frame_info, has predicate */
793 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
794 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
795 /* Skip verify of name_of_malloc, invalid_p == 0 */
796 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
797 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
798 /* Skip verify of address_class_type_flags, has predicate */
799 /* Skip verify of address_class_type_flags_to_name, has predicate */
800 /* Skip verify of address_class_name_to_type_flags, has predicate */
801 /* Skip verify of register_reggroup_p, invalid_p == 0 */
802 buf
= ui_file_xstrdup (log
, &dummy
);
803 make_cleanup (xfree
, buf
);
804 if (strlen (buf
) > 0)
805 internal_error (__FILE__
, __LINE__
,
806 "verify_gdbarch: the following are invalid ...%s",
808 do_cleanups (cleanups
);
812 /* Print out the details of the current architecture. */
814 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
815 just happens to match the global variable ``current_gdbarch''. That
816 way macros refering to that variable get the local and not the global
817 version - ulgh. Once everything is parameterised with gdbarch, this
821 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
829 gdbarch_frame_align_p (current_gdbarch
));
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: frame_align = 0x%08lx\n",
833 (long) current_gdbarch
->frame_align
);
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
837 (long) current_gdbarch
->in_function_epilogue_p
);
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
841 (long) current_gdbarch
->register_reggroup_p
);
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
845 gdbarch_pseudo_register_read_p (current_gdbarch
));
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
849 (long) current_gdbarch
->pseudo_register_read
);
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
853 gdbarch_pseudo_register_write_p (current_gdbarch
));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
857 (long) current_gdbarch
->pseudo_register_write
);
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
861 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
865 (long) current_gdbarch
->address_class_name_to_type_flags
);
866 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: %s # %s\n",
869 "ADDRESS_CLASS_TYPE_FLAGS_P()",
870 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
873 ADDRESS_CLASS_TYPE_FLAGS_P ());
875 #ifdef ADDRESS_CLASS_TYPE_FLAGS
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: %s # %s\n",
878 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
879 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
881 fprintf_unfiltered (file
,
882 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
883 (long) current_gdbarch
->address_class_type_flags
884 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
889 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
893 (long) current_gdbarch
->address_class_type_flags_to_name
);
894 #ifdef ADDRESS_TO_POINTER
896 /* Macro might contain `[{}]' when not multi-arch */
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: %s # %s\n",
899 "ADDRESS_TO_POINTER(type, buf, addr)",
900 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
905 (long) current_gdbarch
->address_to_pointer
906 /*ADDRESS_TO_POINTER ()*/);
908 #ifdef ADDR_BITS_REMOVE
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: %s # %s\n",
911 "ADDR_BITS_REMOVE(addr)",
912 XSTRING (ADDR_BITS_REMOVE (addr
)));
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
916 (long) current_gdbarch
->addr_bits_remove
917 /*ADDR_BITS_REMOVE ()*/);
919 #ifdef BELIEVE_PCC_PROMOTION
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
922 XSTRING (BELIEVE_PCC_PROMOTION
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
925 BELIEVE_PCC_PROMOTION
);
927 #ifdef BELIEVE_PCC_PROMOTION_TYPE
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
930 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
933 BELIEVE_PCC_PROMOTION_TYPE
);
935 #ifdef BREAKPOINT_FROM_PC
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: %s # %s\n",
938 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
939 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
943 (long) current_gdbarch
->breakpoint_from_pc
944 /*BREAKPOINT_FROM_PC ()*/);
946 #ifdef CALL_DUMMY_ADDRESS
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: %s # %s\n",
949 "CALL_DUMMY_ADDRESS()",
950 XSTRING (CALL_DUMMY_ADDRESS ()));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
954 (long) current_gdbarch
->call_dummy_address
955 /*CALL_DUMMY_ADDRESS ()*/);
957 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
960 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
961 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
964 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
966 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
969 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
972 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
974 #ifdef CALL_DUMMY_LENGTH
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
977 XSTRING (CALL_DUMMY_LENGTH
));
978 if (gdbarch
->call_dummy_length
>= 0)
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
983 #ifdef CALL_DUMMY_LOCATION
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
986 XSTRING (CALL_DUMMY_LOCATION
));
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
989 CALL_DUMMY_LOCATION
);
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: CALL_DUMMY_P # %s\n",
994 XSTRING (CALL_DUMMY_P
));
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: CALL_DUMMY_P = %d\n",
999 #ifdef CALL_DUMMY_STACK_ADJUST
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1002 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1003 if (CALL_DUMMY_STACK_ADJUST_P
)
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1006 (long) CALL_DUMMY_STACK_ADJUST
);
1008 #ifdef CALL_DUMMY_STACK_ADJUST_P
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1011 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1014 (long) CALL_DUMMY_STACK_ADJUST_P
);
1016 #ifdef CALL_DUMMY_START_OFFSET
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1019 XSTRING (CALL_DUMMY_START_OFFSET
));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1022 (long) CALL_DUMMY_START_OFFSET
);
1024 #ifdef CALL_DUMMY_WORDS
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1027 XSTRING (CALL_DUMMY_WORDS
));
1028 fprintf_unfiltered (file
,
1029 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1030 (long) CALL_DUMMY_WORDS
);
1032 #ifdef CANNOT_FETCH_REGISTER
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: %s # %s\n",
1035 "CANNOT_FETCH_REGISTER(regnum)",
1036 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
1040 (long) current_gdbarch
->cannot_fetch_register
1041 /*CANNOT_FETCH_REGISTER ()*/);
1043 #ifdef CANNOT_STEP_BREAKPOINT
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1046 XSTRING (CANNOT_STEP_BREAKPOINT
));
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1049 CANNOT_STEP_BREAKPOINT
);
1051 #ifdef CANNOT_STORE_REGISTER
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: %s # %s\n",
1054 "CANNOT_STORE_REGISTER(regnum)",
1055 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1057 fprintf_unfiltered (file
,
1058 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
1059 (long) current_gdbarch
->cannot_store_register
1060 /*CANNOT_STORE_REGISTER ()*/);
1062 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1064 /* Macro might contain `[{}]' when not multi-arch */
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: %s # %s\n",
1067 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1068 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1073 (long) current_gdbarch
->coff_make_msymbol_special
1074 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1079 (long) current_gdbarch
->construct_inferior_arguments
);
1080 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: %s # %s\n",
1083 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1084 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1088 (long) current_gdbarch
->convert_from_func_ptr_addr
1089 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1091 #ifdef CONVERT_REGISTER_P
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: %s # %s\n",
1094 "CONVERT_REGISTER_P(regnum)",
1095 XSTRING (CONVERT_REGISTER_P (regnum
)));
1097 fprintf_unfiltered (file
,
1098 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1099 (long) current_gdbarch
->convert_register_p
1100 /*CONVERT_REGISTER_P ()*/);
1102 #ifdef DECR_PC_AFTER_BREAK
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1105 XSTRING (DECR_PC_AFTER_BREAK
));
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1108 (long) DECR_PC_AFTER_BREAK
);
1110 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: %s # %s\n",
1113 "DEPRECATED_DO_REGISTERS_INFO_P()",
1114 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1117 DEPRECATED_DO_REGISTERS_INFO_P ());
1119 #ifdef DEPRECATED_DO_REGISTERS_INFO
1121 /* Macro might contain `[{}]' when not multi-arch */
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: %s # %s\n",
1124 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1125 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1130 (long) current_gdbarch
->deprecated_do_registers_info
1131 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1133 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1135 /* Macro might contain `[{}]' when not multi-arch */
1136 fprintf_unfiltered (file
,
1137 "gdbarch_dump: %s # %s\n",
1138 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1139 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1144 (long) current_gdbarch
->deprecated_extract_return_value
1145 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1147 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: %s # %s\n",
1150 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1151 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1154 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1156 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: %s # %s\n",
1159 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1160 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1164 (long) current_gdbarch
->deprecated_extract_struct_value_address
1165 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1167 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: %s # %s\n",
1170 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1171 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1174 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1176 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1178 /* Macro might contain `[{}]' when not multi-arch */
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: %s # %s\n",
1181 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1182 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1187 (long) current_gdbarch
->deprecated_frame_init_saved_regs
1188 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1190 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: %s # %s\n",
1193 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1194 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1197 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1199 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1201 /* Macro might contain `[{}]' when not multi-arch */
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: %s # %s\n",
1204 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1205 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1210 (long) current_gdbarch
->deprecated_init_extra_frame_info
1211 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1213 #ifdef DEPRECATED_INIT_FRAME_PC_P
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: %s # %s\n",
1216 "DEPRECATED_INIT_FRAME_PC_P()",
1217 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1220 DEPRECATED_INIT_FRAME_PC_P ());
1222 #ifdef DEPRECATED_INIT_FRAME_PC
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: %s # %s\n",
1225 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1226 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1230 (long) current_gdbarch
->deprecated_init_frame_pc
1231 /*DEPRECATED_INIT_FRAME_PC ()*/);
1233 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1234 fprintf_unfiltered (file
,
1235 "gdbarch_dump: %s # %s\n",
1236 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1237 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1240 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1242 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: %s # %s\n",
1245 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1246 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1250 (long) current_gdbarch
->deprecated_init_frame_pc_first
1251 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1253 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: %s # %s\n",
1256 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1257 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1260 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1262 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1265 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE
));
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1268 DEPRECATED_MAX_REGISTER_RAW_SIZE
);
1270 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: %s # %s\n",
1273 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1274 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1277 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1279 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1282 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
));
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1285 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
);
1287 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1288 fprintf_unfiltered (file
,
1289 "gdbarch_dump: %s # %s\n",
1290 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1291 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1292 fprintf_unfiltered (file
,
1293 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1294 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1296 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: %s # %s\n",
1299 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1300 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1304 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1305 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1307 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: %s # %s\n",
1310 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1311 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1312 fprintf_unfiltered (file
,
1313 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1314 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1316 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1318 /* Macro might contain `[{}]' when not multi-arch */
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: %s # %s\n",
1321 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1322 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1327 (long) current_gdbarch
->deprecated_push_dummy_frame
1328 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1330 #ifdef DEPRECATED_STORE_RETURN_VALUE
1332 /* Macro might contain `[{}]' when not multi-arch */
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: %s # %s\n",
1335 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1336 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1341 (long) current_gdbarch
->deprecated_store_return_value
1342 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1344 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1345 fprintf_unfiltered (file
,
1346 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1347 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
));
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1350 DEPRECATED_USE_GENERIC_DUMMY_FRAMES
);
1352 #ifdef DWARF2_BUILD_FRAME_INFO_P
1353 fprintf_unfiltered (file
,
1354 "gdbarch_dump: %s # %s\n",
1355 "DWARF2_BUILD_FRAME_INFO_P()",
1356 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1359 DWARF2_BUILD_FRAME_INFO_P ());
1361 #ifdef DWARF2_BUILD_FRAME_INFO
1363 /* Macro might contain `[{}]' when not multi-arch */
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: %s # %s\n",
1366 "DWARF2_BUILD_FRAME_INFO(objfile)",
1367 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1372 (long) current_gdbarch
->dwarf2_build_frame_info
1373 /*DWARF2_BUILD_FRAME_INFO ()*/);
1375 #ifdef DWARF2_REG_TO_REGNUM
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: %s # %s\n",
1378 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1379 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1383 (long) current_gdbarch
->dwarf2_reg_to_regnum
1384 /*DWARF2_REG_TO_REGNUM ()*/);
1386 #ifdef DWARF_REG_TO_REGNUM
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: %s # %s\n",
1389 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1390 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1394 (long) current_gdbarch
->dwarf_reg_to_regnum
1395 /*DWARF_REG_TO_REGNUM ()*/);
1397 #ifdef ECOFF_REG_TO_REGNUM
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: %s # %s\n",
1400 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1401 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1405 (long) current_gdbarch
->ecoff_reg_to_regnum
1406 /*ECOFF_REG_TO_REGNUM ()*/);
1408 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1410 /* Macro might contain `[{}]' when not multi-arch */
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: %s # %s\n",
1413 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1414 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1419 (long) current_gdbarch
->elf_make_msymbol_special
1420 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1422 #ifdef EXTRACT_RETURN_VALUE
1424 /* Macro might contain `[{}]' when not multi-arch */
1425 fprintf_unfiltered (file
,
1426 "gdbarch_dump: %s # %s\n",
1427 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1428 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1431 fprintf_unfiltered (file
,
1432 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1433 (long) current_gdbarch
->extract_return_value
1434 /*EXTRACT_RETURN_VALUE ()*/);
1436 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: %s # %s\n",
1439 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1440 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1443 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1445 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: %s # %s\n",
1448 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1449 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1453 (long) current_gdbarch
->extract_struct_value_address
1454 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1456 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1459 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1462 EXTRA_STACK_ALIGNMENT_NEEDED
);
1464 #ifdef FIX_CALL_DUMMY
1466 /* Macro might contain `[{}]' when not multi-arch */
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: %s # %s\n",
1469 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1470 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1475 (long) current_gdbarch
->fix_call_dummy
1476 /*FIX_CALL_DUMMY ()*/);
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: FP0_REGNUM # %s\n",
1481 XSTRING (FP0_REGNUM
));
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: FP0_REGNUM = %d\n",
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: FP_REGNUM # %s\n",
1489 XSTRING (FP_REGNUM
));
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: FP_REGNUM = %d\n",
1494 #ifdef FRAMELESS_FUNCTION_INVOCATION
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: %s # %s\n",
1497 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1498 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1500 fprintf_unfiltered (file
,
1501 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1502 (long) current_gdbarch
->frameless_function_invocation
1503 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1505 #ifdef FRAME_ARGS_ADDRESS
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: %s # %s\n",
1508 "FRAME_ARGS_ADDRESS(fi)",
1509 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1513 (long) current_gdbarch
->frame_args_address
1514 /*FRAME_ARGS_ADDRESS ()*/);
1516 #ifdef FRAME_ARGS_SKIP
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1519 XSTRING (FRAME_ARGS_SKIP
));
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1522 (long) FRAME_ARGS_SKIP
);
1524 #ifdef FRAME_CHAIN_P
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: %s # %s\n",
1528 XSTRING (FRAME_CHAIN_P ()));
1529 fprintf_unfiltered (file
,
1530 "gdbarch_dump: FRAME_CHAIN_P() = %d\n",
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: %s # %s\n",
1536 "FRAME_CHAIN(frame)",
1537 XSTRING (FRAME_CHAIN (frame
)));
1539 fprintf_unfiltered (file
,
1540 "gdbarch_dump: FRAME_CHAIN = <0x%08lx>\n",
1541 (long) current_gdbarch
->frame_chain
1542 /*FRAME_CHAIN ()*/);
1544 #ifdef FRAME_CHAIN_VALID_P
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: %s # %s\n",
1547 "FRAME_CHAIN_VALID_P()",
1548 XSTRING (FRAME_CHAIN_VALID_P ()));
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: FRAME_CHAIN_VALID_P() = %d\n",
1551 FRAME_CHAIN_VALID_P ());
1553 #ifdef FRAME_CHAIN_VALID
1554 fprintf_unfiltered (file
,
1555 "gdbarch_dump: %s # %s\n",
1556 "FRAME_CHAIN_VALID(chain, thisframe)",
1557 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1559 fprintf_unfiltered (file
,
1560 "gdbarch_dump: FRAME_CHAIN_VALID = <0x%08lx>\n",
1561 (long) current_gdbarch
->frame_chain_valid
1562 /*FRAME_CHAIN_VALID ()*/);
1564 #ifdef FRAME_LOCALS_ADDRESS
1565 fprintf_unfiltered (file
,
1566 "gdbarch_dump: %s # %s\n",
1567 "FRAME_LOCALS_ADDRESS(fi)",
1568 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1572 (long) current_gdbarch
->frame_locals_address
1573 /*FRAME_LOCALS_ADDRESS ()*/);
1575 #ifdef FRAME_NUM_ARGS
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: %s # %s\n",
1578 "FRAME_NUM_ARGS(frame)",
1579 XSTRING (FRAME_NUM_ARGS (frame
)));
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1583 (long) current_gdbarch
->frame_num_args
1584 /*FRAME_NUM_ARGS ()*/);
1586 #ifdef FRAME_SAVED_PC_P
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: %s # %s\n",
1589 "FRAME_SAVED_PC_P()",
1590 XSTRING (FRAME_SAVED_PC_P ()));
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: FRAME_SAVED_PC_P() = %d\n",
1593 FRAME_SAVED_PC_P ());
1595 #ifdef FRAME_SAVED_PC
1596 fprintf_unfiltered (file
,
1597 "gdbarch_dump: %s # %s\n",
1598 "FRAME_SAVED_PC(fi)",
1599 XSTRING (FRAME_SAVED_PC (fi
)));
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: FRAME_SAVED_PC = <0x%08lx>\n",
1603 (long) current_gdbarch
->frame_saved_pc
1604 /*FRAME_SAVED_PC ()*/);
1606 #ifdef FUNCTION_START_OFFSET
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1609 XSTRING (FUNCTION_START_OFFSET
));
1610 fprintf_unfiltered (file
,
1611 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1612 (long) FUNCTION_START_OFFSET
);
1614 #ifdef GET_LONGJMP_TARGET_P
1615 fprintf_unfiltered (file
,
1616 "gdbarch_dump: %s # %s\n",
1617 "GET_LONGJMP_TARGET_P()",
1618 XSTRING (GET_LONGJMP_TARGET_P ()));
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1621 GET_LONGJMP_TARGET_P ());
1623 #ifdef GET_LONGJMP_TARGET
1624 fprintf_unfiltered (file
,
1625 "gdbarch_dump: %s # %s\n",
1626 "GET_LONGJMP_TARGET(pc)",
1627 XSTRING (GET_LONGJMP_TARGET (pc
)));
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1631 (long) current_gdbarch
->get_longjmp_target
1632 /*GET_LONGJMP_TARGET ()*/);
1634 #ifdef GET_SAVED_REGISTER_P
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: %s # %s\n",
1637 "GET_SAVED_REGISTER_P()",
1638 XSTRING (GET_SAVED_REGISTER_P ()));
1639 fprintf_unfiltered (file
,
1640 "gdbarch_dump: GET_SAVED_REGISTER_P() = %d\n",
1641 GET_SAVED_REGISTER_P ());
1643 #ifdef GET_SAVED_REGISTER
1645 /* Macro might contain `[{}]' when not multi-arch */
1646 fprintf_unfiltered (file
,
1647 "gdbarch_dump: %s # %s\n",
1648 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1649 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: GET_SAVED_REGISTER = <0x%08lx>\n",
1654 (long) current_gdbarch
->get_saved_register
1655 /*GET_SAVED_REGISTER ()*/);
1657 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1660 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1661 fprintf_unfiltered (file
,
1662 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1663 HAVE_NONSTEPPABLE_WATCHPOINT
);
1666 fprintf_unfiltered (file
,
1667 "gdbarch_dump: %s # %s\n",
1668 "INNER_THAN(lhs, rhs)",
1669 XSTRING (INNER_THAN (lhs
, rhs
)));
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1673 (long) current_gdbarch
->inner_than
1676 #ifdef INTEGER_TO_ADDRESS_P
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: %s # %s\n",
1679 "INTEGER_TO_ADDRESS_P()",
1680 XSTRING (INTEGER_TO_ADDRESS_P ()));
1681 fprintf_unfiltered (file
,
1682 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1683 INTEGER_TO_ADDRESS_P ());
1685 #ifdef INTEGER_TO_ADDRESS
1686 fprintf_unfiltered (file
,
1687 "gdbarch_dump: %s # %s\n",
1688 "INTEGER_TO_ADDRESS(type, buf)",
1689 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1693 (long) current_gdbarch
->integer_to_address
1694 /*INTEGER_TO_ADDRESS ()*/);
1696 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1697 fprintf_unfiltered (file
,
1698 "gdbarch_dump: %s # %s\n",
1699 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1700 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1702 fprintf_unfiltered (file
,
1703 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1704 (long) current_gdbarch
->in_solib_call_trampoline
1705 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1707 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: %s # %s\n",
1710 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1711 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1715 (long) current_gdbarch
->in_solib_return_trampoline
1716 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1718 #ifdef MEMORY_INSERT_BREAKPOINT
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: %s # %s\n",
1721 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1722 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1724 fprintf_unfiltered (file
,
1725 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1726 (long) current_gdbarch
->memory_insert_breakpoint
1727 /*MEMORY_INSERT_BREAKPOINT ()*/);
1729 #ifdef MEMORY_REMOVE_BREAKPOINT
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: %s # %s\n",
1732 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1733 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1737 (long) current_gdbarch
->memory_remove_breakpoint
1738 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1740 #ifdef NAME_OF_MALLOC
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1743 XSTRING (NAME_OF_MALLOC
));
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: NPC_REGNUM # %s\n",
1751 XSTRING (NPC_REGNUM
));
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: NPC_REGNUM = %d\n",
1756 #ifdef NUM_PSEUDO_REGS
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1759 XSTRING (NUM_PSEUDO_REGS
));
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: NUM_REGS # %s\n",
1767 XSTRING (NUM_REGS
));
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: NUM_REGS = %d\n",
1772 #ifdef PARM_BOUNDARY
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1775 XSTRING (PARM_BOUNDARY
));
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1780 #ifdef PC_IN_SIGTRAMP
1781 fprintf_unfiltered (file
,
1782 "gdbarch_dump: %s # %s\n",
1783 "PC_IN_SIGTRAMP(pc, name)",
1784 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1786 fprintf_unfiltered (file
,
1787 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1788 (long) current_gdbarch
->pc_in_sigtramp
1789 /*PC_IN_SIGTRAMP ()*/);
1792 fprintf_unfiltered (file
,
1793 "gdbarch_dump: PC_REGNUM # %s\n",
1794 XSTRING (PC_REGNUM
));
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: PC_REGNUM = %d\n",
1799 #ifdef POINTER_TO_ADDRESS
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: %s # %s\n",
1802 "POINTER_TO_ADDRESS(type, buf)",
1803 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1805 fprintf_unfiltered (file
,
1806 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1807 (long) current_gdbarch
->pointer_to_address
1808 /*POINTER_TO_ADDRESS ()*/);
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: %s # %s\n",
1814 XSTRING (POP_FRAME_P ()));
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: POP_FRAME_P() = %d\n",
1821 /* Macro might contain `[{}]' when not multi-arch */
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: %s # %s\n",
1825 XSTRING (POP_FRAME (-)));
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: POP_FRAME = <0x%08lx>\n",
1830 (long) current_gdbarch
->pop_frame
1833 #ifdef PREPARE_TO_PROCEED
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: %s # %s\n",
1836 "PREPARE_TO_PROCEED(select_it)",
1837 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1841 (long) current_gdbarch
->prepare_to_proceed
1842 /*PREPARE_TO_PROCEED ()*/);
1845 fprintf_unfiltered (file
,
1846 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1847 gdbarch_print_float_info_p (current_gdbarch
));
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: print_float_info = 0x%08lx\n",
1851 (long) current_gdbarch
->print_float_info
);
1853 fprintf_unfiltered (file
,
1854 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1855 (long) current_gdbarch
->print_registers_info
);
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1859 gdbarch_print_vector_info_p (current_gdbarch
));
1861 fprintf_unfiltered (file
,
1862 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1863 (long) current_gdbarch
->print_vector_info
);
1864 #ifdef PROLOGUE_FRAMELESS_P
1865 fprintf_unfiltered (file
,
1866 "gdbarch_dump: %s # %s\n",
1867 "PROLOGUE_FRAMELESS_P(ip)",
1868 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1870 fprintf_unfiltered (file
,
1871 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1872 (long) current_gdbarch
->prologue_frameless_p
1873 /*PROLOGUE_FRAMELESS_P ()*/);
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: PS_REGNUM # %s\n",
1878 XSTRING (PS_REGNUM
));
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: PS_REGNUM = %d\n",
1883 #ifdef PUSH_ARGUMENTS
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: %s # %s\n",
1886 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1887 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n",
1891 (long) current_gdbarch
->push_arguments
1892 /*PUSH_ARGUMENTS ()*/);
1894 #ifdef PUSH_RETURN_ADDRESS_P
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: %s # %s\n",
1897 "PUSH_RETURN_ADDRESS_P()",
1898 XSTRING (PUSH_RETURN_ADDRESS_P ()));
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n",
1901 PUSH_RETURN_ADDRESS_P ());
1903 #ifdef PUSH_RETURN_ADDRESS
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: %s # %s\n",
1906 "PUSH_RETURN_ADDRESS(pc, sp)",
1907 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1909 fprintf_unfiltered (file
,
1910 "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1911 (long) current_gdbarch
->push_return_address
1912 /*PUSH_RETURN_ADDRESS ()*/);
1914 #ifdef REGISTER_BYTE
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: %s # %s\n",
1917 "REGISTER_BYTE(reg_nr)",
1918 XSTRING (REGISTER_BYTE (reg_nr
)));
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1922 (long) current_gdbarch
->register_byte
1923 /*REGISTER_BYTE ()*/);
1925 #ifdef REGISTER_BYTES
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: REGISTER_BYTES # %s\n",
1928 XSTRING (REGISTER_BYTES
));
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: REGISTER_BYTES = %d\n",
1933 #ifdef REGISTER_BYTES_OK_P
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: %s # %s\n",
1936 "REGISTER_BYTES_OK_P()",
1937 XSTRING (REGISTER_BYTES_OK_P ()));
1938 fprintf_unfiltered (file
,
1939 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1940 REGISTER_BYTES_OK_P ());
1942 #ifdef REGISTER_BYTES_OK
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: %s # %s\n",
1945 "REGISTER_BYTES_OK(nr_bytes)",
1946 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1950 (long) current_gdbarch
->register_bytes_ok
1951 /*REGISTER_BYTES_OK ()*/);
1953 #ifdef REGISTER_CONVERTIBLE
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: %s # %s\n",
1956 "REGISTER_CONVERTIBLE(nr)",
1957 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
1961 (long) current_gdbarch
->register_convertible
1962 /*REGISTER_CONVERTIBLE ()*/);
1964 #ifdef REGISTER_CONVERT_TO_RAW
1966 /* Macro might contain `[{}]' when not multi-arch */
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: %s # %s\n",
1969 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1970 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1975 (long) current_gdbarch
->register_convert_to_raw
1976 /*REGISTER_CONVERT_TO_RAW ()*/);
1978 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1980 /* Macro might contain `[{}]' when not multi-arch */
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: %s # %s\n",
1983 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1984 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1989 (long) current_gdbarch
->register_convert_to_virtual
1990 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1992 #ifdef REGISTER_NAME
1993 fprintf_unfiltered (file
,
1994 "gdbarch_dump: %s # %s\n",
1995 "REGISTER_NAME(regnr)",
1996 XSTRING (REGISTER_NAME (regnr
)));
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2000 (long) current_gdbarch
->register_name
2001 /*REGISTER_NAME ()*/);
2003 #ifdef REGISTER_RAW_SIZE
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: %s # %s\n",
2006 "REGISTER_RAW_SIZE(reg_nr)",
2007 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2011 (long) current_gdbarch
->register_raw_size
2012 /*REGISTER_RAW_SIZE ()*/);
2014 #ifdef REGISTER_SIM_REGNO
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: %s # %s\n",
2017 "REGISTER_SIM_REGNO(reg_nr)",
2018 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2022 (long) current_gdbarch
->register_sim_regno
2023 /*REGISTER_SIM_REGNO ()*/);
2025 #ifdef REGISTER_SIZE
2026 fprintf_unfiltered (file
,
2027 "gdbarch_dump: REGISTER_SIZE # %s\n",
2028 XSTRING (REGISTER_SIZE
));
2029 fprintf_unfiltered (file
,
2030 "gdbarch_dump: REGISTER_SIZE = %d\n",
2033 #ifdef REGISTER_TO_VALUE
2035 /* Macro might contain `[{}]' when not multi-arch */
2036 fprintf_unfiltered (file
,
2037 "gdbarch_dump: %s # %s\n",
2038 "REGISTER_TO_VALUE(regnum, type, from, to)",
2039 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
2042 fprintf_unfiltered (file
,
2043 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2044 (long) current_gdbarch
->register_to_value
2045 /*REGISTER_TO_VALUE ()*/);
2048 fprintf_unfiltered (file
,
2049 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2050 gdbarch_register_type_p (current_gdbarch
));
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: register_type = 0x%08lx\n",
2054 (long) current_gdbarch
->register_type
);
2055 #ifdef REGISTER_VIRTUAL_SIZE
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: %s # %s\n",
2058 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2059 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2063 (long) current_gdbarch
->register_virtual_size
2064 /*REGISTER_VIRTUAL_SIZE ()*/);
2066 #ifdef REGISTER_VIRTUAL_TYPE_P
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: %s # %s\n",
2069 "REGISTER_VIRTUAL_TYPE_P()",
2070 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2073 REGISTER_VIRTUAL_TYPE_P ());
2075 #ifdef REGISTER_VIRTUAL_TYPE
2076 fprintf_unfiltered (file
,
2077 "gdbarch_dump: %s # %s\n",
2078 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2079 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2083 (long) current_gdbarch
->register_virtual_type
2084 /*REGISTER_VIRTUAL_TYPE ()*/);
2086 #ifdef REG_STRUCT_HAS_ADDR_P
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: %s # %s\n",
2089 "REG_STRUCT_HAS_ADDR_P()",
2090 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2091 fprintf_unfiltered (file
,
2092 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2093 REG_STRUCT_HAS_ADDR_P ());
2095 #ifdef REG_STRUCT_HAS_ADDR
2096 fprintf_unfiltered (file
,
2097 "gdbarch_dump: %s # %s\n",
2098 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2099 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
2101 fprintf_unfiltered (file
,
2102 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2103 (long) current_gdbarch
->reg_struct_has_addr
2104 /*REG_STRUCT_HAS_ADDR ()*/);
2106 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2108 /* Macro might contain `[{}]' when not multi-arch */
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: %s # %s\n",
2111 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2112 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
2115 fprintf_unfiltered (file
,
2116 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2117 (long) current_gdbarch
->remote_translate_xfer_address
2118 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2120 #ifdef RETURN_VALUE_ON_STACK
2121 fprintf_unfiltered (file
,
2122 "gdbarch_dump: %s # %s\n",
2123 "RETURN_VALUE_ON_STACK(type)",
2124 XSTRING (RETURN_VALUE_ON_STACK (type
)));
2126 fprintf_unfiltered (file
,
2127 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2128 (long) current_gdbarch
->return_value_on_stack
2129 /*RETURN_VALUE_ON_STACK ()*/);
2131 #ifdef SAVED_PC_AFTER_CALL
2132 fprintf_unfiltered (file
,
2133 "gdbarch_dump: %s # %s\n",
2134 "SAVED_PC_AFTER_CALL(frame)",
2135 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n",
2139 (long) current_gdbarch
->saved_pc_after_call
2140 /*SAVED_PC_AFTER_CALL ()*/);
2142 #ifdef SAVE_DUMMY_FRAME_TOS_P
2143 fprintf_unfiltered (file
,
2144 "gdbarch_dump: %s # %s\n",
2145 "SAVE_DUMMY_FRAME_TOS_P()",
2146 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2147 fprintf_unfiltered (file
,
2148 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2149 SAVE_DUMMY_FRAME_TOS_P ());
2151 #ifdef SAVE_DUMMY_FRAME_TOS
2153 /* Macro might contain `[{}]' when not multi-arch */
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: %s # %s\n",
2156 "SAVE_DUMMY_FRAME_TOS(sp)",
2157 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2162 (long) current_gdbarch
->save_dummy_frame_tos
2163 /*SAVE_DUMMY_FRAME_TOS ()*/);
2165 #ifdef SDB_REG_TO_REGNUM
2166 fprintf_unfiltered (file
,
2167 "gdbarch_dump: %s # %s\n",
2168 "SDB_REG_TO_REGNUM(sdb_regnr)",
2169 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
2171 fprintf_unfiltered (file
,
2172 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2173 (long) current_gdbarch
->sdb_reg_to_regnum
2174 /*SDB_REG_TO_REGNUM ()*/);
2176 #ifdef SIGTRAMP_END_P
2177 fprintf_unfiltered (file
,
2178 "gdbarch_dump: %s # %s\n",
2180 XSTRING (SIGTRAMP_END_P ()));
2181 fprintf_unfiltered (file
,
2182 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2186 fprintf_unfiltered (file
,
2187 "gdbarch_dump: %s # %s\n",
2189 XSTRING (SIGTRAMP_END (pc
)));
2191 fprintf_unfiltered (file
,
2192 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2193 (long) current_gdbarch
->sigtramp_end
2194 /*SIGTRAMP_END ()*/);
2196 #ifdef SIGTRAMP_START_P
2197 fprintf_unfiltered (file
,
2198 "gdbarch_dump: %s # %s\n",
2199 "SIGTRAMP_START_P()",
2200 XSTRING (SIGTRAMP_START_P ()));
2201 fprintf_unfiltered (file
,
2202 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2203 SIGTRAMP_START_P ());
2205 #ifdef SIGTRAMP_START
2206 fprintf_unfiltered (file
,
2207 "gdbarch_dump: %s # %s\n",
2208 "SIGTRAMP_START(pc)",
2209 XSTRING (SIGTRAMP_START (pc
)));
2211 fprintf_unfiltered (file
,
2212 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2213 (long) current_gdbarch
->sigtramp_start
2214 /*SIGTRAMP_START ()*/);
2216 #ifdef SIZEOF_CALL_DUMMY_WORDS
2217 fprintf_unfiltered (file
,
2218 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2219 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
2220 fprintf_unfiltered (file
,
2221 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
2222 (long) SIZEOF_CALL_DUMMY_WORDS
);
2224 #ifdef SKIP_PROLOGUE
2225 fprintf_unfiltered (file
,
2226 "gdbarch_dump: %s # %s\n",
2227 "SKIP_PROLOGUE(ip)",
2228 XSTRING (SKIP_PROLOGUE (ip
)));
2230 fprintf_unfiltered (file
,
2231 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2232 (long) current_gdbarch
->skip_prologue
2233 /*SKIP_PROLOGUE ()*/);
2235 #ifdef SKIP_TRAMPOLINE_CODE
2236 fprintf_unfiltered (file
,
2237 "gdbarch_dump: %s # %s\n",
2238 "SKIP_TRAMPOLINE_CODE(pc)",
2239 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
2241 fprintf_unfiltered (file
,
2242 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2243 (long) current_gdbarch
->skip_trampoline_code
2244 /*SKIP_TRAMPOLINE_CODE ()*/);
2246 #ifdef SMASH_TEXT_ADDRESS
2247 fprintf_unfiltered (file
,
2248 "gdbarch_dump: %s # %s\n",
2249 "SMASH_TEXT_ADDRESS(addr)",
2250 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2252 fprintf_unfiltered (file
,
2253 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2254 (long) current_gdbarch
->smash_text_address
2255 /*SMASH_TEXT_ADDRESS ()*/);
2257 #ifdef SOFTWARE_SINGLE_STEP_P
2258 fprintf_unfiltered (file
,
2259 "gdbarch_dump: %s # %s\n",
2260 "SOFTWARE_SINGLE_STEP_P()",
2261 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2262 fprintf_unfiltered (file
,
2263 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2264 SOFTWARE_SINGLE_STEP_P ());
2266 #ifdef SOFTWARE_SINGLE_STEP
2268 /* Macro might contain `[{}]' when not multi-arch */
2269 fprintf_unfiltered (file
,
2270 "gdbarch_dump: %s # %s\n",
2271 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2272 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2275 fprintf_unfiltered (file
,
2276 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2277 (long) current_gdbarch
->software_single_step
2278 /*SOFTWARE_SINGLE_STEP ()*/);
2281 fprintf_unfiltered (file
,
2282 "gdbarch_dump: SP_REGNUM # %s\n",
2283 XSTRING (SP_REGNUM
));
2284 fprintf_unfiltered (file
,
2285 "gdbarch_dump: SP_REGNUM = %d\n",
2288 #ifdef STAB_REG_TO_REGNUM
2289 fprintf_unfiltered (file
,
2290 "gdbarch_dump: %s # %s\n",
2291 "STAB_REG_TO_REGNUM(stab_regnr)",
2292 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2294 fprintf_unfiltered (file
,
2295 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2296 (long) current_gdbarch
->stab_reg_to_regnum
2297 /*STAB_REG_TO_REGNUM ()*/);
2299 #ifdef STACK_ALIGN_P
2300 fprintf_unfiltered (file
,
2301 "gdbarch_dump: %s # %s\n",
2303 XSTRING (STACK_ALIGN_P ()));
2304 fprintf_unfiltered (file
,
2305 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2309 fprintf_unfiltered (file
,
2310 "gdbarch_dump: %s # %s\n",
2312 XSTRING (STACK_ALIGN (sp
)));
2314 fprintf_unfiltered (file
,
2315 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2316 (long) current_gdbarch
->stack_align
2317 /*STACK_ALIGN ()*/);
2319 #ifdef STORE_RETURN_VALUE
2321 /* Macro might contain `[{}]' when not multi-arch */
2322 fprintf_unfiltered (file
,
2323 "gdbarch_dump: %s # %s\n",
2324 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2325 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2328 fprintf_unfiltered (file
,
2329 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2330 (long) current_gdbarch
->store_return_value
2331 /*STORE_RETURN_VALUE ()*/);
2333 #ifdef STORE_STRUCT_RETURN
2335 /* Macro might contain `[{}]' when not multi-arch */
2336 fprintf_unfiltered (file
,
2337 "gdbarch_dump: %s # %s\n",
2338 "STORE_STRUCT_RETURN(addr, sp)",
2339 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
2342 fprintf_unfiltered (file
,
2343 "gdbarch_dump: STORE_STRUCT_RETURN = <0x%08lx>\n",
2344 (long) current_gdbarch
->store_struct_return
2345 /*STORE_STRUCT_RETURN ()*/);
2347 #ifdef TARGET_ADDR_BIT
2348 fprintf_unfiltered (file
,
2349 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2350 XSTRING (TARGET_ADDR_BIT
));
2351 fprintf_unfiltered (file
,
2352 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2355 #ifdef TARGET_ARCHITECTURE
2356 fprintf_unfiltered (file
,
2357 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2358 XSTRING (TARGET_ARCHITECTURE
));
2359 if (TARGET_ARCHITECTURE
!= NULL
)
2360 fprintf_unfiltered (file
,
2361 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2362 TARGET_ARCHITECTURE
->printable_name
);
2364 #ifdef TARGET_BFD_VMA_BIT
2365 fprintf_unfiltered (file
,
2366 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2367 XSTRING (TARGET_BFD_VMA_BIT
));
2368 fprintf_unfiltered (file
,
2369 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2370 TARGET_BFD_VMA_BIT
);
2372 #ifdef TARGET_BYTE_ORDER
2373 fprintf_unfiltered (file
,
2374 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2375 XSTRING (TARGET_BYTE_ORDER
));
2376 fprintf_unfiltered (file
,
2377 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2378 (long) TARGET_BYTE_ORDER
);
2380 #ifdef TARGET_CHAR_SIGNED
2381 fprintf_unfiltered (file
,
2382 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2383 XSTRING (TARGET_CHAR_SIGNED
));
2384 fprintf_unfiltered (file
,
2385 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2386 TARGET_CHAR_SIGNED
);
2388 #ifdef TARGET_DOUBLE_BIT
2389 fprintf_unfiltered (file
,
2390 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2391 XSTRING (TARGET_DOUBLE_BIT
));
2392 fprintf_unfiltered (file
,
2393 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2396 #ifdef TARGET_DOUBLE_FORMAT
2397 fprintf_unfiltered (file
,
2398 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2399 XSTRING (TARGET_DOUBLE_FORMAT
));
2400 fprintf_unfiltered (file
,
2401 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2402 (TARGET_DOUBLE_FORMAT
)->name
);
2404 #ifdef TARGET_FLOAT_BIT
2405 fprintf_unfiltered (file
,
2406 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2407 XSTRING (TARGET_FLOAT_BIT
));
2408 fprintf_unfiltered (file
,
2409 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2412 #ifdef TARGET_FLOAT_FORMAT
2413 fprintf_unfiltered (file
,
2414 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2415 XSTRING (TARGET_FLOAT_FORMAT
));
2416 fprintf_unfiltered (file
,
2417 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2418 (TARGET_FLOAT_FORMAT
)->name
);
2420 #ifdef TARGET_INT_BIT
2421 fprintf_unfiltered (file
,
2422 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2423 XSTRING (TARGET_INT_BIT
));
2424 fprintf_unfiltered (file
,
2425 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2428 #ifdef TARGET_LONG_BIT
2429 fprintf_unfiltered (file
,
2430 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2431 XSTRING (TARGET_LONG_BIT
));
2432 fprintf_unfiltered (file
,
2433 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2436 #ifdef TARGET_LONG_DOUBLE_BIT
2437 fprintf_unfiltered (file
,
2438 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2439 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2440 fprintf_unfiltered (file
,
2441 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2442 TARGET_LONG_DOUBLE_BIT
);
2444 #ifdef TARGET_LONG_DOUBLE_FORMAT
2445 fprintf_unfiltered (file
,
2446 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2447 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2448 fprintf_unfiltered (file
,
2449 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2450 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2452 #ifdef TARGET_LONG_LONG_BIT
2453 fprintf_unfiltered (file
,
2454 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2455 XSTRING (TARGET_LONG_LONG_BIT
));
2456 fprintf_unfiltered (file
,
2457 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2458 TARGET_LONG_LONG_BIT
);
2461 fprintf_unfiltered (file
,
2462 "gdbarch_dump: TARGET_OSABI # %s\n",
2463 XSTRING (TARGET_OSABI
));
2464 fprintf_unfiltered (file
,
2465 "gdbarch_dump: TARGET_OSABI = %ld\n",
2466 (long) TARGET_OSABI
);
2468 #ifdef TARGET_PRINT_INSN
2469 fprintf_unfiltered (file
,
2470 "gdbarch_dump: %s # %s\n",
2471 "TARGET_PRINT_INSN(vma, info)",
2472 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2474 fprintf_unfiltered (file
,
2475 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2476 (long) current_gdbarch
->print_insn
2477 /*TARGET_PRINT_INSN ()*/);
2479 #ifdef TARGET_PTR_BIT
2480 fprintf_unfiltered (file
,
2481 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2482 XSTRING (TARGET_PTR_BIT
));
2483 fprintf_unfiltered (file
,
2484 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2487 #ifdef TARGET_READ_FP
2488 fprintf_unfiltered (file
,
2489 "gdbarch_dump: %s # %s\n",
2491 XSTRING (TARGET_READ_FP ()));
2493 fprintf_unfiltered (file
,
2494 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2495 (long) current_gdbarch
->read_fp
2496 /*TARGET_READ_FP ()*/);
2498 #ifdef TARGET_READ_PC
2499 fprintf_unfiltered (file
,
2500 "gdbarch_dump: %s # %s\n",
2501 "TARGET_READ_PC(ptid)",
2502 XSTRING (TARGET_READ_PC (ptid
)));
2504 fprintf_unfiltered (file
,
2505 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2506 (long) current_gdbarch
->read_pc
2507 /*TARGET_READ_PC ()*/);
2509 #ifdef TARGET_READ_SP
2510 fprintf_unfiltered (file
,
2511 "gdbarch_dump: %s # %s\n",
2513 XSTRING (TARGET_READ_SP ()));
2515 fprintf_unfiltered (file
,
2516 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2517 (long) current_gdbarch
->read_sp
2518 /*TARGET_READ_SP ()*/);
2520 #ifdef TARGET_SHORT_BIT
2521 fprintf_unfiltered (file
,
2522 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2523 XSTRING (TARGET_SHORT_BIT
));
2524 fprintf_unfiltered (file
,
2525 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2528 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2530 /* Macro might contain `[{}]' when not multi-arch */
2531 fprintf_unfiltered (file
,
2532 "gdbarch_dump: %s # %s\n",
2533 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2534 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2537 fprintf_unfiltered (file
,
2538 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2539 (long) current_gdbarch
->virtual_frame_pointer
2540 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2542 #ifdef TARGET_WRITE_PC
2544 /* Macro might contain `[{}]' when not multi-arch */
2545 fprintf_unfiltered (file
,
2546 "gdbarch_dump: %s # %s\n",
2547 "TARGET_WRITE_PC(val, ptid)",
2548 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2551 fprintf_unfiltered (file
,
2552 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2553 (long) current_gdbarch
->write_pc
2554 /*TARGET_WRITE_PC ()*/);
2556 #ifdef TARGET_WRITE_SP
2558 /* Macro might contain `[{}]' when not multi-arch */
2559 fprintf_unfiltered (file
,
2560 "gdbarch_dump: %s # %s\n",
2561 "TARGET_WRITE_SP(val)",
2562 XSTRING (TARGET_WRITE_SP (val
)));
2565 fprintf_unfiltered (file
,
2566 "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
2567 (long) current_gdbarch
->write_sp
2568 /*TARGET_WRITE_SP ()*/);
2570 #ifdef USE_STRUCT_CONVENTION
2571 fprintf_unfiltered (file
,
2572 "gdbarch_dump: %s # %s\n",
2573 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2574 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2576 fprintf_unfiltered (file
,
2577 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2578 (long) current_gdbarch
->use_struct_convention
2579 /*USE_STRUCT_CONVENTION ()*/);
2581 #ifdef VALUE_TO_REGISTER
2583 /* Macro might contain `[{}]' when not multi-arch */
2584 fprintf_unfiltered (file
,
2585 "gdbarch_dump: %s # %s\n",
2586 "VALUE_TO_REGISTER(type, regnum, from, to)",
2587 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2590 fprintf_unfiltered (file
,
2591 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2592 (long) current_gdbarch
->value_to_register
2593 /*VALUE_TO_REGISTER ()*/);
2595 if (current_gdbarch
->dump_tdep
!= NULL
)
2596 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2599 struct gdbarch_tdep
*
2600 gdbarch_tdep (struct gdbarch
*gdbarch
)
2602 if (gdbarch_debug
>= 2)
2603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2604 return gdbarch
->tdep
;
2608 const struct bfd_arch_info
*
2609 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2611 gdb_assert (gdbarch
!= NULL
);
2612 if (gdbarch_debug
>= 2)
2613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2614 return gdbarch
->bfd_arch_info
;
2618 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2620 gdb_assert (gdbarch
!= NULL
);
2621 if (gdbarch_debug
>= 2)
2622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2623 return gdbarch
->byte_order
;
2627 gdbarch_osabi (struct gdbarch
*gdbarch
)
2629 gdb_assert (gdbarch
!= NULL
);
2630 if (gdbarch_debug
>= 2)
2631 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2632 return gdbarch
->osabi
;
2636 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2638 gdb_assert (gdbarch
!= NULL
);
2639 /* Skip verify of short_bit, invalid_p == 0 */
2640 if (gdbarch_debug
>= 2)
2641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2642 return gdbarch
->short_bit
;
2646 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2649 gdbarch
->short_bit
= short_bit
;
2653 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2655 gdb_assert (gdbarch
!= NULL
);
2656 /* Skip verify of int_bit, invalid_p == 0 */
2657 if (gdbarch_debug
>= 2)
2658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2659 return gdbarch
->int_bit
;
2663 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2666 gdbarch
->int_bit
= int_bit
;
2670 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2672 gdb_assert (gdbarch
!= NULL
);
2673 /* Skip verify of long_bit, invalid_p == 0 */
2674 if (gdbarch_debug
>= 2)
2675 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2676 return gdbarch
->long_bit
;
2680 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2683 gdbarch
->long_bit
= long_bit
;
2687 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2689 gdb_assert (gdbarch
!= NULL
);
2690 /* Skip verify of long_long_bit, invalid_p == 0 */
2691 if (gdbarch_debug
>= 2)
2692 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2693 return gdbarch
->long_long_bit
;
2697 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2700 gdbarch
->long_long_bit
= long_long_bit
;
2704 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2706 gdb_assert (gdbarch
!= NULL
);
2707 /* Skip verify of float_bit, invalid_p == 0 */
2708 if (gdbarch_debug
>= 2)
2709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2710 return gdbarch
->float_bit
;
2714 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2717 gdbarch
->float_bit
= float_bit
;
2721 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2723 gdb_assert (gdbarch
!= NULL
);
2724 /* Skip verify of double_bit, invalid_p == 0 */
2725 if (gdbarch_debug
>= 2)
2726 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2727 return gdbarch
->double_bit
;
2731 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2734 gdbarch
->double_bit
= double_bit
;
2738 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2740 gdb_assert (gdbarch
!= NULL
);
2741 /* Skip verify of long_double_bit, invalid_p == 0 */
2742 if (gdbarch_debug
>= 2)
2743 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2744 return gdbarch
->long_double_bit
;
2748 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2749 int long_double_bit
)
2751 gdbarch
->long_double_bit
= long_double_bit
;
2755 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2757 gdb_assert (gdbarch
!= NULL
);
2758 /* Skip verify of ptr_bit, invalid_p == 0 */
2759 if (gdbarch_debug
>= 2)
2760 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2761 return gdbarch
->ptr_bit
;
2765 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2768 gdbarch
->ptr_bit
= ptr_bit
;
2772 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2774 gdb_assert (gdbarch
!= NULL
);
2775 if (gdbarch
->addr_bit
== 0)
2776 internal_error (__FILE__
, __LINE__
,
2777 "gdbarch: gdbarch_addr_bit invalid");
2778 if (gdbarch_debug
>= 2)
2779 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2780 return gdbarch
->addr_bit
;
2784 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2787 gdbarch
->addr_bit
= addr_bit
;
2791 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2793 gdb_assert (gdbarch
!= NULL
);
2794 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2795 if (gdbarch_debug
>= 2)
2796 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2797 return gdbarch
->bfd_vma_bit
;
2801 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2804 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2808 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2810 gdb_assert (gdbarch
!= NULL
);
2811 if (gdbarch
->char_signed
== -1)
2812 internal_error (__FILE__
, __LINE__
,
2813 "gdbarch: gdbarch_char_signed invalid");
2814 if (gdbarch_debug
>= 2)
2815 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2816 return gdbarch
->char_signed
;
2820 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2823 gdbarch
->char_signed
= char_signed
;
2827 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2829 gdb_assert (gdbarch
!= NULL
);
2830 if (gdbarch
->read_pc
== 0)
2831 internal_error (__FILE__
, __LINE__
,
2832 "gdbarch: gdbarch_read_pc invalid");
2833 if (gdbarch_debug
>= 2)
2834 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2835 return gdbarch
->read_pc (ptid
);
2839 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2840 gdbarch_read_pc_ftype read_pc
)
2842 gdbarch
->read_pc
= read_pc
;
2846 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2848 gdb_assert (gdbarch
!= NULL
);
2849 if (gdbarch
->write_pc
== 0)
2850 internal_error (__FILE__
, __LINE__
,
2851 "gdbarch: gdbarch_write_pc invalid");
2852 if (gdbarch_debug
>= 2)
2853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2854 gdbarch
->write_pc (val
, ptid
);
2858 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2859 gdbarch_write_pc_ftype write_pc
)
2861 gdbarch
->write_pc
= write_pc
;
2865 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2867 gdb_assert (gdbarch
!= NULL
);
2868 if (gdbarch
->read_fp
== 0)
2869 internal_error (__FILE__
, __LINE__
,
2870 "gdbarch: gdbarch_read_fp invalid");
2871 if (gdbarch_debug
>= 2)
2872 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2873 return gdbarch
->read_fp ();
2877 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2878 gdbarch_read_fp_ftype read_fp
)
2880 gdbarch
->read_fp
= read_fp
;
2884 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2886 gdb_assert (gdbarch
!= NULL
);
2887 if (gdbarch
->read_sp
== 0)
2888 internal_error (__FILE__
, __LINE__
,
2889 "gdbarch: gdbarch_read_sp invalid");
2890 if (gdbarch_debug
>= 2)
2891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2892 return gdbarch
->read_sp ();
2896 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2897 gdbarch_read_sp_ftype read_sp
)
2899 gdbarch
->read_sp
= read_sp
;
2903 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2905 gdb_assert (gdbarch
!= NULL
);
2906 if (gdbarch
->write_sp
== 0)
2907 internal_error (__FILE__
, __LINE__
,
2908 "gdbarch: gdbarch_write_sp invalid");
2909 if (gdbarch_debug
>= 2)
2910 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2911 gdbarch
->write_sp (val
);
2915 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2916 gdbarch_write_sp_ftype write_sp
)
2918 gdbarch
->write_sp
= write_sp
;
2922 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2924 gdb_assert (gdbarch
!= NULL
);
2925 if (gdbarch
->virtual_frame_pointer
== 0)
2926 internal_error (__FILE__
, __LINE__
,
2927 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2928 if (gdbarch_debug
>= 2)
2929 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2930 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2934 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2935 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2937 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2941 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2943 gdb_assert (gdbarch
!= NULL
);
2944 return gdbarch
->pseudo_register_read
!= 0;
2948 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2950 gdb_assert (gdbarch
!= NULL
);
2951 if (gdbarch
->pseudo_register_read
== 0)
2952 internal_error (__FILE__
, __LINE__
,
2953 "gdbarch: gdbarch_pseudo_register_read invalid");
2954 if (gdbarch_debug
>= 2)
2955 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2956 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2960 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2961 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2963 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2967 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2969 gdb_assert (gdbarch
!= NULL
);
2970 return gdbarch
->pseudo_register_write
!= 0;
2974 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2976 gdb_assert (gdbarch
!= NULL
);
2977 if (gdbarch
->pseudo_register_write
== 0)
2978 internal_error (__FILE__
, __LINE__
,
2979 "gdbarch: gdbarch_pseudo_register_write invalid");
2980 if (gdbarch_debug
>= 2)
2981 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2982 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2986 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2987 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2989 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2993 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2995 gdb_assert (gdbarch
!= NULL
);
2996 if (gdbarch
->num_regs
== -1)
2997 internal_error (__FILE__
, __LINE__
,
2998 "gdbarch: gdbarch_num_regs invalid");
2999 if (gdbarch_debug
>= 2)
3000 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
3001 return gdbarch
->num_regs
;
3005 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
3008 gdbarch
->num_regs
= num_regs
;
3012 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
3014 gdb_assert (gdbarch
!= NULL
);
3015 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3016 if (gdbarch_debug
>= 2)
3017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
3018 return gdbarch
->num_pseudo_regs
;
3022 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
3023 int num_pseudo_regs
)
3025 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
3029 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
3031 gdb_assert (gdbarch
!= NULL
);
3032 /* Skip verify of sp_regnum, invalid_p == 0 */
3033 if (gdbarch_debug
>= 2)
3034 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
3035 return gdbarch
->sp_regnum
;
3039 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
3042 gdbarch
->sp_regnum
= sp_regnum
;
3046 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
3048 gdb_assert (gdbarch
!= NULL
);
3049 /* Skip verify of fp_regnum, invalid_p == 0 */
3050 if (gdbarch_debug
>= 2)
3051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
3052 return gdbarch
->fp_regnum
;
3056 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
3059 gdbarch
->fp_regnum
= fp_regnum
;
3063 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
3065 gdb_assert (gdbarch
!= NULL
);
3066 /* Skip verify of pc_regnum, invalid_p == 0 */
3067 if (gdbarch_debug
>= 2)
3068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
3069 return gdbarch
->pc_regnum
;
3073 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
3076 gdbarch
->pc_regnum
= pc_regnum
;
3080 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
3082 gdb_assert (gdbarch
!= NULL
);
3083 /* Skip verify of ps_regnum, invalid_p == 0 */
3084 if (gdbarch_debug
>= 2)
3085 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
3086 return gdbarch
->ps_regnum
;
3090 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
3093 gdbarch
->ps_regnum
= ps_regnum
;
3097 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
3099 gdb_assert (gdbarch
!= NULL
);
3100 /* Skip verify of fp0_regnum, invalid_p == 0 */
3101 if (gdbarch_debug
>= 2)
3102 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
3103 return gdbarch
->fp0_regnum
;
3107 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
3110 gdbarch
->fp0_regnum
= fp0_regnum
;
3114 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
3116 gdb_assert (gdbarch
!= NULL
);
3117 /* Skip verify of npc_regnum, invalid_p == 0 */
3118 if (gdbarch_debug
>= 2)
3119 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
3120 return gdbarch
->npc_regnum
;
3124 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
3127 gdbarch
->npc_regnum
= npc_regnum
;
3131 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
3133 gdb_assert (gdbarch
!= NULL
);
3134 if (gdbarch
->stab_reg_to_regnum
== 0)
3135 internal_error (__FILE__
, __LINE__
,
3136 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3137 if (gdbarch_debug
>= 2)
3138 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
3139 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
3143 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
3144 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
3146 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
3150 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
3152 gdb_assert (gdbarch
!= NULL
);
3153 if (gdbarch
->ecoff_reg_to_regnum
== 0)
3154 internal_error (__FILE__
, __LINE__
,
3155 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3156 if (gdbarch_debug
>= 2)
3157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
3158 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
3162 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
3163 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
3165 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
3169 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
3171 gdb_assert (gdbarch
!= NULL
);
3172 if (gdbarch
->dwarf_reg_to_regnum
== 0)
3173 internal_error (__FILE__
, __LINE__
,
3174 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3175 if (gdbarch_debug
>= 2)
3176 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
3177 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
3181 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
3182 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
3184 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
3188 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
3190 gdb_assert (gdbarch
!= NULL
);
3191 if (gdbarch
->sdb_reg_to_regnum
== 0)
3192 internal_error (__FILE__
, __LINE__
,
3193 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3194 if (gdbarch_debug
>= 2)
3195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
3196 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
3200 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
3201 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
3203 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
3207 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
3209 gdb_assert (gdbarch
!= NULL
);
3210 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
3211 internal_error (__FILE__
, __LINE__
,
3212 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3213 if (gdbarch_debug
>= 2)
3214 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
3215 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
3219 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
3220 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
3222 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
3226 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
3228 gdb_assert (gdbarch
!= NULL
);
3229 if (gdbarch
->register_name
== 0)
3230 internal_error (__FILE__
, __LINE__
,
3231 "gdbarch: gdbarch_register_name invalid");
3232 if (gdbarch_debug
>= 2)
3233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
3234 return gdbarch
->register_name (regnr
);
3238 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
3239 gdbarch_register_name_ftype register_name
)
3241 gdbarch
->register_name
= register_name
;
3245 gdbarch_register_size (struct gdbarch
*gdbarch
)
3247 gdb_assert (gdbarch
!= NULL
);
3248 if (gdbarch
->register_size
== -1)
3249 internal_error (__FILE__
, __LINE__
,
3250 "gdbarch: gdbarch_register_size invalid");
3251 if (gdbarch_debug
>= 2)
3252 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
3253 return gdbarch
->register_size
;
3257 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
3260 gdbarch
->register_size
= register_size
;
3264 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
3266 gdb_assert (gdbarch
!= NULL
);
3267 if (gdbarch
->register_bytes
== -1)
3268 internal_error (__FILE__
, __LINE__
,
3269 "gdbarch: gdbarch_register_bytes invalid");
3270 if (gdbarch_debug
>= 2)
3271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
3272 return gdbarch
->register_bytes
;
3276 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
3279 gdbarch
->register_bytes
= register_bytes
;
3283 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3285 gdb_assert (gdbarch
!= NULL
);
3286 if (gdbarch
->register_byte
== 0)
3287 internal_error (__FILE__
, __LINE__
,
3288 "gdbarch: gdbarch_register_byte invalid");
3289 if (gdbarch_debug
>= 2)
3290 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
3291 return gdbarch
->register_byte (reg_nr
);
3295 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
3296 gdbarch_register_byte_ftype register_byte
)
3298 gdbarch
->register_byte
= register_byte
;
3302 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3304 gdb_assert (gdbarch
!= NULL
);
3305 if (gdbarch
->register_raw_size
== 0)
3306 internal_error (__FILE__
, __LINE__
,
3307 "gdbarch: gdbarch_register_raw_size invalid");
3308 if (gdbarch_debug
>= 2)
3309 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
3310 return gdbarch
->register_raw_size (reg_nr
);
3314 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
3315 gdbarch_register_raw_size_ftype register_raw_size
)
3317 gdbarch
->register_raw_size
= register_raw_size
;
3321 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
3323 gdb_assert (gdbarch
!= NULL
);
3324 return gdbarch
->deprecated_max_register_raw_size
!= 0;
3328 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
3330 gdb_assert (gdbarch
!= NULL
);
3331 if (gdbarch_debug
>= 2)
3332 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
3333 return gdbarch
->deprecated_max_register_raw_size
;
3337 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
3338 int deprecated_max_register_raw_size
)
3340 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
3344 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3346 gdb_assert (gdbarch
!= NULL
);
3347 if (gdbarch
->register_virtual_size
== 0)
3348 internal_error (__FILE__
, __LINE__
,
3349 "gdbarch: gdbarch_register_virtual_size invalid");
3350 if (gdbarch_debug
>= 2)
3351 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3352 return gdbarch
->register_virtual_size (reg_nr
);
3356 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3357 gdbarch_register_virtual_size_ftype register_virtual_size
)
3359 gdbarch
->register_virtual_size
= register_virtual_size
;
3363 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
3365 gdb_assert (gdbarch
!= NULL
);
3366 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
3370 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
3372 gdb_assert (gdbarch
!= NULL
);
3373 if (gdbarch_debug
>= 2)
3374 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
3375 return gdbarch
->deprecated_max_register_virtual_size
;
3379 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
3380 int deprecated_max_register_virtual_size
)
3382 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
3386 gdbarch_register_virtual_type_p (struct gdbarch
*gdbarch
)
3388 gdb_assert (gdbarch
!= NULL
);
3389 return gdbarch
->register_virtual_type
!= 0;
3393 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3395 gdb_assert (gdbarch
!= NULL
);
3396 if (gdbarch
->register_virtual_type
== 0)
3397 internal_error (__FILE__
, __LINE__
,
3398 "gdbarch: gdbarch_register_virtual_type invalid");
3399 if (gdbarch_debug
>= 2)
3400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3401 return gdbarch
->register_virtual_type (reg_nr
);
3405 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3406 gdbarch_register_virtual_type_ftype register_virtual_type
)
3408 gdbarch
->register_virtual_type
= register_virtual_type
;
3412 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
3414 gdb_assert (gdbarch
!= NULL
);
3415 return gdbarch
->register_type
!= 0;
3419 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
3421 gdb_assert (gdbarch
!= NULL
);
3422 if (gdbarch
->register_type
== 0)
3423 internal_error (__FILE__
, __LINE__
,
3424 "gdbarch: gdbarch_register_type invalid");
3425 if (gdbarch_debug
>= 2)
3426 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
3427 return gdbarch
->register_type (gdbarch
, reg_nr
);
3431 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
3432 gdbarch_register_type_ftype register_type
)
3434 gdbarch
->register_type
= register_type
;
3438 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3440 gdb_assert (gdbarch
!= NULL
);
3441 return gdbarch
->deprecated_do_registers_info
!= 0;
3445 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3447 gdb_assert (gdbarch
!= NULL
);
3448 if (gdbarch
->deprecated_do_registers_info
== 0)
3449 internal_error (__FILE__
, __LINE__
,
3450 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3451 if (gdbarch_debug
>= 2)
3452 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3453 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3457 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3458 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3460 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3464 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3466 gdb_assert (gdbarch
!= NULL
);
3467 if (gdbarch
->print_registers_info
== 0)
3468 internal_error (__FILE__
, __LINE__
,
3469 "gdbarch: gdbarch_print_registers_info invalid");
3470 if (gdbarch_debug
>= 2)
3471 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3472 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3476 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3477 gdbarch_print_registers_info_ftype print_registers_info
)
3479 gdbarch
->print_registers_info
= print_registers_info
;
3483 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3485 gdb_assert (gdbarch
!= NULL
);
3486 return gdbarch
->print_float_info
!= 0;
3490 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3492 gdb_assert (gdbarch
!= NULL
);
3493 if (gdbarch
->print_float_info
== 0)
3494 internal_error (__FILE__
, __LINE__
,
3495 "gdbarch: gdbarch_print_float_info invalid");
3496 if (gdbarch_debug
>= 2)
3497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3498 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3502 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3503 gdbarch_print_float_info_ftype print_float_info
)
3505 gdbarch
->print_float_info
= print_float_info
;
3509 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3511 gdb_assert (gdbarch
!= NULL
);
3512 return gdbarch
->print_vector_info
!= 0;
3516 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3518 gdb_assert (gdbarch
!= NULL
);
3519 if (gdbarch
->print_vector_info
== 0)
3520 internal_error (__FILE__
, __LINE__
,
3521 "gdbarch: gdbarch_print_vector_info invalid");
3522 if (gdbarch_debug
>= 2)
3523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3524 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3528 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3529 gdbarch_print_vector_info_ftype print_vector_info
)
3531 gdbarch
->print_vector_info
= print_vector_info
;
3535 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3537 gdb_assert (gdbarch
!= NULL
);
3538 if (gdbarch
->register_sim_regno
== 0)
3539 internal_error (__FILE__
, __LINE__
,
3540 "gdbarch: gdbarch_register_sim_regno invalid");
3541 if (gdbarch_debug
>= 2)
3542 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3543 return gdbarch
->register_sim_regno (reg_nr
);
3547 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3548 gdbarch_register_sim_regno_ftype register_sim_regno
)
3550 gdbarch
->register_sim_regno
= register_sim_regno
;
3554 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3556 gdb_assert (gdbarch
!= NULL
);
3557 return gdbarch
->register_bytes_ok
!= 0;
3561 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3563 gdb_assert (gdbarch
!= NULL
);
3564 if (gdbarch
->register_bytes_ok
== 0)
3565 internal_error (__FILE__
, __LINE__
,
3566 "gdbarch: gdbarch_register_bytes_ok invalid");
3567 if (gdbarch_debug
>= 2)
3568 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3569 return gdbarch
->register_bytes_ok (nr_bytes
);
3573 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3574 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3576 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3580 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3582 gdb_assert (gdbarch
!= NULL
);
3583 if (gdbarch
->cannot_fetch_register
== 0)
3584 internal_error (__FILE__
, __LINE__
,
3585 "gdbarch: gdbarch_cannot_fetch_register invalid");
3586 if (gdbarch_debug
>= 2)
3587 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3588 return gdbarch
->cannot_fetch_register (regnum
);
3592 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3593 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3595 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3599 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3601 gdb_assert (gdbarch
!= NULL
);
3602 if (gdbarch
->cannot_store_register
== 0)
3603 internal_error (__FILE__
, __LINE__
,
3604 "gdbarch: gdbarch_cannot_store_register invalid");
3605 if (gdbarch_debug
>= 2)
3606 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3607 return gdbarch
->cannot_store_register (regnum
);
3611 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3612 gdbarch_cannot_store_register_ftype cannot_store_register
)
3614 gdbarch
->cannot_store_register
= cannot_store_register
;
3618 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3620 gdb_assert (gdbarch
!= NULL
);
3621 return gdbarch
->get_longjmp_target
!= 0;
3625 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3627 gdb_assert (gdbarch
!= NULL
);
3628 if (gdbarch
->get_longjmp_target
== 0)
3629 internal_error (__FILE__
, __LINE__
,
3630 "gdbarch: gdbarch_get_longjmp_target invalid");
3631 if (gdbarch_debug
>= 2)
3632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3633 return gdbarch
->get_longjmp_target (pc
);
3637 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3638 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3640 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3644 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3646 gdb_assert (gdbarch
!= NULL
);
3647 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3648 if (gdbarch_debug
>= 2)
3649 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3650 return gdbarch
->deprecated_use_generic_dummy_frames
;
3654 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3655 int deprecated_use_generic_dummy_frames
)
3657 gdbarch
->deprecated_use_generic_dummy_frames
= deprecated_use_generic_dummy_frames
;
3661 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3663 gdb_assert (gdbarch
!= NULL
);
3664 /* Skip verify of call_dummy_location, invalid_p == 0 */
3665 if (gdbarch_debug
>= 2)
3666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3667 return gdbarch
->call_dummy_location
;
3671 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3672 int call_dummy_location
)
3674 gdbarch
->call_dummy_location
= call_dummy_location
;
3678 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3680 gdb_assert (gdbarch
!= NULL
);
3681 if (gdbarch
->call_dummy_address
== 0)
3682 internal_error (__FILE__
, __LINE__
,
3683 "gdbarch: gdbarch_call_dummy_address invalid");
3684 if (gdbarch_debug
>= 2)
3685 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3686 return gdbarch
->call_dummy_address ();
3690 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3691 gdbarch_call_dummy_address_ftype call_dummy_address
)
3693 gdbarch
->call_dummy_address
= call_dummy_address
;
3697 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3699 gdb_assert (gdbarch
!= NULL
);
3700 if (gdbarch
->call_dummy_start_offset
== -1)
3701 internal_error (__FILE__
, __LINE__
,
3702 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3703 if (gdbarch_debug
>= 2)
3704 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3705 return gdbarch
->call_dummy_start_offset
;
3709 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3710 CORE_ADDR call_dummy_start_offset
)
3712 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3716 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3718 gdb_assert (gdbarch
!= NULL
);
3719 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3720 internal_error (__FILE__
, __LINE__
,
3721 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3722 if (gdbarch_debug
>= 2)
3723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3724 return gdbarch
->call_dummy_breakpoint_offset
;
3728 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3729 CORE_ADDR call_dummy_breakpoint_offset
)
3731 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3735 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3737 gdb_assert (gdbarch
!= NULL
);
3738 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3739 internal_error (__FILE__
, __LINE__
,
3740 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3741 if (gdbarch_debug
>= 2)
3742 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3743 return gdbarch
->call_dummy_breakpoint_offset_p
;
3747 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3748 int call_dummy_breakpoint_offset_p
)
3750 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3754 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3756 gdb_assert (gdbarch
!= NULL
);
3757 if (gdbarch
->call_dummy_length
== -1)
3758 internal_error (__FILE__
, __LINE__
,
3759 "gdbarch: gdbarch_call_dummy_length invalid");
3760 if (gdbarch_debug
>= 2)
3761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3762 return gdbarch
->call_dummy_length
;
3766 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3767 int call_dummy_length
)
3769 gdbarch
->call_dummy_length
= call_dummy_length
;
3773 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3775 gdb_assert (gdbarch
!= NULL
);
3776 return gdbarch
->deprecated_pc_in_call_dummy
!= generic_pc_in_call_dummy
;
3780 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3782 gdb_assert (gdbarch
!= NULL
);
3783 if (gdbarch
->deprecated_pc_in_call_dummy
== 0)
3784 internal_error (__FILE__
, __LINE__
,
3785 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3786 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3787 if (gdbarch_debug
>= 2)
3788 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3789 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3793 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3794 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3796 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3800 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3802 gdb_assert (gdbarch
!= NULL
);
3803 if (gdbarch
->call_dummy_p
== -1)
3804 internal_error (__FILE__
, __LINE__
,
3805 "gdbarch: gdbarch_call_dummy_p invalid");
3806 if (gdbarch_debug
>= 2)
3807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3808 return gdbarch
->call_dummy_p
;
3812 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3815 gdbarch
->call_dummy_p
= call_dummy_p
;
3819 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3821 gdb_assert (gdbarch
!= NULL
);
3822 /* Skip verify of call_dummy_words, invalid_p == 0 */
3823 if (gdbarch_debug
>= 2)
3824 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3825 return gdbarch
->call_dummy_words
;
3829 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3830 LONGEST
* call_dummy_words
)
3832 gdbarch
->call_dummy_words
= call_dummy_words
;
3836 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3838 gdb_assert (gdbarch
!= NULL
);
3839 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3840 if (gdbarch_debug
>= 2)
3841 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3842 return gdbarch
->sizeof_call_dummy_words
;
3846 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3847 int sizeof_call_dummy_words
)
3849 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3853 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3855 gdb_assert (gdbarch
!= NULL
);
3856 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3857 internal_error (__FILE__
, __LINE__
,
3858 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3859 if (gdbarch_debug
>= 2)
3860 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3861 return gdbarch
->call_dummy_stack_adjust_p
;
3865 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3866 int call_dummy_stack_adjust_p
)
3868 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3872 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3874 gdb_assert (gdbarch
!= NULL
);
3875 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3876 internal_error (__FILE__
, __LINE__
,
3877 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3878 if (gdbarch_debug
>= 2)
3879 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3880 return gdbarch
->call_dummy_stack_adjust
;
3884 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3885 int call_dummy_stack_adjust
)
3887 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3891 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
)
3893 gdb_assert (gdbarch
!= NULL
);
3894 if (gdbarch
->fix_call_dummy
== 0)
3895 internal_error (__FILE__
, __LINE__
,
3896 "gdbarch: gdbarch_fix_call_dummy invalid");
3897 if (gdbarch_debug
>= 2)
3898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3899 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3903 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3904 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3906 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3910 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch
*gdbarch
)
3912 gdb_assert (gdbarch
!= NULL
);
3913 return gdbarch
->deprecated_init_frame_pc_first
!= 0;
3917 gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3919 gdb_assert (gdbarch
!= NULL
);
3920 if (gdbarch
->deprecated_init_frame_pc_first
== 0)
3921 internal_error (__FILE__
, __LINE__
,
3922 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3923 if (gdbarch_debug
>= 2)
3924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc_first called\n");
3925 return gdbarch
->deprecated_init_frame_pc_first (fromleaf
, prev
);
3929 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
,
3930 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first
)
3932 gdbarch
->deprecated_init_frame_pc_first
= deprecated_init_frame_pc_first
;
3936 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3938 gdb_assert (gdbarch
!= NULL
);
3939 return gdbarch
->deprecated_init_frame_pc
!= 0;
3943 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3945 gdb_assert (gdbarch
!= NULL
);
3946 if (gdbarch
->deprecated_init_frame_pc
== 0)
3947 internal_error (__FILE__
, __LINE__
,
3948 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3949 if (gdbarch_debug
>= 2)
3950 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3951 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3955 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3956 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3958 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3962 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3964 gdb_assert (gdbarch
!= NULL
);
3965 if (gdbarch_debug
>= 2)
3966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3967 return gdbarch
->believe_pcc_promotion
;
3971 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3972 int believe_pcc_promotion
)
3974 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3978 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3980 gdb_assert (gdbarch
!= NULL
);
3981 if (gdbarch_debug
>= 2)
3982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3983 return gdbarch
->believe_pcc_promotion_type
;
3987 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3988 int believe_pcc_promotion_type
)
3990 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3994 gdbarch_get_saved_register_p (struct gdbarch
*gdbarch
)
3996 gdb_assert (gdbarch
!= NULL
);
3997 return gdbarch
->get_saved_register
!= 0;
4001 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
)
4003 gdb_assert (gdbarch
!= NULL
);
4004 if (gdbarch
->get_saved_register
== 0)
4005 internal_error (__FILE__
, __LINE__
,
4006 "gdbarch: gdbarch_get_saved_register invalid");
4007 if (gdbarch_debug
>= 2)
4008 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
4009 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
4013 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
4014 gdbarch_get_saved_register_ftype get_saved_register
)
4016 gdbarch
->get_saved_register
= get_saved_register
;
4020 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
4022 gdb_assert (gdbarch
!= NULL
);
4023 if (gdbarch
->register_convertible
== 0)
4024 internal_error (__FILE__
, __LINE__
,
4025 "gdbarch: gdbarch_register_convertible invalid");
4026 if (gdbarch_debug
>= 2)
4027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
4028 return gdbarch
->register_convertible (nr
);
4032 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
4033 gdbarch_register_convertible_ftype register_convertible
)
4035 gdbarch
->register_convertible
= register_convertible
;
4039 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4041 gdb_assert (gdbarch
!= NULL
);
4042 if (gdbarch
->register_convert_to_virtual
== 0)
4043 internal_error (__FILE__
, __LINE__
,
4044 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4045 if (gdbarch_debug
>= 2)
4046 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
4047 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
4051 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
4052 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
4054 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
4058 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4060 gdb_assert (gdbarch
!= NULL
);
4061 if (gdbarch
->register_convert_to_raw
== 0)
4062 internal_error (__FILE__
, __LINE__
,
4063 "gdbarch: gdbarch_register_convert_to_raw invalid");
4064 if (gdbarch_debug
>= 2)
4065 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
4066 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
4070 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
4071 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
4073 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
4077 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
4079 gdb_assert (gdbarch
!= NULL
);
4080 if (gdbarch
->convert_register_p
== 0)
4081 internal_error (__FILE__
, __LINE__
,
4082 "gdbarch: gdbarch_convert_register_p invalid");
4083 if (gdbarch_debug
>= 2)
4084 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
4085 return gdbarch
->convert_register_p (regnum
);
4089 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
4090 gdbarch_convert_register_p_ftype convert_register_p
)
4092 gdbarch
->convert_register_p
= convert_register_p
;
4096 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4098 gdb_assert (gdbarch
!= NULL
);
4099 if (gdbarch
->register_to_value
== 0)
4100 internal_error (__FILE__
, __LINE__
,
4101 "gdbarch: gdbarch_register_to_value invalid");
4102 if (gdbarch_debug
>= 2)
4103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
4104 gdbarch
->register_to_value (regnum
, type
, from
, to
);
4108 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
4109 gdbarch_register_to_value_ftype register_to_value
)
4111 gdbarch
->register_to_value
= register_to_value
;
4115 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4117 gdb_assert (gdbarch
!= NULL
);
4118 if (gdbarch
->value_to_register
== 0)
4119 internal_error (__FILE__
, __LINE__
,
4120 "gdbarch: gdbarch_value_to_register invalid");
4121 if (gdbarch_debug
>= 2)
4122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
4123 gdbarch
->value_to_register (type
, regnum
, from
, to
);
4127 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
4128 gdbarch_value_to_register_ftype value_to_register
)
4130 gdbarch
->value_to_register
= value_to_register
;
4134 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
4136 gdb_assert (gdbarch
!= NULL
);
4137 if (gdbarch
->pointer_to_address
== 0)
4138 internal_error (__FILE__
, __LINE__
,
4139 "gdbarch: gdbarch_pointer_to_address invalid");
4140 if (gdbarch_debug
>= 2)
4141 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
4142 return gdbarch
->pointer_to_address (type
, buf
);
4146 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
4147 gdbarch_pointer_to_address_ftype pointer_to_address
)
4149 gdbarch
->pointer_to_address
= pointer_to_address
;
4153 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
4155 gdb_assert (gdbarch
!= NULL
);
4156 if (gdbarch
->address_to_pointer
== 0)
4157 internal_error (__FILE__
, __LINE__
,
4158 "gdbarch: gdbarch_address_to_pointer invalid");
4159 if (gdbarch_debug
>= 2)
4160 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
4161 gdbarch
->address_to_pointer (type
, buf
, addr
);
4165 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
4166 gdbarch_address_to_pointer_ftype address_to_pointer
)
4168 gdbarch
->address_to_pointer
= address_to_pointer
;
4172 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
4174 gdb_assert (gdbarch
!= NULL
);
4175 return gdbarch
->integer_to_address
!= 0;
4179 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
4181 gdb_assert (gdbarch
!= NULL
);
4182 if (gdbarch
->integer_to_address
== 0)
4183 internal_error (__FILE__
, __LINE__
,
4184 "gdbarch: gdbarch_integer_to_address invalid");
4185 if (gdbarch_debug
>= 2)
4186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
4187 return gdbarch
->integer_to_address (type
, buf
);
4191 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
4192 gdbarch_integer_to_address_ftype integer_to_address
)
4194 gdbarch
->integer_to_address
= integer_to_address
;
4198 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
4200 gdb_assert (gdbarch
!= NULL
);
4201 if (gdbarch
->return_value_on_stack
== 0)
4202 internal_error (__FILE__
, __LINE__
,
4203 "gdbarch: gdbarch_return_value_on_stack invalid");
4204 if (gdbarch_debug
>= 2)
4205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
4206 return gdbarch
->return_value_on_stack (type
);
4210 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
4211 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
4213 gdbarch
->return_value_on_stack
= return_value_on_stack
;
4217 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
4219 gdb_assert (gdbarch
!= NULL
);
4220 if (gdbarch
->push_arguments
== 0)
4221 internal_error (__FILE__
, __LINE__
,
4222 "gdbarch: gdbarch_push_arguments invalid");
4223 if (gdbarch_debug
>= 2)
4224 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
4225 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
4229 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
4230 gdbarch_push_arguments_ftype push_arguments
)
4232 gdbarch
->push_arguments
= push_arguments
;
4236 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch
*gdbarch
)
4238 gdb_assert (gdbarch
!= NULL
);
4239 return gdbarch
->deprecated_push_dummy_frame
!= 0;
4243 gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
)
4245 gdb_assert (gdbarch
!= NULL
);
4246 if (gdbarch
->deprecated_push_dummy_frame
== 0)
4247 internal_error (__FILE__
, __LINE__
,
4248 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4249 if (gdbarch_debug
>= 2)
4250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_dummy_frame called\n");
4251 gdbarch
->deprecated_push_dummy_frame ();
4255 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
,
4256 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame
)
4258 gdbarch
->deprecated_push_dummy_frame
= deprecated_push_dummy_frame
;
4262 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
4264 gdb_assert (gdbarch
!= NULL
);
4265 return gdbarch
->push_return_address
!= 0;
4269 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
4271 gdb_assert (gdbarch
!= NULL
);
4272 if (gdbarch
->push_return_address
== 0)
4273 internal_error (__FILE__
, __LINE__
,
4274 "gdbarch: gdbarch_push_return_address invalid");
4275 if (gdbarch_debug
>= 2)
4276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
4277 return gdbarch
->push_return_address (pc
, sp
);
4281 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
4282 gdbarch_push_return_address_ftype push_return_address
)
4284 gdbarch
->push_return_address
= push_return_address
;
4288 gdbarch_pop_frame_p (struct gdbarch
*gdbarch
)
4290 gdb_assert (gdbarch
!= NULL
);
4291 return gdbarch
->pop_frame
!= 0;
4295 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
4297 gdb_assert (gdbarch
!= NULL
);
4298 if (gdbarch
->pop_frame
== 0)
4299 internal_error (__FILE__
, __LINE__
,
4300 "gdbarch: gdbarch_pop_frame invalid");
4301 if (gdbarch_debug
>= 2)
4302 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
4303 gdbarch
->pop_frame ();
4307 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
4308 gdbarch_pop_frame_ftype pop_frame
)
4310 gdbarch
->pop_frame
= pop_frame
;
4314 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
4316 gdb_assert (gdbarch
!= NULL
);
4317 if (gdbarch
->store_struct_return
== 0)
4318 internal_error (__FILE__
, __LINE__
,
4319 "gdbarch: gdbarch_store_struct_return invalid");
4320 if (gdbarch_debug
>= 2)
4321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
4322 gdbarch
->store_struct_return (addr
, sp
);
4326 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
4327 gdbarch_store_struct_return_ftype store_struct_return
)
4329 gdbarch
->store_struct_return
= store_struct_return
;
4333 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4335 gdb_assert (gdbarch
!= NULL
);
4336 if (gdbarch
->extract_return_value
== 0)
4337 internal_error (__FILE__
, __LINE__
,
4338 "gdbarch: gdbarch_extract_return_value invalid");
4339 if (gdbarch_debug
>= 2)
4340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4341 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4345 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4346 gdbarch_extract_return_value_ftype extract_return_value
)
4348 gdbarch
->extract_return_value
= extract_return_value
;
4352 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4354 gdb_assert (gdbarch
!= NULL
);
4355 if (gdbarch
->store_return_value
== 0)
4356 internal_error (__FILE__
, __LINE__
,
4357 "gdbarch: gdbarch_store_return_value invalid");
4358 if (gdbarch_debug
>= 2)
4359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4360 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4364 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4365 gdbarch_store_return_value_ftype store_return_value
)
4367 gdbarch
->store_return_value
= store_return_value
;
4371 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4373 gdb_assert (gdbarch
!= NULL
);
4374 if (gdbarch
->deprecated_extract_return_value
== 0)
4375 internal_error (__FILE__
, __LINE__
,
4376 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4377 if (gdbarch_debug
>= 2)
4378 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4379 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4383 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4384 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4386 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4390 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4392 gdb_assert (gdbarch
!= NULL
);
4393 if (gdbarch
->deprecated_store_return_value
== 0)
4394 internal_error (__FILE__
, __LINE__
,
4395 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4396 if (gdbarch_debug
>= 2)
4397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4398 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4402 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4403 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4405 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4409 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4411 gdb_assert (gdbarch
!= NULL
);
4412 return gdbarch
->extract_struct_value_address
!= 0;
4416 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4418 gdb_assert (gdbarch
!= NULL
);
4419 if (gdbarch
->extract_struct_value_address
== 0)
4420 internal_error (__FILE__
, __LINE__
,
4421 "gdbarch: gdbarch_extract_struct_value_address invalid");
4422 if (gdbarch_debug
>= 2)
4423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4424 return gdbarch
->extract_struct_value_address (regcache
);
4428 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4429 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4431 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4435 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4437 gdb_assert (gdbarch
!= NULL
);
4438 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4442 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4444 gdb_assert (gdbarch
!= NULL
);
4445 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4446 internal_error (__FILE__
, __LINE__
,
4447 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4448 if (gdbarch_debug
>= 2)
4449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4450 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4454 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4455 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4457 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4461 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4463 gdb_assert (gdbarch
!= NULL
);
4464 if (gdbarch
->use_struct_convention
== 0)
4465 internal_error (__FILE__
, __LINE__
,
4466 "gdbarch: gdbarch_use_struct_convention invalid");
4467 if (gdbarch_debug
>= 2)
4468 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4469 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4473 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4474 gdbarch_use_struct_convention_ftype use_struct_convention
)
4476 gdbarch
->use_struct_convention
= use_struct_convention
;
4480 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
4482 gdb_assert (gdbarch
!= NULL
);
4483 return gdbarch
->deprecated_frame_init_saved_regs
!= 0;
4487 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4489 gdb_assert (gdbarch
!= NULL
);
4490 if (gdbarch
->deprecated_frame_init_saved_regs
== 0)
4491 internal_error (__FILE__
, __LINE__
,
4492 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4493 if (gdbarch_debug
>= 2)
4494 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
4495 gdbarch
->deprecated_frame_init_saved_regs (frame
);
4499 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4500 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
4502 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
4506 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4508 gdb_assert (gdbarch
!= NULL
);
4509 return gdbarch
->deprecated_init_extra_frame_info
!= 0;
4513 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4515 gdb_assert (gdbarch
!= NULL
);
4516 if (gdbarch
->deprecated_init_extra_frame_info
== 0)
4517 internal_error (__FILE__
, __LINE__
,
4518 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4519 if (gdbarch_debug
>= 2)
4520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
4521 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
4525 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
4526 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
4528 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
4532 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4534 gdb_assert (gdbarch
!= NULL
);
4535 if (gdbarch
->skip_prologue
== 0)
4536 internal_error (__FILE__
, __LINE__
,
4537 "gdbarch: gdbarch_skip_prologue invalid");
4538 if (gdbarch_debug
>= 2)
4539 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4540 return gdbarch
->skip_prologue (ip
);
4544 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4545 gdbarch_skip_prologue_ftype skip_prologue
)
4547 gdbarch
->skip_prologue
= skip_prologue
;
4551 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4553 gdb_assert (gdbarch
!= NULL
);
4554 if (gdbarch
->prologue_frameless_p
== 0)
4555 internal_error (__FILE__
, __LINE__
,
4556 "gdbarch: gdbarch_prologue_frameless_p invalid");
4557 if (gdbarch_debug
>= 2)
4558 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4559 return gdbarch
->prologue_frameless_p (ip
);
4563 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4564 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4566 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4570 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4572 gdb_assert (gdbarch
!= NULL
);
4573 if (gdbarch
->inner_than
== 0)
4574 internal_error (__FILE__
, __LINE__
,
4575 "gdbarch: gdbarch_inner_than invalid");
4576 if (gdbarch_debug
>= 2)
4577 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4578 return gdbarch
->inner_than (lhs
, rhs
);
4582 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4583 gdbarch_inner_than_ftype inner_than
)
4585 gdbarch
->inner_than
= inner_than
;
4588 const unsigned char *
4589 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4591 gdb_assert (gdbarch
!= NULL
);
4592 if (gdbarch
->breakpoint_from_pc
== 0)
4593 internal_error (__FILE__
, __LINE__
,
4594 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4595 if (gdbarch_debug
>= 2)
4596 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4597 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4601 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4602 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4604 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4608 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4610 gdb_assert (gdbarch
!= NULL
);
4611 if (gdbarch
->memory_insert_breakpoint
== 0)
4612 internal_error (__FILE__
, __LINE__
,
4613 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4614 if (gdbarch_debug
>= 2)
4615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4616 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4620 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4621 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4623 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4627 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4629 gdb_assert (gdbarch
!= NULL
);
4630 if (gdbarch
->memory_remove_breakpoint
== 0)
4631 internal_error (__FILE__
, __LINE__
,
4632 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4633 if (gdbarch_debug
>= 2)
4634 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4635 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4639 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4640 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4642 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4646 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4648 gdb_assert (gdbarch
!= NULL
);
4649 if (gdbarch
->decr_pc_after_break
== -1)
4650 internal_error (__FILE__
, __LINE__
,
4651 "gdbarch: gdbarch_decr_pc_after_break invalid");
4652 if (gdbarch_debug
>= 2)
4653 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4654 return gdbarch
->decr_pc_after_break
;
4658 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4659 CORE_ADDR decr_pc_after_break
)
4661 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4665 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4667 gdb_assert (gdbarch
!= NULL
);
4668 if (gdbarch
->prepare_to_proceed
== 0)
4669 internal_error (__FILE__
, __LINE__
,
4670 "gdbarch: gdbarch_prepare_to_proceed invalid");
4671 if (gdbarch_debug
>= 2)
4672 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4673 return gdbarch
->prepare_to_proceed (select_it
);
4677 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4678 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4680 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4684 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4686 gdb_assert (gdbarch
!= NULL
);
4687 if (gdbarch
->function_start_offset
== -1)
4688 internal_error (__FILE__
, __LINE__
,
4689 "gdbarch: gdbarch_function_start_offset invalid");
4690 if (gdbarch_debug
>= 2)
4691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4692 return gdbarch
->function_start_offset
;
4696 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4697 CORE_ADDR function_start_offset
)
4699 gdbarch
->function_start_offset
= function_start_offset
;
4703 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4705 gdb_assert (gdbarch
!= NULL
);
4706 if (gdbarch
->remote_translate_xfer_address
== 0)
4707 internal_error (__FILE__
, __LINE__
,
4708 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4709 if (gdbarch_debug
>= 2)
4710 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4711 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4715 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4716 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4718 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4722 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4724 gdb_assert (gdbarch
!= NULL
);
4725 if (gdbarch
->frame_args_skip
== -1)
4726 internal_error (__FILE__
, __LINE__
,
4727 "gdbarch: gdbarch_frame_args_skip invalid");
4728 if (gdbarch_debug
>= 2)
4729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4730 return gdbarch
->frame_args_skip
;
4734 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4735 CORE_ADDR frame_args_skip
)
4737 gdbarch
->frame_args_skip
= frame_args_skip
;
4741 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4743 gdb_assert (gdbarch
!= NULL
);
4744 if (gdbarch
->frameless_function_invocation
== 0)
4745 internal_error (__FILE__
, __LINE__
,
4746 "gdbarch: gdbarch_frameless_function_invocation invalid");
4747 if (gdbarch_debug
>= 2)
4748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4749 return gdbarch
->frameless_function_invocation (fi
);
4753 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4754 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4756 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4760 gdbarch_frame_chain_p (struct gdbarch
*gdbarch
)
4762 gdb_assert (gdbarch
!= NULL
);
4763 return gdbarch
->frame_chain
!= 0;
4767 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4769 gdb_assert (gdbarch
!= NULL
);
4770 if (gdbarch
->frame_chain
== 0)
4771 internal_error (__FILE__
, __LINE__
,
4772 "gdbarch: gdbarch_frame_chain invalid");
4773 if (gdbarch_debug
>= 2)
4774 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4775 return gdbarch
->frame_chain (frame
);
4779 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4780 gdbarch_frame_chain_ftype frame_chain
)
4782 gdbarch
->frame_chain
= frame_chain
;
4786 gdbarch_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4788 gdb_assert (gdbarch
!= NULL
);
4789 return gdbarch
->frame_chain_valid
!= 0;
4793 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4795 gdb_assert (gdbarch
!= NULL
);
4796 if (gdbarch
->frame_chain_valid
== 0)
4797 internal_error (__FILE__
, __LINE__
,
4798 "gdbarch: gdbarch_frame_chain_valid invalid");
4799 if (gdbarch_debug
>= 2)
4800 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4801 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4805 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4806 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4808 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4812 gdbarch_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4814 gdb_assert (gdbarch
!= NULL
);
4815 return gdbarch
->frame_saved_pc
!= 0;
4819 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4821 gdb_assert (gdbarch
!= NULL
);
4822 if (gdbarch
->frame_saved_pc
== 0)
4823 internal_error (__FILE__
, __LINE__
,
4824 "gdbarch: gdbarch_frame_saved_pc invalid");
4825 if (gdbarch_debug
>= 2)
4826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4827 return gdbarch
->frame_saved_pc (fi
);
4831 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4832 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4834 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4838 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4840 gdb_assert (gdbarch
!= NULL
);
4841 if (gdbarch
->frame_args_address
== 0)
4842 internal_error (__FILE__
, __LINE__
,
4843 "gdbarch: gdbarch_frame_args_address invalid");
4844 if (gdbarch_debug
>= 2)
4845 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4846 return gdbarch
->frame_args_address (fi
);
4850 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4851 gdbarch_frame_args_address_ftype frame_args_address
)
4853 gdbarch
->frame_args_address
= frame_args_address
;
4857 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4859 gdb_assert (gdbarch
!= NULL
);
4860 if (gdbarch
->frame_locals_address
== 0)
4861 internal_error (__FILE__
, __LINE__
,
4862 "gdbarch: gdbarch_frame_locals_address invalid");
4863 if (gdbarch_debug
>= 2)
4864 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4865 return gdbarch
->frame_locals_address (fi
);
4869 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4870 gdbarch_frame_locals_address_ftype frame_locals_address
)
4872 gdbarch
->frame_locals_address
= frame_locals_address
;
4876 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4878 gdb_assert (gdbarch
!= NULL
);
4879 if (gdbarch
->saved_pc_after_call
== 0)
4880 internal_error (__FILE__
, __LINE__
,
4881 "gdbarch: gdbarch_saved_pc_after_call invalid");
4882 if (gdbarch_debug
>= 2)
4883 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4884 return gdbarch
->saved_pc_after_call (frame
);
4888 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4889 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4891 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4895 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4897 gdb_assert (gdbarch
!= NULL
);
4898 if (gdbarch
->frame_num_args
== 0)
4899 internal_error (__FILE__
, __LINE__
,
4900 "gdbarch: gdbarch_frame_num_args invalid");
4901 if (gdbarch_debug
>= 2)
4902 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4903 return gdbarch
->frame_num_args (frame
);
4907 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4908 gdbarch_frame_num_args_ftype frame_num_args
)
4910 gdbarch
->frame_num_args
= frame_num_args
;
4914 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4916 gdb_assert (gdbarch
!= NULL
);
4917 return gdbarch
->stack_align
!= 0;
4921 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4923 gdb_assert (gdbarch
!= NULL
);
4924 if (gdbarch
->stack_align
== 0)
4925 internal_error (__FILE__
, __LINE__
,
4926 "gdbarch: gdbarch_stack_align invalid");
4927 if (gdbarch_debug
>= 2)
4928 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4929 return gdbarch
->stack_align (sp
);
4933 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4934 gdbarch_stack_align_ftype stack_align
)
4936 gdbarch
->stack_align
= stack_align
;
4940 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4942 gdb_assert (gdbarch
!= NULL
);
4943 return gdbarch
->frame_align
!= 0;
4947 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4949 gdb_assert (gdbarch
!= NULL
);
4950 if (gdbarch
->frame_align
== 0)
4951 internal_error (__FILE__
, __LINE__
,
4952 "gdbarch: gdbarch_frame_align invalid");
4953 if (gdbarch_debug
>= 2)
4954 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4955 return gdbarch
->frame_align (gdbarch
, address
);
4959 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4960 gdbarch_frame_align_ftype frame_align
)
4962 gdbarch
->frame_align
= frame_align
;
4966 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4968 gdb_assert (gdbarch
!= NULL
);
4969 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4970 if (gdbarch_debug
>= 2)
4971 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4972 return gdbarch
->extra_stack_alignment_needed
;
4976 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4977 int extra_stack_alignment_needed
)
4979 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4983 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4985 gdb_assert (gdbarch
!= NULL
);
4986 return gdbarch
->reg_struct_has_addr
!= 0;
4990 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4992 gdb_assert (gdbarch
!= NULL
);
4993 if (gdbarch
->reg_struct_has_addr
== 0)
4994 internal_error (__FILE__
, __LINE__
,
4995 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4996 if (gdbarch_debug
>= 2)
4997 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4998 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
5002 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
5003 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
5005 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
5009 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
5011 gdb_assert (gdbarch
!= NULL
);
5012 return gdbarch
->save_dummy_frame_tos
!= 0;
5016 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
5018 gdb_assert (gdbarch
!= NULL
);
5019 if (gdbarch
->save_dummy_frame_tos
== 0)
5020 internal_error (__FILE__
, __LINE__
,
5021 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5022 if (gdbarch_debug
>= 2)
5023 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
5024 gdbarch
->save_dummy_frame_tos (sp
);
5028 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
5029 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
5031 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
5035 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
5037 gdb_assert (gdbarch
!= NULL
);
5038 if (gdbarch_debug
>= 2)
5039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
5040 return gdbarch
->parm_boundary
;
5044 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
5047 gdbarch
->parm_boundary
= parm_boundary
;
5050 const struct floatformat
*
5051 gdbarch_float_format (struct gdbarch
*gdbarch
)
5053 gdb_assert (gdbarch
!= NULL
);
5054 if (gdbarch_debug
>= 2)
5055 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
5056 return gdbarch
->float_format
;
5060 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
5061 const struct floatformat
* float_format
)
5063 gdbarch
->float_format
= float_format
;
5066 const struct floatformat
*
5067 gdbarch_double_format (struct gdbarch
*gdbarch
)
5069 gdb_assert (gdbarch
!= NULL
);
5070 if (gdbarch_debug
>= 2)
5071 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
5072 return gdbarch
->double_format
;
5076 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
5077 const struct floatformat
* double_format
)
5079 gdbarch
->double_format
= double_format
;
5082 const struct floatformat
*
5083 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
5085 gdb_assert (gdbarch
!= NULL
);
5086 if (gdbarch_debug
>= 2)
5087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
5088 return gdbarch
->long_double_format
;
5092 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
5093 const struct floatformat
* long_double_format
)
5095 gdbarch
->long_double_format
= long_double_format
;
5099 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5101 gdb_assert (gdbarch
!= NULL
);
5102 if (gdbarch
->convert_from_func_ptr_addr
== 0)
5103 internal_error (__FILE__
, __LINE__
,
5104 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5105 if (gdbarch_debug
>= 2)
5106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
5107 return gdbarch
->convert_from_func_ptr_addr (addr
);
5111 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
5112 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
5114 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
5118 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5120 gdb_assert (gdbarch
!= NULL
);
5121 if (gdbarch
->addr_bits_remove
== 0)
5122 internal_error (__FILE__
, __LINE__
,
5123 "gdbarch: gdbarch_addr_bits_remove invalid");
5124 if (gdbarch_debug
>= 2)
5125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
5126 return gdbarch
->addr_bits_remove (addr
);
5130 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
5131 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
5133 gdbarch
->addr_bits_remove
= addr_bits_remove
;
5137 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5139 gdb_assert (gdbarch
!= NULL
);
5140 if (gdbarch
->smash_text_address
== 0)
5141 internal_error (__FILE__
, __LINE__
,
5142 "gdbarch: gdbarch_smash_text_address invalid");
5143 if (gdbarch_debug
>= 2)
5144 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
5145 return gdbarch
->smash_text_address (addr
);
5149 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
5150 gdbarch_smash_text_address_ftype smash_text_address
)
5152 gdbarch
->smash_text_address
= smash_text_address
;
5156 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
5158 gdb_assert (gdbarch
!= NULL
);
5159 return gdbarch
->software_single_step
!= 0;
5163 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
5165 gdb_assert (gdbarch
!= NULL
);
5166 if (gdbarch
->software_single_step
== 0)
5167 internal_error (__FILE__
, __LINE__
,
5168 "gdbarch: gdbarch_software_single_step invalid");
5169 if (gdbarch_debug
>= 2)
5170 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
5171 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
5175 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
5176 gdbarch_software_single_step_ftype software_single_step
)
5178 gdbarch
->software_single_step
= software_single_step
;
5182 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
5184 gdb_assert (gdbarch
!= NULL
);
5185 if (gdbarch
->print_insn
== 0)
5186 internal_error (__FILE__
, __LINE__
,
5187 "gdbarch: gdbarch_print_insn invalid");
5188 if (gdbarch_debug
>= 2)
5189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
5190 return gdbarch
->print_insn (vma
, info
);
5194 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
5195 gdbarch_print_insn_ftype print_insn
)
5197 gdbarch
->print_insn
= print_insn
;
5201 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5203 gdb_assert (gdbarch
!= NULL
);
5204 if (gdbarch
->skip_trampoline_code
== 0)
5205 internal_error (__FILE__
, __LINE__
,
5206 "gdbarch: gdbarch_skip_trampoline_code invalid");
5207 if (gdbarch_debug
>= 2)
5208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
5209 return gdbarch
->skip_trampoline_code (pc
);
5213 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
5214 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
5216 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
5220 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5222 gdb_assert (gdbarch
!= NULL
);
5223 if (gdbarch
->in_solib_call_trampoline
== 0)
5224 internal_error (__FILE__
, __LINE__
,
5225 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5226 if (gdbarch_debug
>= 2)
5227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
5228 return gdbarch
->in_solib_call_trampoline (pc
, name
);
5232 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
5233 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
5235 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
5239 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5241 gdb_assert (gdbarch
!= NULL
);
5242 if (gdbarch
->in_solib_return_trampoline
== 0)
5243 internal_error (__FILE__
, __LINE__
,
5244 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5245 if (gdbarch_debug
>= 2)
5246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
5247 return gdbarch
->in_solib_return_trampoline (pc
, name
);
5251 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
5252 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
5254 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
5258 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5260 gdb_assert (gdbarch
!= NULL
);
5261 if (gdbarch
->pc_in_sigtramp
== 0)
5262 internal_error (__FILE__
, __LINE__
,
5263 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5264 if (gdbarch_debug
>= 2)
5265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
5266 return gdbarch
->pc_in_sigtramp (pc
, name
);
5270 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
5271 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
5273 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
5277 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
5279 gdb_assert (gdbarch
!= NULL
);
5280 return gdbarch
->sigtramp_start
!= 0;
5284 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5286 gdb_assert (gdbarch
!= NULL
);
5287 if (gdbarch
->sigtramp_start
== 0)
5288 internal_error (__FILE__
, __LINE__
,
5289 "gdbarch: gdbarch_sigtramp_start invalid");
5290 if (gdbarch_debug
>= 2)
5291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
5292 return gdbarch
->sigtramp_start (pc
);
5296 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
5297 gdbarch_sigtramp_start_ftype sigtramp_start
)
5299 gdbarch
->sigtramp_start
= sigtramp_start
;
5303 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
5305 gdb_assert (gdbarch
!= NULL
);
5306 return gdbarch
->sigtramp_end
!= 0;
5310 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5312 gdb_assert (gdbarch
!= NULL
);
5313 if (gdbarch
->sigtramp_end
== 0)
5314 internal_error (__FILE__
, __LINE__
,
5315 "gdbarch: gdbarch_sigtramp_end invalid");
5316 if (gdbarch_debug
>= 2)
5317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
5318 return gdbarch
->sigtramp_end (pc
);
5322 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
5323 gdbarch_sigtramp_end_ftype sigtramp_end
)
5325 gdbarch
->sigtramp_end
= sigtramp_end
;
5329 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5331 gdb_assert (gdbarch
!= NULL
);
5332 if (gdbarch
->in_function_epilogue_p
== 0)
5333 internal_error (__FILE__
, __LINE__
,
5334 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5335 if (gdbarch_debug
>= 2)
5336 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
5337 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
5341 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
5342 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
5344 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
5348 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
5350 gdb_assert (gdbarch
!= NULL
);
5351 if (gdbarch
->construct_inferior_arguments
== 0)
5352 internal_error (__FILE__
, __LINE__
,
5353 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5354 if (gdbarch_debug
>= 2)
5355 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5356 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5360 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5361 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5363 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5367 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
5369 gdb_assert (gdbarch
!= NULL
);
5370 return gdbarch
->dwarf2_build_frame_info
!= 0;
5374 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
5376 gdb_assert (gdbarch
!= NULL
);
5377 if (gdbarch
->dwarf2_build_frame_info
== 0)
5378 internal_error (__FILE__
, __LINE__
,
5379 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5380 if (gdbarch_debug
>= 2)
5381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
5382 gdbarch
->dwarf2_build_frame_info (objfile
);
5386 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
5387 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
5389 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
5393 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5395 gdb_assert (gdbarch
!= NULL
);
5396 if (gdbarch
->elf_make_msymbol_special
== 0)
5397 internal_error (__FILE__
, __LINE__
,
5398 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5399 if (gdbarch_debug
>= 2)
5400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5401 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5405 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5406 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5408 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5412 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5414 gdb_assert (gdbarch
!= NULL
);
5415 if (gdbarch
->coff_make_msymbol_special
== 0)
5416 internal_error (__FILE__
, __LINE__
,
5417 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5418 if (gdbarch_debug
>= 2)
5419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5420 gdbarch
->coff_make_msymbol_special (val
, msym
);
5424 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5425 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5427 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5431 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5433 gdb_assert (gdbarch
!= NULL
);
5434 /* Skip verify of name_of_malloc, invalid_p == 0 */
5435 if (gdbarch_debug
>= 2)
5436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5437 return gdbarch
->name_of_malloc
;
5441 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5442 const char * name_of_malloc
)
5444 gdbarch
->name_of_malloc
= name_of_malloc
;
5448 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5450 gdb_assert (gdbarch
!= NULL
);
5451 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5452 if (gdbarch_debug
>= 2)
5453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5454 return gdbarch
->cannot_step_breakpoint
;
5458 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5459 int cannot_step_breakpoint
)
5461 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5465 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5467 gdb_assert (gdbarch
!= NULL
);
5468 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5469 if (gdbarch_debug
>= 2)
5470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5471 return gdbarch
->have_nonsteppable_watchpoint
;
5475 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5476 int have_nonsteppable_watchpoint
)
5478 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5482 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5484 gdb_assert (gdbarch
!= NULL
);
5485 return gdbarch
->address_class_type_flags
!= 0;
5489 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5491 gdb_assert (gdbarch
!= NULL
);
5492 if (gdbarch
->address_class_type_flags
== 0)
5493 internal_error (__FILE__
, __LINE__
,
5494 "gdbarch: gdbarch_address_class_type_flags invalid");
5495 if (gdbarch_debug
>= 2)
5496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5497 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5501 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5502 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5504 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5508 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5510 gdb_assert (gdbarch
!= NULL
);
5511 return gdbarch
->address_class_type_flags_to_name
!= 0;
5515 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5517 gdb_assert (gdbarch
!= NULL
);
5518 if (gdbarch
->address_class_type_flags_to_name
== 0)
5519 internal_error (__FILE__
, __LINE__
,
5520 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5521 if (gdbarch_debug
>= 2)
5522 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5523 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5527 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5528 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5530 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5534 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5536 gdb_assert (gdbarch
!= NULL
);
5537 return gdbarch
->address_class_name_to_type_flags
!= 0;
5541 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
5543 gdb_assert (gdbarch
!= NULL
);
5544 if (gdbarch
->address_class_name_to_type_flags
== 0)
5545 internal_error (__FILE__
, __LINE__
,
5546 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5547 if (gdbarch_debug
>= 2)
5548 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5549 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5553 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5554 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5556 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5560 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5562 gdb_assert (gdbarch
!= NULL
);
5563 if (gdbarch
->register_reggroup_p
== 0)
5564 internal_error (__FILE__
, __LINE__
,
5565 "gdbarch: gdbarch_register_reggroup_p invalid");
5566 if (gdbarch_debug
>= 2)
5567 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5568 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5572 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5573 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5575 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5579 /* Keep a registry of per-architecture data-pointers required by GDB
5586 gdbarch_data_init_ftype
*init
;
5587 gdbarch_data_free_ftype
*free
;
5590 struct gdbarch_data_registration
5592 struct gdbarch_data
*data
;
5593 struct gdbarch_data_registration
*next
;
5596 struct gdbarch_data_registry
5599 struct gdbarch_data_registration
*registrations
;
5602 struct gdbarch_data_registry gdbarch_data_registry
=
5607 struct gdbarch_data
*
5608 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5609 gdbarch_data_free_ftype
*free
)
5611 struct gdbarch_data_registration
**curr
;
5612 /* Append the new registraration. */
5613 for (curr
= &gdbarch_data_registry
.registrations
;
5615 curr
= &(*curr
)->next
);
5616 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5617 (*curr
)->next
= NULL
;
5618 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5619 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5620 (*curr
)->data
->init
= init
;
5621 (*curr
)->data
->init_p
= 1;
5622 (*curr
)->data
->free
= free
;
5623 return (*curr
)->data
;
5627 /* Create/delete the gdbarch data vector. */
5630 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5632 gdb_assert (gdbarch
->data
== NULL
);
5633 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5634 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5638 free_gdbarch_data (struct gdbarch
*gdbarch
)
5640 struct gdbarch_data_registration
*rego
;
5641 gdb_assert (gdbarch
->data
!= NULL
);
5642 for (rego
= gdbarch_data_registry
.registrations
;
5646 struct gdbarch_data
*data
= rego
->data
;
5647 gdb_assert (data
->index
< gdbarch
->nr_data
);
5648 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5650 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5651 gdbarch
->data
[data
->index
] = NULL
;
5654 xfree (gdbarch
->data
);
5655 gdbarch
->data
= NULL
;
5659 /* Initialize the current value of the specified per-architecture
5663 set_gdbarch_data (struct gdbarch
*gdbarch
,
5664 struct gdbarch_data
*data
,
5667 gdb_assert (data
->index
< gdbarch
->nr_data
);
5668 if (gdbarch
->data
[data
->index
] != NULL
)
5670 gdb_assert (data
->free
!= NULL
);
5671 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5673 gdbarch
->data
[data
->index
] = pointer
;
5676 /* Return the current value of the specified per-architecture
5680 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5682 gdb_assert (data
->index
< gdbarch
->nr_data
);
5683 /* The data-pointer isn't initialized, call init() to get a value but
5684 only if the architecture initializaiton has completed. Otherwise
5685 punt - hope that the caller knows what they are doing. */
5686 if (gdbarch
->data
[data
->index
] == NULL
5687 && gdbarch
->initialized_p
)
5689 /* Be careful to detect an initialization cycle. */
5690 gdb_assert (data
->init_p
);
5692 gdb_assert (data
->init
!= NULL
);
5693 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5695 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5697 return gdbarch
->data
[data
->index
];
5702 /* Keep a registry of swapped data required by GDB modules. */
5707 struct gdbarch_swap_registration
*source
;
5708 struct gdbarch_swap
*next
;
5711 struct gdbarch_swap_registration
5714 unsigned long sizeof_data
;
5715 gdbarch_swap_ftype
*init
;
5716 struct gdbarch_swap_registration
*next
;
5719 struct gdbarch_swap_registry
5722 struct gdbarch_swap_registration
*registrations
;
5725 struct gdbarch_swap_registry gdbarch_swap_registry
=
5731 register_gdbarch_swap (void *data
,
5732 unsigned long sizeof_data
,
5733 gdbarch_swap_ftype
*init
)
5735 struct gdbarch_swap_registration
**rego
;
5736 for (rego
= &gdbarch_swap_registry
.registrations
;
5738 rego
= &(*rego
)->next
);
5739 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5740 (*rego
)->next
= NULL
;
5741 (*rego
)->init
= init
;
5742 (*rego
)->data
= data
;
5743 (*rego
)->sizeof_data
= sizeof_data
;
5747 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5749 struct gdbarch_swap
*curr
;
5750 for (curr
= gdbarch
->swap
;
5754 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5759 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5761 struct gdbarch_swap_registration
*rego
;
5762 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5763 for (rego
= gdbarch_swap_registry
.registrations
;
5767 if (rego
->data
!= NULL
)
5769 (*curr
) = XMALLOC (struct gdbarch_swap
);
5770 (*curr
)->source
= rego
;
5771 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5772 (*curr
)->next
= NULL
;
5773 curr
= &(*curr
)->next
;
5775 if (rego
->init
!= NULL
)
5781 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5783 struct gdbarch_swap
*curr
;
5784 for (curr
= gdbarch
->swap
;
5787 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5791 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5793 struct gdbarch_swap
*curr
;
5794 for (curr
= gdbarch
->swap
;
5797 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5801 /* Keep a registry of the architectures known by GDB. */
5803 struct gdbarch_registration
5805 enum bfd_architecture bfd_architecture
;
5806 gdbarch_init_ftype
*init
;
5807 gdbarch_dump_tdep_ftype
*dump_tdep
;
5808 struct gdbarch_list
*arches
;
5809 struct gdbarch_registration
*next
;
5812 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5815 append_name (const char ***buf
, int *nr
, const char *name
)
5817 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5823 gdbarch_printable_names (void)
5827 /* Accumulate a list of names based on the registed list of
5829 enum bfd_architecture a
;
5831 const char **arches
= NULL
;
5832 struct gdbarch_registration
*rego
;
5833 for (rego
= gdbarch_registry
;
5837 const struct bfd_arch_info
*ap
;
5838 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5840 internal_error (__FILE__
, __LINE__
,
5841 "gdbarch_architecture_names: multi-arch unknown");
5844 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5849 append_name (&arches
, &nr_arches
, NULL
);
5853 /* Just return all the architectures that BFD knows. Assume that
5854 the legacy architecture framework supports them. */
5855 return bfd_arch_list ();
5860 gdbarch_register (enum bfd_architecture bfd_architecture
,
5861 gdbarch_init_ftype
*init
,
5862 gdbarch_dump_tdep_ftype
*dump_tdep
)
5864 struct gdbarch_registration
**curr
;
5865 const struct bfd_arch_info
*bfd_arch_info
;
5866 /* Check that BFD recognizes this architecture */
5867 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5868 if (bfd_arch_info
== NULL
)
5870 internal_error (__FILE__
, __LINE__
,
5871 "gdbarch: Attempt to register unknown architecture (%d)",
5874 /* Check that we haven't seen this architecture before */
5875 for (curr
= &gdbarch_registry
;
5877 curr
= &(*curr
)->next
)
5879 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5880 internal_error (__FILE__
, __LINE__
,
5881 "gdbarch: Duplicate registraration of architecture (%s)",
5882 bfd_arch_info
->printable_name
);
5886 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5887 bfd_arch_info
->printable_name
,
5890 (*curr
) = XMALLOC (struct gdbarch_registration
);
5891 (*curr
)->bfd_architecture
= bfd_architecture
;
5892 (*curr
)->init
= init
;
5893 (*curr
)->dump_tdep
= dump_tdep
;
5894 (*curr
)->arches
= NULL
;
5895 (*curr
)->next
= NULL
;
5896 /* When non- multi-arch, install whatever target dump routine we've
5897 been provided - hopefully that routine has been written correctly
5898 and works regardless of multi-arch. */
5899 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5900 && startup_gdbarch
.dump_tdep
== NULL
)
5901 startup_gdbarch
.dump_tdep
= dump_tdep
;
5905 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5906 gdbarch_init_ftype
*init
)
5908 gdbarch_register (bfd_architecture
, init
, NULL
);
5912 /* Look for an architecture using gdbarch_info. Base search on only
5913 BFD_ARCH_INFO and BYTE_ORDER. */
5915 struct gdbarch_list
*
5916 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5917 const struct gdbarch_info
*info
)
5919 for (; arches
!= NULL
; arches
= arches
->next
)
5921 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5923 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5925 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5933 /* Update the current architecture. Return ZERO if the update request
5937 gdbarch_update_p (struct gdbarch_info info
)
5939 struct gdbarch
*new_gdbarch
;
5940 struct gdbarch
*old_gdbarch
;
5941 struct gdbarch_registration
*rego
;
5943 /* Fill in missing parts of the INFO struct using a number of
5944 sources: ``set ...''; INFOabfd supplied; existing target. */
5946 /* ``(gdb) set architecture ...'' */
5947 if (info
.bfd_arch_info
== NULL
5948 && !TARGET_ARCHITECTURE_AUTO
)
5949 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5950 if (info
.bfd_arch_info
== NULL
5951 && info
.abfd
!= NULL
5952 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5953 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5954 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5955 if (info
.bfd_arch_info
== NULL
)
5956 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5958 /* ``(gdb) set byte-order ...'' */
5959 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5960 && !TARGET_BYTE_ORDER_AUTO
)
5961 info
.byte_order
= TARGET_BYTE_ORDER
;
5962 /* From the INFO struct. */
5963 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5964 && info
.abfd
!= NULL
)
5965 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5966 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5967 : BFD_ENDIAN_UNKNOWN
);
5968 /* From the current target. */
5969 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5970 info
.byte_order
= TARGET_BYTE_ORDER
;
5972 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
5973 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
5974 info
.osabi
= gdbarch_lookup_osabi (info
.abfd
);
5975 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
5976 info
.osabi
= current_gdbarch
->osabi
;
5978 /* Must have found some sort of architecture. */
5979 gdb_assert (info
.bfd_arch_info
!= NULL
);
5983 fprintf_unfiltered (gdb_stdlog
,
5984 "gdbarch_update: info.bfd_arch_info %s\n",
5985 (info
.bfd_arch_info
!= NULL
5986 ? info
.bfd_arch_info
->printable_name
5988 fprintf_unfiltered (gdb_stdlog
,
5989 "gdbarch_update: info.byte_order %d (%s)\n",
5991 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5992 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5994 fprintf_unfiltered (gdb_stdlog
,
5995 "gdbarch_update: info.osabi %d (%s)\n",
5996 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
5997 fprintf_unfiltered (gdb_stdlog
,
5998 "gdbarch_update: info.abfd 0x%lx\n",
6000 fprintf_unfiltered (gdb_stdlog
,
6001 "gdbarch_update: info.tdep_info 0x%lx\n",
6002 (long) info
.tdep_info
);
6005 /* Find the target that knows about this architecture. */
6006 for (rego
= gdbarch_registry
;
6009 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
6014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
6018 /* Swap the data belonging to the old target out setting the
6019 installed data to zero. This stops the ->init() function trying
6020 to refer to the previous architecture's global data structures. */
6021 swapout_gdbarch_swap (current_gdbarch
);
6022 clear_gdbarch_swap (current_gdbarch
);
6024 /* Save the previously selected architecture, setting the global to
6025 NULL. This stops ->init() trying to use the previous
6026 architecture's configuration. The previous architecture may not
6027 even be of the same architecture family. The most recent
6028 architecture of the same family is found at the head of the
6029 rego->arches list. */
6030 old_gdbarch
= current_gdbarch
;
6031 current_gdbarch
= NULL
;
6033 /* Ask the target for a replacement architecture. */
6034 new_gdbarch
= rego
->init (info
, rego
->arches
);
6036 /* Did the target like it? No. Reject the change and revert to the
6037 old architecture. */
6038 if (new_gdbarch
== NULL
)
6041 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
6042 swapin_gdbarch_swap (old_gdbarch
);
6043 current_gdbarch
= old_gdbarch
;
6047 /* Did the architecture change? No. Oops, put the old architecture
6049 if (old_gdbarch
== new_gdbarch
)
6052 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6054 new_gdbarch
->bfd_arch_info
->printable_name
);
6055 swapin_gdbarch_swap (old_gdbarch
);
6056 current_gdbarch
= old_gdbarch
;
6060 /* Is this a pre-existing architecture? Yes. Move it to the front
6061 of the list of architectures (keeping the list sorted Most
6062 Recently Used) and then copy it in. */
6064 struct gdbarch_list
**list
;
6065 for (list
= ®o
->arches
;
6067 list
= &(*list
)->next
)
6069 if ((*list
)->gdbarch
== new_gdbarch
)
6071 struct gdbarch_list
*this;
6073 fprintf_unfiltered (gdb_stdlog
,
6074 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6076 new_gdbarch
->bfd_arch_info
->printable_name
);
6079 (*list
) = this->next
;
6080 /* Insert in the front. */
6081 this->next
= rego
->arches
;
6082 rego
->arches
= this;
6083 /* Copy the new architecture in. */
6084 current_gdbarch
= new_gdbarch
;
6085 swapin_gdbarch_swap (new_gdbarch
);
6086 architecture_changed_event ();
6092 /* Prepend this new architecture to the architecture list (keep the
6093 list sorted Most Recently Used). */
6095 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
6096 this->next
= rego
->arches
;
6097 this->gdbarch
= new_gdbarch
;
6098 rego
->arches
= this;
6101 /* Switch to this new architecture marking it initialized. */
6102 current_gdbarch
= new_gdbarch
;
6103 current_gdbarch
->initialized_p
= 1;
6106 fprintf_unfiltered (gdb_stdlog
,
6107 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6109 new_gdbarch
->bfd_arch_info
->printable_name
);
6112 /* Check that the newly installed architecture is valid. Plug in
6113 any post init values. */
6114 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
6115 verify_gdbarch (new_gdbarch
);
6117 /* Initialize the per-architecture memory (swap) areas.
6118 CURRENT_GDBARCH must be update before these modules are
6120 init_gdbarch_swap (new_gdbarch
);
6122 /* Initialize the per-architecture data. CURRENT_GDBARCH
6123 must be updated before these modules are called. */
6124 architecture_changed_event ();
6127 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
6135 /* Pointer to the target-dependent disassembly function. */
6136 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
6137 disassemble_info tm_print_insn_info
;
6140 extern void _initialize_gdbarch (void);
6143 _initialize_gdbarch (void)
6145 struct cmd_list_element
*c
;
6147 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
6148 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
6149 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
6150 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
6151 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
6153 add_show_from_set (add_set_cmd ("arch",
6156 (char *)&gdbarch_debug
,
6157 "Set architecture debugging.\n\
6158 When non-zero, architecture debugging is enabled.", &setdebuglist
),
6160 c
= add_set_cmd ("archdebug",
6163 (char *)&gdbarch_debug
,
6164 "Set architecture debugging.\n\
6165 When non-zero, architecture debugging is enabled.", &setlist
);
6167 deprecate_cmd (c
, "set debug arch");
6168 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");