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 max_register_raw_size
;
174 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
175 int max_register_virtual_size
;
176 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
177 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
178 gdbarch_print_registers_info_ftype
*print_registers_info
;
179 gdbarch_print_float_info_ftype
*print_float_info
;
180 gdbarch_print_vector_info_ftype
*print_vector_info
;
181 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
182 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
183 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
184 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
185 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
186 int deprecated_use_generic_dummy_frames
;
187 int call_dummy_location
;
188 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
189 CORE_ADDR call_dummy_start_offset
;
190 CORE_ADDR call_dummy_breakpoint_offset
;
191 int call_dummy_breakpoint_offset_p
;
192 int call_dummy_length
;
193 gdbarch_deprecated_pc_in_call_dummy_ftype
*deprecated_pc_in_call_dummy
;
195 LONGEST
* call_dummy_words
;
196 int sizeof_call_dummy_words
;
197 int call_dummy_stack_adjust_p
;
198 int call_dummy_stack_adjust
;
199 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
200 gdbarch_deprecated_init_frame_pc_first_ftype
*deprecated_init_frame_pc_first
;
201 gdbarch_deprecated_init_frame_pc_ftype
*deprecated_init_frame_pc
;
202 int believe_pcc_promotion
;
203 int believe_pcc_promotion_type
;
204 gdbarch_get_saved_register_ftype
*get_saved_register
;
205 gdbarch_register_convertible_ftype
*register_convertible
;
206 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
207 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
208 gdbarch_convert_register_p_ftype
*convert_register_p
;
209 gdbarch_register_to_value_ftype
*register_to_value
;
210 gdbarch_value_to_register_ftype
*value_to_register
;
211 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
212 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
213 gdbarch_integer_to_address_ftype
*integer_to_address
;
214 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
215 gdbarch_push_arguments_ftype
*push_arguments
;
216 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
217 gdbarch_push_return_address_ftype
*push_return_address
;
218 gdbarch_pop_frame_ftype
*pop_frame
;
219 gdbarch_store_struct_return_ftype
*store_struct_return
;
220 gdbarch_extract_return_value_ftype
*extract_return_value
;
221 gdbarch_store_return_value_ftype
*store_return_value
;
222 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
223 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
224 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
225 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
226 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
227 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
228 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
229 gdbarch_skip_prologue_ftype
*skip_prologue
;
230 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
231 gdbarch_inner_than_ftype
*inner_than
;
232 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
233 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
234 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
235 CORE_ADDR decr_pc_after_break
;
236 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
237 CORE_ADDR function_start_offset
;
238 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
239 CORE_ADDR frame_args_skip
;
240 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
241 gdbarch_frame_chain_ftype
*frame_chain
;
242 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
243 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
244 gdbarch_frame_args_address_ftype
*frame_args_address
;
245 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
246 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
247 gdbarch_frame_num_args_ftype
*frame_num_args
;
248 gdbarch_stack_align_ftype
*stack_align
;
249 gdbarch_frame_align_ftype
*frame_align
;
250 int extra_stack_alignment_needed
;
251 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
252 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
254 const struct floatformat
* float_format
;
255 const struct floatformat
* double_format
;
256 const struct floatformat
* long_double_format
;
257 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
258 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
259 gdbarch_smash_text_address_ftype
*smash_text_address
;
260 gdbarch_software_single_step_ftype
*software_single_step
;
261 gdbarch_print_insn_ftype
*print_insn
;
262 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
263 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
264 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
265 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
266 gdbarch_sigtramp_start_ftype
*sigtramp_start
;
267 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
268 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
269 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
270 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
271 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
272 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
273 const char * name_of_malloc
;
274 int cannot_step_breakpoint
;
275 int have_nonsteppable_watchpoint
;
276 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
277 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
278 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
279 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
283 /* The default architecture uses host values (for want of a better
286 extern const struct bfd_arch_info bfd_default_arch_struct
;
288 struct gdbarch startup_gdbarch
=
290 1, /* Always initialized. */
291 /* basic architecture information */
292 &bfd_default_arch_struct
,
295 /* target specific vector and its dump routine */
297 /*per-architecture data-pointers and swap regions */
299 /* Multi-arch values */
303 8 * sizeof (LONGEST
),
306 8 * sizeof (long double),
335 generic_register_byte
,
336 generic_register_size
,
338 generic_register_size
,
342 default_print_registers_info
,
357 generic_pc_in_call_dummy
,
432 generic_in_function_epilogue_p
,
433 construct_inferior_arguments
,
443 default_register_reggroup_p
,
444 /* startup_gdbarch() */
447 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
449 /* Do any initialization needed for a non-multiarch configuration
450 after the _initialize_MODULE functions have been run. */
452 initialize_non_multiarch (void)
454 alloc_gdbarch_data (&startup_gdbarch
);
455 /* Ensure that all swap areas are zeroed so that they again think
456 they are starting from scratch. */
457 clear_gdbarch_swap (&startup_gdbarch
);
458 init_gdbarch_swap (&startup_gdbarch
);
462 /* Create a new ``struct gdbarch'' based on information provided by
463 ``struct gdbarch_info''. */
466 gdbarch_alloc (const struct gdbarch_info
*info
,
467 struct gdbarch_tdep
*tdep
)
469 /* NOTE: The new architecture variable is named ``current_gdbarch''
470 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
471 the current local architecture and not the previous global
472 architecture. This ensures that the new architectures initial
473 values are not influenced by the previous architecture. Once
474 everything is parameterised with gdbarch, this will go away. */
475 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
476 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
478 alloc_gdbarch_data (current_gdbarch
);
480 current_gdbarch
->tdep
= tdep
;
482 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
483 current_gdbarch
->byte_order
= info
->byte_order
;
484 current_gdbarch
->osabi
= info
->osabi
;
486 /* Force the explicit initialization of these. */
487 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
488 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
489 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
490 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
491 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
492 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
493 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
494 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
495 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
496 current_gdbarch
->char_signed
= -1;
497 current_gdbarch
->read_pc
= generic_target_read_pc
;
498 current_gdbarch
->write_pc
= generic_target_write_pc
;
499 current_gdbarch
->read_fp
= generic_target_read_fp
;
500 current_gdbarch
->read_sp
= generic_target_read_sp
;
501 current_gdbarch
->write_sp
= generic_target_write_sp
;
502 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
503 current_gdbarch
->num_regs
= -1;
504 current_gdbarch
->sp_regnum
= -1;
505 current_gdbarch
->fp_regnum
= -1;
506 current_gdbarch
->pc_regnum
= -1;
507 current_gdbarch
->ps_regnum
= -1;
508 current_gdbarch
->fp0_regnum
= -1;
509 current_gdbarch
->npc_regnum
= -1;
510 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
511 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
512 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
513 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
514 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
515 current_gdbarch
->register_name
= legacy_register_name
;
516 current_gdbarch
->register_size
= -1;
517 current_gdbarch
->register_bytes
= -1;
518 current_gdbarch
->register_byte
= generic_register_byte
;
519 current_gdbarch
->register_raw_size
= generic_register_size
;
520 current_gdbarch
->max_register_raw_size
= -1;
521 current_gdbarch
->register_virtual_size
= generic_register_size
;
522 current_gdbarch
->max_register_virtual_size
= -1;
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 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
663 && (gdbarch
->max_register_raw_size
== -1))
664 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
665 /* Skip verify of register_virtual_size, invalid_p == 0 */
666 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
667 && (gdbarch
->max_register_virtual_size
== -1))
668 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
669 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
670 && (gdbarch
->register_virtual_type
== 0))
671 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
672 /* Skip verify of deprecated_do_registers_info, has predicate */
673 /* Skip verify of print_registers_info, invalid_p == 0 */
674 /* Skip verify of print_float_info, has predicate */
675 /* Skip verify of print_vector_info, has predicate */
676 /* Skip verify of register_sim_regno, invalid_p == 0 */
677 /* Skip verify of register_bytes_ok, has predicate */
678 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
679 /* Skip verify of cannot_store_register, invalid_p == 0 */
680 /* Skip verify of get_longjmp_target, has predicate */
681 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
682 /* Skip verify of call_dummy_location, invalid_p == 0 */
683 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
684 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
685 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
686 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
687 && (gdbarch
->call_dummy_start_offset
== -1))
688 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
689 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
690 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
691 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
692 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
693 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
694 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
695 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
696 && (gdbarch
->call_dummy_length
== -1))
697 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
698 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
699 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
700 && (gdbarch
->call_dummy_p
== -1))
701 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
702 /* Skip verify of call_dummy_words, invalid_p == 0 */
703 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
704 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
705 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
706 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
707 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
708 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
709 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
710 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
711 && (gdbarch
->fix_call_dummy
== 0))
712 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
713 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
714 /* Skip verify of deprecated_init_frame_pc, has predicate */
715 /* Skip verify of get_saved_register, has predicate */
716 /* Skip verify of register_convertible, invalid_p == 0 */
717 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
718 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
719 /* Skip verify of convert_register_p, invalid_p == 0 */
720 /* Skip verify of register_to_value, invalid_p == 0 */
721 /* Skip verify of value_to_register, invalid_p == 0 */
722 /* Skip verify of pointer_to_address, invalid_p == 0 */
723 /* Skip verify of address_to_pointer, invalid_p == 0 */
724 /* Skip verify of integer_to_address, has predicate */
725 /* Skip verify of return_value_on_stack, invalid_p == 0 */
726 /* Skip verify of push_arguments, invalid_p == 0 */
727 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
728 && (gdbarch
->push_dummy_frame
== 0))
729 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
730 /* Skip verify of push_return_address, has predicate */
731 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
732 && (gdbarch
->pop_frame
== 0))
733 fprintf_unfiltered (log
, "\n\tpop_frame");
734 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
735 && (gdbarch
->store_struct_return
== 0))
736 fprintf_unfiltered (log
, "\n\tstore_struct_return");
737 /* Skip verify of extract_return_value, invalid_p == 0 */
738 /* Skip verify of store_return_value, invalid_p == 0 */
739 /* Skip verify of extract_struct_value_address, has predicate */
740 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
741 /* Skip verify of use_struct_convention, invalid_p == 0 */
742 /* Skip verify of frame_init_saved_regs, has predicate */
743 /* Skip verify of init_extra_frame_info, has predicate */
744 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
745 && (gdbarch
->skip_prologue
== 0))
746 fprintf_unfiltered (log
, "\n\tskip_prologue");
747 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
748 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
749 && (gdbarch
->inner_than
== 0))
750 fprintf_unfiltered (log
, "\n\tinner_than");
751 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
752 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
753 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
754 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
755 && (gdbarch
->decr_pc_after_break
== -1))
756 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
757 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
758 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
759 && (gdbarch
->function_start_offset
== -1))
760 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
761 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
762 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
763 && (gdbarch
->frame_args_skip
== -1))
764 fprintf_unfiltered (log
, "\n\tframe_args_skip");
765 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
766 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
767 && (gdbarch
->frame_chain
== 0))
768 fprintf_unfiltered (log
, "\n\tframe_chain");
769 /* Skip verify of frame_chain_valid, has predicate */
770 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
771 && (gdbarch
->frame_saved_pc
== 0))
772 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
773 /* Skip verify of frame_args_address, invalid_p == 0 */
774 /* Skip verify of frame_locals_address, invalid_p == 0 */
775 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
776 && (gdbarch
->saved_pc_after_call
== 0))
777 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
778 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
779 && (gdbarch
->frame_num_args
== 0))
780 fprintf_unfiltered (log
, "\n\tframe_num_args");
781 /* Skip verify of stack_align, has predicate */
782 /* Skip verify of frame_align, has predicate */
783 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
784 /* Skip verify of reg_struct_has_addr, has predicate */
785 /* Skip verify of save_dummy_frame_tos, has predicate */
786 if (gdbarch
->float_format
== 0)
787 gdbarch
->float_format
= default_float_format (gdbarch
);
788 if (gdbarch
->double_format
== 0)
789 gdbarch
->double_format
= default_double_format (gdbarch
);
790 if (gdbarch
->long_double_format
== 0)
791 gdbarch
->long_double_format
= default_double_format (gdbarch
);
792 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
793 /* Skip verify of addr_bits_remove, invalid_p == 0 */
794 /* Skip verify of smash_text_address, invalid_p == 0 */
795 /* Skip verify of software_single_step, has predicate */
796 /* Skip verify of print_insn, invalid_p == 0 */
797 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
798 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
799 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
800 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
801 /* Skip verify of sigtramp_start, has predicate */
802 /* Skip verify of sigtramp_end, has predicate */
803 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
804 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
805 /* Skip verify of dwarf2_build_frame_info, has predicate */
806 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
807 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
808 /* Skip verify of name_of_malloc, invalid_p == 0 */
809 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
810 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
811 /* Skip verify of address_class_type_flags, has predicate */
812 /* Skip verify of address_class_type_flags_to_name, has predicate */
813 /* Skip verify of address_class_name_to_type_flags, has predicate */
814 /* Skip verify of register_reggroup_p, invalid_p == 0 */
815 buf
= ui_file_xstrdup (log
, &dummy
);
816 make_cleanup (xfree
, buf
);
817 if (strlen (buf
) > 0)
818 internal_error (__FILE__
, __LINE__
,
819 "verify_gdbarch: the following are invalid ...%s",
821 do_cleanups (cleanups
);
825 /* Print out the details of the current architecture. */
827 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
828 just happens to match the global variable ``current_gdbarch''. That
829 way macros refering to that variable get the local and not the global
830 version - ulgh. Once everything is parameterised with gdbarch, this
834 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
842 gdbarch_frame_align_p (current_gdbarch
));
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: frame_align = 0x%08lx\n",
846 (long) current_gdbarch
->frame_align
);
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
850 (long) current_gdbarch
->in_function_epilogue_p
);
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
854 (long) current_gdbarch
->register_reggroup_p
);
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
858 gdbarch_pseudo_register_read_p (current_gdbarch
));
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
862 (long) current_gdbarch
->pseudo_register_read
);
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
866 gdbarch_pseudo_register_write_p (current_gdbarch
));
868 fprintf_unfiltered (file
,
869 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
870 (long) current_gdbarch
->pseudo_register_write
);
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
874 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
878 (long) current_gdbarch
->address_class_name_to_type_flags
);
879 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: %s # %s\n",
882 "ADDRESS_CLASS_TYPE_FLAGS_P()",
883 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
886 ADDRESS_CLASS_TYPE_FLAGS_P ());
888 #ifdef ADDRESS_CLASS_TYPE_FLAGS
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: %s # %s\n",
891 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
892 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
896 (long) current_gdbarch
->address_class_type_flags
897 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
902 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
906 (long) current_gdbarch
->address_class_type_flags_to_name
);
907 #ifdef ADDRESS_TO_POINTER
909 /* Macro might contain `[{}]' when not multi-arch */
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: %s # %s\n",
912 "ADDRESS_TO_POINTER(type, buf, addr)",
913 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
918 (long) current_gdbarch
->address_to_pointer
919 /*ADDRESS_TO_POINTER ()*/);
921 #ifdef ADDR_BITS_REMOVE
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: %s # %s\n",
924 "ADDR_BITS_REMOVE(addr)",
925 XSTRING (ADDR_BITS_REMOVE (addr
)));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
929 (long) current_gdbarch
->addr_bits_remove
930 /*ADDR_BITS_REMOVE ()*/);
932 #ifdef BELIEVE_PCC_PROMOTION
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
935 XSTRING (BELIEVE_PCC_PROMOTION
));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
938 BELIEVE_PCC_PROMOTION
);
940 #ifdef BELIEVE_PCC_PROMOTION_TYPE
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
943 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
946 BELIEVE_PCC_PROMOTION_TYPE
);
948 #ifdef BREAKPOINT_FROM_PC
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: %s # %s\n",
951 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
952 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
954 fprintf_unfiltered (file
,
955 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
956 (long) current_gdbarch
->breakpoint_from_pc
957 /*BREAKPOINT_FROM_PC ()*/);
959 #ifdef CALL_DUMMY_ADDRESS
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: %s # %s\n",
962 "CALL_DUMMY_ADDRESS()",
963 XSTRING (CALL_DUMMY_ADDRESS ()));
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
967 (long) current_gdbarch
->call_dummy_address
968 /*CALL_DUMMY_ADDRESS ()*/);
970 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
973 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
974 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
977 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
979 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
982 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
985 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
987 #ifdef CALL_DUMMY_LENGTH
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
990 XSTRING (CALL_DUMMY_LENGTH
));
991 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
996 #ifdef CALL_DUMMY_LOCATION
997 fprintf_unfiltered (file
,
998 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
999 XSTRING (CALL_DUMMY_LOCATION
));
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
1002 CALL_DUMMY_LOCATION
);
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1007 XSTRING (CALL_DUMMY_P
));
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: CALL_DUMMY_P = %d\n",
1012 #ifdef CALL_DUMMY_STACK_ADJUST
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1015 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1016 if (CALL_DUMMY_STACK_ADJUST_P
)
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1019 (long) CALL_DUMMY_STACK_ADJUST
);
1021 #ifdef CALL_DUMMY_STACK_ADJUST_P
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1024 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1027 (long) CALL_DUMMY_STACK_ADJUST_P
);
1029 #ifdef CALL_DUMMY_START_OFFSET
1030 fprintf_unfiltered (file
,
1031 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1032 XSTRING (CALL_DUMMY_START_OFFSET
));
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1035 (long) CALL_DUMMY_START_OFFSET
);
1037 #ifdef CALL_DUMMY_WORDS
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1040 XSTRING (CALL_DUMMY_WORDS
));
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1043 (long) CALL_DUMMY_WORDS
);
1045 #ifdef CANNOT_FETCH_REGISTER
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: %s # %s\n",
1048 "CANNOT_FETCH_REGISTER(regnum)",
1049 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
1053 (long) current_gdbarch
->cannot_fetch_register
1054 /*CANNOT_FETCH_REGISTER ()*/);
1056 #ifdef CANNOT_STEP_BREAKPOINT
1057 fprintf_unfiltered (file
,
1058 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1059 XSTRING (CANNOT_STEP_BREAKPOINT
));
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1062 CANNOT_STEP_BREAKPOINT
);
1064 #ifdef CANNOT_STORE_REGISTER
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: %s # %s\n",
1067 "CANNOT_STORE_REGISTER(regnum)",
1068 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
1072 (long) current_gdbarch
->cannot_store_register
1073 /*CANNOT_STORE_REGISTER ()*/);
1075 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1077 /* Macro might contain `[{}]' when not multi-arch */
1078 fprintf_unfiltered (file
,
1079 "gdbarch_dump: %s # %s\n",
1080 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1081 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1086 (long) current_gdbarch
->coff_make_msymbol_special
1087 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1092 (long) current_gdbarch
->construct_inferior_arguments
);
1093 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: %s # %s\n",
1096 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1097 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1101 (long) current_gdbarch
->convert_from_func_ptr_addr
1102 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1104 #ifdef CONVERT_REGISTER_P
1105 fprintf_unfiltered (file
,
1106 "gdbarch_dump: %s # %s\n",
1107 "CONVERT_REGISTER_P(regnum)",
1108 XSTRING (CONVERT_REGISTER_P (regnum
)));
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1112 (long) current_gdbarch
->convert_register_p
1113 /*CONVERT_REGISTER_P ()*/);
1115 #ifdef DECR_PC_AFTER_BREAK
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1118 XSTRING (DECR_PC_AFTER_BREAK
));
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1121 (long) DECR_PC_AFTER_BREAK
);
1123 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: %s # %s\n",
1126 "DEPRECATED_DO_REGISTERS_INFO_P()",
1127 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1130 DEPRECATED_DO_REGISTERS_INFO_P ());
1132 #ifdef DEPRECATED_DO_REGISTERS_INFO
1134 /* Macro might contain `[{}]' when not multi-arch */
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: %s # %s\n",
1137 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1138 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1143 (long) current_gdbarch
->deprecated_do_registers_info
1144 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1146 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1148 /* Macro might contain `[{}]' when not multi-arch */
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: %s # %s\n",
1151 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1152 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1157 (long) current_gdbarch
->deprecated_extract_return_value
1158 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1160 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: %s # %s\n",
1163 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1164 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1165 fprintf_unfiltered (file
,
1166 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1167 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1169 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: %s # %s\n",
1172 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1173 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1177 (long) current_gdbarch
->deprecated_extract_struct_value_address
1178 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1180 #ifdef DEPRECATED_INIT_FRAME_PC_P
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: %s # %s\n",
1183 "DEPRECATED_INIT_FRAME_PC_P()",
1184 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1187 DEPRECATED_INIT_FRAME_PC_P ());
1189 #ifdef DEPRECATED_INIT_FRAME_PC
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: %s # %s\n",
1192 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1193 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1197 (long) current_gdbarch
->deprecated_init_frame_pc
1198 /*DEPRECATED_INIT_FRAME_PC ()*/);
1200 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: %s # %s\n",
1203 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1204 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1207 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1209 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: %s # %s\n",
1212 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1213 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1217 (long) current_gdbarch
->deprecated_init_frame_pc_first
1218 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1220 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: %s # %s\n",
1223 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1224 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1225 fprintf_unfiltered (file
,
1226 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1227 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1229 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: %s # %s\n",
1232 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1233 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1237 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1238 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1240 #ifdef DEPRECATED_STORE_RETURN_VALUE
1242 /* Macro might contain `[{}]' when not multi-arch */
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: %s # %s\n",
1245 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1246 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1249 fprintf_unfiltered (file
,
1250 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1251 (long) current_gdbarch
->deprecated_store_return_value
1252 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1254 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1255 fprintf_unfiltered (file
,
1256 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1257 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
));
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1260 DEPRECATED_USE_GENERIC_DUMMY_FRAMES
);
1262 #ifdef DWARF2_BUILD_FRAME_INFO_P
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: %s # %s\n",
1265 "DWARF2_BUILD_FRAME_INFO_P()",
1266 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1267 fprintf_unfiltered (file
,
1268 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1269 DWARF2_BUILD_FRAME_INFO_P ());
1271 #ifdef DWARF2_BUILD_FRAME_INFO
1273 /* Macro might contain `[{}]' when not multi-arch */
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: %s # %s\n",
1276 "DWARF2_BUILD_FRAME_INFO(objfile)",
1277 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1282 (long) current_gdbarch
->dwarf2_build_frame_info
1283 /*DWARF2_BUILD_FRAME_INFO ()*/);
1285 #ifdef DWARF2_REG_TO_REGNUM
1286 fprintf_unfiltered (file
,
1287 "gdbarch_dump: %s # %s\n",
1288 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1289 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1293 (long) current_gdbarch
->dwarf2_reg_to_regnum
1294 /*DWARF2_REG_TO_REGNUM ()*/);
1296 #ifdef DWARF_REG_TO_REGNUM
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: %s # %s\n",
1299 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1300 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1304 (long) current_gdbarch
->dwarf_reg_to_regnum
1305 /*DWARF_REG_TO_REGNUM ()*/);
1307 #ifdef ECOFF_REG_TO_REGNUM
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: %s # %s\n",
1310 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1311 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1315 (long) current_gdbarch
->ecoff_reg_to_regnum
1316 /*ECOFF_REG_TO_REGNUM ()*/);
1318 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1320 /* Macro might contain `[{}]' when not multi-arch */
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: %s # %s\n",
1323 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1324 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1329 (long) current_gdbarch
->elf_make_msymbol_special
1330 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1332 #ifdef EXTRACT_RETURN_VALUE
1334 /* Macro might contain `[{}]' when not multi-arch */
1335 fprintf_unfiltered (file
,
1336 "gdbarch_dump: %s # %s\n",
1337 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1338 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1343 (long) current_gdbarch
->extract_return_value
1344 /*EXTRACT_RETURN_VALUE ()*/);
1346 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1347 fprintf_unfiltered (file
,
1348 "gdbarch_dump: %s # %s\n",
1349 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1350 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1353 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1355 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1356 fprintf_unfiltered (file
,
1357 "gdbarch_dump: %s # %s\n",
1358 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1359 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1363 (long) current_gdbarch
->extract_struct_value_address
1364 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1366 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1369 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1372 EXTRA_STACK_ALIGNMENT_NEEDED
);
1374 #ifdef FIX_CALL_DUMMY
1376 /* Macro might contain `[{}]' when not multi-arch */
1377 fprintf_unfiltered (file
,
1378 "gdbarch_dump: %s # %s\n",
1379 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1380 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1385 (long) current_gdbarch
->fix_call_dummy
1386 /*FIX_CALL_DUMMY ()*/);
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: FP0_REGNUM # %s\n",
1391 XSTRING (FP0_REGNUM
));
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: FP0_REGNUM = %d\n",
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: FP_REGNUM # %s\n",
1399 XSTRING (FP_REGNUM
));
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: FP_REGNUM = %d\n",
1404 #ifdef FRAMELESS_FUNCTION_INVOCATION
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: %s # %s\n",
1407 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1408 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1412 (long) current_gdbarch
->frameless_function_invocation
1413 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1415 #ifdef FRAME_ARGS_ADDRESS
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: %s # %s\n",
1418 "FRAME_ARGS_ADDRESS(fi)",
1419 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1423 (long) current_gdbarch
->frame_args_address
1424 /*FRAME_ARGS_ADDRESS ()*/);
1426 #ifdef FRAME_ARGS_SKIP
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1429 XSTRING (FRAME_ARGS_SKIP
));
1430 fprintf_unfiltered (file
,
1431 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1432 (long) FRAME_ARGS_SKIP
);
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: %s # %s\n",
1437 "FRAME_CHAIN(frame)",
1438 XSTRING (FRAME_CHAIN (frame
)));
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: FRAME_CHAIN = <0x%08lx>\n",
1442 (long) current_gdbarch
->frame_chain
1443 /*FRAME_CHAIN ()*/);
1445 #ifdef FRAME_CHAIN_VALID_P
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: %s # %s\n",
1448 "FRAME_CHAIN_VALID_P()",
1449 XSTRING (FRAME_CHAIN_VALID_P ()));
1450 fprintf_unfiltered (file
,
1451 "gdbarch_dump: FRAME_CHAIN_VALID_P() = %d\n",
1452 FRAME_CHAIN_VALID_P ());
1454 #ifdef FRAME_CHAIN_VALID
1455 fprintf_unfiltered (file
,
1456 "gdbarch_dump: %s # %s\n",
1457 "FRAME_CHAIN_VALID(chain, thisframe)",
1458 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: FRAME_CHAIN_VALID = <0x%08lx>\n",
1462 (long) current_gdbarch
->frame_chain_valid
1463 /*FRAME_CHAIN_VALID ()*/);
1465 #ifdef FRAME_INIT_SAVED_REGS_P
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: %s # %s\n",
1468 "FRAME_INIT_SAVED_REGS_P()",
1469 XSTRING (FRAME_INIT_SAVED_REGS_P ()));
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: FRAME_INIT_SAVED_REGS_P() = %d\n",
1472 FRAME_INIT_SAVED_REGS_P ());
1474 #ifdef FRAME_INIT_SAVED_REGS
1476 /* Macro might contain `[{}]' when not multi-arch */
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: %s # %s\n",
1479 "FRAME_INIT_SAVED_REGS(frame)",
1480 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1485 (long) current_gdbarch
->frame_init_saved_regs
1486 /*FRAME_INIT_SAVED_REGS ()*/);
1488 #ifdef FRAME_LOCALS_ADDRESS
1489 fprintf_unfiltered (file
,
1490 "gdbarch_dump: %s # %s\n",
1491 "FRAME_LOCALS_ADDRESS(fi)",
1492 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1494 fprintf_unfiltered (file
,
1495 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1496 (long) current_gdbarch
->frame_locals_address
1497 /*FRAME_LOCALS_ADDRESS ()*/);
1499 #ifdef FRAME_NUM_ARGS
1500 fprintf_unfiltered (file
,
1501 "gdbarch_dump: %s # %s\n",
1502 "FRAME_NUM_ARGS(frame)",
1503 XSTRING (FRAME_NUM_ARGS (frame
)));
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1507 (long) current_gdbarch
->frame_num_args
1508 /*FRAME_NUM_ARGS ()*/);
1510 #ifdef FRAME_SAVED_PC
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: %s # %s\n",
1513 "FRAME_SAVED_PC(fi)",
1514 XSTRING (FRAME_SAVED_PC (fi
)));
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: FRAME_SAVED_PC = <0x%08lx>\n",
1518 (long) current_gdbarch
->frame_saved_pc
1519 /*FRAME_SAVED_PC ()*/);
1521 #ifdef FUNCTION_START_OFFSET
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1524 XSTRING (FUNCTION_START_OFFSET
));
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1527 (long) FUNCTION_START_OFFSET
);
1529 #ifdef GET_LONGJMP_TARGET_P
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: %s # %s\n",
1532 "GET_LONGJMP_TARGET_P()",
1533 XSTRING (GET_LONGJMP_TARGET_P ()));
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1536 GET_LONGJMP_TARGET_P ());
1538 #ifdef GET_LONGJMP_TARGET
1539 fprintf_unfiltered (file
,
1540 "gdbarch_dump: %s # %s\n",
1541 "GET_LONGJMP_TARGET(pc)",
1542 XSTRING (GET_LONGJMP_TARGET (pc
)));
1544 fprintf_unfiltered (file
,
1545 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1546 (long) current_gdbarch
->get_longjmp_target
1547 /*GET_LONGJMP_TARGET ()*/);
1549 #ifdef GET_SAVED_REGISTER_P
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: %s # %s\n",
1552 "GET_SAVED_REGISTER_P()",
1553 XSTRING (GET_SAVED_REGISTER_P ()));
1554 fprintf_unfiltered (file
,
1555 "gdbarch_dump: GET_SAVED_REGISTER_P() = %d\n",
1556 GET_SAVED_REGISTER_P ());
1558 #ifdef GET_SAVED_REGISTER
1560 /* Macro might contain `[{}]' when not multi-arch */
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: %s # %s\n",
1563 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1564 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: GET_SAVED_REGISTER = <0x%08lx>\n",
1569 (long) current_gdbarch
->get_saved_register
1570 /*GET_SAVED_REGISTER ()*/);
1572 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1575 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1578 HAVE_NONSTEPPABLE_WATCHPOINT
);
1580 #ifdef INIT_EXTRA_FRAME_INFO_P
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: %s # %s\n",
1583 "INIT_EXTRA_FRAME_INFO_P()",
1584 XSTRING (INIT_EXTRA_FRAME_INFO_P ()));
1585 fprintf_unfiltered (file
,
1586 "gdbarch_dump: INIT_EXTRA_FRAME_INFO_P() = %d\n",
1587 INIT_EXTRA_FRAME_INFO_P ());
1589 #ifdef INIT_EXTRA_FRAME_INFO
1591 /* Macro might contain `[{}]' when not multi-arch */
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: %s # %s\n",
1594 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1595 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1600 (long) current_gdbarch
->init_extra_frame_info
1601 /*INIT_EXTRA_FRAME_INFO ()*/);
1604 fprintf_unfiltered (file
,
1605 "gdbarch_dump: %s # %s\n",
1606 "INNER_THAN(lhs, rhs)",
1607 XSTRING (INNER_THAN (lhs
, rhs
)));
1609 fprintf_unfiltered (file
,
1610 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1611 (long) current_gdbarch
->inner_than
1614 #ifdef INTEGER_TO_ADDRESS_P
1615 fprintf_unfiltered (file
,
1616 "gdbarch_dump: %s # %s\n",
1617 "INTEGER_TO_ADDRESS_P()",
1618 XSTRING (INTEGER_TO_ADDRESS_P ()));
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1621 INTEGER_TO_ADDRESS_P ());
1623 #ifdef INTEGER_TO_ADDRESS
1624 fprintf_unfiltered (file
,
1625 "gdbarch_dump: %s # %s\n",
1626 "INTEGER_TO_ADDRESS(type, buf)",
1627 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1631 (long) current_gdbarch
->integer_to_address
1632 /*INTEGER_TO_ADDRESS ()*/);
1634 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: %s # %s\n",
1637 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1638 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1642 (long) current_gdbarch
->in_solib_call_trampoline
1643 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1645 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1646 fprintf_unfiltered (file
,
1647 "gdbarch_dump: %s # %s\n",
1648 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1649 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1651 fprintf_unfiltered (file
,
1652 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1653 (long) current_gdbarch
->in_solib_return_trampoline
1654 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1656 #ifdef MAX_REGISTER_RAW_SIZE
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1659 XSTRING (MAX_REGISTER_RAW_SIZE
));
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1662 MAX_REGISTER_RAW_SIZE
);
1664 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1665 fprintf_unfiltered (file
,
1666 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1667 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1670 MAX_REGISTER_VIRTUAL_SIZE
);
1672 #ifdef MEMORY_INSERT_BREAKPOINT
1673 fprintf_unfiltered (file
,
1674 "gdbarch_dump: %s # %s\n",
1675 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1676 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1680 (long) current_gdbarch
->memory_insert_breakpoint
1681 /*MEMORY_INSERT_BREAKPOINT ()*/);
1683 #ifdef MEMORY_REMOVE_BREAKPOINT
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: %s # %s\n",
1686 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1687 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1689 fprintf_unfiltered (file
,
1690 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1691 (long) current_gdbarch
->memory_remove_breakpoint
1692 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1694 #ifdef NAME_OF_MALLOC
1695 fprintf_unfiltered (file
,
1696 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1697 XSTRING (NAME_OF_MALLOC
));
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: NPC_REGNUM # %s\n",
1705 XSTRING (NPC_REGNUM
));
1706 fprintf_unfiltered (file
,
1707 "gdbarch_dump: NPC_REGNUM = %d\n",
1710 #ifdef NUM_PSEUDO_REGS
1711 fprintf_unfiltered (file
,
1712 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1713 XSTRING (NUM_PSEUDO_REGS
));
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: NUM_REGS # %s\n",
1721 XSTRING (NUM_REGS
));
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: NUM_REGS = %d\n",
1726 #ifdef PARM_BOUNDARY
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1729 XSTRING (PARM_BOUNDARY
));
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1734 #ifdef PC_IN_SIGTRAMP
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: %s # %s\n",
1737 "PC_IN_SIGTRAMP(pc, name)",
1738 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1742 (long) current_gdbarch
->pc_in_sigtramp
1743 /*PC_IN_SIGTRAMP ()*/);
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: PC_REGNUM # %s\n",
1748 XSTRING (PC_REGNUM
));
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: PC_REGNUM = %d\n",
1753 #ifdef POINTER_TO_ADDRESS
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: %s # %s\n",
1756 "POINTER_TO_ADDRESS(type, buf)",
1757 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1761 (long) current_gdbarch
->pointer_to_address
1762 /*POINTER_TO_ADDRESS ()*/);
1766 /* Macro might contain `[{}]' when not multi-arch */
1767 fprintf_unfiltered (file
,
1768 "gdbarch_dump: %s # %s\n",
1770 XSTRING (POP_FRAME (-)));
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: POP_FRAME = <0x%08lx>\n",
1775 (long) current_gdbarch
->pop_frame
1778 #ifdef PREPARE_TO_PROCEED
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: %s # %s\n",
1781 "PREPARE_TO_PROCEED(select_it)",
1782 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1786 (long) current_gdbarch
->prepare_to_proceed
1787 /*PREPARE_TO_PROCEED ()*/);
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1792 gdbarch_print_float_info_p (current_gdbarch
));
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: print_float_info = 0x%08lx\n",
1796 (long) current_gdbarch
->print_float_info
);
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1800 (long) current_gdbarch
->print_registers_info
);
1802 fprintf_unfiltered (file
,
1803 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1804 gdbarch_print_vector_info_p (current_gdbarch
));
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1808 (long) current_gdbarch
->print_vector_info
);
1809 #ifdef PROLOGUE_FRAMELESS_P
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: %s # %s\n",
1812 "PROLOGUE_FRAMELESS_P(ip)",
1813 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1817 (long) current_gdbarch
->prologue_frameless_p
1818 /*PROLOGUE_FRAMELESS_P ()*/);
1821 fprintf_unfiltered (file
,
1822 "gdbarch_dump: PS_REGNUM # %s\n",
1823 XSTRING (PS_REGNUM
));
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: PS_REGNUM = %d\n",
1828 #ifdef PUSH_ARGUMENTS
1829 fprintf_unfiltered (file
,
1830 "gdbarch_dump: %s # %s\n",
1831 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1832 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n",
1836 (long) current_gdbarch
->push_arguments
1837 /*PUSH_ARGUMENTS ()*/);
1839 #ifdef PUSH_DUMMY_FRAME
1841 /* Macro might contain `[{}]' when not multi-arch */
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: %s # %s\n",
1844 "PUSH_DUMMY_FRAME(-)",
1845 XSTRING (PUSH_DUMMY_FRAME (-)));
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: PUSH_DUMMY_FRAME = <0x%08lx>\n",
1850 (long) current_gdbarch
->push_dummy_frame
1851 /*PUSH_DUMMY_FRAME ()*/);
1853 #ifdef PUSH_RETURN_ADDRESS_P
1854 fprintf_unfiltered (file
,
1855 "gdbarch_dump: %s # %s\n",
1856 "PUSH_RETURN_ADDRESS_P()",
1857 XSTRING (PUSH_RETURN_ADDRESS_P ()));
1858 fprintf_unfiltered (file
,
1859 "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n",
1860 PUSH_RETURN_ADDRESS_P ());
1862 #ifdef PUSH_RETURN_ADDRESS
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: %s # %s\n",
1865 "PUSH_RETURN_ADDRESS(pc, sp)",
1866 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1870 (long) current_gdbarch
->push_return_address
1871 /*PUSH_RETURN_ADDRESS ()*/);
1873 #ifdef REGISTER_BYTE
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: %s # %s\n",
1876 "REGISTER_BYTE(reg_nr)",
1877 XSTRING (REGISTER_BYTE (reg_nr
)));
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1881 (long) current_gdbarch
->register_byte
1882 /*REGISTER_BYTE ()*/);
1884 #ifdef REGISTER_BYTES
1885 fprintf_unfiltered (file
,
1886 "gdbarch_dump: REGISTER_BYTES # %s\n",
1887 XSTRING (REGISTER_BYTES
));
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: REGISTER_BYTES = %d\n",
1892 #ifdef REGISTER_BYTES_OK_P
1893 fprintf_unfiltered (file
,
1894 "gdbarch_dump: %s # %s\n",
1895 "REGISTER_BYTES_OK_P()",
1896 XSTRING (REGISTER_BYTES_OK_P ()));
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1899 REGISTER_BYTES_OK_P ());
1901 #ifdef REGISTER_BYTES_OK
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: %s # %s\n",
1904 "REGISTER_BYTES_OK(nr_bytes)",
1905 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1907 fprintf_unfiltered (file
,
1908 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1909 (long) current_gdbarch
->register_bytes_ok
1910 /*REGISTER_BYTES_OK ()*/);
1912 #ifdef REGISTER_CONVERTIBLE
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: %s # %s\n",
1915 "REGISTER_CONVERTIBLE(nr)",
1916 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
1920 (long) current_gdbarch
->register_convertible
1921 /*REGISTER_CONVERTIBLE ()*/);
1923 #ifdef REGISTER_CONVERT_TO_RAW
1925 /* Macro might contain `[{}]' when not multi-arch */
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: %s # %s\n",
1928 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1929 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1934 (long) current_gdbarch
->register_convert_to_raw
1935 /*REGISTER_CONVERT_TO_RAW ()*/);
1937 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1939 /* Macro might contain `[{}]' when not multi-arch */
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: %s # %s\n",
1942 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1943 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1948 (long) current_gdbarch
->register_convert_to_virtual
1949 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1951 #ifdef REGISTER_NAME
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: %s # %s\n",
1954 "REGISTER_NAME(regnr)",
1955 XSTRING (REGISTER_NAME (regnr
)));
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1959 (long) current_gdbarch
->register_name
1960 /*REGISTER_NAME ()*/);
1962 #ifdef REGISTER_RAW_SIZE
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: %s # %s\n",
1965 "REGISTER_RAW_SIZE(reg_nr)",
1966 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
1970 (long) current_gdbarch
->register_raw_size
1971 /*REGISTER_RAW_SIZE ()*/);
1973 #ifdef REGISTER_SIM_REGNO
1974 fprintf_unfiltered (file
,
1975 "gdbarch_dump: %s # %s\n",
1976 "REGISTER_SIM_REGNO(reg_nr)",
1977 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1981 (long) current_gdbarch
->register_sim_regno
1982 /*REGISTER_SIM_REGNO ()*/);
1984 #ifdef REGISTER_SIZE
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: REGISTER_SIZE # %s\n",
1987 XSTRING (REGISTER_SIZE
));
1988 fprintf_unfiltered (file
,
1989 "gdbarch_dump: REGISTER_SIZE = %d\n",
1992 #ifdef REGISTER_TO_VALUE
1994 /* Macro might contain `[{}]' when not multi-arch */
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: %s # %s\n",
1997 "REGISTER_TO_VALUE(regnum, type, from, to)",
1998 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
2001 fprintf_unfiltered (file
,
2002 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2003 (long) current_gdbarch
->register_to_value
2004 /*REGISTER_TO_VALUE ()*/);
2006 #ifdef REGISTER_VIRTUAL_SIZE
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: %s # %s\n",
2009 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2010 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
2012 fprintf_unfiltered (file
,
2013 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2014 (long) current_gdbarch
->register_virtual_size
2015 /*REGISTER_VIRTUAL_SIZE ()*/);
2017 #ifdef REGISTER_VIRTUAL_TYPE
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: %s # %s\n",
2020 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2021 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
2023 fprintf_unfiltered (file
,
2024 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2025 (long) current_gdbarch
->register_virtual_type
2026 /*REGISTER_VIRTUAL_TYPE ()*/);
2028 #ifdef REG_STRUCT_HAS_ADDR_P
2029 fprintf_unfiltered (file
,
2030 "gdbarch_dump: %s # %s\n",
2031 "REG_STRUCT_HAS_ADDR_P()",
2032 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2035 REG_STRUCT_HAS_ADDR_P ());
2037 #ifdef REG_STRUCT_HAS_ADDR
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: %s # %s\n",
2040 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2041 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
2043 fprintf_unfiltered (file
,
2044 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2045 (long) current_gdbarch
->reg_struct_has_addr
2046 /*REG_STRUCT_HAS_ADDR ()*/);
2048 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2050 /* Macro might contain `[{}]' when not multi-arch */
2051 fprintf_unfiltered (file
,
2052 "gdbarch_dump: %s # %s\n",
2053 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2054 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
2057 fprintf_unfiltered (file
,
2058 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2059 (long) current_gdbarch
->remote_translate_xfer_address
2060 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2062 #ifdef RETURN_VALUE_ON_STACK
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: %s # %s\n",
2065 "RETURN_VALUE_ON_STACK(type)",
2066 XSTRING (RETURN_VALUE_ON_STACK (type
)));
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2070 (long) current_gdbarch
->return_value_on_stack
2071 /*RETURN_VALUE_ON_STACK ()*/);
2073 #ifdef SAVED_PC_AFTER_CALL
2074 fprintf_unfiltered (file
,
2075 "gdbarch_dump: %s # %s\n",
2076 "SAVED_PC_AFTER_CALL(frame)",
2077 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
2079 fprintf_unfiltered (file
,
2080 "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n",
2081 (long) current_gdbarch
->saved_pc_after_call
2082 /*SAVED_PC_AFTER_CALL ()*/);
2084 #ifdef SAVE_DUMMY_FRAME_TOS_P
2085 fprintf_unfiltered (file
,
2086 "gdbarch_dump: %s # %s\n",
2087 "SAVE_DUMMY_FRAME_TOS_P()",
2088 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2091 SAVE_DUMMY_FRAME_TOS_P ());
2093 #ifdef SAVE_DUMMY_FRAME_TOS
2095 /* Macro might contain `[{}]' when not multi-arch */
2096 fprintf_unfiltered (file
,
2097 "gdbarch_dump: %s # %s\n",
2098 "SAVE_DUMMY_FRAME_TOS(sp)",
2099 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
2102 fprintf_unfiltered (file
,
2103 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2104 (long) current_gdbarch
->save_dummy_frame_tos
2105 /*SAVE_DUMMY_FRAME_TOS ()*/);
2107 #ifdef SDB_REG_TO_REGNUM
2108 fprintf_unfiltered (file
,
2109 "gdbarch_dump: %s # %s\n",
2110 "SDB_REG_TO_REGNUM(sdb_regnr)",
2111 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2115 (long) current_gdbarch
->sdb_reg_to_regnum
2116 /*SDB_REG_TO_REGNUM ()*/);
2118 #ifdef SIGTRAMP_END_P
2119 fprintf_unfiltered (file
,
2120 "gdbarch_dump: %s # %s\n",
2122 XSTRING (SIGTRAMP_END_P ()));
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2128 fprintf_unfiltered (file
,
2129 "gdbarch_dump: %s # %s\n",
2131 XSTRING (SIGTRAMP_END (pc
)));
2133 fprintf_unfiltered (file
,
2134 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2135 (long) current_gdbarch
->sigtramp_end
2136 /*SIGTRAMP_END ()*/);
2138 #ifdef SIGTRAMP_START_P
2139 fprintf_unfiltered (file
,
2140 "gdbarch_dump: %s # %s\n",
2141 "SIGTRAMP_START_P()",
2142 XSTRING (SIGTRAMP_START_P ()));
2143 fprintf_unfiltered (file
,
2144 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2145 SIGTRAMP_START_P ());
2147 #ifdef SIGTRAMP_START
2148 fprintf_unfiltered (file
,
2149 "gdbarch_dump: %s # %s\n",
2150 "SIGTRAMP_START(pc)",
2151 XSTRING (SIGTRAMP_START (pc
)));
2153 fprintf_unfiltered (file
,
2154 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2155 (long) current_gdbarch
->sigtramp_start
2156 /*SIGTRAMP_START ()*/);
2158 #ifdef SIZEOF_CALL_DUMMY_WORDS
2159 fprintf_unfiltered (file
,
2160 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2161 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
2162 fprintf_unfiltered (file
,
2163 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
2164 (long) SIZEOF_CALL_DUMMY_WORDS
);
2166 #ifdef SKIP_PROLOGUE
2167 fprintf_unfiltered (file
,
2168 "gdbarch_dump: %s # %s\n",
2169 "SKIP_PROLOGUE(ip)",
2170 XSTRING (SKIP_PROLOGUE (ip
)));
2172 fprintf_unfiltered (file
,
2173 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2174 (long) current_gdbarch
->skip_prologue
2175 /*SKIP_PROLOGUE ()*/);
2177 #ifdef SKIP_TRAMPOLINE_CODE
2178 fprintf_unfiltered (file
,
2179 "gdbarch_dump: %s # %s\n",
2180 "SKIP_TRAMPOLINE_CODE(pc)",
2181 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
2183 fprintf_unfiltered (file
,
2184 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2185 (long) current_gdbarch
->skip_trampoline_code
2186 /*SKIP_TRAMPOLINE_CODE ()*/);
2188 #ifdef SMASH_TEXT_ADDRESS
2189 fprintf_unfiltered (file
,
2190 "gdbarch_dump: %s # %s\n",
2191 "SMASH_TEXT_ADDRESS(addr)",
2192 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2194 fprintf_unfiltered (file
,
2195 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2196 (long) current_gdbarch
->smash_text_address
2197 /*SMASH_TEXT_ADDRESS ()*/);
2199 #ifdef SOFTWARE_SINGLE_STEP_P
2200 fprintf_unfiltered (file
,
2201 "gdbarch_dump: %s # %s\n",
2202 "SOFTWARE_SINGLE_STEP_P()",
2203 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2204 fprintf_unfiltered (file
,
2205 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2206 SOFTWARE_SINGLE_STEP_P ());
2208 #ifdef SOFTWARE_SINGLE_STEP
2210 /* Macro might contain `[{}]' when not multi-arch */
2211 fprintf_unfiltered (file
,
2212 "gdbarch_dump: %s # %s\n",
2213 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2214 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2217 fprintf_unfiltered (file
,
2218 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2219 (long) current_gdbarch
->software_single_step
2220 /*SOFTWARE_SINGLE_STEP ()*/);
2223 fprintf_unfiltered (file
,
2224 "gdbarch_dump: SP_REGNUM # %s\n",
2225 XSTRING (SP_REGNUM
));
2226 fprintf_unfiltered (file
,
2227 "gdbarch_dump: SP_REGNUM = %d\n",
2230 #ifdef STAB_REG_TO_REGNUM
2231 fprintf_unfiltered (file
,
2232 "gdbarch_dump: %s # %s\n",
2233 "STAB_REG_TO_REGNUM(stab_regnr)",
2234 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2236 fprintf_unfiltered (file
,
2237 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2238 (long) current_gdbarch
->stab_reg_to_regnum
2239 /*STAB_REG_TO_REGNUM ()*/);
2241 #ifdef STACK_ALIGN_P
2242 fprintf_unfiltered (file
,
2243 "gdbarch_dump: %s # %s\n",
2245 XSTRING (STACK_ALIGN_P ()));
2246 fprintf_unfiltered (file
,
2247 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2251 fprintf_unfiltered (file
,
2252 "gdbarch_dump: %s # %s\n",
2254 XSTRING (STACK_ALIGN (sp
)));
2256 fprintf_unfiltered (file
,
2257 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2258 (long) current_gdbarch
->stack_align
2259 /*STACK_ALIGN ()*/);
2261 #ifdef STORE_RETURN_VALUE
2263 /* Macro might contain `[{}]' when not multi-arch */
2264 fprintf_unfiltered (file
,
2265 "gdbarch_dump: %s # %s\n",
2266 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2267 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2270 fprintf_unfiltered (file
,
2271 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2272 (long) current_gdbarch
->store_return_value
2273 /*STORE_RETURN_VALUE ()*/);
2275 #ifdef STORE_STRUCT_RETURN
2277 /* Macro might contain `[{}]' when not multi-arch */
2278 fprintf_unfiltered (file
,
2279 "gdbarch_dump: %s # %s\n",
2280 "STORE_STRUCT_RETURN(addr, sp)",
2281 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
2284 fprintf_unfiltered (file
,
2285 "gdbarch_dump: STORE_STRUCT_RETURN = <0x%08lx>\n",
2286 (long) current_gdbarch
->store_struct_return
2287 /*STORE_STRUCT_RETURN ()*/);
2289 #ifdef TARGET_ADDR_BIT
2290 fprintf_unfiltered (file
,
2291 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2292 XSTRING (TARGET_ADDR_BIT
));
2293 fprintf_unfiltered (file
,
2294 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2297 #ifdef TARGET_ARCHITECTURE
2298 fprintf_unfiltered (file
,
2299 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2300 XSTRING (TARGET_ARCHITECTURE
));
2301 if (TARGET_ARCHITECTURE
!= NULL
)
2302 fprintf_unfiltered (file
,
2303 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2304 TARGET_ARCHITECTURE
->printable_name
);
2306 #ifdef TARGET_BFD_VMA_BIT
2307 fprintf_unfiltered (file
,
2308 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2309 XSTRING (TARGET_BFD_VMA_BIT
));
2310 fprintf_unfiltered (file
,
2311 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2312 TARGET_BFD_VMA_BIT
);
2314 #ifdef TARGET_BYTE_ORDER
2315 fprintf_unfiltered (file
,
2316 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2317 XSTRING (TARGET_BYTE_ORDER
));
2318 fprintf_unfiltered (file
,
2319 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2320 (long) TARGET_BYTE_ORDER
);
2322 #ifdef TARGET_CHAR_SIGNED
2323 fprintf_unfiltered (file
,
2324 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2325 XSTRING (TARGET_CHAR_SIGNED
));
2326 fprintf_unfiltered (file
,
2327 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2328 TARGET_CHAR_SIGNED
);
2330 #ifdef TARGET_DOUBLE_BIT
2331 fprintf_unfiltered (file
,
2332 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2333 XSTRING (TARGET_DOUBLE_BIT
));
2334 fprintf_unfiltered (file
,
2335 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2338 #ifdef TARGET_DOUBLE_FORMAT
2339 fprintf_unfiltered (file
,
2340 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2341 XSTRING (TARGET_DOUBLE_FORMAT
));
2342 fprintf_unfiltered (file
,
2343 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2344 (TARGET_DOUBLE_FORMAT
)->name
);
2346 #ifdef TARGET_FLOAT_BIT
2347 fprintf_unfiltered (file
,
2348 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2349 XSTRING (TARGET_FLOAT_BIT
));
2350 fprintf_unfiltered (file
,
2351 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2354 #ifdef TARGET_FLOAT_FORMAT
2355 fprintf_unfiltered (file
,
2356 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2357 XSTRING (TARGET_FLOAT_FORMAT
));
2358 fprintf_unfiltered (file
,
2359 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2360 (TARGET_FLOAT_FORMAT
)->name
);
2362 #ifdef TARGET_INT_BIT
2363 fprintf_unfiltered (file
,
2364 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2365 XSTRING (TARGET_INT_BIT
));
2366 fprintf_unfiltered (file
,
2367 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2370 #ifdef TARGET_LONG_BIT
2371 fprintf_unfiltered (file
,
2372 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2373 XSTRING (TARGET_LONG_BIT
));
2374 fprintf_unfiltered (file
,
2375 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2378 #ifdef TARGET_LONG_DOUBLE_BIT
2379 fprintf_unfiltered (file
,
2380 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2381 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2382 fprintf_unfiltered (file
,
2383 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2384 TARGET_LONG_DOUBLE_BIT
);
2386 #ifdef TARGET_LONG_DOUBLE_FORMAT
2387 fprintf_unfiltered (file
,
2388 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2389 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2390 fprintf_unfiltered (file
,
2391 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2392 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2394 #ifdef TARGET_LONG_LONG_BIT
2395 fprintf_unfiltered (file
,
2396 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2397 XSTRING (TARGET_LONG_LONG_BIT
));
2398 fprintf_unfiltered (file
,
2399 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2400 TARGET_LONG_LONG_BIT
);
2403 fprintf_unfiltered (file
,
2404 "gdbarch_dump: TARGET_OSABI # %s\n",
2405 XSTRING (TARGET_OSABI
));
2406 fprintf_unfiltered (file
,
2407 "gdbarch_dump: TARGET_OSABI = %ld\n",
2408 (long) TARGET_OSABI
);
2410 #ifdef TARGET_PRINT_INSN
2411 fprintf_unfiltered (file
,
2412 "gdbarch_dump: %s # %s\n",
2413 "TARGET_PRINT_INSN(vma, info)",
2414 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2416 fprintf_unfiltered (file
,
2417 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2418 (long) current_gdbarch
->print_insn
2419 /*TARGET_PRINT_INSN ()*/);
2421 #ifdef TARGET_PTR_BIT
2422 fprintf_unfiltered (file
,
2423 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2424 XSTRING (TARGET_PTR_BIT
));
2425 fprintf_unfiltered (file
,
2426 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2429 #ifdef TARGET_READ_FP
2430 fprintf_unfiltered (file
,
2431 "gdbarch_dump: %s # %s\n",
2433 XSTRING (TARGET_READ_FP ()));
2435 fprintf_unfiltered (file
,
2436 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2437 (long) current_gdbarch
->read_fp
2438 /*TARGET_READ_FP ()*/);
2440 #ifdef TARGET_READ_PC
2441 fprintf_unfiltered (file
,
2442 "gdbarch_dump: %s # %s\n",
2443 "TARGET_READ_PC(ptid)",
2444 XSTRING (TARGET_READ_PC (ptid
)));
2446 fprintf_unfiltered (file
,
2447 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2448 (long) current_gdbarch
->read_pc
2449 /*TARGET_READ_PC ()*/);
2451 #ifdef TARGET_READ_SP
2452 fprintf_unfiltered (file
,
2453 "gdbarch_dump: %s # %s\n",
2455 XSTRING (TARGET_READ_SP ()));
2457 fprintf_unfiltered (file
,
2458 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2459 (long) current_gdbarch
->read_sp
2460 /*TARGET_READ_SP ()*/);
2462 #ifdef TARGET_SHORT_BIT
2463 fprintf_unfiltered (file
,
2464 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2465 XSTRING (TARGET_SHORT_BIT
));
2466 fprintf_unfiltered (file
,
2467 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2470 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2472 /* Macro might contain `[{}]' when not multi-arch */
2473 fprintf_unfiltered (file
,
2474 "gdbarch_dump: %s # %s\n",
2475 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2476 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2479 fprintf_unfiltered (file
,
2480 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2481 (long) current_gdbarch
->virtual_frame_pointer
2482 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2484 #ifdef TARGET_WRITE_PC
2486 /* Macro might contain `[{}]' when not multi-arch */
2487 fprintf_unfiltered (file
,
2488 "gdbarch_dump: %s # %s\n",
2489 "TARGET_WRITE_PC(val, ptid)",
2490 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2493 fprintf_unfiltered (file
,
2494 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2495 (long) current_gdbarch
->write_pc
2496 /*TARGET_WRITE_PC ()*/);
2498 #ifdef TARGET_WRITE_SP
2500 /* Macro might contain `[{}]' when not multi-arch */
2501 fprintf_unfiltered (file
,
2502 "gdbarch_dump: %s # %s\n",
2503 "TARGET_WRITE_SP(val)",
2504 XSTRING (TARGET_WRITE_SP (val
)));
2507 fprintf_unfiltered (file
,
2508 "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
2509 (long) current_gdbarch
->write_sp
2510 /*TARGET_WRITE_SP ()*/);
2512 #ifdef USE_STRUCT_CONVENTION
2513 fprintf_unfiltered (file
,
2514 "gdbarch_dump: %s # %s\n",
2515 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2516 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2518 fprintf_unfiltered (file
,
2519 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2520 (long) current_gdbarch
->use_struct_convention
2521 /*USE_STRUCT_CONVENTION ()*/);
2523 #ifdef VALUE_TO_REGISTER
2525 /* Macro might contain `[{}]' when not multi-arch */
2526 fprintf_unfiltered (file
,
2527 "gdbarch_dump: %s # %s\n",
2528 "VALUE_TO_REGISTER(type, regnum, from, to)",
2529 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2532 fprintf_unfiltered (file
,
2533 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2534 (long) current_gdbarch
->value_to_register
2535 /*VALUE_TO_REGISTER ()*/);
2537 if (current_gdbarch
->dump_tdep
!= NULL
)
2538 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2541 struct gdbarch_tdep
*
2542 gdbarch_tdep (struct gdbarch
*gdbarch
)
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2546 return gdbarch
->tdep
;
2550 const struct bfd_arch_info
*
2551 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2553 gdb_assert (gdbarch
!= NULL
);
2554 if (gdbarch_debug
>= 2)
2555 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2556 return gdbarch
->bfd_arch_info
;
2560 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2562 gdb_assert (gdbarch
!= NULL
);
2563 if (gdbarch_debug
>= 2)
2564 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2565 return gdbarch
->byte_order
;
2569 gdbarch_osabi (struct gdbarch
*gdbarch
)
2571 gdb_assert (gdbarch
!= NULL
);
2572 if (gdbarch_debug
>= 2)
2573 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2574 return gdbarch
->osabi
;
2578 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2580 gdb_assert (gdbarch
!= NULL
);
2581 /* Skip verify of short_bit, invalid_p == 0 */
2582 if (gdbarch_debug
>= 2)
2583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2584 return gdbarch
->short_bit
;
2588 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2591 gdbarch
->short_bit
= short_bit
;
2595 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2597 gdb_assert (gdbarch
!= NULL
);
2598 /* Skip verify of int_bit, invalid_p == 0 */
2599 if (gdbarch_debug
>= 2)
2600 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2601 return gdbarch
->int_bit
;
2605 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2608 gdbarch
->int_bit
= int_bit
;
2612 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2614 gdb_assert (gdbarch
!= NULL
);
2615 /* Skip verify of long_bit, invalid_p == 0 */
2616 if (gdbarch_debug
>= 2)
2617 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2618 return gdbarch
->long_bit
;
2622 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2625 gdbarch
->long_bit
= long_bit
;
2629 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2631 gdb_assert (gdbarch
!= NULL
);
2632 /* Skip verify of long_long_bit, invalid_p == 0 */
2633 if (gdbarch_debug
>= 2)
2634 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2635 return gdbarch
->long_long_bit
;
2639 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2642 gdbarch
->long_long_bit
= long_long_bit
;
2646 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2648 gdb_assert (gdbarch
!= NULL
);
2649 /* Skip verify of float_bit, invalid_p == 0 */
2650 if (gdbarch_debug
>= 2)
2651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2652 return gdbarch
->float_bit
;
2656 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2659 gdbarch
->float_bit
= float_bit
;
2663 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2665 gdb_assert (gdbarch
!= NULL
);
2666 /* Skip verify of double_bit, invalid_p == 0 */
2667 if (gdbarch_debug
>= 2)
2668 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2669 return gdbarch
->double_bit
;
2673 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2676 gdbarch
->double_bit
= double_bit
;
2680 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2682 gdb_assert (gdbarch
!= NULL
);
2683 /* Skip verify of long_double_bit, invalid_p == 0 */
2684 if (gdbarch_debug
>= 2)
2685 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2686 return gdbarch
->long_double_bit
;
2690 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2691 int long_double_bit
)
2693 gdbarch
->long_double_bit
= long_double_bit
;
2697 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2699 gdb_assert (gdbarch
!= NULL
);
2700 /* Skip verify of ptr_bit, invalid_p == 0 */
2701 if (gdbarch_debug
>= 2)
2702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2703 return gdbarch
->ptr_bit
;
2707 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2710 gdbarch
->ptr_bit
= ptr_bit
;
2714 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2716 gdb_assert (gdbarch
!= NULL
);
2717 if (gdbarch
->addr_bit
== 0)
2718 internal_error (__FILE__
, __LINE__
,
2719 "gdbarch: gdbarch_addr_bit invalid");
2720 if (gdbarch_debug
>= 2)
2721 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2722 return gdbarch
->addr_bit
;
2726 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2729 gdbarch
->addr_bit
= addr_bit
;
2733 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2735 gdb_assert (gdbarch
!= NULL
);
2736 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2737 if (gdbarch_debug
>= 2)
2738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2739 return gdbarch
->bfd_vma_bit
;
2743 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2746 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2750 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2752 gdb_assert (gdbarch
!= NULL
);
2753 if (gdbarch
->char_signed
== -1)
2754 internal_error (__FILE__
, __LINE__
,
2755 "gdbarch: gdbarch_char_signed invalid");
2756 if (gdbarch_debug
>= 2)
2757 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2758 return gdbarch
->char_signed
;
2762 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2765 gdbarch
->char_signed
= char_signed
;
2769 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2771 gdb_assert (gdbarch
!= NULL
);
2772 if (gdbarch
->read_pc
== 0)
2773 internal_error (__FILE__
, __LINE__
,
2774 "gdbarch: gdbarch_read_pc invalid");
2775 if (gdbarch_debug
>= 2)
2776 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2777 return gdbarch
->read_pc (ptid
);
2781 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2782 gdbarch_read_pc_ftype read_pc
)
2784 gdbarch
->read_pc
= read_pc
;
2788 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2790 gdb_assert (gdbarch
!= NULL
);
2791 if (gdbarch
->write_pc
== 0)
2792 internal_error (__FILE__
, __LINE__
,
2793 "gdbarch: gdbarch_write_pc invalid");
2794 if (gdbarch_debug
>= 2)
2795 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2796 gdbarch
->write_pc (val
, ptid
);
2800 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2801 gdbarch_write_pc_ftype write_pc
)
2803 gdbarch
->write_pc
= write_pc
;
2807 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2809 gdb_assert (gdbarch
!= NULL
);
2810 if (gdbarch
->read_fp
== 0)
2811 internal_error (__FILE__
, __LINE__
,
2812 "gdbarch: gdbarch_read_fp invalid");
2813 if (gdbarch_debug
>= 2)
2814 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2815 return gdbarch
->read_fp ();
2819 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2820 gdbarch_read_fp_ftype read_fp
)
2822 gdbarch
->read_fp
= read_fp
;
2826 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2828 gdb_assert (gdbarch
!= NULL
);
2829 if (gdbarch
->read_sp
== 0)
2830 internal_error (__FILE__
, __LINE__
,
2831 "gdbarch: gdbarch_read_sp invalid");
2832 if (gdbarch_debug
>= 2)
2833 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2834 return gdbarch
->read_sp ();
2838 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2839 gdbarch_read_sp_ftype read_sp
)
2841 gdbarch
->read_sp
= read_sp
;
2845 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2847 gdb_assert (gdbarch
!= NULL
);
2848 if (gdbarch
->write_sp
== 0)
2849 internal_error (__FILE__
, __LINE__
,
2850 "gdbarch: gdbarch_write_sp invalid");
2851 if (gdbarch_debug
>= 2)
2852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2853 gdbarch
->write_sp (val
);
2857 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2858 gdbarch_write_sp_ftype write_sp
)
2860 gdbarch
->write_sp
= write_sp
;
2864 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2866 gdb_assert (gdbarch
!= NULL
);
2867 if (gdbarch
->virtual_frame_pointer
== 0)
2868 internal_error (__FILE__
, __LINE__
,
2869 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2870 if (gdbarch_debug
>= 2)
2871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2872 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2876 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2877 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2879 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2883 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2885 gdb_assert (gdbarch
!= NULL
);
2886 return gdbarch
->pseudo_register_read
!= 0;
2890 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2892 gdb_assert (gdbarch
!= NULL
);
2893 if (gdbarch
->pseudo_register_read
== 0)
2894 internal_error (__FILE__
, __LINE__
,
2895 "gdbarch: gdbarch_pseudo_register_read invalid");
2896 if (gdbarch_debug
>= 2)
2897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2898 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2902 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2903 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2905 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2909 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2911 gdb_assert (gdbarch
!= NULL
);
2912 return gdbarch
->pseudo_register_write
!= 0;
2916 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2918 gdb_assert (gdbarch
!= NULL
);
2919 if (gdbarch
->pseudo_register_write
== 0)
2920 internal_error (__FILE__
, __LINE__
,
2921 "gdbarch: gdbarch_pseudo_register_write invalid");
2922 if (gdbarch_debug
>= 2)
2923 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2924 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2928 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2929 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2931 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2935 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2937 gdb_assert (gdbarch
!= NULL
);
2938 if (gdbarch
->num_regs
== -1)
2939 internal_error (__FILE__
, __LINE__
,
2940 "gdbarch: gdbarch_num_regs invalid");
2941 if (gdbarch_debug
>= 2)
2942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2943 return gdbarch
->num_regs
;
2947 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2950 gdbarch
->num_regs
= num_regs
;
2954 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2956 gdb_assert (gdbarch
!= NULL
);
2957 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2958 if (gdbarch_debug
>= 2)
2959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2960 return gdbarch
->num_pseudo_regs
;
2964 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2965 int num_pseudo_regs
)
2967 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2971 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2973 gdb_assert (gdbarch
!= NULL
);
2974 /* Skip verify of sp_regnum, invalid_p == 0 */
2975 if (gdbarch_debug
>= 2)
2976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2977 return gdbarch
->sp_regnum
;
2981 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2984 gdbarch
->sp_regnum
= sp_regnum
;
2988 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2990 gdb_assert (gdbarch
!= NULL
);
2991 /* Skip verify of fp_regnum, invalid_p == 0 */
2992 if (gdbarch_debug
>= 2)
2993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2994 return gdbarch
->fp_regnum
;
2998 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
3001 gdbarch
->fp_regnum
= fp_regnum
;
3005 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
3007 gdb_assert (gdbarch
!= NULL
);
3008 /* Skip verify of pc_regnum, invalid_p == 0 */
3009 if (gdbarch_debug
>= 2)
3010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
3011 return gdbarch
->pc_regnum
;
3015 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
3018 gdbarch
->pc_regnum
= pc_regnum
;
3022 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
3024 gdb_assert (gdbarch
!= NULL
);
3025 /* Skip verify of ps_regnum, invalid_p == 0 */
3026 if (gdbarch_debug
>= 2)
3027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
3028 return gdbarch
->ps_regnum
;
3032 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
3035 gdbarch
->ps_regnum
= ps_regnum
;
3039 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
3041 gdb_assert (gdbarch
!= NULL
);
3042 /* Skip verify of fp0_regnum, invalid_p == 0 */
3043 if (gdbarch_debug
>= 2)
3044 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
3045 return gdbarch
->fp0_regnum
;
3049 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
3052 gdbarch
->fp0_regnum
= fp0_regnum
;
3056 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
3058 gdb_assert (gdbarch
!= NULL
);
3059 /* Skip verify of npc_regnum, invalid_p == 0 */
3060 if (gdbarch_debug
>= 2)
3061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
3062 return gdbarch
->npc_regnum
;
3066 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
3069 gdbarch
->npc_regnum
= npc_regnum
;
3073 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
3075 gdb_assert (gdbarch
!= NULL
);
3076 if (gdbarch
->stab_reg_to_regnum
== 0)
3077 internal_error (__FILE__
, __LINE__
,
3078 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3079 if (gdbarch_debug
>= 2)
3080 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
3081 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
3085 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
3086 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
3088 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
3092 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
3094 gdb_assert (gdbarch
!= NULL
);
3095 if (gdbarch
->ecoff_reg_to_regnum
== 0)
3096 internal_error (__FILE__
, __LINE__
,
3097 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3098 if (gdbarch_debug
>= 2)
3099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
3100 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
3104 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
3105 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
3107 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
3111 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
3113 gdb_assert (gdbarch
!= NULL
);
3114 if (gdbarch
->dwarf_reg_to_regnum
== 0)
3115 internal_error (__FILE__
, __LINE__
,
3116 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3117 if (gdbarch_debug
>= 2)
3118 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
3119 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
3123 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
3124 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
3126 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
3130 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
3132 gdb_assert (gdbarch
!= NULL
);
3133 if (gdbarch
->sdb_reg_to_regnum
== 0)
3134 internal_error (__FILE__
, __LINE__
,
3135 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3136 if (gdbarch_debug
>= 2)
3137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
3138 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
3142 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
3143 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
3145 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
3149 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
3151 gdb_assert (gdbarch
!= NULL
);
3152 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
3153 internal_error (__FILE__
, __LINE__
,
3154 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3155 if (gdbarch_debug
>= 2)
3156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
3157 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
3161 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
3162 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
3164 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
3168 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
3170 gdb_assert (gdbarch
!= NULL
);
3171 if (gdbarch
->register_name
== 0)
3172 internal_error (__FILE__
, __LINE__
,
3173 "gdbarch: gdbarch_register_name invalid");
3174 if (gdbarch_debug
>= 2)
3175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
3176 return gdbarch
->register_name (regnr
);
3180 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
3181 gdbarch_register_name_ftype register_name
)
3183 gdbarch
->register_name
= register_name
;
3187 gdbarch_register_size (struct gdbarch
*gdbarch
)
3189 gdb_assert (gdbarch
!= NULL
);
3190 if (gdbarch
->register_size
== -1)
3191 internal_error (__FILE__
, __LINE__
,
3192 "gdbarch: gdbarch_register_size invalid");
3193 if (gdbarch_debug
>= 2)
3194 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
3195 return gdbarch
->register_size
;
3199 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
3202 gdbarch
->register_size
= register_size
;
3206 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
3208 gdb_assert (gdbarch
!= NULL
);
3209 if (gdbarch
->register_bytes
== -1)
3210 internal_error (__FILE__
, __LINE__
,
3211 "gdbarch: gdbarch_register_bytes invalid");
3212 if (gdbarch_debug
>= 2)
3213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
3214 return gdbarch
->register_bytes
;
3218 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
3221 gdbarch
->register_bytes
= register_bytes
;
3225 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3227 gdb_assert (gdbarch
!= NULL
);
3228 if (gdbarch
->register_byte
== 0)
3229 internal_error (__FILE__
, __LINE__
,
3230 "gdbarch: gdbarch_register_byte invalid");
3231 if (gdbarch_debug
>= 2)
3232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
3233 return gdbarch
->register_byte (reg_nr
);
3237 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
3238 gdbarch_register_byte_ftype register_byte
)
3240 gdbarch
->register_byte
= register_byte
;
3244 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3246 gdb_assert (gdbarch
!= NULL
);
3247 if (gdbarch
->register_raw_size
== 0)
3248 internal_error (__FILE__
, __LINE__
,
3249 "gdbarch: gdbarch_register_raw_size invalid");
3250 if (gdbarch_debug
>= 2)
3251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
3252 return gdbarch
->register_raw_size (reg_nr
);
3256 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
3257 gdbarch_register_raw_size_ftype register_raw_size
)
3259 gdbarch
->register_raw_size
= register_raw_size
;
3263 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
3265 gdb_assert (gdbarch
!= NULL
);
3266 if (gdbarch
->max_register_raw_size
== -1)
3267 internal_error (__FILE__
, __LINE__
,
3268 "gdbarch: gdbarch_max_register_raw_size invalid");
3269 if (gdbarch_debug
>= 2)
3270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
3271 return gdbarch
->max_register_raw_size
;
3275 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
3276 int max_register_raw_size
)
3278 gdbarch
->max_register_raw_size
= max_register_raw_size
;
3282 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3284 gdb_assert (gdbarch
!= NULL
);
3285 if (gdbarch
->register_virtual_size
== 0)
3286 internal_error (__FILE__
, __LINE__
,
3287 "gdbarch: gdbarch_register_virtual_size invalid");
3288 if (gdbarch_debug
>= 2)
3289 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3290 return gdbarch
->register_virtual_size (reg_nr
);
3294 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3295 gdbarch_register_virtual_size_ftype register_virtual_size
)
3297 gdbarch
->register_virtual_size
= register_virtual_size
;
3301 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
3303 gdb_assert (gdbarch
!= NULL
);
3304 if (gdbarch
->max_register_virtual_size
== -1)
3305 internal_error (__FILE__
, __LINE__
,
3306 "gdbarch: gdbarch_max_register_virtual_size invalid");
3307 if (gdbarch_debug
>= 2)
3308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
3309 return gdbarch
->max_register_virtual_size
;
3313 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
3314 int max_register_virtual_size
)
3316 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
3320 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3322 gdb_assert (gdbarch
!= NULL
);
3323 if (gdbarch
->register_virtual_type
== 0)
3324 internal_error (__FILE__
, __LINE__
,
3325 "gdbarch: gdbarch_register_virtual_type invalid");
3326 if (gdbarch_debug
>= 2)
3327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3328 return gdbarch
->register_virtual_type (reg_nr
);
3332 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3333 gdbarch_register_virtual_type_ftype register_virtual_type
)
3335 gdbarch
->register_virtual_type
= register_virtual_type
;
3339 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3341 gdb_assert (gdbarch
!= NULL
);
3342 return gdbarch
->deprecated_do_registers_info
!= 0;
3346 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3348 gdb_assert (gdbarch
!= NULL
);
3349 if (gdbarch
->deprecated_do_registers_info
== 0)
3350 internal_error (__FILE__
, __LINE__
,
3351 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3352 if (gdbarch_debug
>= 2)
3353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3354 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3358 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3359 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3361 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3365 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3367 gdb_assert (gdbarch
!= NULL
);
3368 if (gdbarch
->print_registers_info
== 0)
3369 internal_error (__FILE__
, __LINE__
,
3370 "gdbarch: gdbarch_print_registers_info invalid");
3371 if (gdbarch_debug
>= 2)
3372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3373 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3377 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3378 gdbarch_print_registers_info_ftype print_registers_info
)
3380 gdbarch
->print_registers_info
= print_registers_info
;
3384 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3386 gdb_assert (gdbarch
!= NULL
);
3387 return gdbarch
->print_float_info
!= 0;
3391 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3393 gdb_assert (gdbarch
!= NULL
);
3394 if (gdbarch
->print_float_info
== 0)
3395 internal_error (__FILE__
, __LINE__
,
3396 "gdbarch: gdbarch_print_float_info invalid");
3397 if (gdbarch_debug
>= 2)
3398 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3399 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3403 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3404 gdbarch_print_float_info_ftype print_float_info
)
3406 gdbarch
->print_float_info
= print_float_info
;
3410 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3412 gdb_assert (gdbarch
!= NULL
);
3413 return gdbarch
->print_vector_info
!= 0;
3417 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3419 gdb_assert (gdbarch
!= NULL
);
3420 if (gdbarch
->print_vector_info
== 0)
3421 internal_error (__FILE__
, __LINE__
,
3422 "gdbarch: gdbarch_print_vector_info invalid");
3423 if (gdbarch_debug
>= 2)
3424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3425 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3429 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3430 gdbarch_print_vector_info_ftype print_vector_info
)
3432 gdbarch
->print_vector_info
= print_vector_info
;
3436 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3438 gdb_assert (gdbarch
!= NULL
);
3439 if (gdbarch
->register_sim_regno
== 0)
3440 internal_error (__FILE__
, __LINE__
,
3441 "gdbarch: gdbarch_register_sim_regno invalid");
3442 if (gdbarch_debug
>= 2)
3443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3444 return gdbarch
->register_sim_regno (reg_nr
);
3448 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3449 gdbarch_register_sim_regno_ftype register_sim_regno
)
3451 gdbarch
->register_sim_regno
= register_sim_regno
;
3455 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3457 gdb_assert (gdbarch
!= NULL
);
3458 return gdbarch
->register_bytes_ok
!= 0;
3462 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3464 gdb_assert (gdbarch
!= NULL
);
3465 if (gdbarch
->register_bytes_ok
== 0)
3466 internal_error (__FILE__
, __LINE__
,
3467 "gdbarch: gdbarch_register_bytes_ok invalid");
3468 if (gdbarch_debug
>= 2)
3469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3470 return gdbarch
->register_bytes_ok (nr_bytes
);
3474 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3475 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3477 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3481 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3483 gdb_assert (gdbarch
!= NULL
);
3484 if (gdbarch
->cannot_fetch_register
== 0)
3485 internal_error (__FILE__
, __LINE__
,
3486 "gdbarch: gdbarch_cannot_fetch_register invalid");
3487 if (gdbarch_debug
>= 2)
3488 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3489 return gdbarch
->cannot_fetch_register (regnum
);
3493 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3494 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3496 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3500 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3502 gdb_assert (gdbarch
!= NULL
);
3503 if (gdbarch
->cannot_store_register
== 0)
3504 internal_error (__FILE__
, __LINE__
,
3505 "gdbarch: gdbarch_cannot_store_register invalid");
3506 if (gdbarch_debug
>= 2)
3507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3508 return gdbarch
->cannot_store_register (regnum
);
3512 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3513 gdbarch_cannot_store_register_ftype cannot_store_register
)
3515 gdbarch
->cannot_store_register
= cannot_store_register
;
3519 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3521 gdb_assert (gdbarch
!= NULL
);
3522 return gdbarch
->get_longjmp_target
!= 0;
3526 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3528 gdb_assert (gdbarch
!= NULL
);
3529 if (gdbarch
->get_longjmp_target
== 0)
3530 internal_error (__FILE__
, __LINE__
,
3531 "gdbarch: gdbarch_get_longjmp_target invalid");
3532 if (gdbarch_debug
>= 2)
3533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3534 return gdbarch
->get_longjmp_target (pc
);
3538 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3539 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3541 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3545 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3547 gdb_assert (gdbarch
!= NULL
);
3548 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3549 if (gdbarch_debug
>= 2)
3550 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3551 return gdbarch
->deprecated_use_generic_dummy_frames
;
3555 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3556 int deprecated_use_generic_dummy_frames
)
3558 gdbarch
->deprecated_use_generic_dummy_frames
= deprecated_use_generic_dummy_frames
;
3562 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3564 gdb_assert (gdbarch
!= NULL
);
3565 /* Skip verify of call_dummy_location, invalid_p == 0 */
3566 if (gdbarch_debug
>= 2)
3567 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3568 return gdbarch
->call_dummy_location
;
3572 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3573 int call_dummy_location
)
3575 gdbarch
->call_dummy_location
= call_dummy_location
;
3579 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3581 gdb_assert (gdbarch
!= NULL
);
3582 if (gdbarch
->call_dummy_address
== 0)
3583 internal_error (__FILE__
, __LINE__
,
3584 "gdbarch: gdbarch_call_dummy_address invalid");
3585 if (gdbarch_debug
>= 2)
3586 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3587 return gdbarch
->call_dummy_address ();
3591 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3592 gdbarch_call_dummy_address_ftype call_dummy_address
)
3594 gdbarch
->call_dummy_address
= call_dummy_address
;
3598 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3600 gdb_assert (gdbarch
!= NULL
);
3601 if (gdbarch
->call_dummy_start_offset
== -1)
3602 internal_error (__FILE__
, __LINE__
,
3603 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3604 if (gdbarch_debug
>= 2)
3605 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3606 return gdbarch
->call_dummy_start_offset
;
3610 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3611 CORE_ADDR call_dummy_start_offset
)
3613 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3617 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3619 gdb_assert (gdbarch
!= NULL
);
3620 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3621 internal_error (__FILE__
, __LINE__
,
3622 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3623 if (gdbarch_debug
>= 2)
3624 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3625 return gdbarch
->call_dummy_breakpoint_offset
;
3629 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3630 CORE_ADDR call_dummy_breakpoint_offset
)
3632 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3636 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3638 gdb_assert (gdbarch
!= NULL
);
3639 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3640 internal_error (__FILE__
, __LINE__
,
3641 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3642 if (gdbarch_debug
>= 2)
3643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3644 return gdbarch
->call_dummy_breakpoint_offset_p
;
3648 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3649 int call_dummy_breakpoint_offset_p
)
3651 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3655 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3657 gdb_assert (gdbarch
!= NULL
);
3658 if (gdbarch
->call_dummy_length
== -1)
3659 internal_error (__FILE__
, __LINE__
,
3660 "gdbarch: gdbarch_call_dummy_length invalid");
3661 if (gdbarch_debug
>= 2)
3662 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3663 return gdbarch
->call_dummy_length
;
3667 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3668 int call_dummy_length
)
3670 gdbarch
->call_dummy_length
= call_dummy_length
;
3674 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3676 gdb_assert (gdbarch
!= NULL
);
3677 return gdbarch
->deprecated_pc_in_call_dummy
!= generic_pc_in_call_dummy
;
3681 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3683 gdb_assert (gdbarch
!= NULL
);
3684 if (gdbarch
->deprecated_pc_in_call_dummy
== 0)
3685 internal_error (__FILE__
, __LINE__
,
3686 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3687 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3688 if (gdbarch_debug
>= 2)
3689 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3690 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3694 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3695 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3697 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3701 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3703 gdb_assert (gdbarch
!= NULL
);
3704 if (gdbarch
->call_dummy_p
== -1)
3705 internal_error (__FILE__
, __LINE__
,
3706 "gdbarch: gdbarch_call_dummy_p invalid");
3707 if (gdbarch_debug
>= 2)
3708 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3709 return gdbarch
->call_dummy_p
;
3713 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3716 gdbarch
->call_dummy_p
= call_dummy_p
;
3720 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3722 gdb_assert (gdbarch
!= NULL
);
3723 /* Skip verify of call_dummy_words, invalid_p == 0 */
3724 if (gdbarch_debug
>= 2)
3725 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3726 return gdbarch
->call_dummy_words
;
3730 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3731 LONGEST
* call_dummy_words
)
3733 gdbarch
->call_dummy_words
= call_dummy_words
;
3737 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3739 gdb_assert (gdbarch
!= NULL
);
3740 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3741 if (gdbarch_debug
>= 2)
3742 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3743 return gdbarch
->sizeof_call_dummy_words
;
3747 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3748 int sizeof_call_dummy_words
)
3750 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3754 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3756 gdb_assert (gdbarch
!= NULL
);
3757 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3758 internal_error (__FILE__
, __LINE__
,
3759 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3760 if (gdbarch_debug
>= 2)
3761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3762 return gdbarch
->call_dummy_stack_adjust_p
;
3766 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3767 int call_dummy_stack_adjust_p
)
3769 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3773 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3775 gdb_assert (gdbarch
!= NULL
);
3776 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3777 internal_error (__FILE__
, __LINE__
,
3778 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3779 if (gdbarch_debug
>= 2)
3780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3781 return gdbarch
->call_dummy_stack_adjust
;
3785 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3786 int call_dummy_stack_adjust
)
3788 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3792 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
)
3794 gdb_assert (gdbarch
!= NULL
);
3795 if (gdbarch
->fix_call_dummy
== 0)
3796 internal_error (__FILE__
, __LINE__
,
3797 "gdbarch: gdbarch_fix_call_dummy invalid");
3798 if (gdbarch_debug
>= 2)
3799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3800 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3804 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3805 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3807 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3811 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch
*gdbarch
)
3813 gdb_assert (gdbarch
!= NULL
);
3814 return gdbarch
->deprecated_init_frame_pc_first
!= 0;
3818 gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3820 gdb_assert (gdbarch
!= NULL
);
3821 if (gdbarch
->deprecated_init_frame_pc_first
== 0)
3822 internal_error (__FILE__
, __LINE__
,
3823 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3824 if (gdbarch_debug
>= 2)
3825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc_first called\n");
3826 return gdbarch
->deprecated_init_frame_pc_first (fromleaf
, prev
);
3830 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
,
3831 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first
)
3833 gdbarch
->deprecated_init_frame_pc_first
= deprecated_init_frame_pc_first
;
3837 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3839 gdb_assert (gdbarch
!= NULL
);
3840 return gdbarch
->deprecated_init_frame_pc
!= 0;
3844 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3846 gdb_assert (gdbarch
!= NULL
);
3847 if (gdbarch
->deprecated_init_frame_pc
== 0)
3848 internal_error (__FILE__
, __LINE__
,
3849 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3850 if (gdbarch_debug
>= 2)
3851 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3852 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3856 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3857 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3859 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3863 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3865 gdb_assert (gdbarch
!= NULL
);
3866 if (gdbarch_debug
>= 2)
3867 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3868 return gdbarch
->believe_pcc_promotion
;
3872 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3873 int believe_pcc_promotion
)
3875 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3879 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3881 gdb_assert (gdbarch
!= NULL
);
3882 if (gdbarch_debug
>= 2)
3883 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3884 return gdbarch
->believe_pcc_promotion_type
;
3888 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3889 int believe_pcc_promotion_type
)
3891 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3895 gdbarch_get_saved_register_p (struct gdbarch
*gdbarch
)
3897 gdb_assert (gdbarch
!= NULL
);
3898 return gdbarch
->get_saved_register
!= 0;
3902 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
)
3904 gdb_assert (gdbarch
!= NULL
);
3905 if (gdbarch
->get_saved_register
== 0)
3906 internal_error (__FILE__
, __LINE__
,
3907 "gdbarch: gdbarch_get_saved_register invalid");
3908 if (gdbarch_debug
>= 2)
3909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3910 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3914 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3915 gdbarch_get_saved_register_ftype get_saved_register
)
3917 gdbarch
->get_saved_register
= get_saved_register
;
3921 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3923 gdb_assert (gdbarch
!= NULL
);
3924 if (gdbarch
->register_convertible
== 0)
3925 internal_error (__FILE__
, __LINE__
,
3926 "gdbarch: gdbarch_register_convertible invalid");
3927 if (gdbarch_debug
>= 2)
3928 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3929 return gdbarch
->register_convertible (nr
);
3933 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3934 gdbarch_register_convertible_ftype register_convertible
)
3936 gdbarch
->register_convertible
= register_convertible
;
3940 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3942 gdb_assert (gdbarch
!= NULL
);
3943 if (gdbarch
->register_convert_to_virtual
== 0)
3944 internal_error (__FILE__
, __LINE__
,
3945 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3946 if (gdbarch_debug
>= 2)
3947 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3948 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3952 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3953 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3955 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3959 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3961 gdb_assert (gdbarch
!= NULL
);
3962 if (gdbarch
->register_convert_to_raw
== 0)
3963 internal_error (__FILE__
, __LINE__
,
3964 "gdbarch: gdbarch_register_convert_to_raw invalid");
3965 if (gdbarch_debug
>= 2)
3966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3967 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3971 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3972 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3974 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3978 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3980 gdb_assert (gdbarch
!= NULL
);
3981 if (gdbarch
->convert_register_p
== 0)
3982 internal_error (__FILE__
, __LINE__
,
3983 "gdbarch: gdbarch_convert_register_p invalid");
3984 if (gdbarch_debug
>= 2)
3985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3986 return gdbarch
->convert_register_p (regnum
);
3990 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3991 gdbarch_convert_register_p_ftype convert_register_p
)
3993 gdbarch
->convert_register_p
= convert_register_p
;
3997 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3999 gdb_assert (gdbarch
!= NULL
);
4000 if (gdbarch
->register_to_value
== 0)
4001 internal_error (__FILE__
, __LINE__
,
4002 "gdbarch: gdbarch_register_to_value invalid");
4003 if (gdbarch_debug
>= 2)
4004 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
4005 gdbarch
->register_to_value (regnum
, type
, from
, to
);
4009 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
4010 gdbarch_register_to_value_ftype register_to_value
)
4012 gdbarch
->register_to_value
= register_to_value
;
4016 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4018 gdb_assert (gdbarch
!= NULL
);
4019 if (gdbarch
->value_to_register
== 0)
4020 internal_error (__FILE__
, __LINE__
,
4021 "gdbarch: gdbarch_value_to_register invalid");
4022 if (gdbarch_debug
>= 2)
4023 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
4024 gdbarch
->value_to_register (type
, regnum
, from
, to
);
4028 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
4029 gdbarch_value_to_register_ftype value_to_register
)
4031 gdbarch
->value_to_register
= value_to_register
;
4035 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
4037 gdb_assert (gdbarch
!= NULL
);
4038 if (gdbarch
->pointer_to_address
== 0)
4039 internal_error (__FILE__
, __LINE__
,
4040 "gdbarch: gdbarch_pointer_to_address invalid");
4041 if (gdbarch_debug
>= 2)
4042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
4043 return gdbarch
->pointer_to_address (type
, buf
);
4047 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
4048 gdbarch_pointer_to_address_ftype pointer_to_address
)
4050 gdbarch
->pointer_to_address
= pointer_to_address
;
4054 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
4056 gdb_assert (gdbarch
!= NULL
);
4057 if (gdbarch
->address_to_pointer
== 0)
4058 internal_error (__FILE__
, __LINE__
,
4059 "gdbarch: gdbarch_address_to_pointer invalid");
4060 if (gdbarch_debug
>= 2)
4061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
4062 gdbarch
->address_to_pointer (type
, buf
, addr
);
4066 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
4067 gdbarch_address_to_pointer_ftype address_to_pointer
)
4069 gdbarch
->address_to_pointer
= address_to_pointer
;
4073 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
4075 gdb_assert (gdbarch
!= NULL
);
4076 return gdbarch
->integer_to_address
!= 0;
4080 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
4082 gdb_assert (gdbarch
!= NULL
);
4083 if (gdbarch
->integer_to_address
== 0)
4084 internal_error (__FILE__
, __LINE__
,
4085 "gdbarch: gdbarch_integer_to_address invalid");
4086 if (gdbarch_debug
>= 2)
4087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
4088 return gdbarch
->integer_to_address (type
, buf
);
4092 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
4093 gdbarch_integer_to_address_ftype integer_to_address
)
4095 gdbarch
->integer_to_address
= integer_to_address
;
4099 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
4101 gdb_assert (gdbarch
!= NULL
);
4102 if (gdbarch
->return_value_on_stack
== 0)
4103 internal_error (__FILE__
, __LINE__
,
4104 "gdbarch: gdbarch_return_value_on_stack invalid");
4105 if (gdbarch_debug
>= 2)
4106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
4107 return gdbarch
->return_value_on_stack (type
);
4111 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
4112 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
4114 gdbarch
->return_value_on_stack
= return_value_on_stack
;
4118 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
4120 gdb_assert (gdbarch
!= NULL
);
4121 if (gdbarch
->push_arguments
== 0)
4122 internal_error (__FILE__
, __LINE__
,
4123 "gdbarch: gdbarch_push_arguments invalid");
4124 if (gdbarch_debug
>= 2)
4125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
4126 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
4130 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
4131 gdbarch_push_arguments_ftype push_arguments
)
4133 gdbarch
->push_arguments
= push_arguments
;
4137 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
4139 gdb_assert (gdbarch
!= NULL
);
4140 if (gdbarch
->push_dummy_frame
== 0)
4141 internal_error (__FILE__
, __LINE__
,
4142 "gdbarch: gdbarch_push_dummy_frame invalid");
4143 if (gdbarch_debug
>= 2)
4144 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
4145 gdbarch
->push_dummy_frame ();
4149 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
4150 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
4152 gdbarch
->push_dummy_frame
= push_dummy_frame
;
4156 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
4158 gdb_assert (gdbarch
!= NULL
);
4159 return gdbarch
->push_return_address
!= 0;
4163 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
4165 gdb_assert (gdbarch
!= NULL
);
4166 if (gdbarch
->push_return_address
== 0)
4167 internal_error (__FILE__
, __LINE__
,
4168 "gdbarch: gdbarch_push_return_address invalid");
4169 if (gdbarch_debug
>= 2)
4170 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
4171 return gdbarch
->push_return_address (pc
, sp
);
4175 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
4176 gdbarch_push_return_address_ftype push_return_address
)
4178 gdbarch
->push_return_address
= push_return_address
;
4182 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
4184 gdb_assert (gdbarch
!= NULL
);
4185 if (gdbarch
->pop_frame
== 0)
4186 internal_error (__FILE__
, __LINE__
,
4187 "gdbarch: gdbarch_pop_frame invalid");
4188 if (gdbarch_debug
>= 2)
4189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
4190 gdbarch
->pop_frame ();
4194 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
4195 gdbarch_pop_frame_ftype pop_frame
)
4197 gdbarch
->pop_frame
= pop_frame
;
4201 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
4203 gdb_assert (gdbarch
!= NULL
);
4204 if (gdbarch
->store_struct_return
== 0)
4205 internal_error (__FILE__
, __LINE__
,
4206 "gdbarch: gdbarch_store_struct_return invalid");
4207 if (gdbarch_debug
>= 2)
4208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
4209 gdbarch
->store_struct_return (addr
, sp
);
4213 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
4214 gdbarch_store_struct_return_ftype store_struct_return
)
4216 gdbarch
->store_struct_return
= store_struct_return
;
4220 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4222 gdb_assert (gdbarch
!= NULL
);
4223 if (gdbarch
->extract_return_value
== 0)
4224 internal_error (__FILE__
, __LINE__
,
4225 "gdbarch: gdbarch_extract_return_value invalid");
4226 if (gdbarch_debug
>= 2)
4227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4228 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4232 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4233 gdbarch_extract_return_value_ftype extract_return_value
)
4235 gdbarch
->extract_return_value
= extract_return_value
;
4239 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4241 gdb_assert (gdbarch
!= NULL
);
4242 if (gdbarch
->store_return_value
== 0)
4243 internal_error (__FILE__
, __LINE__
,
4244 "gdbarch: gdbarch_store_return_value invalid");
4245 if (gdbarch_debug
>= 2)
4246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4247 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4251 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4252 gdbarch_store_return_value_ftype store_return_value
)
4254 gdbarch
->store_return_value
= store_return_value
;
4258 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4260 gdb_assert (gdbarch
!= NULL
);
4261 if (gdbarch
->deprecated_extract_return_value
== 0)
4262 internal_error (__FILE__
, __LINE__
,
4263 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4264 if (gdbarch_debug
>= 2)
4265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4266 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4270 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4271 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4273 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4277 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4279 gdb_assert (gdbarch
!= NULL
);
4280 if (gdbarch
->deprecated_store_return_value
== 0)
4281 internal_error (__FILE__
, __LINE__
,
4282 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4283 if (gdbarch_debug
>= 2)
4284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4285 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4289 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4290 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4292 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4296 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4298 gdb_assert (gdbarch
!= NULL
);
4299 return gdbarch
->extract_struct_value_address
!= 0;
4303 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4305 gdb_assert (gdbarch
!= NULL
);
4306 if (gdbarch
->extract_struct_value_address
== 0)
4307 internal_error (__FILE__
, __LINE__
,
4308 "gdbarch: gdbarch_extract_struct_value_address invalid");
4309 if (gdbarch_debug
>= 2)
4310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4311 return gdbarch
->extract_struct_value_address (regcache
);
4315 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4316 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4318 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4322 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4324 gdb_assert (gdbarch
!= NULL
);
4325 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4329 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4331 gdb_assert (gdbarch
!= NULL
);
4332 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4333 internal_error (__FILE__
, __LINE__
,
4334 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4335 if (gdbarch_debug
>= 2)
4336 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4337 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4341 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4342 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4344 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4348 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4350 gdb_assert (gdbarch
!= NULL
);
4351 if (gdbarch
->use_struct_convention
== 0)
4352 internal_error (__FILE__
, __LINE__
,
4353 "gdbarch: gdbarch_use_struct_convention invalid");
4354 if (gdbarch_debug
>= 2)
4355 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4356 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4360 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4361 gdbarch_use_struct_convention_ftype use_struct_convention
)
4363 gdbarch
->use_struct_convention
= use_struct_convention
;
4367 gdbarch_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
4369 gdb_assert (gdbarch
!= NULL
);
4370 return gdbarch
->frame_init_saved_regs
!= 0;
4374 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4376 gdb_assert (gdbarch
!= NULL
);
4377 if (gdbarch
->frame_init_saved_regs
== 0)
4378 internal_error (__FILE__
, __LINE__
,
4379 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4380 if (gdbarch_debug
>= 2)
4381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
4382 gdbarch
->frame_init_saved_regs (frame
);
4386 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4387 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
4389 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
4393 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4395 gdb_assert (gdbarch
!= NULL
);
4396 return gdbarch
->init_extra_frame_info
!= 0;
4400 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4402 gdb_assert (gdbarch
!= NULL
);
4403 if (gdbarch
->init_extra_frame_info
== 0)
4404 internal_error (__FILE__
, __LINE__
,
4405 "gdbarch: gdbarch_init_extra_frame_info invalid");
4406 if (gdbarch_debug
>= 2)
4407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
4408 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4412 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4413 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4415 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4419 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4421 gdb_assert (gdbarch
!= NULL
);
4422 if (gdbarch
->skip_prologue
== 0)
4423 internal_error (__FILE__
, __LINE__
,
4424 "gdbarch: gdbarch_skip_prologue invalid");
4425 if (gdbarch_debug
>= 2)
4426 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4427 return gdbarch
->skip_prologue (ip
);
4431 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4432 gdbarch_skip_prologue_ftype skip_prologue
)
4434 gdbarch
->skip_prologue
= skip_prologue
;
4438 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4440 gdb_assert (gdbarch
!= NULL
);
4441 if (gdbarch
->prologue_frameless_p
== 0)
4442 internal_error (__FILE__
, __LINE__
,
4443 "gdbarch: gdbarch_prologue_frameless_p invalid");
4444 if (gdbarch_debug
>= 2)
4445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4446 return gdbarch
->prologue_frameless_p (ip
);
4450 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4451 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4453 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4457 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4459 gdb_assert (gdbarch
!= NULL
);
4460 if (gdbarch
->inner_than
== 0)
4461 internal_error (__FILE__
, __LINE__
,
4462 "gdbarch: gdbarch_inner_than invalid");
4463 if (gdbarch_debug
>= 2)
4464 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4465 return gdbarch
->inner_than (lhs
, rhs
);
4469 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4470 gdbarch_inner_than_ftype inner_than
)
4472 gdbarch
->inner_than
= inner_than
;
4475 const unsigned char *
4476 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4478 gdb_assert (gdbarch
!= NULL
);
4479 if (gdbarch
->breakpoint_from_pc
== 0)
4480 internal_error (__FILE__
, __LINE__
,
4481 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4482 if (gdbarch_debug
>= 2)
4483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4484 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4488 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4489 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4491 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4495 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4497 gdb_assert (gdbarch
!= NULL
);
4498 if (gdbarch
->memory_insert_breakpoint
== 0)
4499 internal_error (__FILE__
, __LINE__
,
4500 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4501 if (gdbarch_debug
>= 2)
4502 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4503 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4507 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4508 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4510 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4514 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4516 gdb_assert (gdbarch
!= NULL
);
4517 if (gdbarch
->memory_remove_breakpoint
== 0)
4518 internal_error (__FILE__
, __LINE__
,
4519 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4520 if (gdbarch_debug
>= 2)
4521 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4522 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4526 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4527 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4529 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4533 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4535 gdb_assert (gdbarch
!= NULL
);
4536 if (gdbarch
->decr_pc_after_break
== -1)
4537 internal_error (__FILE__
, __LINE__
,
4538 "gdbarch: gdbarch_decr_pc_after_break invalid");
4539 if (gdbarch_debug
>= 2)
4540 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4541 return gdbarch
->decr_pc_after_break
;
4545 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4546 CORE_ADDR decr_pc_after_break
)
4548 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4552 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4554 gdb_assert (gdbarch
!= NULL
);
4555 if (gdbarch
->prepare_to_proceed
== 0)
4556 internal_error (__FILE__
, __LINE__
,
4557 "gdbarch: gdbarch_prepare_to_proceed invalid");
4558 if (gdbarch_debug
>= 2)
4559 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4560 return gdbarch
->prepare_to_proceed (select_it
);
4564 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4565 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4567 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4571 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4573 gdb_assert (gdbarch
!= NULL
);
4574 if (gdbarch
->function_start_offset
== -1)
4575 internal_error (__FILE__
, __LINE__
,
4576 "gdbarch: gdbarch_function_start_offset invalid");
4577 if (gdbarch_debug
>= 2)
4578 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4579 return gdbarch
->function_start_offset
;
4583 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4584 CORE_ADDR function_start_offset
)
4586 gdbarch
->function_start_offset
= function_start_offset
;
4590 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4592 gdb_assert (gdbarch
!= NULL
);
4593 if (gdbarch
->remote_translate_xfer_address
== 0)
4594 internal_error (__FILE__
, __LINE__
,
4595 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4596 if (gdbarch_debug
>= 2)
4597 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4598 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4602 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4603 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4605 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4609 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4611 gdb_assert (gdbarch
!= NULL
);
4612 if (gdbarch
->frame_args_skip
== -1)
4613 internal_error (__FILE__
, __LINE__
,
4614 "gdbarch: gdbarch_frame_args_skip invalid");
4615 if (gdbarch_debug
>= 2)
4616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4617 return gdbarch
->frame_args_skip
;
4621 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4622 CORE_ADDR frame_args_skip
)
4624 gdbarch
->frame_args_skip
= frame_args_skip
;
4628 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4630 gdb_assert (gdbarch
!= NULL
);
4631 if (gdbarch
->frameless_function_invocation
== 0)
4632 internal_error (__FILE__
, __LINE__
,
4633 "gdbarch: gdbarch_frameless_function_invocation invalid");
4634 if (gdbarch_debug
>= 2)
4635 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4636 return gdbarch
->frameless_function_invocation (fi
);
4640 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4641 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4643 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4647 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4649 gdb_assert (gdbarch
!= NULL
);
4650 if (gdbarch
->frame_chain
== 0)
4651 internal_error (__FILE__
, __LINE__
,
4652 "gdbarch: gdbarch_frame_chain invalid");
4653 if (gdbarch_debug
>= 2)
4654 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4655 return gdbarch
->frame_chain (frame
);
4659 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4660 gdbarch_frame_chain_ftype frame_chain
)
4662 gdbarch
->frame_chain
= frame_chain
;
4666 gdbarch_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4668 gdb_assert (gdbarch
!= NULL
);
4669 return gdbarch
->frame_chain_valid
!= 0;
4673 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4675 gdb_assert (gdbarch
!= NULL
);
4676 if (gdbarch
->frame_chain_valid
== 0)
4677 internal_error (__FILE__
, __LINE__
,
4678 "gdbarch: gdbarch_frame_chain_valid invalid");
4679 if (gdbarch_debug
>= 2)
4680 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4681 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4685 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4686 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4688 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4692 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4694 gdb_assert (gdbarch
!= NULL
);
4695 if (gdbarch
->frame_saved_pc
== 0)
4696 internal_error (__FILE__
, __LINE__
,
4697 "gdbarch: gdbarch_frame_saved_pc invalid");
4698 if (gdbarch_debug
>= 2)
4699 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4700 return gdbarch
->frame_saved_pc (fi
);
4704 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4705 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4707 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4711 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4713 gdb_assert (gdbarch
!= NULL
);
4714 if (gdbarch
->frame_args_address
== 0)
4715 internal_error (__FILE__
, __LINE__
,
4716 "gdbarch: gdbarch_frame_args_address invalid");
4717 if (gdbarch_debug
>= 2)
4718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4719 return gdbarch
->frame_args_address (fi
);
4723 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4724 gdbarch_frame_args_address_ftype frame_args_address
)
4726 gdbarch
->frame_args_address
= frame_args_address
;
4730 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4732 gdb_assert (gdbarch
!= NULL
);
4733 if (gdbarch
->frame_locals_address
== 0)
4734 internal_error (__FILE__
, __LINE__
,
4735 "gdbarch: gdbarch_frame_locals_address invalid");
4736 if (gdbarch_debug
>= 2)
4737 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4738 return gdbarch
->frame_locals_address (fi
);
4742 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4743 gdbarch_frame_locals_address_ftype frame_locals_address
)
4745 gdbarch
->frame_locals_address
= frame_locals_address
;
4749 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4751 gdb_assert (gdbarch
!= NULL
);
4752 if (gdbarch
->saved_pc_after_call
== 0)
4753 internal_error (__FILE__
, __LINE__
,
4754 "gdbarch: gdbarch_saved_pc_after_call invalid");
4755 if (gdbarch_debug
>= 2)
4756 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4757 return gdbarch
->saved_pc_after_call (frame
);
4761 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4762 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4764 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4768 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4770 gdb_assert (gdbarch
!= NULL
);
4771 if (gdbarch
->frame_num_args
== 0)
4772 internal_error (__FILE__
, __LINE__
,
4773 "gdbarch: gdbarch_frame_num_args invalid");
4774 if (gdbarch_debug
>= 2)
4775 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4776 return gdbarch
->frame_num_args (frame
);
4780 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4781 gdbarch_frame_num_args_ftype frame_num_args
)
4783 gdbarch
->frame_num_args
= frame_num_args
;
4787 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4789 gdb_assert (gdbarch
!= NULL
);
4790 return gdbarch
->stack_align
!= 0;
4794 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4796 gdb_assert (gdbarch
!= NULL
);
4797 if (gdbarch
->stack_align
== 0)
4798 internal_error (__FILE__
, __LINE__
,
4799 "gdbarch: gdbarch_stack_align invalid");
4800 if (gdbarch_debug
>= 2)
4801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4802 return gdbarch
->stack_align (sp
);
4806 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4807 gdbarch_stack_align_ftype stack_align
)
4809 gdbarch
->stack_align
= stack_align
;
4813 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4815 gdb_assert (gdbarch
!= NULL
);
4816 return gdbarch
->frame_align
!= 0;
4820 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4822 gdb_assert (gdbarch
!= NULL
);
4823 if (gdbarch
->frame_align
== 0)
4824 internal_error (__FILE__
, __LINE__
,
4825 "gdbarch: gdbarch_frame_align invalid");
4826 if (gdbarch_debug
>= 2)
4827 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4828 return gdbarch
->frame_align (gdbarch
, address
);
4832 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4833 gdbarch_frame_align_ftype frame_align
)
4835 gdbarch
->frame_align
= frame_align
;
4839 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4841 gdb_assert (gdbarch
!= NULL
);
4842 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4843 if (gdbarch_debug
>= 2)
4844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4845 return gdbarch
->extra_stack_alignment_needed
;
4849 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4850 int extra_stack_alignment_needed
)
4852 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4856 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4858 gdb_assert (gdbarch
!= NULL
);
4859 return gdbarch
->reg_struct_has_addr
!= 0;
4863 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4865 gdb_assert (gdbarch
!= NULL
);
4866 if (gdbarch
->reg_struct_has_addr
== 0)
4867 internal_error (__FILE__
, __LINE__
,
4868 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4869 if (gdbarch_debug
>= 2)
4870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4871 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4875 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4876 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4878 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4882 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4884 gdb_assert (gdbarch
!= NULL
);
4885 return gdbarch
->save_dummy_frame_tos
!= 0;
4889 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4891 gdb_assert (gdbarch
!= NULL
);
4892 if (gdbarch
->save_dummy_frame_tos
== 0)
4893 internal_error (__FILE__
, __LINE__
,
4894 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4895 if (gdbarch_debug
>= 2)
4896 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4897 gdbarch
->save_dummy_frame_tos (sp
);
4901 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4902 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4904 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4908 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4910 gdb_assert (gdbarch
!= NULL
);
4911 if (gdbarch_debug
>= 2)
4912 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4913 return gdbarch
->parm_boundary
;
4917 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4920 gdbarch
->parm_boundary
= parm_boundary
;
4923 const struct floatformat
*
4924 gdbarch_float_format (struct gdbarch
*gdbarch
)
4926 gdb_assert (gdbarch
!= NULL
);
4927 if (gdbarch_debug
>= 2)
4928 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4929 return gdbarch
->float_format
;
4933 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4934 const struct floatformat
* float_format
)
4936 gdbarch
->float_format
= float_format
;
4939 const struct floatformat
*
4940 gdbarch_double_format (struct gdbarch
*gdbarch
)
4942 gdb_assert (gdbarch
!= NULL
);
4943 if (gdbarch_debug
>= 2)
4944 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4945 return gdbarch
->double_format
;
4949 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4950 const struct floatformat
* double_format
)
4952 gdbarch
->double_format
= double_format
;
4955 const struct floatformat
*
4956 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4958 gdb_assert (gdbarch
!= NULL
);
4959 if (gdbarch_debug
>= 2)
4960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4961 return gdbarch
->long_double_format
;
4965 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4966 const struct floatformat
* long_double_format
)
4968 gdbarch
->long_double_format
= long_double_format
;
4972 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4974 gdb_assert (gdbarch
!= NULL
);
4975 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4976 internal_error (__FILE__
, __LINE__
,
4977 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4978 if (gdbarch_debug
>= 2)
4979 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4980 return gdbarch
->convert_from_func_ptr_addr (addr
);
4984 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4985 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4987 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4991 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4993 gdb_assert (gdbarch
!= NULL
);
4994 if (gdbarch
->addr_bits_remove
== 0)
4995 internal_error (__FILE__
, __LINE__
,
4996 "gdbarch: gdbarch_addr_bits_remove invalid");
4997 if (gdbarch_debug
>= 2)
4998 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4999 return gdbarch
->addr_bits_remove (addr
);
5003 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
5004 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
5006 gdbarch
->addr_bits_remove
= addr_bits_remove
;
5010 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5012 gdb_assert (gdbarch
!= NULL
);
5013 if (gdbarch
->smash_text_address
== 0)
5014 internal_error (__FILE__
, __LINE__
,
5015 "gdbarch: gdbarch_smash_text_address invalid");
5016 if (gdbarch_debug
>= 2)
5017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
5018 return gdbarch
->smash_text_address (addr
);
5022 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
5023 gdbarch_smash_text_address_ftype smash_text_address
)
5025 gdbarch
->smash_text_address
= smash_text_address
;
5029 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
5031 gdb_assert (gdbarch
!= NULL
);
5032 return gdbarch
->software_single_step
!= 0;
5036 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
5038 gdb_assert (gdbarch
!= NULL
);
5039 if (gdbarch
->software_single_step
== 0)
5040 internal_error (__FILE__
, __LINE__
,
5041 "gdbarch: gdbarch_software_single_step invalid");
5042 if (gdbarch_debug
>= 2)
5043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
5044 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
5048 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
5049 gdbarch_software_single_step_ftype software_single_step
)
5051 gdbarch
->software_single_step
= software_single_step
;
5055 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
5057 gdb_assert (gdbarch
!= NULL
);
5058 if (gdbarch
->print_insn
== 0)
5059 internal_error (__FILE__
, __LINE__
,
5060 "gdbarch: gdbarch_print_insn invalid");
5061 if (gdbarch_debug
>= 2)
5062 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
5063 return gdbarch
->print_insn (vma
, info
);
5067 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
5068 gdbarch_print_insn_ftype print_insn
)
5070 gdbarch
->print_insn
= print_insn
;
5074 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5076 gdb_assert (gdbarch
!= NULL
);
5077 if (gdbarch
->skip_trampoline_code
== 0)
5078 internal_error (__FILE__
, __LINE__
,
5079 "gdbarch: gdbarch_skip_trampoline_code invalid");
5080 if (gdbarch_debug
>= 2)
5081 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
5082 return gdbarch
->skip_trampoline_code (pc
);
5086 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
5087 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
5089 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
5093 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5095 gdb_assert (gdbarch
!= NULL
);
5096 if (gdbarch
->in_solib_call_trampoline
== 0)
5097 internal_error (__FILE__
, __LINE__
,
5098 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5099 if (gdbarch_debug
>= 2)
5100 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
5101 return gdbarch
->in_solib_call_trampoline (pc
, name
);
5105 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
5106 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
5108 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
5112 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5114 gdb_assert (gdbarch
!= NULL
);
5115 if (gdbarch
->in_solib_return_trampoline
== 0)
5116 internal_error (__FILE__
, __LINE__
,
5117 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5118 if (gdbarch_debug
>= 2)
5119 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
5120 return gdbarch
->in_solib_return_trampoline (pc
, name
);
5124 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
5125 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
5127 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
5131 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5133 gdb_assert (gdbarch
!= NULL
);
5134 if (gdbarch
->pc_in_sigtramp
== 0)
5135 internal_error (__FILE__
, __LINE__
,
5136 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5137 if (gdbarch_debug
>= 2)
5138 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
5139 return gdbarch
->pc_in_sigtramp (pc
, name
);
5143 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
5144 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
5146 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
5150 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
5152 gdb_assert (gdbarch
!= NULL
);
5153 return gdbarch
->sigtramp_start
!= 0;
5157 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5159 gdb_assert (gdbarch
!= NULL
);
5160 if (gdbarch
->sigtramp_start
== 0)
5161 internal_error (__FILE__
, __LINE__
,
5162 "gdbarch: gdbarch_sigtramp_start invalid");
5163 if (gdbarch_debug
>= 2)
5164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
5165 return gdbarch
->sigtramp_start (pc
);
5169 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
5170 gdbarch_sigtramp_start_ftype sigtramp_start
)
5172 gdbarch
->sigtramp_start
= sigtramp_start
;
5176 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
5178 gdb_assert (gdbarch
!= NULL
);
5179 return gdbarch
->sigtramp_end
!= 0;
5183 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5185 gdb_assert (gdbarch
!= NULL
);
5186 if (gdbarch
->sigtramp_end
== 0)
5187 internal_error (__FILE__
, __LINE__
,
5188 "gdbarch: gdbarch_sigtramp_end invalid");
5189 if (gdbarch_debug
>= 2)
5190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
5191 return gdbarch
->sigtramp_end (pc
);
5195 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
5196 gdbarch_sigtramp_end_ftype sigtramp_end
)
5198 gdbarch
->sigtramp_end
= sigtramp_end
;
5202 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5204 gdb_assert (gdbarch
!= NULL
);
5205 if (gdbarch
->in_function_epilogue_p
== 0)
5206 internal_error (__FILE__
, __LINE__
,
5207 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5208 if (gdbarch_debug
>= 2)
5209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
5210 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
5214 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
5215 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
5217 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
5221 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
5223 gdb_assert (gdbarch
!= NULL
);
5224 if (gdbarch
->construct_inferior_arguments
== 0)
5225 internal_error (__FILE__
, __LINE__
,
5226 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5227 if (gdbarch_debug
>= 2)
5228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5229 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5233 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5234 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5236 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5240 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
5242 gdb_assert (gdbarch
!= NULL
);
5243 return gdbarch
->dwarf2_build_frame_info
!= 0;
5247 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
5249 gdb_assert (gdbarch
!= NULL
);
5250 if (gdbarch
->dwarf2_build_frame_info
== 0)
5251 internal_error (__FILE__
, __LINE__
,
5252 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5253 if (gdbarch_debug
>= 2)
5254 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
5255 gdbarch
->dwarf2_build_frame_info (objfile
);
5259 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
5260 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
5262 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
5266 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5268 gdb_assert (gdbarch
!= NULL
);
5269 if (gdbarch
->elf_make_msymbol_special
== 0)
5270 internal_error (__FILE__
, __LINE__
,
5271 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5272 if (gdbarch_debug
>= 2)
5273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5274 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5278 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5279 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5281 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5285 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5287 gdb_assert (gdbarch
!= NULL
);
5288 if (gdbarch
->coff_make_msymbol_special
== 0)
5289 internal_error (__FILE__
, __LINE__
,
5290 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5291 if (gdbarch_debug
>= 2)
5292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5293 gdbarch
->coff_make_msymbol_special (val
, msym
);
5297 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5298 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5300 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5304 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5306 gdb_assert (gdbarch
!= NULL
);
5307 /* Skip verify of name_of_malloc, invalid_p == 0 */
5308 if (gdbarch_debug
>= 2)
5309 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5310 return gdbarch
->name_of_malloc
;
5314 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5315 const char * name_of_malloc
)
5317 gdbarch
->name_of_malloc
= name_of_malloc
;
5321 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5323 gdb_assert (gdbarch
!= NULL
);
5324 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5325 if (gdbarch_debug
>= 2)
5326 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5327 return gdbarch
->cannot_step_breakpoint
;
5331 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5332 int cannot_step_breakpoint
)
5334 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5338 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5340 gdb_assert (gdbarch
!= NULL
);
5341 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5342 if (gdbarch_debug
>= 2)
5343 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5344 return gdbarch
->have_nonsteppable_watchpoint
;
5348 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5349 int have_nonsteppable_watchpoint
)
5351 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5355 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5357 gdb_assert (gdbarch
!= NULL
);
5358 return gdbarch
->address_class_type_flags
!= 0;
5362 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5364 gdb_assert (gdbarch
!= NULL
);
5365 if (gdbarch
->address_class_type_flags
== 0)
5366 internal_error (__FILE__
, __LINE__
,
5367 "gdbarch: gdbarch_address_class_type_flags invalid");
5368 if (gdbarch_debug
>= 2)
5369 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5370 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5374 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5375 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5377 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5381 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5383 gdb_assert (gdbarch
!= NULL
);
5384 return gdbarch
->address_class_type_flags_to_name
!= 0;
5388 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5390 gdb_assert (gdbarch
!= NULL
);
5391 if (gdbarch
->address_class_type_flags_to_name
== 0)
5392 internal_error (__FILE__
, __LINE__
,
5393 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5394 if (gdbarch_debug
>= 2)
5395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5396 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5400 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5401 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5403 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5407 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5409 gdb_assert (gdbarch
!= NULL
);
5410 return gdbarch
->address_class_name_to_type_flags
!= 0;
5414 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
5416 gdb_assert (gdbarch
!= NULL
);
5417 if (gdbarch
->address_class_name_to_type_flags
== 0)
5418 internal_error (__FILE__
, __LINE__
,
5419 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5420 if (gdbarch_debug
>= 2)
5421 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5422 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5426 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5427 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5429 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5433 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5435 gdb_assert (gdbarch
!= NULL
);
5436 if (gdbarch
->register_reggroup_p
== 0)
5437 internal_error (__FILE__
, __LINE__
,
5438 "gdbarch: gdbarch_register_reggroup_p invalid");
5439 if (gdbarch_debug
>= 2)
5440 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5441 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5445 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5446 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5448 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5452 /* Keep a registry of per-architecture data-pointers required by GDB
5459 gdbarch_data_init_ftype
*init
;
5460 gdbarch_data_free_ftype
*free
;
5463 struct gdbarch_data_registration
5465 struct gdbarch_data
*data
;
5466 struct gdbarch_data_registration
*next
;
5469 struct gdbarch_data_registry
5472 struct gdbarch_data_registration
*registrations
;
5475 struct gdbarch_data_registry gdbarch_data_registry
=
5480 struct gdbarch_data
*
5481 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5482 gdbarch_data_free_ftype
*free
)
5484 struct gdbarch_data_registration
**curr
;
5485 /* Append the new registraration. */
5486 for (curr
= &gdbarch_data_registry
.registrations
;
5488 curr
= &(*curr
)->next
);
5489 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5490 (*curr
)->next
= NULL
;
5491 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5492 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5493 (*curr
)->data
->init
= init
;
5494 (*curr
)->data
->init_p
= 1;
5495 (*curr
)->data
->free
= free
;
5496 return (*curr
)->data
;
5500 /* Create/delete the gdbarch data vector. */
5503 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5505 gdb_assert (gdbarch
->data
== NULL
);
5506 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5507 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5511 free_gdbarch_data (struct gdbarch
*gdbarch
)
5513 struct gdbarch_data_registration
*rego
;
5514 gdb_assert (gdbarch
->data
!= NULL
);
5515 for (rego
= gdbarch_data_registry
.registrations
;
5519 struct gdbarch_data
*data
= rego
->data
;
5520 gdb_assert (data
->index
< gdbarch
->nr_data
);
5521 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5523 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5524 gdbarch
->data
[data
->index
] = NULL
;
5527 xfree (gdbarch
->data
);
5528 gdbarch
->data
= NULL
;
5532 /* Initialize the current value of the specified per-architecture
5536 set_gdbarch_data (struct gdbarch
*gdbarch
,
5537 struct gdbarch_data
*data
,
5540 gdb_assert (data
->index
< gdbarch
->nr_data
);
5541 if (gdbarch
->data
[data
->index
] != NULL
)
5543 gdb_assert (data
->free
!= NULL
);
5544 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5546 gdbarch
->data
[data
->index
] = pointer
;
5549 /* Return the current value of the specified per-architecture
5553 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5555 gdb_assert (data
->index
< gdbarch
->nr_data
);
5556 /* The data-pointer isn't initialized, call init() to get a value but
5557 only if the architecture initializaiton has completed. Otherwise
5558 punt - hope that the caller knows what they are doing. */
5559 if (gdbarch
->data
[data
->index
] == NULL
5560 && gdbarch
->initialized_p
)
5562 /* Be careful to detect an initialization cycle. */
5563 gdb_assert (data
->init_p
);
5565 gdb_assert (data
->init
!= NULL
);
5566 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5568 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5570 return gdbarch
->data
[data
->index
];
5575 /* Keep a registry of swapped data required by GDB modules. */
5580 struct gdbarch_swap_registration
*source
;
5581 struct gdbarch_swap
*next
;
5584 struct gdbarch_swap_registration
5587 unsigned long sizeof_data
;
5588 gdbarch_swap_ftype
*init
;
5589 struct gdbarch_swap_registration
*next
;
5592 struct gdbarch_swap_registry
5595 struct gdbarch_swap_registration
*registrations
;
5598 struct gdbarch_swap_registry gdbarch_swap_registry
=
5604 register_gdbarch_swap (void *data
,
5605 unsigned long sizeof_data
,
5606 gdbarch_swap_ftype
*init
)
5608 struct gdbarch_swap_registration
**rego
;
5609 for (rego
= &gdbarch_swap_registry
.registrations
;
5611 rego
= &(*rego
)->next
);
5612 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5613 (*rego
)->next
= NULL
;
5614 (*rego
)->init
= init
;
5615 (*rego
)->data
= data
;
5616 (*rego
)->sizeof_data
= sizeof_data
;
5620 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5622 struct gdbarch_swap
*curr
;
5623 for (curr
= gdbarch
->swap
;
5627 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5632 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5634 struct gdbarch_swap_registration
*rego
;
5635 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5636 for (rego
= gdbarch_swap_registry
.registrations
;
5640 if (rego
->data
!= NULL
)
5642 (*curr
) = XMALLOC (struct gdbarch_swap
);
5643 (*curr
)->source
= rego
;
5644 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5645 (*curr
)->next
= NULL
;
5646 curr
= &(*curr
)->next
;
5648 if (rego
->init
!= NULL
)
5654 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5656 struct gdbarch_swap
*curr
;
5657 for (curr
= gdbarch
->swap
;
5660 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5664 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5666 struct gdbarch_swap
*curr
;
5667 for (curr
= gdbarch
->swap
;
5670 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5674 /* Keep a registry of the architectures known by GDB. */
5676 struct gdbarch_registration
5678 enum bfd_architecture bfd_architecture
;
5679 gdbarch_init_ftype
*init
;
5680 gdbarch_dump_tdep_ftype
*dump_tdep
;
5681 struct gdbarch_list
*arches
;
5682 struct gdbarch_registration
*next
;
5685 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5688 append_name (const char ***buf
, int *nr
, const char *name
)
5690 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5696 gdbarch_printable_names (void)
5700 /* Accumulate a list of names based on the registed list of
5702 enum bfd_architecture a
;
5704 const char **arches
= NULL
;
5705 struct gdbarch_registration
*rego
;
5706 for (rego
= gdbarch_registry
;
5710 const struct bfd_arch_info
*ap
;
5711 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5713 internal_error (__FILE__
, __LINE__
,
5714 "gdbarch_architecture_names: multi-arch unknown");
5717 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5722 append_name (&arches
, &nr_arches
, NULL
);
5726 /* Just return all the architectures that BFD knows. Assume that
5727 the legacy architecture framework supports them. */
5728 return bfd_arch_list ();
5733 gdbarch_register (enum bfd_architecture bfd_architecture
,
5734 gdbarch_init_ftype
*init
,
5735 gdbarch_dump_tdep_ftype
*dump_tdep
)
5737 struct gdbarch_registration
**curr
;
5738 const struct bfd_arch_info
*bfd_arch_info
;
5739 /* Check that BFD recognizes this architecture */
5740 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5741 if (bfd_arch_info
== NULL
)
5743 internal_error (__FILE__
, __LINE__
,
5744 "gdbarch: Attempt to register unknown architecture (%d)",
5747 /* Check that we haven't seen this architecture before */
5748 for (curr
= &gdbarch_registry
;
5750 curr
= &(*curr
)->next
)
5752 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5753 internal_error (__FILE__
, __LINE__
,
5754 "gdbarch: Duplicate registraration of architecture (%s)",
5755 bfd_arch_info
->printable_name
);
5759 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5760 bfd_arch_info
->printable_name
,
5763 (*curr
) = XMALLOC (struct gdbarch_registration
);
5764 (*curr
)->bfd_architecture
= bfd_architecture
;
5765 (*curr
)->init
= init
;
5766 (*curr
)->dump_tdep
= dump_tdep
;
5767 (*curr
)->arches
= NULL
;
5768 (*curr
)->next
= NULL
;
5769 /* When non- multi-arch, install whatever target dump routine we've
5770 been provided - hopefully that routine has been written correctly
5771 and works regardless of multi-arch. */
5772 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5773 && startup_gdbarch
.dump_tdep
== NULL
)
5774 startup_gdbarch
.dump_tdep
= dump_tdep
;
5778 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5779 gdbarch_init_ftype
*init
)
5781 gdbarch_register (bfd_architecture
, init
, NULL
);
5785 /* Look for an architecture using gdbarch_info. Base search on only
5786 BFD_ARCH_INFO and BYTE_ORDER. */
5788 struct gdbarch_list
*
5789 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5790 const struct gdbarch_info
*info
)
5792 for (; arches
!= NULL
; arches
= arches
->next
)
5794 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5796 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5798 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5806 /* Update the current architecture. Return ZERO if the update request
5810 gdbarch_update_p (struct gdbarch_info info
)
5812 struct gdbarch
*new_gdbarch
;
5813 struct gdbarch
*old_gdbarch
;
5814 struct gdbarch_registration
*rego
;
5816 /* Fill in missing parts of the INFO struct using a number of
5817 sources: ``set ...''; INFOabfd supplied; existing target. */
5819 /* ``(gdb) set architecture ...'' */
5820 if (info
.bfd_arch_info
== NULL
5821 && !TARGET_ARCHITECTURE_AUTO
)
5822 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5823 if (info
.bfd_arch_info
== NULL
5824 && info
.abfd
!= NULL
5825 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5826 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5827 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5828 if (info
.bfd_arch_info
== NULL
)
5829 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5831 /* ``(gdb) set byte-order ...'' */
5832 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5833 && !TARGET_BYTE_ORDER_AUTO
)
5834 info
.byte_order
= TARGET_BYTE_ORDER
;
5835 /* From the INFO struct. */
5836 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5837 && info
.abfd
!= NULL
)
5838 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5839 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5840 : BFD_ENDIAN_UNKNOWN
);
5841 /* From the current target. */
5842 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5843 info
.byte_order
= TARGET_BYTE_ORDER
;
5845 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
5846 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
5847 info
.osabi
= gdbarch_lookup_osabi (info
.abfd
);
5848 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
5849 info
.osabi
= current_gdbarch
->osabi
;
5851 /* Must have found some sort of architecture. */
5852 gdb_assert (info
.bfd_arch_info
!= NULL
);
5856 fprintf_unfiltered (gdb_stdlog
,
5857 "gdbarch_update: info.bfd_arch_info %s\n",
5858 (info
.bfd_arch_info
!= NULL
5859 ? info
.bfd_arch_info
->printable_name
5861 fprintf_unfiltered (gdb_stdlog
,
5862 "gdbarch_update: info.byte_order %d (%s)\n",
5864 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5865 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5867 fprintf_unfiltered (gdb_stdlog
,
5868 "gdbarch_update: info.osabi %d (%s)\n",
5869 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
5870 fprintf_unfiltered (gdb_stdlog
,
5871 "gdbarch_update: info.abfd 0x%lx\n",
5873 fprintf_unfiltered (gdb_stdlog
,
5874 "gdbarch_update: info.tdep_info 0x%lx\n",
5875 (long) info
.tdep_info
);
5878 /* Find the target that knows about this architecture. */
5879 for (rego
= gdbarch_registry
;
5882 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5887 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5891 /* Swap the data belonging to the old target out setting the
5892 installed data to zero. This stops the ->init() function trying
5893 to refer to the previous architecture's global data structures. */
5894 swapout_gdbarch_swap (current_gdbarch
);
5895 clear_gdbarch_swap (current_gdbarch
);
5897 /* Save the previously selected architecture, setting the global to
5898 NULL. This stops ->init() trying to use the previous
5899 architecture's configuration. The previous architecture may not
5900 even be of the same architecture family. The most recent
5901 architecture of the same family is found at the head of the
5902 rego->arches list. */
5903 old_gdbarch
= current_gdbarch
;
5904 current_gdbarch
= NULL
;
5906 /* Ask the target for a replacement architecture. */
5907 new_gdbarch
= rego
->init (info
, rego
->arches
);
5909 /* Did the target like it? No. Reject the change and revert to the
5910 old architecture. */
5911 if (new_gdbarch
== NULL
)
5914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5915 swapin_gdbarch_swap (old_gdbarch
);
5916 current_gdbarch
= old_gdbarch
;
5920 /* Did the architecture change? No. Oops, put the old architecture
5922 if (old_gdbarch
== new_gdbarch
)
5925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5927 new_gdbarch
->bfd_arch_info
->printable_name
);
5928 swapin_gdbarch_swap (old_gdbarch
);
5929 current_gdbarch
= old_gdbarch
;
5933 /* Is this a pre-existing architecture? Yes. Move it to the front
5934 of the list of architectures (keeping the list sorted Most
5935 Recently Used) and then copy it in. */
5937 struct gdbarch_list
**list
;
5938 for (list
= ®o
->arches
;
5940 list
= &(*list
)->next
)
5942 if ((*list
)->gdbarch
== new_gdbarch
)
5944 struct gdbarch_list
*this;
5946 fprintf_unfiltered (gdb_stdlog
,
5947 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5949 new_gdbarch
->bfd_arch_info
->printable_name
);
5952 (*list
) = this->next
;
5953 /* Insert in the front. */
5954 this->next
= rego
->arches
;
5955 rego
->arches
= this;
5956 /* Copy the new architecture in. */
5957 current_gdbarch
= new_gdbarch
;
5958 swapin_gdbarch_swap (new_gdbarch
);
5959 architecture_changed_event ();
5965 /* Prepend this new architecture to the architecture list (keep the
5966 list sorted Most Recently Used). */
5968 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5969 this->next
= rego
->arches
;
5970 this->gdbarch
= new_gdbarch
;
5971 rego
->arches
= this;
5974 /* Switch to this new architecture marking it initialized. */
5975 current_gdbarch
= new_gdbarch
;
5976 current_gdbarch
->initialized_p
= 1;
5979 fprintf_unfiltered (gdb_stdlog
,
5980 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5982 new_gdbarch
->bfd_arch_info
->printable_name
);
5985 /* Check that the newly installed architecture is valid. Plug in
5986 any post init values. */
5987 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5988 verify_gdbarch (new_gdbarch
);
5990 /* Initialize the per-architecture memory (swap) areas.
5991 CURRENT_GDBARCH must be update before these modules are
5993 init_gdbarch_swap (new_gdbarch
);
5995 /* Initialize the per-architecture data. CURRENT_GDBARCH
5996 must be updated before these modules are called. */
5997 architecture_changed_event ();
6000 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
6008 /* Pointer to the target-dependent disassembly function. */
6009 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
6010 disassemble_info tm_print_insn_info
;
6013 extern void _initialize_gdbarch (void);
6016 _initialize_gdbarch (void)
6018 struct cmd_list_element
*c
;
6020 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
6021 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
6022 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
6023 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
6024 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
6026 add_show_from_set (add_set_cmd ("arch",
6029 (char *)&gdbarch_debug
,
6030 "Set architecture debugging.\n\
6031 When non-zero, architecture debugging is enabled.", &setdebuglist
),
6033 c
= add_set_cmd ("archdebug",
6036 (char *)&gdbarch_debug
,
6037 "Set architecture debugging.\n\
6038 When non-zero, architecture debugging is enabled.", &setlist
);
6040 deprecate_cmd (c
, "set debug arch");
6041 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");