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"
69 #include "symfile.h" /* For entry_point_address. */
71 /* Static function declarations */
73 static void verify_gdbarch (struct gdbarch
*gdbarch
);
74 static void alloc_gdbarch_data (struct gdbarch
*);
75 static void free_gdbarch_data (struct gdbarch
*);
76 static void init_gdbarch_swap (struct gdbarch
*);
77 static void clear_gdbarch_swap (struct gdbarch
*);
78 static void swapout_gdbarch_swap (struct gdbarch
*);
79 static void swapin_gdbarch_swap (struct gdbarch
*);
81 /* Non-zero if we want to trace architecture code. */
84 #define GDBARCH_DEBUG 0
86 int gdbarch_debug
= GDBARCH_DEBUG
;
89 /* Maintain the struct gdbarch object */
93 /* Has this architecture been fully initialized? */
95 /* basic architectural information */
96 const struct bfd_arch_info
* bfd_arch_info
;
100 /* target specific vector. */
101 struct gdbarch_tdep
*tdep
;
102 gdbarch_dump_tdep_ftype
*dump_tdep
;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap
*swap
;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype
*read_pc
;
149 gdbarch_write_pc_ftype
*write_pc
;
150 gdbarch_deprecated_target_read_fp_ftype
*deprecated_target_read_fp
;
151 gdbarch_read_sp_ftype
*read_sp
;
152 gdbarch_deprecated_dummy_write_sp_ftype
*deprecated_dummy_write_sp
;
153 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
154 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
155 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
159 int deprecated_fp_regnum
;
164 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
165 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
166 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
167 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
168 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
169 gdbarch_register_name_ftype
*register_name
;
172 gdbarch_register_byte_ftype
*register_byte
;
173 gdbarch_register_raw_size_ftype
*register_raw_size
;
174 int deprecated_max_register_raw_size
;
175 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
176 int deprecated_max_register_virtual_size
;
177 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
178 gdbarch_register_type_ftype
*register_type
;
179 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
180 gdbarch_print_registers_info_ftype
*print_registers_info
;
181 gdbarch_print_float_info_ftype
*print_float_info
;
182 gdbarch_print_vector_info_ftype
*print_vector_info
;
183 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
184 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
185 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
186 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
187 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
188 int deprecated_use_generic_dummy_frames
;
189 int call_dummy_location
;
190 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
191 CORE_ADDR call_dummy_start_offset
;
192 CORE_ADDR call_dummy_breakpoint_offset
;
193 int call_dummy_length
;
194 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 deprecated_call_dummy_stack_adjust
;
198 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
199 gdbarch_deprecated_init_frame_pc_first_ftype
*deprecated_init_frame_pc_first
;
200 gdbarch_deprecated_init_frame_pc_ftype
*deprecated_init_frame_pc
;
201 int believe_pcc_promotion
;
202 int believe_pcc_promotion_type
;
203 gdbarch_deprecated_get_saved_register_ftype
*deprecated_get_saved_register
;
204 gdbarch_register_convertible_ftype
*register_convertible
;
205 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
206 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
207 gdbarch_convert_register_p_ftype
*convert_register_p
;
208 gdbarch_register_to_value_ftype
*register_to_value
;
209 gdbarch_value_to_register_ftype
*value_to_register
;
210 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
211 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
212 gdbarch_integer_to_address_ftype
*integer_to_address
;
213 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
214 gdbarch_deprecated_push_arguments_ftype
*deprecated_push_arguments
;
215 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
216 gdbarch_deprecated_push_dummy_frame_ftype
*deprecated_push_dummy_frame
;
217 gdbarch_deprecated_push_return_address_ftype
*deprecated_push_return_address
;
218 gdbarch_deprecated_pop_frame_ftype
*deprecated_pop_frame
;
219 gdbarch_deprecated_store_struct_return_ftype
*deprecated_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_deprecated_frame_init_saved_regs_ftype
*deprecated_frame_init_saved_regs
;
228 gdbarch_deprecated_init_extra_frame_info_ftype
*deprecated_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_deprecated_frame_chain_ftype
*deprecated_frame_chain
;
242 gdbarch_deprecated_frame_chain_valid_ftype
*deprecated_frame_chain_valid
;
243 gdbarch_deprecated_frame_saved_pc_ftype
*deprecated_frame_saved_pc
;
244 gdbarch_unwind_pc_ftype
*unwind_pc
;
245 gdbarch_frame_args_address_ftype
*frame_args_address
;
246 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
247 gdbarch_deprecated_saved_pc_after_call_ftype
*deprecated_saved_pc_after_call
;
248 gdbarch_frame_num_args_ftype
*frame_num_args
;
249 gdbarch_stack_align_ftype
*stack_align
;
250 gdbarch_frame_align_ftype
*frame_align
;
251 int deprecated_extra_stack_alignment_needed
;
252 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
253 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
254 gdbarch_unwind_dummy_id_ftype
*unwind_dummy_id
;
256 const struct floatformat
* float_format
;
257 const struct floatformat
* double_format
;
258 const struct floatformat
* long_double_format
;
259 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
260 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
261 gdbarch_smash_text_address_ftype
*smash_text_address
;
262 gdbarch_software_single_step_ftype
*software_single_step
;
263 gdbarch_print_insn_ftype
*print_insn
;
264 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
265 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
266 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
267 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
268 gdbarch_sigtramp_start_ftype
*sigtramp_start
;
269 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
270 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
271 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
272 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
273 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
274 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
275 const char * name_of_malloc
;
276 int cannot_step_breakpoint
;
277 int have_nonsteppable_watchpoint
;
278 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
279 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
280 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
281 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
285 /* The default architecture uses host values (for want of a better
288 extern const struct bfd_arch_info bfd_default_arch_struct
;
290 struct gdbarch startup_gdbarch
=
292 1, /* Always initialized. */
293 /* basic architecture information */
294 &bfd_default_arch_struct
,
297 /* target specific vector and its dump routine */
299 /*per-architecture data-pointers and swap regions */
301 /* Multi-arch values */
305 8 * sizeof (LONGEST
),
308 8 * sizeof (long double),
337 generic_register_byte
,
338 generic_register_size
,
340 generic_register_size
,
345 default_print_registers_info
,
359 generic_pc_in_call_dummy
,
435 generic_in_function_epilogue_p
,
436 construct_inferior_arguments
,
446 default_register_reggroup_p
,
447 /* startup_gdbarch() */
450 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
452 /* Do any initialization needed for a non-multiarch configuration
453 after the _initialize_MODULE functions have been run. */
455 initialize_non_multiarch (void)
457 alloc_gdbarch_data (&startup_gdbarch
);
458 /* Ensure that all swap areas are zeroed so that they again think
459 they are starting from scratch. */
460 clear_gdbarch_swap (&startup_gdbarch
);
461 init_gdbarch_swap (&startup_gdbarch
);
465 /* Create a new ``struct gdbarch'' based on information provided by
466 ``struct gdbarch_info''. */
469 gdbarch_alloc (const struct gdbarch_info
*info
,
470 struct gdbarch_tdep
*tdep
)
472 /* NOTE: The new architecture variable is named ``current_gdbarch''
473 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
474 the current local architecture and not the previous global
475 architecture. This ensures that the new architectures initial
476 values are not influenced by the previous architecture. Once
477 everything is parameterised with gdbarch, this will go away. */
478 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
479 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
481 alloc_gdbarch_data (current_gdbarch
);
483 current_gdbarch
->tdep
= tdep
;
485 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
486 current_gdbarch
->byte_order
= info
->byte_order
;
487 current_gdbarch
->osabi
= info
->osabi
;
489 /* Force the explicit initialization of these. */
490 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
491 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
492 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
493 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
494 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
495 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
496 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
497 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
498 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
499 current_gdbarch
->char_signed
= -1;
500 current_gdbarch
->read_pc
= generic_target_read_pc
;
501 current_gdbarch
->write_pc
= generic_target_write_pc
;
502 current_gdbarch
->read_sp
= generic_target_read_sp
;
503 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
504 current_gdbarch
->num_regs
= -1;
505 current_gdbarch
->sp_regnum
= -1;
506 current_gdbarch
->deprecated_fp_regnum
= -1;
507 current_gdbarch
->pc_regnum
= -1;
508 current_gdbarch
->ps_regnum
= -1;
509 current_gdbarch
->fp0_regnum
= -1;
510 current_gdbarch
->npc_regnum
= -1;
511 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
512 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
513 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
514 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
515 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
516 current_gdbarch
->register_name
= legacy_register_name
;
517 current_gdbarch
->register_size
= -1;
518 current_gdbarch
->register_bytes
= -1;
519 current_gdbarch
->register_byte
= generic_register_byte
;
520 current_gdbarch
->register_raw_size
= generic_register_size
;
521 current_gdbarch
->register_virtual_size
= generic_register_size
;
522 current_gdbarch
->print_registers_info
= default_print_registers_info
;
523 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
524 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
525 current_gdbarch
->cannot_store_register
= cannot_register_not
;
526 current_gdbarch
->deprecated_use_generic_dummy_frames
= 1;
527 current_gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
528 current_gdbarch
->call_dummy_address
= entry_point_address
;
529 current_gdbarch
->deprecated_pc_in_call_dummy
= generic_pc_in_call_dummy
;
530 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
531 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
532 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
533 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
534 current_gdbarch
->register_to_value
= legacy_register_to_value
;
535 current_gdbarch
->value_to_register
= legacy_value_to_register
;
536 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
537 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
538 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
539 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
540 current_gdbarch
->store_return_value
= legacy_store_return_value
;
541 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
542 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
543 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
544 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
545 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
546 current_gdbarch
->decr_pc_after_break
= -1;
547 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
548 current_gdbarch
->function_start_offset
= -1;
549 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
550 current_gdbarch
->frame_args_skip
= -1;
551 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
552 current_gdbarch
->frame_args_address
= get_frame_base
;
553 current_gdbarch
->frame_locals_address
= get_frame_base
;
554 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
555 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
556 current_gdbarch
->smash_text_address
= core_addr_identity
;
557 current_gdbarch
->print_insn
= legacy_print_insn
;
558 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
559 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
560 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
561 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
562 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
563 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
564 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
565 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
566 current_gdbarch
->name_of_malloc
= "malloc";
567 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
568 /* gdbarch_alloc() */
570 return current_gdbarch
;
574 /* Free a gdbarch struct. This should never happen in normal
575 operation --- once you've created a gdbarch, you keep it around.
576 However, if an architecture's init function encounters an error
577 building the structure, it may need to clean up a partially
578 constructed gdbarch. */
581 gdbarch_free (struct gdbarch
*arch
)
583 gdb_assert (arch
!= NULL
);
584 free_gdbarch_data (arch
);
589 /* Ensure that all values in a GDBARCH are reasonable. */
592 verify_gdbarch (struct gdbarch
*gdbarch
)
595 struct cleanup
*cleanups
;
598 /* Only perform sanity checks on a multi-arch target. */
601 log
= mem_fileopen ();
602 cleanups
= make_cleanup_ui_file_delete (log
);
604 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
605 fprintf_unfiltered (log
, "\n\tbyte-order");
606 if (gdbarch
->bfd_arch_info
== NULL
)
607 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
608 /* Check those that need to be defined for the given multi-arch level. */
609 /* Skip verify of short_bit, invalid_p == 0 */
610 /* Skip verify of int_bit, invalid_p == 0 */
611 /* Skip verify of long_bit, invalid_p == 0 */
612 /* Skip verify of long_long_bit, invalid_p == 0 */
613 /* Skip verify of float_bit, invalid_p == 0 */
614 /* Skip verify of double_bit, invalid_p == 0 */
615 /* Skip verify of long_double_bit, invalid_p == 0 */
616 /* Skip verify of ptr_bit, invalid_p == 0 */
617 if (gdbarch
->addr_bit
== 0)
618 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
619 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
620 if (gdbarch
->char_signed
== -1)
621 gdbarch
->char_signed
= 1;
622 /* Skip verify of read_pc, invalid_p == 0 */
623 /* Skip verify of write_pc, invalid_p == 0 */
624 /* Skip verify of deprecated_target_read_fp, has predicate */
625 /* Skip verify of read_sp, invalid_p == 0 */
626 /* Skip verify of deprecated_dummy_write_sp, has predicate */
627 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
628 /* Skip verify of pseudo_register_read, has predicate */
629 /* Skip verify of pseudo_register_write, has predicate */
630 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
631 && (gdbarch
->num_regs
== -1))
632 fprintf_unfiltered (log
, "\n\tnum_regs");
633 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
634 /* Skip verify of sp_regnum, invalid_p == 0 */
635 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
636 /* Skip verify of pc_regnum, invalid_p == 0 */
637 /* Skip verify of ps_regnum, invalid_p == 0 */
638 /* Skip verify of fp0_regnum, invalid_p == 0 */
639 /* Skip verify of npc_regnum, invalid_p == 0 */
640 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
641 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
642 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
643 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
644 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
645 /* Skip verify of register_name, invalid_p == 0 */
646 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
647 && (gdbarch
->register_size
== -1))
648 fprintf_unfiltered (log
, "\n\tregister_size");
649 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
650 && (gdbarch
->register_bytes
== -1))
651 fprintf_unfiltered (log
, "\n\tregister_bytes");
652 /* Skip verify of register_byte, invalid_p == 0 */
653 /* Skip verify of register_raw_size, invalid_p == 0 */
654 /* Skip verify of deprecated_max_register_raw_size, has predicate */
655 /* Skip verify of register_virtual_size, invalid_p == 0 */
656 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
657 /* Skip verify of register_virtual_type, has predicate */
658 /* Skip verify of register_type, has predicate */
659 /* Skip verify of deprecated_do_registers_info, has predicate */
660 /* Skip verify of print_registers_info, invalid_p == 0 */
661 /* Skip verify of print_float_info, has predicate */
662 /* Skip verify of print_vector_info, has predicate */
663 /* Skip verify of register_sim_regno, invalid_p == 0 */
664 /* Skip verify of register_bytes_ok, has predicate */
665 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
666 /* Skip verify of cannot_store_register, invalid_p == 0 */
667 /* Skip verify of get_longjmp_target, has predicate */
668 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
669 /* Skip verify of call_dummy_location, invalid_p == 0 */
670 /* Skip verify of call_dummy_address, invalid_p == 0 */
671 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
672 /* Skip verify of call_dummy_words, invalid_p == 0 */
673 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
674 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
675 /* Skip verify of fix_call_dummy, has predicate */
676 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
677 /* Skip verify of deprecated_init_frame_pc, has predicate */
678 /* Skip verify of deprecated_get_saved_register, has predicate */
679 /* Skip verify of register_convertible, invalid_p == 0 */
680 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
681 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
682 /* Skip verify of convert_register_p, invalid_p == 0 */
683 /* Skip verify of register_to_value, invalid_p == 0 */
684 /* Skip verify of value_to_register, invalid_p == 0 */
685 /* Skip verify of pointer_to_address, invalid_p == 0 */
686 /* Skip verify of address_to_pointer, invalid_p == 0 */
687 /* Skip verify of integer_to_address, has predicate */
688 /* Skip verify of return_value_on_stack, invalid_p == 0 */
689 /* Skip verify of deprecated_push_arguments, has predicate */
690 /* Skip verify of push_dummy_call, has predicate */
691 /* Skip verify of deprecated_push_dummy_frame, has predicate */
692 /* Skip verify of deprecated_push_return_address, has predicate */
693 /* Skip verify of deprecated_pop_frame, has predicate */
694 /* Skip verify of deprecated_store_struct_return, has predicate */
695 /* Skip verify of extract_return_value, invalid_p == 0 */
696 /* Skip verify of store_return_value, invalid_p == 0 */
697 /* Skip verify of extract_struct_value_address, has predicate */
698 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
699 /* Skip verify of use_struct_convention, invalid_p == 0 */
700 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
701 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
702 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
703 && (gdbarch
->skip_prologue
== 0))
704 fprintf_unfiltered (log
, "\n\tskip_prologue");
705 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
706 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
707 && (gdbarch
->inner_than
== 0))
708 fprintf_unfiltered (log
, "\n\tinner_than");
709 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
710 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
711 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
712 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
713 && (gdbarch
->decr_pc_after_break
== -1))
714 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
715 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
716 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
717 && (gdbarch
->function_start_offset
== -1))
718 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
719 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
720 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
721 && (gdbarch
->frame_args_skip
== -1))
722 fprintf_unfiltered (log
, "\n\tframe_args_skip");
723 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
724 /* Skip verify of deprecated_frame_chain, has predicate */
725 /* Skip verify of deprecated_frame_chain_valid, has predicate */
726 /* Skip verify of deprecated_frame_saved_pc, has predicate */
727 /* Skip verify of unwind_pc, has predicate */
728 /* Skip verify of frame_args_address, invalid_p == 0 */
729 /* Skip verify of frame_locals_address, invalid_p == 0 */
730 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
731 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
732 && (gdbarch
->frame_num_args
== 0))
733 fprintf_unfiltered (log
, "\n\tframe_num_args");
734 /* Skip verify of stack_align, has predicate */
735 /* Skip verify of frame_align, has predicate */
736 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
737 /* Skip verify of reg_struct_has_addr, has predicate */
738 /* Skip verify of save_dummy_frame_tos, has predicate */
739 /* Skip verify of unwind_dummy_id, has predicate */
740 if (gdbarch
->float_format
== 0)
741 gdbarch
->float_format
= default_float_format (gdbarch
);
742 if (gdbarch
->double_format
== 0)
743 gdbarch
->double_format
= default_double_format (gdbarch
);
744 if (gdbarch
->long_double_format
== 0)
745 gdbarch
->long_double_format
= default_double_format (gdbarch
);
746 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
747 /* Skip verify of addr_bits_remove, invalid_p == 0 */
748 /* Skip verify of smash_text_address, invalid_p == 0 */
749 /* Skip verify of software_single_step, has predicate */
750 /* Skip verify of print_insn, invalid_p == 0 */
751 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
752 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
753 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
754 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
755 /* Skip verify of sigtramp_start, has predicate */
756 /* Skip verify of sigtramp_end, has predicate */
757 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
758 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
759 /* Skip verify of dwarf2_build_frame_info, has predicate */
760 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
761 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
762 /* Skip verify of name_of_malloc, invalid_p == 0 */
763 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
764 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
765 /* Skip verify of address_class_type_flags, has predicate */
766 /* Skip verify of address_class_type_flags_to_name, has predicate */
767 /* Skip verify of address_class_name_to_type_flags, has predicate */
768 /* Skip verify of register_reggroup_p, invalid_p == 0 */
769 buf
= ui_file_xstrdup (log
, &dummy
);
770 make_cleanup (xfree
, buf
);
771 if (strlen (buf
) > 0)
772 internal_error (__FILE__
, __LINE__
,
773 "verify_gdbarch: the following are invalid ...%s",
775 do_cleanups (cleanups
);
779 /* Print out the details of the current architecture. */
781 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
782 just happens to match the global variable ``current_gdbarch''. That
783 way macros refering to that variable get the local and not the global
784 version - ulgh. Once everything is parameterised with gdbarch, this
788 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
790 fprintf_unfiltered (file
,
791 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
794 fprintf_unfiltered (file
,
795 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
796 gdbarch_frame_align_p (current_gdbarch
));
798 fprintf_unfiltered (file
,
799 "gdbarch_dump: frame_align = 0x%08lx\n",
800 (long) current_gdbarch
->frame_align
);
802 fprintf_unfiltered (file
,
803 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
804 (long) current_gdbarch
->in_function_epilogue_p
);
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
808 (long) current_gdbarch
->register_reggroup_p
);
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
812 gdbarch_pseudo_register_read_p (current_gdbarch
));
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
816 (long) current_gdbarch
->pseudo_register_read
);
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
820 gdbarch_pseudo_register_write_p (current_gdbarch
));
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
824 (long) current_gdbarch
->pseudo_register_write
);
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
828 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
832 (long) current_gdbarch
->address_class_name_to_type_flags
);
833 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: %s # %s\n",
836 "ADDRESS_CLASS_TYPE_FLAGS_P()",
837 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
840 ADDRESS_CLASS_TYPE_FLAGS_P ());
842 #ifdef ADDRESS_CLASS_TYPE_FLAGS
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: %s # %s\n",
845 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
846 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
850 (long) current_gdbarch
->address_class_type_flags
851 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
856 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
860 (long) current_gdbarch
->address_class_type_flags_to_name
);
861 #ifdef ADDRESS_TO_POINTER
863 /* Macro might contain `[{}]' when not multi-arch */
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: %s # %s\n",
866 "ADDRESS_TO_POINTER(type, buf, addr)",
867 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
872 (long) current_gdbarch
->address_to_pointer
873 /*ADDRESS_TO_POINTER ()*/);
875 #ifdef ADDR_BITS_REMOVE
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: %s # %s\n",
878 "ADDR_BITS_REMOVE(addr)",
879 XSTRING (ADDR_BITS_REMOVE (addr
)));
881 fprintf_unfiltered (file
,
882 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
883 (long) current_gdbarch
->addr_bits_remove
884 /*ADDR_BITS_REMOVE ()*/);
886 #ifdef BELIEVE_PCC_PROMOTION
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
889 XSTRING (BELIEVE_PCC_PROMOTION
));
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
892 BELIEVE_PCC_PROMOTION
);
894 #ifdef BELIEVE_PCC_PROMOTION_TYPE
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
897 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
900 BELIEVE_PCC_PROMOTION_TYPE
);
902 #ifdef BREAKPOINT_FROM_PC
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: %s # %s\n",
905 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
906 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
910 (long) current_gdbarch
->breakpoint_from_pc
911 /*BREAKPOINT_FROM_PC ()*/);
913 #ifdef CALL_DUMMY_ADDRESS
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: %s # %s\n",
916 "CALL_DUMMY_ADDRESS()",
917 XSTRING (CALL_DUMMY_ADDRESS ()));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
921 (long) current_gdbarch
->call_dummy_address
922 /*CALL_DUMMY_ADDRESS ()*/);
924 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
927 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
930 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
932 #ifdef CALL_DUMMY_LENGTH
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
935 XSTRING (CALL_DUMMY_LENGTH
));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
940 #ifdef CALL_DUMMY_LOCATION
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
943 XSTRING (CALL_DUMMY_LOCATION
));
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
946 CALL_DUMMY_LOCATION
);
948 #ifdef CALL_DUMMY_START_OFFSET
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
951 XSTRING (CALL_DUMMY_START_OFFSET
));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CALL_DUMMY_START_OFFSET = %ld\n",
954 (long) CALL_DUMMY_START_OFFSET
);
956 #ifdef CALL_DUMMY_WORDS
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
959 XSTRING (CALL_DUMMY_WORDS
));
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
962 (long) CALL_DUMMY_WORDS
);
964 #ifdef CANNOT_FETCH_REGISTER
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: %s # %s\n",
967 "CANNOT_FETCH_REGISTER(regnum)",
968 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
972 (long) current_gdbarch
->cannot_fetch_register
973 /*CANNOT_FETCH_REGISTER ()*/);
975 #ifdef CANNOT_STEP_BREAKPOINT
976 fprintf_unfiltered (file
,
977 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
978 XSTRING (CANNOT_STEP_BREAKPOINT
));
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
981 CANNOT_STEP_BREAKPOINT
);
983 #ifdef CANNOT_STORE_REGISTER
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: %s # %s\n",
986 "CANNOT_STORE_REGISTER(regnum)",
987 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
991 (long) current_gdbarch
->cannot_store_register
992 /*CANNOT_STORE_REGISTER ()*/);
994 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
996 /* Macro might contain `[{}]' when not multi-arch */
997 fprintf_unfiltered (file
,
998 "gdbarch_dump: %s # %s\n",
999 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1000 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1005 (long) current_gdbarch
->coff_make_msymbol_special
1006 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1011 (long) current_gdbarch
->construct_inferior_arguments
);
1012 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: %s # %s\n",
1015 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1016 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1020 (long) current_gdbarch
->convert_from_func_ptr_addr
1021 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1023 #ifdef CONVERT_REGISTER_P
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: %s # %s\n",
1026 "CONVERT_REGISTER_P(regnum)",
1027 XSTRING (CONVERT_REGISTER_P (regnum
)));
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1031 (long) current_gdbarch
->convert_register_p
1032 /*CONVERT_REGISTER_P ()*/);
1034 #ifdef DECR_PC_AFTER_BREAK
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1037 XSTRING (DECR_PC_AFTER_BREAK
));
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1040 (long) DECR_PC_AFTER_BREAK
);
1042 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: %s # %s\n",
1045 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1046 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1049 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1051 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1054 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST
));
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1057 DEPRECATED_CALL_DUMMY_STACK_ADJUST
);
1059 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: %s # %s\n",
1062 "DEPRECATED_DO_REGISTERS_INFO_P()",
1063 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1066 DEPRECATED_DO_REGISTERS_INFO_P ());
1068 #ifdef DEPRECATED_DO_REGISTERS_INFO
1070 /* Macro might contain `[{}]' when not multi-arch */
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: %s # %s\n",
1073 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1074 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1079 (long) current_gdbarch
->deprecated_do_registers_info
1080 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1082 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: %s # %s\n",
1085 "DEPRECATED_DUMMY_WRITE_SP_P()",
1086 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1089 DEPRECATED_DUMMY_WRITE_SP_P ());
1091 #ifdef DEPRECATED_DUMMY_WRITE_SP
1093 /* Macro might contain `[{}]' when not multi-arch */
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: %s # %s\n",
1096 "DEPRECATED_DUMMY_WRITE_SP(val)",
1097 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val
)));
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1102 (long) current_gdbarch
->deprecated_dummy_write_sp
1103 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1105 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1107 /* Macro might contain `[{}]' when not multi-arch */
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: %s # %s\n",
1110 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1111 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1114 fprintf_unfiltered (file
,
1115 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1116 (long) current_gdbarch
->deprecated_extract_return_value
1117 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1119 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: %s # %s\n",
1122 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1123 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1126 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1128 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: %s # %s\n",
1131 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1132 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1136 (long) current_gdbarch
->deprecated_extract_struct_value_address
1137 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1139 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1140 fprintf_unfiltered (file
,
1141 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1142 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1145 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
);
1147 #ifdef DEPRECATED_FP_REGNUM
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1150 XSTRING (DEPRECATED_FP_REGNUM
));
1151 fprintf_unfiltered (file
,
1152 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1153 DEPRECATED_FP_REGNUM
);
1155 #ifdef DEPRECATED_FRAME_CHAIN_P
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: %s # %s\n",
1158 "DEPRECATED_FRAME_CHAIN_P()",
1159 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1162 DEPRECATED_FRAME_CHAIN_P ());
1164 #ifdef DEPRECATED_FRAME_CHAIN
1165 fprintf_unfiltered (file
,
1166 "gdbarch_dump: %s # %s\n",
1167 "DEPRECATED_FRAME_CHAIN(frame)",
1168 XSTRING (DEPRECATED_FRAME_CHAIN (frame
)));
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1172 (long) current_gdbarch
->deprecated_frame_chain
1173 /*DEPRECATED_FRAME_CHAIN ()*/);
1175 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1176 fprintf_unfiltered (file
,
1177 "gdbarch_dump: %s # %s\n",
1178 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1179 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1182 DEPRECATED_FRAME_CHAIN_VALID_P ());
1184 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: %s # %s\n",
1187 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1188 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain
, thisframe
)));
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1192 (long) current_gdbarch
->deprecated_frame_chain_valid
1193 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1195 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1196 fprintf_unfiltered (file
,
1197 "gdbarch_dump: %s # %s\n",
1198 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1199 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1202 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1204 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1206 /* Macro might contain `[{}]' when not multi-arch */
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: %s # %s\n",
1209 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1210 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
1213 fprintf_unfiltered (file
,
1214 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1215 (long) current_gdbarch
->deprecated_frame_init_saved_regs
1216 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1218 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: %s # %s\n",
1221 "DEPRECATED_FRAME_SAVED_PC_P()",
1222 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1225 DEPRECATED_FRAME_SAVED_PC_P ());
1227 #ifdef DEPRECATED_FRAME_SAVED_PC
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: %s # %s\n",
1230 "DEPRECATED_FRAME_SAVED_PC(fi)",
1231 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi
)));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1235 (long) current_gdbarch
->deprecated_frame_saved_pc
1236 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1238 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: %s # %s\n",
1241 "DEPRECATED_GET_SAVED_REGISTER_P()",
1242 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1245 DEPRECATED_GET_SAVED_REGISTER_P ());
1247 #ifdef DEPRECATED_GET_SAVED_REGISTER
1249 /* Macro might contain `[{}]' when not multi-arch */
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: %s # %s\n",
1252 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1253 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1256 fprintf_unfiltered (file
,
1257 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1258 (long) current_gdbarch
->deprecated_get_saved_register
1259 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1261 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: %s # %s\n",
1264 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1265 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1268 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1270 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1272 /* Macro might contain `[{}]' when not multi-arch */
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: %s # %s\n",
1275 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1276 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1281 (long) current_gdbarch
->deprecated_init_extra_frame_info
1282 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1284 #ifdef DEPRECATED_INIT_FRAME_PC_P
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: %s # %s\n",
1287 "DEPRECATED_INIT_FRAME_PC_P()",
1288 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1291 DEPRECATED_INIT_FRAME_PC_P ());
1293 #ifdef DEPRECATED_INIT_FRAME_PC
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: %s # %s\n",
1296 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1297 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1301 (long) current_gdbarch
->deprecated_init_frame_pc
1302 /*DEPRECATED_INIT_FRAME_PC ()*/);
1304 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1308 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1311 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1313 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1314 fprintf_unfiltered (file
,
1315 "gdbarch_dump: %s # %s\n",
1316 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1317 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1321 (long) current_gdbarch
->deprecated_init_frame_pc_first
1322 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1324 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: %s # %s\n",
1327 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1328 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1331 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1333 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1336 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE
));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1339 DEPRECATED_MAX_REGISTER_RAW_SIZE
);
1341 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1342 fprintf_unfiltered (file
,
1343 "gdbarch_dump: %s # %s\n",
1344 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1345 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1348 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1350 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1353 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
));
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1356 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
);
1358 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: %s # %s\n",
1361 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1362 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1365 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1367 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1368 fprintf_unfiltered (file
,
1369 "gdbarch_dump: %s # %s\n",
1370 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1371 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1375 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1376 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1378 #ifdef DEPRECATED_POP_FRAME_P
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: %s # %s\n",
1381 "DEPRECATED_POP_FRAME_P()",
1382 XSTRING (DEPRECATED_POP_FRAME_P ()));
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1385 DEPRECATED_POP_FRAME_P ());
1387 #ifdef DEPRECATED_POP_FRAME
1389 /* Macro might contain `[{}]' when not multi-arch */
1390 fprintf_unfiltered (file
,
1391 "gdbarch_dump: %s # %s\n",
1392 "DEPRECATED_POP_FRAME(-)",
1393 XSTRING (DEPRECATED_POP_FRAME (-)));
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1398 (long) current_gdbarch
->deprecated_pop_frame
1399 /*DEPRECATED_POP_FRAME ()*/);
1401 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1402 fprintf_unfiltered (file
,
1403 "gdbarch_dump: %s # %s\n",
1404 "DEPRECATED_PUSH_ARGUMENTS_P()",
1405 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1406 fprintf_unfiltered (file
,
1407 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1408 DEPRECATED_PUSH_ARGUMENTS_P ());
1410 #ifdef DEPRECATED_PUSH_ARGUMENTS
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: %s # %s\n",
1413 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1414 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1418 (long) current_gdbarch
->deprecated_push_arguments
1419 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1421 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1422 fprintf_unfiltered (file
,
1423 "gdbarch_dump: %s # %s\n",
1424 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1425 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1428 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1430 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1432 /* Macro might contain `[{}]' when not multi-arch */
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: %s # %s\n",
1435 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1436 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1441 (long) current_gdbarch
->deprecated_push_dummy_frame
1442 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1444 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: %s # %s\n",
1447 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1448 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1449 fprintf_unfiltered (file
,
1450 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1451 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1453 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: %s # %s\n",
1456 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1457 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc
, sp
)));
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1461 (long) current_gdbarch
->deprecated_push_return_address
1462 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1464 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: %s # %s\n",
1467 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1468 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1469 fprintf_unfiltered (file
,
1470 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1471 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1473 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1474 fprintf_unfiltered (file
,
1475 "gdbarch_dump: %s # %s\n",
1476 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1477 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame
)));
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1481 (long) current_gdbarch
->deprecated_saved_pc_after_call
1482 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1484 #ifdef DEPRECATED_STORE_RETURN_VALUE
1486 /* Macro might contain `[{}]' when not multi-arch */
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: %s # %s\n",
1489 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1490 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1495 (long) current_gdbarch
->deprecated_store_return_value
1496 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1498 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: %s # %s\n",
1501 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1502 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1505 DEPRECATED_STORE_STRUCT_RETURN_P ());
1507 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1509 /* Macro might contain `[{}]' when not multi-arch */
1510 fprintf_unfiltered (file
,
1511 "gdbarch_dump: %s # %s\n",
1512 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1513 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1518 (long) current_gdbarch
->deprecated_store_struct_return
1519 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1521 #ifdef DEPRECATED_TARGET_READ_FP_P
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: %s # %s\n",
1524 "DEPRECATED_TARGET_READ_FP_P()",
1525 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1528 DEPRECATED_TARGET_READ_FP_P ());
1530 #ifdef DEPRECATED_TARGET_READ_FP
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: %s # %s\n",
1533 "DEPRECATED_TARGET_READ_FP()",
1534 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1538 (long) current_gdbarch
->deprecated_target_read_fp
1539 /*DEPRECATED_TARGET_READ_FP ()*/);
1541 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1544 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
));
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1547 DEPRECATED_USE_GENERIC_DUMMY_FRAMES
);
1549 #ifdef DWARF2_BUILD_FRAME_INFO_P
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: %s # %s\n",
1552 "DWARF2_BUILD_FRAME_INFO_P()",
1553 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1554 fprintf_unfiltered (file
,
1555 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1556 DWARF2_BUILD_FRAME_INFO_P ());
1558 #ifdef DWARF2_BUILD_FRAME_INFO
1560 /* Macro might contain `[{}]' when not multi-arch */
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: %s # %s\n",
1563 "DWARF2_BUILD_FRAME_INFO(objfile)",
1564 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1569 (long) current_gdbarch
->dwarf2_build_frame_info
1570 /*DWARF2_BUILD_FRAME_INFO ()*/);
1572 #ifdef DWARF2_REG_TO_REGNUM
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: %s # %s\n",
1575 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1576 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1578 fprintf_unfiltered (file
,
1579 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1580 (long) current_gdbarch
->dwarf2_reg_to_regnum
1581 /*DWARF2_REG_TO_REGNUM ()*/);
1583 #ifdef DWARF_REG_TO_REGNUM
1584 fprintf_unfiltered (file
,
1585 "gdbarch_dump: %s # %s\n",
1586 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1587 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1591 (long) current_gdbarch
->dwarf_reg_to_regnum
1592 /*DWARF_REG_TO_REGNUM ()*/);
1594 #ifdef ECOFF_REG_TO_REGNUM
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: %s # %s\n",
1597 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1598 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1600 fprintf_unfiltered (file
,
1601 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1602 (long) current_gdbarch
->ecoff_reg_to_regnum
1603 /*ECOFF_REG_TO_REGNUM ()*/);
1605 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1607 /* Macro might contain `[{}]' when not multi-arch */
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: %s # %s\n",
1610 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1611 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1616 (long) current_gdbarch
->elf_make_msymbol_special
1617 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1619 #ifdef EXTRACT_RETURN_VALUE
1621 /* Macro might contain `[{}]' when not multi-arch */
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: %s # %s\n",
1624 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1625 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1630 (long) current_gdbarch
->extract_return_value
1631 /*EXTRACT_RETURN_VALUE ()*/);
1633 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1634 fprintf_unfiltered (file
,
1635 "gdbarch_dump: %s # %s\n",
1636 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1637 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1640 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1642 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: %s # %s\n",
1645 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1646 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1650 (long) current_gdbarch
->extract_struct_value_address
1651 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1653 #ifdef FIX_CALL_DUMMY_P
1654 fprintf_unfiltered (file
,
1655 "gdbarch_dump: %s # %s\n",
1656 "FIX_CALL_DUMMY_P()",
1657 XSTRING (FIX_CALL_DUMMY_P ()));
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: FIX_CALL_DUMMY_P() = %d\n",
1660 FIX_CALL_DUMMY_P ());
1662 #ifdef FIX_CALL_DUMMY
1664 /* Macro might contain `[{}]' when not multi-arch */
1665 fprintf_unfiltered (file
,
1666 "gdbarch_dump: %s # %s\n",
1667 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1668 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1673 (long) current_gdbarch
->fix_call_dummy
1674 /*FIX_CALL_DUMMY ()*/);
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: FP0_REGNUM # %s\n",
1679 XSTRING (FP0_REGNUM
));
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: FP0_REGNUM = %d\n",
1684 #ifdef FRAMELESS_FUNCTION_INVOCATION
1685 fprintf_unfiltered (file
,
1686 "gdbarch_dump: %s # %s\n",
1687 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1688 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1690 fprintf_unfiltered (file
,
1691 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1692 (long) current_gdbarch
->frameless_function_invocation
1693 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1695 #ifdef FRAME_ARGS_ADDRESS
1696 fprintf_unfiltered (file
,
1697 "gdbarch_dump: %s # %s\n",
1698 "FRAME_ARGS_ADDRESS(fi)",
1699 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1701 fprintf_unfiltered (file
,
1702 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1703 (long) current_gdbarch
->frame_args_address
1704 /*FRAME_ARGS_ADDRESS ()*/);
1706 #ifdef FRAME_ARGS_SKIP
1707 fprintf_unfiltered (file
,
1708 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1709 XSTRING (FRAME_ARGS_SKIP
));
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1712 (long) FRAME_ARGS_SKIP
);
1714 #ifdef FRAME_LOCALS_ADDRESS
1715 fprintf_unfiltered (file
,
1716 "gdbarch_dump: %s # %s\n",
1717 "FRAME_LOCALS_ADDRESS(fi)",
1718 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1720 fprintf_unfiltered (file
,
1721 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1722 (long) current_gdbarch
->frame_locals_address
1723 /*FRAME_LOCALS_ADDRESS ()*/);
1725 #ifdef FRAME_NUM_ARGS
1726 fprintf_unfiltered (file
,
1727 "gdbarch_dump: %s # %s\n",
1728 "FRAME_NUM_ARGS(frame)",
1729 XSTRING (FRAME_NUM_ARGS (frame
)));
1731 fprintf_unfiltered (file
,
1732 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1733 (long) current_gdbarch
->frame_num_args
1734 /*FRAME_NUM_ARGS ()*/);
1736 #ifdef FUNCTION_START_OFFSET
1737 fprintf_unfiltered (file
,
1738 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1739 XSTRING (FUNCTION_START_OFFSET
));
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1742 (long) FUNCTION_START_OFFSET
);
1744 #ifdef GET_LONGJMP_TARGET_P
1745 fprintf_unfiltered (file
,
1746 "gdbarch_dump: %s # %s\n",
1747 "GET_LONGJMP_TARGET_P()",
1748 XSTRING (GET_LONGJMP_TARGET_P ()));
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1751 GET_LONGJMP_TARGET_P ());
1753 #ifdef GET_LONGJMP_TARGET
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: %s # %s\n",
1756 "GET_LONGJMP_TARGET(pc)",
1757 XSTRING (GET_LONGJMP_TARGET (pc
)));
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1761 (long) current_gdbarch
->get_longjmp_target
1762 /*GET_LONGJMP_TARGET ()*/);
1764 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1767 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1770 HAVE_NONSTEPPABLE_WATCHPOINT
);
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: %s # %s\n",
1775 "INNER_THAN(lhs, rhs)",
1776 XSTRING (INNER_THAN (lhs
, rhs
)));
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1780 (long) current_gdbarch
->inner_than
1783 #ifdef INTEGER_TO_ADDRESS_P
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: %s # %s\n",
1786 "INTEGER_TO_ADDRESS_P()",
1787 XSTRING (INTEGER_TO_ADDRESS_P ()));
1788 fprintf_unfiltered (file
,
1789 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1790 INTEGER_TO_ADDRESS_P ());
1792 #ifdef INTEGER_TO_ADDRESS
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: %s # %s\n",
1795 "INTEGER_TO_ADDRESS(type, buf)",
1796 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1800 (long) current_gdbarch
->integer_to_address
1801 /*INTEGER_TO_ADDRESS ()*/);
1803 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: %s # %s\n",
1806 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1807 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1809 fprintf_unfiltered (file
,
1810 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1811 (long) current_gdbarch
->in_solib_call_trampoline
1812 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1814 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: %s # %s\n",
1817 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1818 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1822 (long) current_gdbarch
->in_solib_return_trampoline
1823 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1825 #ifdef MEMORY_INSERT_BREAKPOINT
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: %s # %s\n",
1828 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1829 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1833 (long) current_gdbarch
->memory_insert_breakpoint
1834 /*MEMORY_INSERT_BREAKPOINT ()*/);
1836 #ifdef MEMORY_REMOVE_BREAKPOINT
1837 fprintf_unfiltered (file
,
1838 "gdbarch_dump: %s # %s\n",
1839 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1840 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1844 (long) current_gdbarch
->memory_remove_breakpoint
1845 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1847 #ifdef NAME_OF_MALLOC
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1850 XSTRING (NAME_OF_MALLOC
));
1851 fprintf_unfiltered (file
,
1852 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1856 fprintf_unfiltered (file
,
1857 "gdbarch_dump: NPC_REGNUM # %s\n",
1858 XSTRING (NPC_REGNUM
));
1859 fprintf_unfiltered (file
,
1860 "gdbarch_dump: NPC_REGNUM = %d\n",
1863 #ifdef NUM_PSEUDO_REGS
1864 fprintf_unfiltered (file
,
1865 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1866 XSTRING (NUM_PSEUDO_REGS
));
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1872 fprintf_unfiltered (file
,
1873 "gdbarch_dump: NUM_REGS # %s\n",
1874 XSTRING (NUM_REGS
));
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: NUM_REGS = %d\n",
1879 #ifdef PARM_BOUNDARY
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1882 XSTRING (PARM_BOUNDARY
));
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1887 #ifdef PC_IN_SIGTRAMP
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: %s # %s\n",
1890 "PC_IN_SIGTRAMP(pc, name)",
1891 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1893 fprintf_unfiltered (file
,
1894 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1895 (long) current_gdbarch
->pc_in_sigtramp
1896 /*PC_IN_SIGTRAMP ()*/);
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: PC_REGNUM # %s\n",
1901 XSTRING (PC_REGNUM
));
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: PC_REGNUM = %d\n",
1906 #ifdef POINTER_TO_ADDRESS
1907 fprintf_unfiltered (file
,
1908 "gdbarch_dump: %s # %s\n",
1909 "POINTER_TO_ADDRESS(type, buf)",
1910 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1912 fprintf_unfiltered (file
,
1913 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1914 (long) current_gdbarch
->pointer_to_address
1915 /*POINTER_TO_ADDRESS ()*/);
1917 #ifdef PREPARE_TO_PROCEED
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: %s # %s\n",
1920 "PREPARE_TO_PROCEED(select_it)",
1921 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1925 (long) current_gdbarch
->prepare_to_proceed
1926 /*PREPARE_TO_PROCEED ()*/);
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1931 gdbarch_print_float_info_p (current_gdbarch
));
1933 fprintf_unfiltered (file
,
1934 "gdbarch_dump: print_float_info = 0x%08lx\n",
1935 (long) current_gdbarch
->print_float_info
);
1937 fprintf_unfiltered (file
,
1938 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1939 (long) current_gdbarch
->print_registers_info
);
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1943 gdbarch_print_vector_info_p (current_gdbarch
));
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1947 (long) current_gdbarch
->print_vector_info
);
1948 #ifdef PROLOGUE_FRAMELESS_P
1949 fprintf_unfiltered (file
,
1950 "gdbarch_dump: %s # %s\n",
1951 "PROLOGUE_FRAMELESS_P(ip)",
1952 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1956 (long) current_gdbarch
->prologue_frameless_p
1957 /*PROLOGUE_FRAMELESS_P ()*/);
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: PS_REGNUM # %s\n",
1962 XSTRING (PS_REGNUM
));
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: PS_REGNUM = %d\n",
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1970 gdbarch_push_dummy_call_p (current_gdbarch
));
1972 fprintf_unfiltered (file
,
1973 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1974 (long) current_gdbarch
->push_dummy_call
);
1975 #ifdef REGISTER_BYTE
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: %s # %s\n",
1978 "REGISTER_BYTE(reg_nr)",
1979 XSTRING (REGISTER_BYTE (reg_nr
)));
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1983 (long) current_gdbarch
->register_byte
1984 /*REGISTER_BYTE ()*/);
1986 #ifdef REGISTER_BYTES
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: REGISTER_BYTES # %s\n",
1989 XSTRING (REGISTER_BYTES
));
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: REGISTER_BYTES = %d\n",
1994 #ifdef REGISTER_BYTES_OK_P
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: %s # %s\n",
1997 "REGISTER_BYTES_OK_P()",
1998 XSTRING (REGISTER_BYTES_OK_P ()));
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2001 REGISTER_BYTES_OK_P ());
2003 #ifdef REGISTER_BYTES_OK
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: %s # %s\n",
2006 "REGISTER_BYTES_OK(nr_bytes)",
2007 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2011 (long) current_gdbarch
->register_bytes_ok
2012 /*REGISTER_BYTES_OK ()*/);
2014 #ifdef REGISTER_CONVERTIBLE
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: %s # %s\n",
2017 "REGISTER_CONVERTIBLE(nr)",
2018 XSTRING (REGISTER_CONVERTIBLE (nr
)));
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
2022 (long) current_gdbarch
->register_convertible
2023 /*REGISTER_CONVERTIBLE ()*/);
2025 #ifdef REGISTER_CONVERT_TO_RAW
2027 /* Macro might contain `[{}]' when not multi-arch */
2028 fprintf_unfiltered (file
,
2029 "gdbarch_dump: %s # %s\n",
2030 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2031 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
2036 (long) current_gdbarch
->register_convert_to_raw
2037 /*REGISTER_CONVERT_TO_RAW ()*/);
2039 #ifdef REGISTER_CONVERT_TO_VIRTUAL
2041 /* Macro might contain `[{}]' when not multi-arch */
2042 fprintf_unfiltered (file
,
2043 "gdbarch_dump: %s # %s\n",
2044 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2045 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
2048 fprintf_unfiltered (file
,
2049 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2050 (long) current_gdbarch
->register_convert_to_virtual
2051 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2053 #ifdef REGISTER_NAME
2054 fprintf_unfiltered (file
,
2055 "gdbarch_dump: %s # %s\n",
2056 "REGISTER_NAME(regnr)",
2057 XSTRING (REGISTER_NAME (regnr
)));
2059 fprintf_unfiltered (file
,
2060 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2061 (long) current_gdbarch
->register_name
2062 /*REGISTER_NAME ()*/);
2064 #ifdef REGISTER_RAW_SIZE
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: %s # %s\n",
2067 "REGISTER_RAW_SIZE(reg_nr)",
2068 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2072 (long) current_gdbarch
->register_raw_size
2073 /*REGISTER_RAW_SIZE ()*/);
2075 #ifdef REGISTER_SIM_REGNO
2076 fprintf_unfiltered (file
,
2077 "gdbarch_dump: %s # %s\n",
2078 "REGISTER_SIM_REGNO(reg_nr)",
2079 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2083 (long) current_gdbarch
->register_sim_regno
2084 /*REGISTER_SIM_REGNO ()*/);
2086 #ifdef REGISTER_SIZE
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: REGISTER_SIZE # %s\n",
2089 XSTRING (REGISTER_SIZE
));
2090 fprintf_unfiltered (file
,
2091 "gdbarch_dump: REGISTER_SIZE = %d\n",
2094 #ifdef REGISTER_TO_VALUE
2096 /* Macro might contain `[{}]' when not multi-arch */
2097 fprintf_unfiltered (file
,
2098 "gdbarch_dump: %s # %s\n",
2099 "REGISTER_TO_VALUE(regnum, type, from, to)",
2100 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2105 (long) current_gdbarch
->register_to_value
2106 /*REGISTER_TO_VALUE ()*/);
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2111 gdbarch_register_type_p (current_gdbarch
));
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: register_type = 0x%08lx\n",
2115 (long) current_gdbarch
->register_type
);
2116 #ifdef REGISTER_VIRTUAL_SIZE
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: %s # %s\n",
2119 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2120 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
2122 fprintf_unfiltered (file
,
2123 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2124 (long) current_gdbarch
->register_virtual_size
2125 /*REGISTER_VIRTUAL_SIZE ()*/);
2127 #ifdef REGISTER_VIRTUAL_TYPE_P
2128 fprintf_unfiltered (file
,
2129 "gdbarch_dump: %s # %s\n",
2130 "REGISTER_VIRTUAL_TYPE_P()",
2131 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2132 fprintf_unfiltered (file
,
2133 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2134 REGISTER_VIRTUAL_TYPE_P ());
2136 #ifdef REGISTER_VIRTUAL_TYPE
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: %s # %s\n",
2139 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2140 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
2142 fprintf_unfiltered (file
,
2143 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2144 (long) current_gdbarch
->register_virtual_type
2145 /*REGISTER_VIRTUAL_TYPE ()*/);
2147 #ifdef REG_STRUCT_HAS_ADDR_P
2148 fprintf_unfiltered (file
,
2149 "gdbarch_dump: %s # %s\n",
2150 "REG_STRUCT_HAS_ADDR_P()",
2151 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2152 fprintf_unfiltered (file
,
2153 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2154 REG_STRUCT_HAS_ADDR_P ());
2156 #ifdef REG_STRUCT_HAS_ADDR
2157 fprintf_unfiltered (file
,
2158 "gdbarch_dump: %s # %s\n",
2159 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2160 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
2162 fprintf_unfiltered (file
,
2163 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2164 (long) current_gdbarch
->reg_struct_has_addr
2165 /*REG_STRUCT_HAS_ADDR ()*/);
2167 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2169 /* Macro might contain `[{}]' when not multi-arch */
2170 fprintf_unfiltered (file
,
2171 "gdbarch_dump: %s # %s\n",
2172 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2173 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
2176 fprintf_unfiltered (file
,
2177 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2178 (long) current_gdbarch
->remote_translate_xfer_address
2179 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2181 #ifdef RETURN_VALUE_ON_STACK
2182 fprintf_unfiltered (file
,
2183 "gdbarch_dump: %s # %s\n",
2184 "RETURN_VALUE_ON_STACK(type)",
2185 XSTRING (RETURN_VALUE_ON_STACK (type
)));
2187 fprintf_unfiltered (file
,
2188 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2189 (long) current_gdbarch
->return_value_on_stack
2190 /*RETURN_VALUE_ON_STACK ()*/);
2192 #ifdef SAVE_DUMMY_FRAME_TOS_P
2193 fprintf_unfiltered (file
,
2194 "gdbarch_dump: %s # %s\n",
2195 "SAVE_DUMMY_FRAME_TOS_P()",
2196 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2197 fprintf_unfiltered (file
,
2198 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2199 SAVE_DUMMY_FRAME_TOS_P ());
2201 #ifdef SAVE_DUMMY_FRAME_TOS
2203 /* Macro might contain `[{}]' when not multi-arch */
2204 fprintf_unfiltered (file
,
2205 "gdbarch_dump: %s # %s\n",
2206 "SAVE_DUMMY_FRAME_TOS(sp)",
2207 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
2210 fprintf_unfiltered (file
,
2211 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2212 (long) current_gdbarch
->save_dummy_frame_tos
2213 /*SAVE_DUMMY_FRAME_TOS ()*/);
2215 #ifdef SDB_REG_TO_REGNUM
2216 fprintf_unfiltered (file
,
2217 "gdbarch_dump: %s # %s\n",
2218 "SDB_REG_TO_REGNUM(sdb_regnr)",
2219 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
2221 fprintf_unfiltered (file
,
2222 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2223 (long) current_gdbarch
->sdb_reg_to_regnum
2224 /*SDB_REG_TO_REGNUM ()*/);
2226 #ifdef SIGTRAMP_END_P
2227 fprintf_unfiltered (file
,
2228 "gdbarch_dump: %s # %s\n",
2230 XSTRING (SIGTRAMP_END_P ()));
2231 fprintf_unfiltered (file
,
2232 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2236 fprintf_unfiltered (file
,
2237 "gdbarch_dump: %s # %s\n",
2239 XSTRING (SIGTRAMP_END (pc
)));
2241 fprintf_unfiltered (file
,
2242 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2243 (long) current_gdbarch
->sigtramp_end
2244 /*SIGTRAMP_END ()*/);
2246 #ifdef SIGTRAMP_START_P
2247 fprintf_unfiltered (file
,
2248 "gdbarch_dump: %s # %s\n",
2249 "SIGTRAMP_START_P()",
2250 XSTRING (SIGTRAMP_START_P ()));
2251 fprintf_unfiltered (file
,
2252 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2253 SIGTRAMP_START_P ());
2255 #ifdef SIGTRAMP_START
2256 fprintf_unfiltered (file
,
2257 "gdbarch_dump: %s # %s\n",
2258 "SIGTRAMP_START(pc)",
2259 XSTRING (SIGTRAMP_START (pc
)));
2261 fprintf_unfiltered (file
,
2262 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2263 (long) current_gdbarch
->sigtramp_start
2264 /*SIGTRAMP_START ()*/);
2266 #ifdef SIZEOF_CALL_DUMMY_WORDS
2267 fprintf_unfiltered (file
,
2268 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2269 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
2270 fprintf_unfiltered (file
,
2271 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = %d\n",
2272 SIZEOF_CALL_DUMMY_WORDS
);
2274 #ifdef SKIP_PROLOGUE
2275 fprintf_unfiltered (file
,
2276 "gdbarch_dump: %s # %s\n",
2277 "SKIP_PROLOGUE(ip)",
2278 XSTRING (SKIP_PROLOGUE (ip
)));
2280 fprintf_unfiltered (file
,
2281 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2282 (long) current_gdbarch
->skip_prologue
2283 /*SKIP_PROLOGUE ()*/);
2285 #ifdef SKIP_TRAMPOLINE_CODE
2286 fprintf_unfiltered (file
,
2287 "gdbarch_dump: %s # %s\n",
2288 "SKIP_TRAMPOLINE_CODE(pc)",
2289 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
2291 fprintf_unfiltered (file
,
2292 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2293 (long) current_gdbarch
->skip_trampoline_code
2294 /*SKIP_TRAMPOLINE_CODE ()*/);
2296 #ifdef SMASH_TEXT_ADDRESS
2297 fprintf_unfiltered (file
,
2298 "gdbarch_dump: %s # %s\n",
2299 "SMASH_TEXT_ADDRESS(addr)",
2300 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2302 fprintf_unfiltered (file
,
2303 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2304 (long) current_gdbarch
->smash_text_address
2305 /*SMASH_TEXT_ADDRESS ()*/);
2307 #ifdef SOFTWARE_SINGLE_STEP_P
2308 fprintf_unfiltered (file
,
2309 "gdbarch_dump: %s # %s\n",
2310 "SOFTWARE_SINGLE_STEP_P()",
2311 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2312 fprintf_unfiltered (file
,
2313 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2314 SOFTWARE_SINGLE_STEP_P ());
2316 #ifdef SOFTWARE_SINGLE_STEP
2318 /* Macro might contain `[{}]' when not multi-arch */
2319 fprintf_unfiltered (file
,
2320 "gdbarch_dump: %s # %s\n",
2321 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2322 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2325 fprintf_unfiltered (file
,
2326 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2327 (long) current_gdbarch
->software_single_step
2328 /*SOFTWARE_SINGLE_STEP ()*/);
2331 fprintf_unfiltered (file
,
2332 "gdbarch_dump: SP_REGNUM # %s\n",
2333 XSTRING (SP_REGNUM
));
2334 fprintf_unfiltered (file
,
2335 "gdbarch_dump: SP_REGNUM = %d\n",
2338 #ifdef STAB_REG_TO_REGNUM
2339 fprintf_unfiltered (file
,
2340 "gdbarch_dump: %s # %s\n",
2341 "STAB_REG_TO_REGNUM(stab_regnr)",
2342 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2344 fprintf_unfiltered (file
,
2345 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2346 (long) current_gdbarch
->stab_reg_to_regnum
2347 /*STAB_REG_TO_REGNUM ()*/);
2349 #ifdef STACK_ALIGN_P
2350 fprintf_unfiltered (file
,
2351 "gdbarch_dump: %s # %s\n",
2353 XSTRING (STACK_ALIGN_P ()));
2354 fprintf_unfiltered (file
,
2355 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2359 fprintf_unfiltered (file
,
2360 "gdbarch_dump: %s # %s\n",
2362 XSTRING (STACK_ALIGN (sp
)));
2364 fprintf_unfiltered (file
,
2365 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2366 (long) current_gdbarch
->stack_align
2367 /*STACK_ALIGN ()*/);
2369 #ifdef STORE_RETURN_VALUE
2371 /* Macro might contain `[{}]' when not multi-arch */
2372 fprintf_unfiltered (file
,
2373 "gdbarch_dump: %s # %s\n",
2374 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2375 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2378 fprintf_unfiltered (file
,
2379 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2380 (long) current_gdbarch
->store_return_value
2381 /*STORE_RETURN_VALUE ()*/);
2383 #ifdef TARGET_ADDR_BIT
2384 fprintf_unfiltered (file
,
2385 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2386 XSTRING (TARGET_ADDR_BIT
));
2387 fprintf_unfiltered (file
,
2388 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2391 #ifdef TARGET_ARCHITECTURE
2392 fprintf_unfiltered (file
,
2393 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2394 XSTRING (TARGET_ARCHITECTURE
));
2395 if (TARGET_ARCHITECTURE
!= NULL
)
2396 fprintf_unfiltered (file
,
2397 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2398 TARGET_ARCHITECTURE
->printable_name
);
2400 #ifdef TARGET_BFD_VMA_BIT
2401 fprintf_unfiltered (file
,
2402 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2403 XSTRING (TARGET_BFD_VMA_BIT
));
2404 fprintf_unfiltered (file
,
2405 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2406 TARGET_BFD_VMA_BIT
);
2408 #ifdef TARGET_BYTE_ORDER
2409 fprintf_unfiltered (file
,
2410 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2411 XSTRING (TARGET_BYTE_ORDER
));
2412 fprintf_unfiltered (file
,
2413 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2414 (long) TARGET_BYTE_ORDER
);
2416 #ifdef TARGET_CHAR_SIGNED
2417 fprintf_unfiltered (file
,
2418 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2419 XSTRING (TARGET_CHAR_SIGNED
));
2420 fprintf_unfiltered (file
,
2421 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2422 TARGET_CHAR_SIGNED
);
2424 #ifdef TARGET_DOUBLE_BIT
2425 fprintf_unfiltered (file
,
2426 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2427 XSTRING (TARGET_DOUBLE_BIT
));
2428 fprintf_unfiltered (file
,
2429 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2432 #ifdef TARGET_DOUBLE_FORMAT
2433 fprintf_unfiltered (file
,
2434 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2435 XSTRING (TARGET_DOUBLE_FORMAT
));
2436 fprintf_unfiltered (file
,
2437 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2438 (TARGET_DOUBLE_FORMAT
)->name
);
2440 #ifdef TARGET_FLOAT_BIT
2441 fprintf_unfiltered (file
,
2442 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2443 XSTRING (TARGET_FLOAT_BIT
));
2444 fprintf_unfiltered (file
,
2445 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2448 #ifdef TARGET_FLOAT_FORMAT
2449 fprintf_unfiltered (file
,
2450 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2451 XSTRING (TARGET_FLOAT_FORMAT
));
2452 fprintf_unfiltered (file
,
2453 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2454 (TARGET_FLOAT_FORMAT
)->name
);
2456 #ifdef TARGET_INT_BIT
2457 fprintf_unfiltered (file
,
2458 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2459 XSTRING (TARGET_INT_BIT
));
2460 fprintf_unfiltered (file
,
2461 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2464 #ifdef TARGET_LONG_BIT
2465 fprintf_unfiltered (file
,
2466 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2467 XSTRING (TARGET_LONG_BIT
));
2468 fprintf_unfiltered (file
,
2469 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2472 #ifdef TARGET_LONG_DOUBLE_BIT
2473 fprintf_unfiltered (file
,
2474 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2475 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2476 fprintf_unfiltered (file
,
2477 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2478 TARGET_LONG_DOUBLE_BIT
);
2480 #ifdef TARGET_LONG_DOUBLE_FORMAT
2481 fprintf_unfiltered (file
,
2482 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2483 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2484 fprintf_unfiltered (file
,
2485 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2486 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2488 #ifdef TARGET_LONG_LONG_BIT
2489 fprintf_unfiltered (file
,
2490 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2491 XSTRING (TARGET_LONG_LONG_BIT
));
2492 fprintf_unfiltered (file
,
2493 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2494 TARGET_LONG_LONG_BIT
);
2497 fprintf_unfiltered (file
,
2498 "gdbarch_dump: TARGET_OSABI # %s\n",
2499 XSTRING (TARGET_OSABI
));
2500 fprintf_unfiltered (file
,
2501 "gdbarch_dump: TARGET_OSABI = %ld\n",
2502 (long) TARGET_OSABI
);
2504 #ifdef TARGET_PRINT_INSN
2505 fprintf_unfiltered (file
,
2506 "gdbarch_dump: %s # %s\n",
2507 "TARGET_PRINT_INSN(vma, info)",
2508 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2510 fprintf_unfiltered (file
,
2511 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2512 (long) current_gdbarch
->print_insn
2513 /*TARGET_PRINT_INSN ()*/);
2515 #ifdef TARGET_PTR_BIT
2516 fprintf_unfiltered (file
,
2517 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2518 XSTRING (TARGET_PTR_BIT
));
2519 fprintf_unfiltered (file
,
2520 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2523 #ifdef TARGET_READ_PC
2524 fprintf_unfiltered (file
,
2525 "gdbarch_dump: %s # %s\n",
2526 "TARGET_READ_PC(ptid)",
2527 XSTRING (TARGET_READ_PC (ptid
)));
2529 fprintf_unfiltered (file
,
2530 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2531 (long) current_gdbarch
->read_pc
2532 /*TARGET_READ_PC ()*/);
2534 #ifdef TARGET_READ_SP
2535 fprintf_unfiltered (file
,
2536 "gdbarch_dump: %s # %s\n",
2538 XSTRING (TARGET_READ_SP ()));
2540 fprintf_unfiltered (file
,
2541 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2542 (long) current_gdbarch
->read_sp
2543 /*TARGET_READ_SP ()*/);
2545 #ifdef TARGET_SHORT_BIT
2546 fprintf_unfiltered (file
,
2547 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2548 XSTRING (TARGET_SHORT_BIT
));
2549 fprintf_unfiltered (file
,
2550 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2553 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2555 /* Macro might contain `[{}]' when not multi-arch */
2556 fprintf_unfiltered (file
,
2557 "gdbarch_dump: %s # %s\n",
2558 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2559 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2562 fprintf_unfiltered (file
,
2563 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2564 (long) current_gdbarch
->virtual_frame_pointer
2565 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2567 #ifdef TARGET_WRITE_PC
2569 /* Macro might contain `[{}]' when not multi-arch */
2570 fprintf_unfiltered (file
,
2571 "gdbarch_dump: %s # %s\n",
2572 "TARGET_WRITE_PC(val, ptid)",
2573 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2576 fprintf_unfiltered (file
,
2577 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2578 (long) current_gdbarch
->write_pc
2579 /*TARGET_WRITE_PC ()*/);
2582 fprintf_unfiltered (file
,
2583 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2584 gdbarch_unwind_dummy_id_p (current_gdbarch
));
2586 fprintf_unfiltered (file
,
2587 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2588 (long) current_gdbarch
->unwind_dummy_id
);
2590 fprintf_unfiltered (file
,
2591 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2592 gdbarch_unwind_pc_p (current_gdbarch
));
2594 fprintf_unfiltered (file
,
2595 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2596 (long) current_gdbarch
->unwind_pc
);
2597 #ifdef USE_STRUCT_CONVENTION
2598 fprintf_unfiltered (file
,
2599 "gdbarch_dump: %s # %s\n",
2600 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2601 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2603 fprintf_unfiltered (file
,
2604 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2605 (long) current_gdbarch
->use_struct_convention
2606 /*USE_STRUCT_CONVENTION ()*/);
2608 #ifdef VALUE_TO_REGISTER
2610 /* Macro might contain `[{}]' when not multi-arch */
2611 fprintf_unfiltered (file
,
2612 "gdbarch_dump: %s # %s\n",
2613 "VALUE_TO_REGISTER(type, regnum, from, to)",
2614 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2617 fprintf_unfiltered (file
,
2618 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2619 (long) current_gdbarch
->value_to_register
2620 /*VALUE_TO_REGISTER ()*/);
2622 if (current_gdbarch
->dump_tdep
!= NULL
)
2623 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2626 struct gdbarch_tdep
*
2627 gdbarch_tdep (struct gdbarch
*gdbarch
)
2629 if (gdbarch_debug
>= 2)
2630 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2631 return gdbarch
->tdep
;
2635 const struct bfd_arch_info
*
2636 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2638 gdb_assert (gdbarch
!= NULL
);
2639 if (gdbarch_debug
>= 2)
2640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2641 return gdbarch
->bfd_arch_info
;
2645 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2647 gdb_assert (gdbarch
!= NULL
);
2648 if (gdbarch_debug
>= 2)
2649 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2650 return gdbarch
->byte_order
;
2654 gdbarch_osabi (struct gdbarch
*gdbarch
)
2656 gdb_assert (gdbarch
!= NULL
);
2657 if (gdbarch_debug
>= 2)
2658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2659 return gdbarch
->osabi
;
2663 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2665 gdb_assert (gdbarch
!= NULL
);
2666 /* Skip verify of short_bit, invalid_p == 0 */
2667 if (gdbarch_debug
>= 2)
2668 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2669 return gdbarch
->short_bit
;
2673 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2676 gdbarch
->short_bit
= short_bit
;
2680 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2682 gdb_assert (gdbarch
!= NULL
);
2683 /* Skip verify of int_bit, invalid_p == 0 */
2684 if (gdbarch_debug
>= 2)
2685 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2686 return gdbarch
->int_bit
;
2690 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2693 gdbarch
->int_bit
= int_bit
;
2697 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2699 gdb_assert (gdbarch
!= NULL
);
2700 /* Skip verify of long_bit, invalid_p == 0 */
2701 if (gdbarch_debug
>= 2)
2702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2703 return gdbarch
->long_bit
;
2707 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2710 gdbarch
->long_bit
= long_bit
;
2714 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2716 gdb_assert (gdbarch
!= NULL
);
2717 /* Skip verify of long_long_bit, invalid_p == 0 */
2718 if (gdbarch_debug
>= 2)
2719 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2720 return gdbarch
->long_long_bit
;
2724 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2727 gdbarch
->long_long_bit
= long_long_bit
;
2731 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2733 gdb_assert (gdbarch
!= NULL
);
2734 /* Skip verify of float_bit, invalid_p == 0 */
2735 if (gdbarch_debug
>= 2)
2736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2737 return gdbarch
->float_bit
;
2741 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2744 gdbarch
->float_bit
= float_bit
;
2748 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2750 gdb_assert (gdbarch
!= NULL
);
2751 /* Skip verify of double_bit, invalid_p == 0 */
2752 if (gdbarch_debug
>= 2)
2753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2754 return gdbarch
->double_bit
;
2758 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2761 gdbarch
->double_bit
= double_bit
;
2765 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2767 gdb_assert (gdbarch
!= NULL
);
2768 /* Skip verify of long_double_bit, invalid_p == 0 */
2769 if (gdbarch_debug
>= 2)
2770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2771 return gdbarch
->long_double_bit
;
2775 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2776 int long_double_bit
)
2778 gdbarch
->long_double_bit
= long_double_bit
;
2782 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2784 gdb_assert (gdbarch
!= NULL
);
2785 /* Skip verify of ptr_bit, invalid_p == 0 */
2786 if (gdbarch_debug
>= 2)
2787 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2788 return gdbarch
->ptr_bit
;
2792 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2795 gdbarch
->ptr_bit
= ptr_bit
;
2799 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2801 gdb_assert (gdbarch
!= NULL
);
2802 if (gdbarch
->addr_bit
== 0)
2803 internal_error (__FILE__
, __LINE__
,
2804 "gdbarch: gdbarch_addr_bit invalid");
2805 if (gdbarch_debug
>= 2)
2806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2807 return gdbarch
->addr_bit
;
2811 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2814 gdbarch
->addr_bit
= addr_bit
;
2818 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2820 gdb_assert (gdbarch
!= NULL
);
2821 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2822 if (gdbarch_debug
>= 2)
2823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2824 return gdbarch
->bfd_vma_bit
;
2828 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2831 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2835 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2837 gdb_assert (gdbarch
!= NULL
);
2838 if (gdbarch
->char_signed
== -1)
2839 internal_error (__FILE__
, __LINE__
,
2840 "gdbarch: gdbarch_char_signed invalid");
2841 if (gdbarch_debug
>= 2)
2842 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2843 return gdbarch
->char_signed
;
2847 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2850 gdbarch
->char_signed
= char_signed
;
2854 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2856 gdb_assert (gdbarch
!= NULL
);
2857 if (gdbarch
->read_pc
== 0)
2858 internal_error (__FILE__
, __LINE__
,
2859 "gdbarch: gdbarch_read_pc invalid");
2860 if (gdbarch_debug
>= 2)
2861 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2862 return gdbarch
->read_pc (ptid
);
2866 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2867 gdbarch_read_pc_ftype read_pc
)
2869 gdbarch
->read_pc
= read_pc
;
2873 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2875 gdb_assert (gdbarch
!= NULL
);
2876 if (gdbarch
->write_pc
== 0)
2877 internal_error (__FILE__
, __LINE__
,
2878 "gdbarch: gdbarch_write_pc invalid");
2879 if (gdbarch_debug
>= 2)
2880 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2881 gdbarch
->write_pc (val
, ptid
);
2885 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2886 gdbarch_write_pc_ftype write_pc
)
2888 gdbarch
->write_pc
= write_pc
;
2892 gdbarch_deprecated_target_read_fp_p (struct gdbarch
*gdbarch
)
2894 gdb_assert (gdbarch
!= NULL
);
2895 return gdbarch
->deprecated_target_read_fp
!= 0;
2899 gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
)
2901 gdb_assert (gdbarch
!= NULL
);
2902 if (gdbarch
->deprecated_target_read_fp
== 0)
2903 internal_error (__FILE__
, __LINE__
,
2904 "gdbarch: gdbarch_deprecated_target_read_fp invalid");
2905 if (gdbarch_debug
>= 2)
2906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_target_read_fp called\n");
2907 return gdbarch
->deprecated_target_read_fp ();
2911 set_gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
,
2912 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp
)
2914 gdbarch
->deprecated_target_read_fp
= deprecated_target_read_fp
;
2918 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2920 gdb_assert (gdbarch
!= NULL
);
2921 if (gdbarch
->read_sp
== 0)
2922 internal_error (__FILE__
, __LINE__
,
2923 "gdbarch: gdbarch_read_sp invalid");
2924 if (gdbarch_debug
>= 2)
2925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2926 return gdbarch
->read_sp ();
2930 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2931 gdbarch_read_sp_ftype read_sp
)
2933 gdbarch
->read_sp
= read_sp
;
2937 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch
*gdbarch
)
2939 gdb_assert (gdbarch
!= NULL
);
2940 return gdbarch
->deprecated_dummy_write_sp
!= 0;
2944 gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2946 gdb_assert (gdbarch
!= NULL
);
2947 if (gdbarch
->deprecated_dummy_write_sp
== 0)
2948 internal_error (__FILE__
, __LINE__
,
2949 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
2950 if (gdbarch_debug
>= 2)
2951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_dummy_write_sp called\n");
2952 gdbarch
->deprecated_dummy_write_sp (val
);
2956 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
,
2957 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp
)
2959 gdbarch
->deprecated_dummy_write_sp
= deprecated_dummy_write_sp
;
2963 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2965 gdb_assert (gdbarch
!= NULL
);
2966 if (gdbarch
->virtual_frame_pointer
== 0)
2967 internal_error (__FILE__
, __LINE__
,
2968 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2969 if (gdbarch_debug
>= 2)
2970 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2971 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2975 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2976 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2978 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2982 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2984 gdb_assert (gdbarch
!= NULL
);
2985 return gdbarch
->pseudo_register_read
!= 0;
2989 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2991 gdb_assert (gdbarch
!= NULL
);
2992 if (gdbarch
->pseudo_register_read
== 0)
2993 internal_error (__FILE__
, __LINE__
,
2994 "gdbarch: gdbarch_pseudo_register_read invalid");
2995 if (gdbarch_debug
>= 2)
2996 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2997 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
3001 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
3002 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
3004 gdbarch
->pseudo_register_read
= pseudo_register_read
;
3008 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
3010 gdb_assert (gdbarch
!= NULL
);
3011 return gdbarch
->pseudo_register_write
!= 0;
3015 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
3017 gdb_assert (gdbarch
!= NULL
);
3018 if (gdbarch
->pseudo_register_write
== 0)
3019 internal_error (__FILE__
, __LINE__
,
3020 "gdbarch: gdbarch_pseudo_register_write invalid");
3021 if (gdbarch_debug
>= 2)
3022 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
3023 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
3027 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
3028 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
3030 gdbarch
->pseudo_register_write
= pseudo_register_write
;
3034 gdbarch_num_regs (struct gdbarch
*gdbarch
)
3036 gdb_assert (gdbarch
!= NULL
);
3037 if (gdbarch
->num_regs
== -1)
3038 internal_error (__FILE__
, __LINE__
,
3039 "gdbarch: gdbarch_num_regs invalid");
3040 if (gdbarch_debug
>= 2)
3041 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
3042 return gdbarch
->num_regs
;
3046 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
3049 gdbarch
->num_regs
= num_regs
;
3053 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
3055 gdb_assert (gdbarch
!= NULL
);
3056 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3057 if (gdbarch_debug
>= 2)
3058 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
3059 return gdbarch
->num_pseudo_regs
;
3063 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
3064 int num_pseudo_regs
)
3066 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
3070 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
3072 gdb_assert (gdbarch
!= NULL
);
3073 /* Skip verify of sp_regnum, invalid_p == 0 */
3074 if (gdbarch_debug
>= 2)
3075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
3076 return gdbarch
->sp_regnum
;
3080 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
3083 gdbarch
->sp_regnum
= sp_regnum
;
3087 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
3089 gdb_assert (gdbarch
!= NULL
);
3090 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3091 if (gdbarch_debug
>= 2)
3092 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
3093 return gdbarch
->deprecated_fp_regnum
;
3097 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
3098 int deprecated_fp_regnum
)
3100 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
3104 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
3106 gdb_assert (gdbarch
!= NULL
);
3107 /* Skip verify of pc_regnum, invalid_p == 0 */
3108 if (gdbarch_debug
>= 2)
3109 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
3110 return gdbarch
->pc_regnum
;
3114 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
3117 gdbarch
->pc_regnum
= pc_regnum
;
3121 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
3123 gdb_assert (gdbarch
!= NULL
);
3124 /* Skip verify of ps_regnum, invalid_p == 0 */
3125 if (gdbarch_debug
>= 2)
3126 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
3127 return gdbarch
->ps_regnum
;
3131 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
3134 gdbarch
->ps_regnum
= ps_regnum
;
3138 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
3140 gdb_assert (gdbarch
!= NULL
);
3141 /* Skip verify of fp0_regnum, invalid_p == 0 */
3142 if (gdbarch_debug
>= 2)
3143 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
3144 return gdbarch
->fp0_regnum
;
3148 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
3151 gdbarch
->fp0_regnum
= fp0_regnum
;
3155 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
3157 gdb_assert (gdbarch
!= NULL
);
3158 /* Skip verify of npc_regnum, invalid_p == 0 */
3159 if (gdbarch_debug
>= 2)
3160 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
3161 return gdbarch
->npc_regnum
;
3165 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
3168 gdbarch
->npc_regnum
= npc_regnum
;
3172 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
3174 gdb_assert (gdbarch
!= NULL
);
3175 if (gdbarch
->stab_reg_to_regnum
== 0)
3176 internal_error (__FILE__
, __LINE__
,
3177 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3178 if (gdbarch_debug
>= 2)
3179 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
3180 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
3184 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
3185 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
3187 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
3191 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
3193 gdb_assert (gdbarch
!= NULL
);
3194 if (gdbarch
->ecoff_reg_to_regnum
== 0)
3195 internal_error (__FILE__
, __LINE__
,
3196 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3197 if (gdbarch_debug
>= 2)
3198 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
3199 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
3203 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
3204 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
3206 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
3210 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
3212 gdb_assert (gdbarch
!= NULL
);
3213 if (gdbarch
->dwarf_reg_to_regnum
== 0)
3214 internal_error (__FILE__
, __LINE__
,
3215 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3216 if (gdbarch_debug
>= 2)
3217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
3218 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
3222 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
3223 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
3225 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
3229 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
3231 gdb_assert (gdbarch
!= NULL
);
3232 if (gdbarch
->sdb_reg_to_regnum
== 0)
3233 internal_error (__FILE__
, __LINE__
,
3234 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3235 if (gdbarch_debug
>= 2)
3236 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
3237 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
3241 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
3242 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
3244 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
3248 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
3250 gdb_assert (gdbarch
!= NULL
);
3251 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
3252 internal_error (__FILE__
, __LINE__
,
3253 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3254 if (gdbarch_debug
>= 2)
3255 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
3256 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
3260 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
3261 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
3263 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
3267 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
3269 gdb_assert (gdbarch
!= NULL
);
3270 if (gdbarch
->register_name
== 0)
3271 internal_error (__FILE__
, __LINE__
,
3272 "gdbarch: gdbarch_register_name invalid");
3273 if (gdbarch_debug
>= 2)
3274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
3275 return gdbarch
->register_name (regnr
);
3279 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
3280 gdbarch_register_name_ftype register_name
)
3282 gdbarch
->register_name
= register_name
;
3286 gdbarch_register_size (struct gdbarch
*gdbarch
)
3288 gdb_assert (gdbarch
!= NULL
);
3289 if (gdbarch
->register_size
== -1)
3290 internal_error (__FILE__
, __LINE__
,
3291 "gdbarch: gdbarch_register_size invalid");
3292 if (gdbarch_debug
>= 2)
3293 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
3294 return gdbarch
->register_size
;
3298 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
3301 gdbarch
->register_size
= register_size
;
3305 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
3307 gdb_assert (gdbarch
!= NULL
);
3308 if (gdbarch
->register_bytes
== -1)
3309 internal_error (__FILE__
, __LINE__
,
3310 "gdbarch: gdbarch_register_bytes invalid");
3311 if (gdbarch_debug
>= 2)
3312 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
3313 return gdbarch
->register_bytes
;
3317 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
3320 gdbarch
->register_bytes
= register_bytes
;
3324 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3326 gdb_assert (gdbarch
!= NULL
);
3327 if (gdbarch
->register_byte
== 0)
3328 internal_error (__FILE__
, __LINE__
,
3329 "gdbarch: gdbarch_register_byte invalid");
3330 if (gdbarch_debug
>= 2)
3331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
3332 return gdbarch
->register_byte (reg_nr
);
3336 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
3337 gdbarch_register_byte_ftype register_byte
)
3339 gdbarch
->register_byte
= register_byte
;
3343 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3345 gdb_assert (gdbarch
!= NULL
);
3346 if (gdbarch
->register_raw_size
== 0)
3347 internal_error (__FILE__
, __LINE__
,
3348 "gdbarch: gdbarch_register_raw_size invalid");
3349 if (gdbarch_debug
>= 2)
3350 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
3351 return gdbarch
->register_raw_size (reg_nr
);
3355 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
3356 gdbarch_register_raw_size_ftype register_raw_size
)
3358 gdbarch
->register_raw_size
= register_raw_size
;
3362 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
3364 gdb_assert (gdbarch
!= NULL
);
3365 return gdbarch
->deprecated_max_register_raw_size
!= 0;
3369 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
3371 gdb_assert (gdbarch
!= NULL
);
3372 if (gdbarch_debug
>= 2)
3373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
3374 return gdbarch
->deprecated_max_register_raw_size
;
3378 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
3379 int deprecated_max_register_raw_size
)
3381 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
3385 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3387 gdb_assert (gdbarch
!= NULL
);
3388 if (gdbarch
->register_virtual_size
== 0)
3389 internal_error (__FILE__
, __LINE__
,
3390 "gdbarch: gdbarch_register_virtual_size invalid");
3391 if (gdbarch_debug
>= 2)
3392 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3393 return gdbarch
->register_virtual_size (reg_nr
);
3397 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3398 gdbarch_register_virtual_size_ftype register_virtual_size
)
3400 gdbarch
->register_virtual_size
= register_virtual_size
;
3404 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
3406 gdb_assert (gdbarch
!= NULL
);
3407 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
3411 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
3413 gdb_assert (gdbarch
!= NULL
);
3414 if (gdbarch_debug
>= 2)
3415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
3416 return gdbarch
->deprecated_max_register_virtual_size
;
3420 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
3421 int deprecated_max_register_virtual_size
)
3423 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
3427 gdbarch_register_virtual_type_p (struct gdbarch
*gdbarch
)
3429 gdb_assert (gdbarch
!= NULL
);
3430 return gdbarch
->register_virtual_type
!= 0;
3434 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3436 gdb_assert (gdbarch
!= NULL
);
3437 if (gdbarch
->register_virtual_type
== 0)
3438 internal_error (__FILE__
, __LINE__
,
3439 "gdbarch: gdbarch_register_virtual_type invalid");
3440 if (gdbarch_debug
>= 2)
3441 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3442 return gdbarch
->register_virtual_type (reg_nr
);
3446 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3447 gdbarch_register_virtual_type_ftype register_virtual_type
)
3449 gdbarch
->register_virtual_type
= register_virtual_type
;
3453 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
3455 gdb_assert (gdbarch
!= NULL
);
3456 return gdbarch
->register_type
!= 0;
3460 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
3462 gdb_assert (gdbarch
!= NULL
);
3463 if (gdbarch
->register_type
== 0)
3464 internal_error (__FILE__
, __LINE__
,
3465 "gdbarch: gdbarch_register_type invalid");
3466 if (gdbarch_debug
>= 2)
3467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
3468 return gdbarch
->register_type (gdbarch
, reg_nr
);
3472 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
3473 gdbarch_register_type_ftype register_type
)
3475 gdbarch
->register_type
= register_type
;
3479 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3481 gdb_assert (gdbarch
!= NULL
);
3482 return gdbarch
->deprecated_do_registers_info
!= 0;
3486 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3488 gdb_assert (gdbarch
!= NULL
);
3489 if (gdbarch
->deprecated_do_registers_info
== 0)
3490 internal_error (__FILE__
, __LINE__
,
3491 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3492 if (gdbarch_debug
>= 2)
3493 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3494 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3498 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3499 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3501 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3505 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3507 gdb_assert (gdbarch
!= NULL
);
3508 if (gdbarch
->print_registers_info
== 0)
3509 internal_error (__FILE__
, __LINE__
,
3510 "gdbarch: gdbarch_print_registers_info invalid");
3511 if (gdbarch_debug
>= 2)
3512 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3513 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3517 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3518 gdbarch_print_registers_info_ftype print_registers_info
)
3520 gdbarch
->print_registers_info
= print_registers_info
;
3524 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3526 gdb_assert (gdbarch
!= NULL
);
3527 return gdbarch
->print_float_info
!= 0;
3531 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3533 gdb_assert (gdbarch
!= NULL
);
3534 if (gdbarch
->print_float_info
== 0)
3535 internal_error (__FILE__
, __LINE__
,
3536 "gdbarch: gdbarch_print_float_info invalid");
3537 if (gdbarch_debug
>= 2)
3538 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3539 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3543 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3544 gdbarch_print_float_info_ftype print_float_info
)
3546 gdbarch
->print_float_info
= print_float_info
;
3550 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3552 gdb_assert (gdbarch
!= NULL
);
3553 return gdbarch
->print_vector_info
!= 0;
3557 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3559 gdb_assert (gdbarch
!= NULL
);
3560 if (gdbarch
->print_vector_info
== 0)
3561 internal_error (__FILE__
, __LINE__
,
3562 "gdbarch: gdbarch_print_vector_info invalid");
3563 if (gdbarch_debug
>= 2)
3564 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3565 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3569 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3570 gdbarch_print_vector_info_ftype print_vector_info
)
3572 gdbarch
->print_vector_info
= print_vector_info
;
3576 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3578 gdb_assert (gdbarch
!= NULL
);
3579 if (gdbarch
->register_sim_regno
== 0)
3580 internal_error (__FILE__
, __LINE__
,
3581 "gdbarch: gdbarch_register_sim_regno invalid");
3582 if (gdbarch_debug
>= 2)
3583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3584 return gdbarch
->register_sim_regno (reg_nr
);
3588 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3589 gdbarch_register_sim_regno_ftype register_sim_regno
)
3591 gdbarch
->register_sim_regno
= register_sim_regno
;
3595 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3597 gdb_assert (gdbarch
!= NULL
);
3598 return gdbarch
->register_bytes_ok
!= 0;
3602 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3604 gdb_assert (gdbarch
!= NULL
);
3605 if (gdbarch
->register_bytes_ok
== 0)
3606 internal_error (__FILE__
, __LINE__
,
3607 "gdbarch: gdbarch_register_bytes_ok invalid");
3608 if (gdbarch_debug
>= 2)
3609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3610 return gdbarch
->register_bytes_ok (nr_bytes
);
3614 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3615 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3617 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3621 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3623 gdb_assert (gdbarch
!= NULL
);
3624 if (gdbarch
->cannot_fetch_register
== 0)
3625 internal_error (__FILE__
, __LINE__
,
3626 "gdbarch: gdbarch_cannot_fetch_register invalid");
3627 if (gdbarch_debug
>= 2)
3628 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3629 return gdbarch
->cannot_fetch_register (regnum
);
3633 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3634 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3636 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3640 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3642 gdb_assert (gdbarch
!= NULL
);
3643 if (gdbarch
->cannot_store_register
== 0)
3644 internal_error (__FILE__
, __LINE__
,
3645 "gdbarch: gdbarch_cannot_store_register invalid");
3646 if (gdbarch_debug
>= 2)
3647 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3648 return gdbarch
->cannot_store_register (regnum
);
3652 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3653 gdbarch_cannot_store_register_ftype cannot_store_register
)
3655 gdbarch
->cannot_store_register
= cannot_store_register
;
3659 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3661 gdb_assert (gdbarch
!= NULL
);
3662 return gdbarch
->get_longjmp_target
!= 0;
3666 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3668 gdb_assert (gdbarch
!= NULL
);
3669 if (gdbarch
->get_longjmp_target
== 0)
3670 internal_error (__FILE__
, __LINE__
,
3671 "gdbarch: gdbarch_get_longjmp_target invalid");
3672 if (gdbarch_debug
>= 2)
3673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3674 return gdbarch
->get_longjmp_target (pc
);
3678 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3679 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3681 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3685 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3687 gdb_assert (gdbarch
!= NULL
);
3688 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3689 if (gdbarch_debug
>= 2)
3690 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3691 return gdbarch
->deprecated_use_generic_dummy_frames
;
3695 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3696 int deprecated_use_generic_dummy_frames
)
3698 gdbarch
->deprecated_use_generic_dummy_frames
= deprecated_use_generic_dummy_frames
;
3702 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3704 gdb_assert (gdbarch
!= NULL
);
3705 /* Skip verify of call_dummy_location, invalid_p == 0 */
3706 if (gdbarch_debug
>= 2)
3707 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3708 return gdbarch
->call_dummy_location
;
3712 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3713 int call_dummy_location
)
3715 gdbarch
->call_dummy_location
= call_dummy_location
;
3719 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3721 gdb_assert (gdbarch
!= NULL
);
3722 if (gdbarch
->call_dummy_address
== 0)
3723 internal_error (__FILE__
, __LINE__
,
3724 "gdbarch: gdbarch_call_dummy_address invalid");
3725 if (gdbarch_debug
>= 2)
3726 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3727 return gdbarch
->call_dummy_address ();
3731 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3732 gdbarch_call_dummy_address_ftype call_dummy_address
)
3734 gdbarch
->call_dummy_address
= call_dummy_address
;
3738 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3740 gdb_assert (gdbarch
!= NULL
);
3741 if (gdbarch_debug
>= 2)
3742 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3743 return gdbarch
->call_dummy_start_offset
;
3747 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3748 CORE_ADDR call_dummy_start_offset
)
3750 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3754 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3756 gdb_assert (gdbarch
!= NULL
);
3757 if (gdbarch_debug
>= 2)
3758 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3759 return gdbarch
->call_dummy_breakpoint_offset
;
3763 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3764 CORE_ADDR call_dummy_breakpoint_offset
)
3766 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3770 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3772 gdb_assert (gdbarch
!= NULL
);
3773 if (gdbarch_debug
>= 2)
3774 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3775 return gdbarch
->call_dummy_length
;
3779 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3780 int call_dummy_length
)
3782 gdbarch
->call_dummy_length
= call_dummy_length
;
3786 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3788 gdb_assert (gdbarch
!= NULL
);
3789 return gdbarch
->deprecated_pc_in_call_dummy
!= generic_pc_in_call_dummy
;
3793 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3795 gdb_assert (gdbarch
!= NULL
);
3796 if (gdbarch
->deprecated_pc_in_call_dummy
== 0)
3797 internal_error (__FILE__
, __LINE__
,
3798 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3799 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3800 if (gdbarch_debug
>= 2)
3801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3802 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3806 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3807 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3809 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3813 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3815 gdb_assert (gdbarch
!= NULL
);
3816 /* Skip verify of call_dummy_words, invalid_p == 0 */
3817 if (gdbarch_debug
>= 2)
3818 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3819 return gdbarch
->call_dummy_words
;
3823 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3824 LONGEST
* call_dummy_words
)
3826 gdbarch
->call_dummy_words
= call_dummy_words
;
3830 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3832 gdb_assert (gdbarch
!= NULL
);
3833 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3834 if (gdbarch_debug
>= 2)
3835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3836 return gdbarch
->sizeof_call_dummy_words
;
3840 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3841 int sizeof_call_dummy_words
)
3843 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3847 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3849 gdb_assert (gdbarch
!= NULL
);
3850 return gdbarch
->deprecated_call_dummy_stack_adjust
!= 0;
3854 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3856 gdb_assert (gdbarch
!= NULL
);
3857 if (gdbarch_debug
>= 2)
3858 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3859 return gdbarch
->deprecated_call_dummy_stack_adjust
;
3863 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3864 int deprecated_call_dummy_stack_adjust
)
3866 gdbarch
->deprecated_call_dummy_stack_adjust
= deprecated_call_dummy_stack_adjust
;
3870 gdbarch_fix_call_dummy_p (struct gdbarch
*gdbarch
)
3872 gdb_assert (gdbarch
!= NULL
);
3873 return gdbarch
->fix_call_dummy
!= 0;
3877 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
)
3879 gdb_assert (gdbarch
!= NULL
);
3880 if (gdbarch
->fix_call_dummy
== 0)
3881 internal_error (__FILE__
, __LINE__
,
3882 "gdbarch: gdbarch_fix_call_dummy invalid");
3883 if (gdbarch_debug
>= 2)
3884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3885 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3889 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3890 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3892 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3896 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch
*gdbarch
)
3898 gdb_assert (gdbarch
!= NULL
);
3899 return gdbarch
->deprecated_init_frame_pc_first
!= 0;
3903 gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3905 gdb_assert (gdbarch
!= NULL
);
3906 if (gdbarch
->deprecated_init_frame_pc_first
== 0)
3907 internal_error (__FILE__
, __LINE__
,
3908 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3909 if (gdbarch_debug
>= 2)
3910 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc_first called\n");
3911 return gdbarch
->deprecated_init_frame_pc_first (fromleaf
, prev
);
3915 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
,
3916 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first
)
3918 gdbarch
->deprecated_init_frame_pc_first
= deprecated_init_frame_pc_first
;
3922 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3924 gdb_assert (gdbarch
!= NULL
);
3925 return gdbarch
->deprecated_init_frame_pc
!= 0;
3929 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3931 gdb_assert (gdbarch
!= NULL
);
3932 if (gdbarch
->deprecated_init_frame_pc
== 0)
3933 internal_error (__FILE__
, __LINE__
,
3934 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3935 if (gdbarch_debug
>= 2)
3936 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3937 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3941 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3942 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3944 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3948 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3950 gdb_assert (gdbarch
!= NULL
);
3951 if (gdbarch_debug
>= 2)
3952 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3953 return gdbarch
->believe_pcc_promotion
;
3957 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3958 int believe_pcc_promotion
)
3960 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3964 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3966 gdb_assert (gdbarch
!= NULL
);
3967 if (gdbarch_debug
>= 2)
3968 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3969 return gdbarch
->believe_pcc_promotion_type
;
3973 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3974 int believe_pcc_promotion_type
)
3976 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3980 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
3982 gdb_assert (gdbarch
!= NULL
);
3983 return gdbarch
->deprecated_get_saved_register
!= 0;
3987 gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
, char *raw_buffer
, int *optimized
, CORE_ADDR
*addrp
, struct frame_info
*frame
, int regnum
, enum lval_type
*lval
)
3989 gdb_assert (gdbarch
!= NULL
);
3990 if (gdbarch
->deprecated_get_saved_register
== 0)
3991 internal_error (__FILE__
, __LINE__
,
3992 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
3993 if (gdbarch_debug
>= 2)
3994 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
3995 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3999 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
4000 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
4002 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
4006 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
4008 gdb_assert (gdbarch
!= NULL
);
4009 if (gdbarch
->register_convertible
== 0)
4010 internal_error (__FILE__
, __LINE__
,
4011 "gdbarch: gdbarch_register_convertible invalid");
4012 if (gdbarch_debug
>= 2)
4013 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
4014 return gdbarch
->register_convertible (nr
);
4018 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
4019 gdbarch_register_convertible_ftype register_convertible
)
4021 gdbarch
->register_convertible
= register_convertible
;
4025 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4027 gdb_assert (gdbarch
!= NULL
);
4028 if (gdbarch
->register_convert_to_virtual
== 0)
4029 internal_error (__FILE__
, __LINE__
,
4030 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4031 if (gdbarch_debug
>= 2)
4032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
4033 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
4037 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
4038 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
4040 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
4044 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4046 gdb_assert (gdbarch
!= NULL
);
4047 if (gdbarch
->register_convert_to_raw
== 0)
4048 internal_error (__FILE__
, __LINE__
,
4049 "gdbarch: gdbarch_register_convert_to_raw invalid");
4050 if (gdbarch_debug
>= 2)
4051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
4052 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
4056 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
4057 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
4059 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
4063 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
4065 gdb_assert (gdbarch
!= NULL
);
4066 if (gdbarch
->convert_register_p
== 0)
4067 internal_error (__FILE__
, __LINE__
,
4068 "gdbarch: gdbarch_convert_register_p invalid");
4069 if (gdbarch_debug
>= 2)
4070 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
4071 return gdbarch
->convert_register_p (regnum
);
4075 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
4076 gdbarch_convert_register_p_ftype convert_register_p
)
4078 gdbarch
->convert_register_p
= convert_register_p
;
4082 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4084 gdb_assert (gdbarch
!= NULL
);
4085 if (gdbarch
->register_to_value
== 0)
4086 internal_error (__FILE__
, __LINE__
,
4087 "gdbarch: gdbarch_register_to_value invalid");
4088 if (gdbarch_debug
>= 2)
4089 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
4090 gdbarch
->register_to_value (regnum
, type
, from
, to
);
4094 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
4095 gdbarch_register_to_value_ftype register_to_value
)
4097 gdbarch
->register_to_value
= register_to_value
;
4101 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4103 gdb_assert (gdbarch
!= NULL
);
4104 if (gdbarch
->value_to_register
== 0)
4105 internal_error (__FILE__
, __LINE__
,
4106 "gdbarch: gdbarch_value_to_register invalid");
4107 if (gdbarch_debug
>= 2)
4108 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
4109 gdbarch
->value_to_register (type
, regnum
, from
, to
);
4113 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
4114 gdbarch_value_to_register_ftype value_to_register
)
4116 gdbarch
->value_to_register
= value_to_register
;
4120 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
4122 gdb_assert (gdbarch
!= NULL
);
4123 if (gdbarch
->pointer_to_address
== 0)
4124 internal_error (__FILE__
, __LINE__
,
4125 "gdbarch: gdbarch_pointer_to_address invalid");
4126 if (gdbarch_debug
>= 2)
4127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
4128 return gdbarch
->pointer_to_address (type
, buf
);
4132 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
4133 gdbarch_pointer_to_address_ftype pointer_to_address
)
4135 gdbarch
->pointer_to_address
= pointer_to_address
;
4139 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
4141 gdb_assert (gdbarch
!= NULL
);
4142 if (gdbarch
->address_to_pointer
== 0)
4143 internal_error (__FILE__
, __LINE__
,
4144 "gdbarch: gdbarch_address_to_pointer invalid");
4145 if (gdbarch_debug
>= 2)
4146 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
4147 gdbarch
->address_to_pointer (type
, buf
, addr
);
4151 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
4152 gdbarch_address_to_pointer_ftype address_to_pointer
)
4154 gdbarch
->address_to_pointer
= address_to_pointer
;
4158 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
4160 gdb_assert (gdbarch
!= NULL
);
4161 return gdbarch
->integer_to_address
!= 0;
4165 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
4167 gdb_assert (gdbarch
!= NULL
);
4168 if (gdbarch
->integer_to_address
== 0)
4169 internal_error (__FILE__
, __LINE__
,
4170 "gdbarch: gdbarch_integer_to_address invalid");
4171 if (gdbarch_debug
>= 2)
4172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
4173 return gdbarch
->integer_to_address (type
, buf
);
4177 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
4178 gdbarch_integer_to_address_ftype integer_to_address
)
4180 gdbarch
->integer_to_address
= integer_to_address
;
4184 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
4186 gdb_assert (gdbarch
!= NULL
);
4187 if (gdbarch
->return_value_on_stack
== 0)
4188 internal_error (__FILE__
, __LINE__
,
4189 "gdbarch: gdbarch_return_value_on_stack invalid");
4190 if (gdbarch_debug
>= 2)
4191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
4192 return gdbarch
->return_value_on_stack (type
);
4196 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
4197 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
4199 gdbarch
->return_value_on_stack
= return_value_on_stack
;
4203 gdbarch_deprecated_push_arguments_p (struct gdbarch
*gdbarch
)
4205 gdb_assert (gdbarch
!= NULL
);
4206 return gdbarch
->deprecated_push_arguments
!= 0;
4210 gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
4212 gdb_assert (gdbarch
!= NULL
);
4213 if (gdbarch
->deprecated_push_arguments
== 0)
4214 internal_error (__FILE__
, __LINE__
,
4215 "gdbarch: gdbarch_deprecated_push_arguments invalid");
4216 if (gdbarch_debug
>= 2)
4217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_arguments called\n");
4218 return gdbarch
->deprecated_push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
4222 set_gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
,
4223 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments
)
4225 gdbarch
->deprecated_push_arguments
= deprecated_push_arguments
;
4229 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
4231 gdb_assert (gdbarch
!= NULL
);
4232 return gdbarch
->push_dummy_call
!= 0;
4236 gdbarch_push_dummy_call (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR dummy_addr
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
4238 gdb_assert (gdbarch
!= NULL
);
4239 if (gdbarch
->push_dummy_call
== 0)
4240 internal_error (__FILE__
, __LINE__
,
4241 "gdbarch: gdbarch_push_dummy_call invalid");
4242 if (gdbarch_debug
>= 2)
4243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
4244 return gdbarch
->push_dummy_call (gdbarch
, regcache
, dummy_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
4248 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
4249 gdbarch_push_dummy_call_ftype push_dummy_call
)
4251 gdbarch
->push_dummy_call
= push_dummy_call
;
4255 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch
*gdbarch
)
4257 gdb_assert (gdbarch
!= NULL
);
4258 return gdbarch
->deprecated_push_dummy_frame
!= 0;
4262 gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
)
4264 gdb_assert (gdbarch
!= NULL
);
4265 if (gdbarch
->deprecated_push_dummy_frame
== 0)
4266 internal_error (__FILE__
, __LINE__
,
4267 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4268 if (gdbarch_debug
>= 2)
4269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_dummy_frame called\n");
4270 gdbarch
->deprecated_push_dummy_frame ();
4274 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
,
4275 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame
)
4277 gdbarch
->deprecated_push_dummy_frame
= deprecated_push_dummy_frame
;
4281 gdbarch_deprecated_push_return_address_p (struct gdbarch
*gdbarch
)
4283 gdb_assert (gdbarch
!= NULL
);
4284 return gdbarch
->deprecated_push_return_address
!= 0;
4288 gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
4290 gdb_assert (gdbarch
!= NULL
);
4291 if (gdbarch
->deprecated_push_return_address
== 0)
4292 internal_error (__FILE__
, __LINE__
,
4293 "gdbarch: gdbarch_deprecated_push_return_address invalid");
4294 if (gdbarch_debug
>= 2)
4295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_return_address called\n");
4296 return gdbarch
->deprecated_push_return_address (pc
, sp
);
4300 set_gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
,
4301 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address
)
4303 gdbarch
->deprecated_push_return_address
= deprecated_push_return_address
;
4307 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
4309 gdb_assert (gdbarch
!= NULL
);
4310 return gdbarch
->deprecated_pop_frame
!= 0;
4314 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
4316 gdb_assert (gdbarch
!= NULL
);
4317 if (gdbarch
->deprecated_pop_frame
== 0)
4318 internal_error (__FILE__
, __LINE__
,
4319 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4320 if (gdbarch_debug
>= 2)
4321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
4322 gdbarch
->deprecated_pop_frame ();
4326 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
4327 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
4329 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
4333 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
4335 gdb_assert (gdbarch
!= NULL
);
4336 return gdbarch
->deprecated_store_struct_return
!= 0;
4340 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
4342 gdb_assert (gdbarch
!= NULL
);
4343 if (gdbarch
->deprecated_store_struct_return
== 0)
4344 internal_error (__FILE__
, __LINE__
,
4345 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4346 if (gdbarch_debug
>= 2)
4347 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
4348 gdbarch
->deprecated_store_struct_return (addr
, sp
);
4352 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
4353 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
4355 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
4359 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4361 gdb_assert (gdbarch
!= NULL
);
4362 if (gdbarch
->extract_return_value
== 0)
4363 internal_error (__FILE__
, __LINE__
,
4364 "gdbarch: gdbarch_extract_return_value invalid");
4365 if (gdbarch_debug
>= 2)
4366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4367 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4371 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4372 gdbarch_extract_return_value_ftype extract_return_value
)
4374 gdbarch
->extract_return_value
= extract_return_value
;
4378 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4380 gdb_assert (gdbarch
!= NULL
);
4381 if (gdbarch
->store_return_value
== 0)
4382 internal_error (__FILE__
, __LINE__
,
4383 "gdbarch: gdbarch_store_return_value invalid");
4384 if (gdbarch_debug
>= 2)
4385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4386 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4390 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4391 gdbarch_store_return_value_ftype store_return_value
)
4393 gdbarch
->store_return_value
= store_return_value
;
4397 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4399 gdb_assert (gdbarch
!= NULL
);
4400 if (gdbarch
->deprecated_extract_return_value
== 0)
4401 internal_error (__FILE__
, __LINE__
,
4402 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4403 if (gdbarch_debug
>= 2)
4404 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4405 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4409 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4410 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4412 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4416 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4418 gdb_assert (gdbarch
!= NULL
);
4419 if (gdbarch
->deprecated_store_return_value
== 0)
4420 internal_error (__FILE__
, __LINE__
,
4421 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4422 if (gdbarch_debug
>= 2)
4423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4424 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4428 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4429 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4431 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4435 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4437 gdb_assert (gdbarch
!= NULL
);
4438 return gdbarch
->extract_struct_value_address
!= 0;
4442 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4444 gdb_assert (gdbarch
!= NULL
);
4445 if (gdbarch
->extract_struct_value_address
== 0)
4446 internal_error (__FILE__
, __LINE__
,
4447 "gdbarch: gdbarch_extract_struct_value_address invalid");
4448 if (gdbarch_debug
>= 2)
4449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4450 return gdbarch
->extract_struct_value_address (regcache
);
4454 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4455 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4457 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4461 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4463 gdb_assert (gdbarch
!= NULL
);
4464 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4468 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4470 gdb_assert (gdbarch
!= NULL
);
4471 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4472 internal_error (__FILE__
, __LINE__
,
4473 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4474 if (gdbarch_debug
>= 2)
4475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4476 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4480 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4481 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4483 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4487 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4489 gdb_assert (gdbarch
!= NULL
);
4490 if (gdbarch
->use_struct_convention
== 0)
4491 internal_error (__FILE__
, __LINE__
,
4492 "gdbarch: gdbarch_use_struct_convention invalid");
4493 if (gdbarch_debug
>= 2)
4494 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4495 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4499 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4500 gdbarch_use_struct_convention_ftype use_struct_convention
)
4502 gdbarch
->use_struct_convention
= use_struct_convention
;
4506 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
4508 gdb_assert (gdbarch
!= NULL
);
4509 return gdbarch
->deprecated_frame_init_saved_regs
!= 0;
4513 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4515 gdb_assert (gdbarch
!= NULL
);
4516 if (gdbarch
->deprecated_frame_init_saved_regs
== 0)
4517 internal_error (__FILE__
, __LINE__
,
4518 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4519 if (gdbarch_debug
>= 2)
4520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
4521 gdbarch
->deprecated_frame_init_saved_regs (frame
);
4525 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4526 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
4528 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
4532 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4534 gdb_assert (gdbarch
!= NULL
);
4535 return gdbarch
->deprecated_init_extra_frame_info
!= 0;
4539 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4541 gdb_assert (gdbarch
!= NULL
);
4542 if (gdbarch
->deprecated_init_extra_frame_info
== 0)
4543 internal_error (__FILE__
, __LINE__
,
4544 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4545 if (gdbarch_debug
>= 2)
4546 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
4547 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
4551 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
4552 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
4554 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
4558 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4560 gdb_assert (gdbarch
!= NULL
);
4561 if (gdbarch
->skip_prologue
== 0)
4562 internal_error (__FILE__
, __LINE__
,
4563 "gdbarch: gdbarch_skip_prologue invalid");
4564 if (gdbarch_debug
>= 2)
4565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4566 return gdbarch
->skip_prologue (ip
);
4570 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4571 gdbarch_skip_prologue_ftype skip_prologue
)
4573 gdbarch
->skip_prologue
= skip_prologue
;
4577 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4579 gdb_assert (gdbarch
!= NULL
);
4580 if (gdbarch
->prologue_frameless_p
== 0)
4581 internal_error (__FILE__
, __LINE__
,
4582 "gdbarch: gdbarch_prologue_frameless_p invalid");
4583 if (gdbarch_debug
>= 2)
4584 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4585 return gdbarch
->prologue_frameless_p (ip
);
4589 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4590 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4592 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4596 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4598 gdb_assert (gdbarch
!= NULL
);
4599 if (gdbarch
->inner_than
== 0)
4600 internal_error (__FILE__
, __LINE__
,
4601 "gdbarch: gdbarch_inner_than invalid");
4602 if (gdbarch_debug
>= 2)
4603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4604 return gdbarch
->inner_than (lhs
, rhs
);
4608 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4609 gdbarch_inner_than_ftype inner_than
)
4611 gdbarch
->inner_than
= inner_than
;
4614 const unsigned char *
4615 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4617 gdb_assert (gdbarch
!= NULL
);
4618 if (gdbarch
->breakpoint_from_pc
== 0)
4619 internal_error (__FILE__
, __LINE__
,
4620 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4621 if (gdbarch_debug
>= 2)
4622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4623 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4627 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4628 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4630 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4634 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4636 gdb_assert (gdbarch
!= NULL
);
4637 if (gdbarch
->memory_insert_breakpoint
== 0)
4638 internal_error (__FILE__
, __LINE__
,
4639 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4640 if (gdbarch_debug
>= 2)
4641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4642 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4646 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4647 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4649 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4653 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4655 gdb_assert (gdbarch
!= NULL
);
4656 if (gdbarch
->memory_remove_breakpoint
== 0)
4657 internal_error (__FILE__
, __LINE__
,
4658 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4659 if (gdbarch_debug
>= 2)
4660 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4661 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4665 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4666 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4668 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4672 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4674 gdb_assert (gdbarch
!= NULL
);
4675 if (gdbarch
->decr_pc_after_break
== -1)
4676 internal_error (__FILE__
, __LINE__
,
4677 "gdbarch: gdbarch_decr_pc_after_break invalid");
4678 if (gdbarch_debug
>= 2)
4679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4680 return gdbarch
->decr_pc_after_break
;
4684 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4685 CORE_ADDR decr_pc_after_break
)
4687 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4691 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4693 gdb_assert (gdbarch
!= NULL
);
4694 if (gdbarch
->prepare_to_proceed
== 0)
4695 internal_error (__FILE__
, __LINE__
,
4696 "gdbarch: gdbarch_prepare_to_proceed invalid");
4697 if (gdbarch_debug
>= 2)
4698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4699 return gdbarch
->prepare_to_proceed (select_it
);
4703 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4704 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4706 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4710 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4712 gdb_assert (gdbarch
!= NULL
);
4713 if (gdbarch
->function_start_offset
== -1)
4714 internal_error (__FILE__
, __LINE__
,
4715 "gdbarch: gdbarch_function_start_offset invalid");
4716 if (gdbarch_debug
>= 2)
4717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4718 return gdbarch
->function_start_offset
;
4722 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4723 CORE_ADDR function_start_offset
)
4725 gdbarch
->function_start_offset
= function_start_offset
;
4729 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4731 gdb_assert (gdbarch
!= NULL
);
4732 if (gdbarch
->remote_translate_xfer_address
== 0)
4733 internal_error (__FILE__
, __LINE__
,
4734 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4735 if (gdbarch_debug
>= 2)
4736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4737 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4741 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4742 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4744 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4748 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4750 gdb_assert (gdbarch
!= NULL
);
4751 if (gdbarch
->frame_args_skip
== -1)
4752 internal_error (__FILE__
, __LINE__
,
4753 "gdbarch: gdbarch_frame_args_skip invalid");
4754 if (gdbarch_debug
>= 2)
4755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4756 return gdbarch
->frame_args_skip
;
4760 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4761 CORE_ADDR frame_args_skip
)
4763 gdbarch
->frame_args_skip
= frame_args_skip
;
4767 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4769 gdb_assert (gdbarch
!= NULL
);
4770 if (gdbarch
->frameless_function_invocation
== 0)
4771 internal_error (__FILE__
, __LINE__
,
4772 "gdbarch: gdbarch_frameless_function_invocation invalid");
4773 if (gdbarch_debug
>= 2)
4774 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4775 return gdbarch
->frameless_function_invocation (fi
);
4779 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4780 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4782 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4786 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
4788 gdb_assert (gdbarch
!= NULL
);
4789 return gdbarch
->deprecated_frame_chain
!= 0;
4793 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4795 gdb_assert (gdbarch
!= NULL
);
4796 if (gdbarch
->deprecated_frame_chain
== 0)
4797 internal_error (__FILE__
, __LINE__
,
4798 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4799 if (gdbarch_debug
>= 2)
4800 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
4801 return gdbarch
->deprecated_frame_chain (frame
);
4805 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
4806 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
4808 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
4812 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4814 gdb_assert (gdbarch
!= NULL
);
4815 return gdbarch
->deprecated_frame_chain_valid
!= 0;
4819 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4821 gdb_assert (gdbarch
!= NULL
);
4822 if (gdbarch
->deprecated_frame_chain_valid
== 0)
4823 internal_error (__FILE__
, __LINE__
,
4824 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4825 if (gdbarch_debug
>= 2)
4826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
4827 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
4831 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
4832 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
4834 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
4838 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4840 gdb_assert (gdbarch
!= NULL
);
4841 return gdbarch
->deprecated_frame_saved_pc
!= 0;
4845 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4847 gdb_assert (gdbarch
!= NULL
);
4848 if (gdbarch
->deprecated_frame_saved_pc
== 0)
4849 internal_error (__FILE__
, __LINE__
,
4850 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4851 if (gdbarch_debug
>= 2)
4852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
4853 return gdbarch
->deprecated_frame_saved_pc (fi
);
4857 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
4858 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
4860 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
4864 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
4866 gdb_assert (gdbarch
!= NULL
);
4867 return gdbarch
->unwind_pc
!= 0;
4871 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4873 gdb_assert (gdbarch
!= NULL
);
4874 if (gdbarch
->unwind_pc
== 0)
4875 internal_error (__FILE__
, __LINE__
,
4876 "gdbarch: gdbarch_unwind_pc invalid");
4877 if (gdbarch_debug
>= 2)
4878 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
4879 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
4883 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
4884 gdbarch_unwind_pc_ftype unwind_pc
)
4886 gdbarch
->unwind_pc
= unwind_pc
;
4890 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4892 gdb_assert (gdbarch
!= NULL
);
4893 if (gdbarch
->frame_args_address
== 0)
4894 internal_error (__FILE__
, __LINE__
,
4895 "gdbarch: gdbarch_frame_args_address invalid");
4896 if (gdbarch_debug
>= 2)
4897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4898 return gdbarch
->frame_args_address (fi
);
4902 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4903 gdbarch_frame_args_address_ftype frame_args_address
)
4905 gdbarch
->frame_args_address
= frame_args_address
;
4909 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4911 gdb_assert (gdbarch
!= NULL
);
4912 if (gdbarch
->frame_locals_address
== 0)
4913 internal_error (__FILE__
, __LINE__
,
4914 "gdbarch: gdbarch_frame_locals_address invalid");
4915 if (gdbarch_debug
>= 2)
4916 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4917 return gdbarch
->frame_locals_address (fi
);
4921 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4922 gdbarch_frame_locals_address_ftype frame_locals_address
)
4924 gdbarch
->frame_locals_address
= frame_locals_address
;
4928 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch
*gdbarch
)
4930 gdb_assert (gdbarch
!= NULL
);
4931 return gdbarch
->deprecated_saved_pc_after_call
!= 0;
4935 gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4937 gdb_assert (gdbarch
!= NULL
);
4938 if (gdbarch
->deprecated_saved_pc_after_call
== 0)
4939 internal_error (__FILE__
, __LINE__
,
4940 "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
4941 if (gdbarch_debug
>= 2)
4942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_saved_pc_after_call called\n");
4943 return gdbarch
->deprecated_saved_pc_after_call (frame
);
4947 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
,
4948 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call
)
4950 gdbarch
->deprecated_saved_pc_after_call
= deprecated_saved_pc_after_call
;
4954 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4956 gdb_assert (gdbarch
!= NULL
);
4957 if (gdbarch
->frame_num_args
== 0)
4958 internal_error (__FILE__
, __LINE__
,
4959 "gdbarch: gdbarch_frame_num_args invalid");
4960 if (gdbarch_debug
>= 2)
4961 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4962 return gdbarch
->frame_num_args (frame
);
4966 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4967 gdbarch_frame_num_args_ftype frame_num_args
)
4969 gdbarch
->frame_num_args
= frame_num_args
;
4973 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4975 gdb_assert (gdbarch
!= NULL
);
4976 return gdbarch
->stack_align
!= 0;
4980 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4982 gdb_assert (gdbarch
!= NULL
);
4983 if (gdbarch
->stack_align
== 0)
4984 internal_error (__FILE__
, __LINE__
,
4985 "gdbarch: gdbarch_stack_align invalid");
4986 if (gdbarch_debug
>= 2)
4987 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4988 return gdbarch
->stack_align (sp
);
4992 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4993 gdbarch_stack_align_ftype stack_align
)
4995 gdbarch
->stack_align
= stack_align
;
4999 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
5001 gdb_assert (gdbarch
!= NULL
);
5002 return gdbarch
->frame_align
!= 0;
5006 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
5008 gdb_assert (gdbarch
!= NULL
);
5009 if (gdbarch
->frame_align
== 0)
5010 internal_error (__FILE__
, __LINE__
,
5011 "gdbarch: gdbarch_frame_align invalid");
5012 if (gdbarch_debug
>= 2)
5013 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
5014 return gdbarch
->frame_align (gdbarch
, address
);
5018 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
5019 gdbarch_frame_align_ftype frame_align
)
5021 gdbarch
->frame_align
= frame_align
;
5025 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
5027 gdb_assert (gdbarch
!= NULL
);
5028 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
5029 if (gdbarch_debug
>= 2)
5030 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5031 return gdbarch
->deprecated_extra_stack_alignment_needed
;
5035 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
5036 int deprecated_extra_stack_alignment_needed
)
5038 gdbarch
->deprecated_extra_stack_alignment_needed
= deprecated_extra_stack_alignment_needed
;
5042 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
5044 gdb_assert (gdbarch
!= NULL
);
5045 return gdbarch
->reg_struct_has_addr
!= 0;
5049 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
5051 gdb_assert (gdbarch
!= NULL
);
5052 if (gdbarch
->reg_struct_has_addr
== 0)
5053 internal_error (__FILE__
, __LINE__
,
5054 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5055 if (gdbarch_debug
>= 2)
5056 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
5057 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
5061 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
5062 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
5064 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
5068 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
5070 gdb_assert (gdbarch
!= NULL
);
5071 return gdbarch
->save_dummy_frame_tos
!= 0;
5075 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
5077 gdb_assert (gdbarch
!= NULL
);
5078 if (gdbarch
->save_dummy_frame_tos
== 0)
5079 internal_error (__FILE__
, __LINE__
,
5080 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5081 if (gdbarch_debug
>= 2)
5082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
5083 gdbarch
->save_dummy_frame_tos (sp
);
5087 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
5088 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
5090 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
5094 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
5096 gdb_assert (gdbarch
!= NULL
);
5097 return gdbarch
->unwind_dummy_id
!= 0;
5101 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
5103 gdb_assert (gdbarch
!= NULL
);
5104 if (gdbarch
->unwind_dummy_id
== 0)
5105 internal_error (__FILE__
, __LINE__
,
5106 "gdbarch: gdbarch_unwind_dummy_id invalid");
5107 if (gdbarch_debug
>= 2)
5108 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
5109 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
5113 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
5114 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
5116 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
5120 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
5122 gdb_assert (gdbarch
!= NULL
);
5123 if (gdbarch_debug
>= 2)
5124 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
5125 return gdbarch
->parm_boundary
;
5129 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
5132 gdbarch
->parm_boundary
= parm_boundary
;
5135 const struct floatformat
*
5136 gdbarch_float_format (struct gdbarch
*gdbarch
)
5138 gdb_assert (gdbarch
!= NULL
);
5139 if (gdbarch_debug
>= 2)
5140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
5141 return gdbarch
->float_format
;
5145 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
5146 const struct floatformat
* float_format
)
5148 gdbarch
->float_format
= float_format
;
5151 const struct floatformat
*
5152 gdbarch_double_format (struct gdbarch
*gdbarch
)
5154 gdb_assert (gdbarch
!= NULL
);
5155 if (gdbarch_debug
>= 2)
5156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
5157 return gdbarch
->double_format
;
5161 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
5162 const struct floatformat
* double_format
)
5164 gdbarch
->double_format
= double_format
;
5167 const struct floatformat
*
5168 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
5170 gdb_assert (gdbarch
!= NULL
);
5171 if (gdbarch_debug
>= 2)
5172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
5173 return gdbarch
->long_double_format
;
5177 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
5178 const struct floatformat
* long_double_format
)
5180 gdbarch
->long_double_format
= long_double_format
;
5184 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5186 gdb_assert (gdbarch
!= NULL
);
5187 if (gdbarch
->convert_from_func_ptr_addr
== 0)
5188 internal_error (__FILE__
, __LINE__
,
5189 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5190 if (gdbarch_debug
>= 2)
5191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
5192 return gdbarch
->convert_from_func_ptr_addr (addr
);
5196 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
5197 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
5199 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
5203 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5205 gdb_assert (gdbarch
!= NULL
);
5206 if (gdbarch
->addr_bits_remove
== 0)
5207 internal_error (__FILE__
, __LINE__
,
5208 "gdbarch: gdbarch_addr_bits_remove invalid");
5209 if (gdbarch_debug
>= 2)
5210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
5211 return gdbarch
->addr_bits_remove (addr
);
5215 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
5216 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
5218 gdbarch
->addr_bits_remove
= addr_bits_remove
;
5222 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5224 gdb_assert (gdbarch
!= NULL
);
5225 if (gdbarch
->smash_text_address
== 0)
5226 internal_error (__FILE__
, __LINE__
,
5227 "gdbarch: gdbarch_smash_text_address invalid");
5228 if (gdbarch_debug
>= 2)
5229 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
5230 return gdbarch
->smash_text_address (addr
);
5234 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
5235 gdbarch_smash_text_address_ftype smash_text_address
)
5237 gdbarch
->smash_text_address
= smash_text_address
;
5241 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
5243 gdb_assert (gdbarch
!= NULL
);
5244 return gdbarch
->software_single_step
!= 0;
5248 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
5250 gdb_assert (gdbarch
!= NULL
);
5251 if (gdbarch
->software_single_step
== 0)
5252 internal_error (__FILE__
, __LINE__
,
5253 "gdbarch: gdbarch_software_single_step invalid");
5254 if (gdbarch_debug
>= 2)
5255 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
5256 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
5260 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
5261 gdbarch_software_single_step_ftype software_single_step
)
5263 gdbarch
->software_single_step
= software_single_step
;
5267 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
5269 gdb_assert (gdbarch
!= NULL
);
5270 if (gdbarch
->print_insn
== 0)
5271 internal_error (__FILE__
, __LINE__
,
5272 "gdbarch: gdbarch_print_insn invalid");
5273 if (gdbarch_debug
>= 2)
5274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
5275 return gdbarch
->print_insn (vma
, info
);
5279 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
5280 gdbarch_print_insn_ftype print_insn
)
5282 gdbarch
->print_insn
= print_insn
;
5286 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5288 gdb_assert (gdbarch
!= NULL
);
5289 if (gdbarch
->skip_trampoline_code
== 0)
5290 internal_error (__FILE__
, __LINE__
,
5291 "gdbarch: gdbarch_skip_trampoline_code invalid");
5292 if (gdbarch_debug
>= 2)
5293 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
5294 return gdbarch
->skip_trampoline_code (pc
);
5298 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
5299 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
5301 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
5305 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5307 gdb_assert (gdbarch
!= NULL
);
5308 if (gdbarch
->in_solib_call_trampoline
== 0)
5309 internal_error (__FILE__
, __LINE__
,
5310 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5311 if (gdbarch_debug
>= 2)
5312 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
5313 return gdbarch
->in_solib_call_trampoline (pc
, name
);
5317 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
5318 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
5320 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
5324 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5326 gdb_assert (gdbarch
!= NULL
);
5327 if (gdbarch
->in_solib_return_trampoline
== 0)
5328 internal_error (__FILE__
, __LINE__
,
5329 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5330 if (gdbarch_debug
>= 2)
5331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
5332 return gdbarch
->in_solib_return_trampoline (pc
, name
);
5336 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
5337 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
5339 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
5343 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5345 gdb_assert (gdbarch
!= NULL
);
5346 if (gdbarch
->pc_in_sigtramp
== 0)
5347 internal_error (__FILE__
, __LINE__
,
5348 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5349 if (gdbarch_debug
>= 2)
5350 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
5351 return gdbarch
->pc_in_sigtramp (pc
, name
);
5355 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
5356 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
5358 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
5362 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
5364 gdb_assert (gdbarch
!= NULL
);
5365 return gdbarch
->sigtramp_start
!= 0;
5369 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5371 gdb_assert (gdbarch
!= NULL
);
5372 if (gdbarch
->sigtramp_start
== 0)
5373 internal_error (__FILE__
, __LINE__
,
5374 "gdbarch: gdbarch_sigtramp_start invalid");
5375 if (gdbarch_debug
>= 2)
5376 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
5377 return gdbarch
->sigtramp_start (pc
);
5381 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
5382 gdbarch_sigtramp_start_ftype sigtramp_start
)
5384 gdbarch
->sigtramp_start
= sigtramp_start
;
5388 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
5390 gdb_assert (gdbarch
!= NULL
);
5391 return gdbarch
->sigtramp_end
!= 0;
5395 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5397 gdb_assert (gdbarch
!= NULL
);
5398 if (gdbarch
->sigtramp_end
== 0)
5399 internal_error (__FILE__
, __LINE__
,
5400 "gdbarch: gdbarch_sigtramp_end invalid");
5401 if (gdbarch_debug
>= 2)
5402 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
5403 return gdbarch
->sigtramp_end (pc
);
5407 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
5408 gdbarch_sigtramp_end_ftype sigtramp_end
)
5410 gdbarch
->sigtramp_end
= sigtramp_end
;
5414 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5416 gdb_assert (gdbarch
!= NULL
);
5417 if (gdbarch
->in_function_epilogue_p
== 0)
5418 internal_error (__FILE__
, __LINE__
,
5419 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5420 if (gdbarch_debug
>= 2)
5421 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
5422 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
5426 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
5427 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
5429 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
5433 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
5435 gdb_assert (gdbarch
!= NULL
);
5436 if (gdbarch
->construct_inferior_arguments
== 0)
5437 internal_error (__FILE__
, __LINE__
,
5438 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5439 if (gdbarch_debug
>= 2)
5440 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5441 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5445 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5446 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5448 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5452 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
5454 gdb_assert (gdbarch
!= NULL
);
5455 return gdbarch
->dwarf2_build_frame_info
!= 0;
5459 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
5461 gdb_assert (gdbarch
!= NULL
);
5462 if (gdbarch
->dwarf2_build_frame_info
== 0)
5463 internal_error (__FILE__
, __LINE__
,
5464 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5465 if (gdbarch_debug
>= 2)
5466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
5467 gdbarch
->dwarf2_build_frame_info (objfile
);
5471 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
5472 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
5474 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
5478 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5480 gdb_assert (gdbarch
!= NULL
);
5481 if (gdbarch
->elf_make_msymbol_special
== 0)
5482 internal_error (__FILE__
, __LINE__
,
5483 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5484 if (gdbarch_debug
>= 2)
5485 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5486 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5490 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5491 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5493 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5497 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5499 gdb_assert (gdbarch
!= NULL
);
5500 if (gdbarch
->coff_make_msymbol_special
== 0)
5501 internal_error (__FILE__
, __LINE__
,
5502 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5503 if (gdbarch_debug
>= 2)
5504 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5505 gdbarch
->coff_make_msymbol_special (val
, msym
);
5509 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5510 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5512 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5516 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5518 gdb_assert (gdbarch
!= NULL
);
5519 /* Skip verify of name_of_malloc, invalid_p == 0 */
5520 if (gdbarch_debug
>= 2)
5521 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5522 return gdbarch
->name_of_malloc
;
5526 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5527 const char * name_of_malloc
)
5529 gdbarch
->name_of_malloc
= name_of_malloc
;
5533 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5535 gdb_assert (gdbarch
!= NULL
);
5536 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5537 if (gdbarch_debug
>= 2)
5538 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5539 return gdbarch
->cannot_step_breakpoint
;
5543 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5544 int cannot_step_breakpoint
)
5546 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5550 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5552 gdb_assert (gdbarch
!= NULL
);
5553 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5554 if (gdbarch_debug
>= 2)
5555 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5556 return gdbarch
->have_nonsteppable_watchpoint
;
5560 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5561 int have_nonsteppable_watchpoint
)
5563 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5567 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5569 gdb_assert (gdbarch
!= NULL
);
5570 return gdbarch
->address_class_type_flags
!= 0;
5574 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5576 gdb_assert (gdbarch
!= NULL
);
5577 if (gdbarch
->address_class_type_flags
== 0)
5578 internal_error (__FILE__
, __LINE__
,
5579 "gdbarch: gdbarch_address_class_type_flags invalid");
5580 if (gdbarch_debug
>= 2)
5581 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5582 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5586 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5587 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5589 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5593 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5595 gdb_assert (gdbarch
!= NULL
);
5596 return gdbarch
->address_class_type_flags_to_name
!= 0;
5600 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5602 gdb_assert (gdbarch
!= NULL
);
5603 if (gdbarch
->address_class_type_flags_to_name
== 0)
5604 internal_error (__FILE__
, __LINE__
,
5605 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5606 if (gdbarch_debug
>= 2)
5607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5608 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5612 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5613 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5615 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5619 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5621 gdb_assert (gdbarch
!= NULL
);
5622 return gdbarch
->address_class_name_to_type_flags
!= 0;
5626 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
5628 gdb_assert (gdbarch
!= NULL
);
5629 if (gdbarch
->address_class_name_to_type_flags
== 0)
5630 internal_error (__FILE__
, __LINE__
,
5631 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5632 if (gdbarch_debug
>= 2)
5633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5634 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5638 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5639 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5641 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5645 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5647 gdb_assert (gdbarch
!= NULL
);
5648 if (gdbarch
->register_reggroup_p
== 0)
5649 internal_error (__FILE__
, __LINE__
,
5650 "gdbarch: gdbarch_register_reggroup_p invalid");
5651 if (gdbarch_debug
>= 2)
5652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5653 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5657 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5658 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5660 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5664 /* Keep a registry of per-architecture data-pointers required by GDB
5671 gdbarch_data_init_ftype
*init
;
5672 gdbarch_data_free_ftype
*free
;
5675 struct gdbarch_data_registration
5677 struct gdbarch_data
*data
;
5678 struct gdbarch_data_registration
*next
;
5681 struct gdbarch_data_registry
5684 struct gdbarch_data_registration
*registrations
;
5687 struct gdbarch_data_registry gdbarch_data_registry
=
5692 struct gdbarch_data
*
5693 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5694 gdbarch_data_free_ftype
*free
)
5696 struct gdbarch_data_registration
**curr
;
5697 /* Append the new registraration. */
5698 for (curr
= &gdbarch_data_registry
.registrations
;
5700 curr
= &(*curr
)->next
);
5701 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5702 (*curr
)->next
= NULL
;
5703 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5704 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5705 (*curr
)->data
->init
= init
;
5706 (*curr
)->data
->init_p
= 1;
5707 (*curr
)->data
->free
= free
;
5708 return (*curr
)->data
;
5712 /* Create/delete the gdbarch data vector. */
5715 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5717 gdb_assert (gdbarch
->data
== NULL
);
5718 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5719 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5723 free_gdbarch_data (struct gdbarch
*gdbarch
)
5725 struct gdbarch_data_registration
*rego
;
5726 gdb_assert (gdbarch
->data
!= NULL
);
5727 for (rego
= gdbarch_data_registry
.registrations
;
5731 struct gdbarch_data
*data
= rego
->data
;
5732 gdb_assert (data
->index
< gdbarch
->nr_data
);
5733 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5735 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5736 gdbarch
->data
[data
->index
] = NULL
;
5739 xfree (gdbarch
->data
);
5740 gdbarch
->data
= NULL
;
5744 /* Initialize the current value of the specified per-architecture
5748 set_gdbarch_data (struct gdbarch
*gdbarch
,
5749 struct gdbarch_data
*data
,
5752 gdb_assert (data
->index
< gdbarch
->nr_data
);
5753 if (gdbarch
->data
[data
->index
] != NULL
)
5755 gdb_assert (data
->free
!= NULL
);
5756 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5758 gdbarch
->data
[data
->index
] = pointer
;
5761 /* Return the current value of the specified per-architecture
5765 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5767 gdb_assert (data
->index
< gdbarch
->nr_data
);
5768 /* The data-pointer isn't initialized, call init() to get a value but
5769 only if the architecture initializaiton has completed. Otherwise
5770 punt - hope that the caller knows what they are doing. */
5771 if (gdbarch
->data
[data
->index
] == NULL
5772 && gdbarch
->initialized_p
)
5774 /* Be careful to detect an initialization cycle. */
5775 gdb_assert (data
->init_p
);
5777 gdb_assert (data
->init
!= NULL
);
5778 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5780 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5782 return gdbarch
->data
[data
->index
];
5787 /* Keep a registry of swapped data required by GDB modules. */
5792 struct gdbarch_swap_registration
*source
;
5793 struct gdbarch_swap
*next
;
5796 struct gdbarch_swap_registration
5799 unsigned long sizeof_data
;
5800 gdbarch_swap_ftype
*init
;
5801 struct gdbarch_swap_registration
*next
;
5804 struct gdbarch_swap_registry
5807 struct gdbarch_swap_registration
*registrations
;
5810 struct gdbarch_swap_registry gdbarch_swap_registry
=
5816 register_gdbarch_swap (void *data
,
5817 unsigned long sizeof_data
,
5818 gdbarch_swap_ftype
*init
)
5820 struct gdbarch_swap_registration
**rego
;
5821 for (rego
= &gdbarch_swap_registry
.registrations
;
5823 rego
= &(*rego
)->next
);
5824 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5825 (*rego
)->next
= NULL
;
5826 (*rego
)->init
= init
;
5827 (*rego
)->data
= data
;
5828 (*rego
)->sizeof_data
= sizeof_data
;
5832 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5834 struct gdbarch_swap
*curr
;
5835 for (curr
= gdbarch
->swap
;
5839 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5844 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5846 struct gdbarch_swap_registration
*rego
;
5847 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5848 for (rego
= gdbarch_swap_registry
.registrations
;
5852 if (rego
->data
!= NULL
)
5854 (*curr
) = XMALLOC (struct gdbarch_swap
);
5855 (*curr
)->source
= rego
;
5856 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5857 (*curr
)->next
= NULL
;
5858 curr
= &(*curr
)->next
;
5860 if (rego
->init
!= NULL
)
5866 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5868 struct gdbarch_swap
*curr
;
5869 for (curr
= gdbarch
->swap
;
5872 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5876 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5878 struct gdbarch_swap
*curr
;
5879 for (curr
= gdbarch
->swap
;
5882 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5886 /* Keep a registry of the architectures known by GDB. */
5888 struct gdbarch_registration
5890 enum bfd_architecture bfd_architecture
;
5891 gdbarch_init_ftype
*init
;
5892 gdbarch_dump_tdep_ftype
*dump_tdep
;
5893 struct gdbarch_list
*arches
;
5894 struct gdbarch_registration
*next
;
5897 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5900 append_name (const char ***buf
, int *nr
, const char *name
)
5902 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5908 gdbarch_printable_names (void)
5912 /* Accumulate a list of names based on the registed list of
5914 enum bfd_architecture a
;
5916 const char **arches
= NULL
;
5917 struct gdbarch_registration
*rego
;
5918 for (rego
= gdbarch_registry
;
5922 const struct bfd_arch_info
*ap
;
5923 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5925 internal_error (__FILE__
, __LINE__
,
5926 "gdbarch_architecture_names: multi-arch unknown");
5929 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5934 append_name (&arches
, &nr_arches
, NULL
);
5938 /* Just return all the architectures that BFD knows. Assume that
5939 the legacy architecture framework supports them. */
5940 return bfd_arch_list ();
5945 gdbarch_register (enum bfd_architecture bfd_architecture
,
5946 gdbarch_init_ftype
*init
,
5947 gdbarch_dump_tdep_ftype
*dump_tdep
)
5949 struct gdbarch_registration
**curr
;
5950 const struct bfd_arch_info
*bfd_arch_info
;
5951 /* Check that BFD recognizes this architecture */
5952 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5953 if (bfd_arch_info
== NULL
)
5955 internal_error (__FILE__
, __LINE__
,
5956 "gdbarch: Attempt to register unknown architecture (%d)",
5959 /* Check that we haven't seen this architecture before */
5960 for (curr
= &gdbarch_registry
;
5962 curr
= &(*curr
)->next
)
5964 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5965 internal_error (__FILE__
, __LINE__
,
5966 "gdbarch: Duplicate registraration of architecture (%s)",
5967 bfd_arch_info
->printable_name
);
5971 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5972 bfd_arch_info
->printable_name
,
5975 (*curr
) = XMALLOC (struct gdbarch_registration
);
5976 (*curr
)->bfd_architecture
= bfd_architecture
;
5977 (*curr
)->init
= init
;
5978 (*curr
)->dump_tdep
= dump_tdep
;
5979 (*curr
)->arches
= NULL
;
5980 (*curr
)->next
= NULL
;
5981 /* When non- multi-arch, install whatever target dump routine we've
5982 been provided - hopefully that routine has been written correctly
5983 and works regardless of multi-arch. */
5984 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5985 && startup_gdbarch
.dump_tdep
== NULL
)
5986 startup_gdbarch
.dump_tdep
= dump_tdep
;
5990 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5991 gdbarch_init_ftype
*init
)
5993 gdbarch_register (bfd_architecture
, init
, NULL
);
5997 /* Look for an architecture using gdbarch_info. Base search on only
5998 BFD_ARCH_INFO and BYTE_ORDER. */
6000 struct gdbarch_list
*
6001 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
6002 const struct gdbarch_info
*info
)
6004 for (; arches
!= NULL
; arches
= arches
->next
)
6006 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
6008 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
6010 if (info
->osabi
!= arches
->gdbarch
->osabi
)
6018 /* Update the current architecture. Return ZERO if the update request
6022 gdbarch_update_p (struct gdbarch_info info
)
6024 struct gdbarch
*new_gdbarch
;
6025 struct gdbarch
*old_gdbarch
;
6026 struct gdbarch_registration
*rego
;
6028 /* Fill in missing parts of the INFO struct using a number of
6029 sources: ``set ...''; INFOabfd supplied; existing target. */
6031 /* ``(gdb) set architecture ...'' */
6032 if (info
.bfd_arch_info
== NULL
6033 && !TARGET_ARCHITECTURE_AUTO
)
6034 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6035 if (info
.bfd_arch_info
== NULL
6036 && info
.abfd
!= NULL
6037 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
6038 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
6039 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
6040 if (info
.bfd_arch_info
== NULL
)
6041 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6043 /* ``(gdb) set byte-order ...'' */
6044 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6045 && !TARGET_BYTE_ORDER_AUTO
)
6046 info
.byte_order
= TARGET_BYTE_ORDER
;
6047 /* From the INFO struct. */
6048 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6049 && info
.abfd
!= NULL
)
6050 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
6051 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
6052 : BFD_ENDIAN_UNKNOWN
);
6053 /* From the current target. */
6054 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
6055 info
.byte_order
= TARGET_BYTE_ORDER
;
6057 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6058 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6059 info
.osabi
= gdbarch_lookup_osabi (info
.abfd
);
6060 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6061 info
.osabi
= current_gdbarch
->osabi
;
6063 /* Must have found some sort of architecture. */
6064 gdb_assert (info
.bfd_arch_info
!= NULL
);
6068 fprintf_unfiltered (gdb_stdlog
,
6069 "gdbarch_update: info.bfd_arch_info %s\n",
6070 (info
.bfd_arch_info
!= NULL
6071 ? info
.bfd_arch_info
->printable_name
6073 fprintf_unfiltered (gdb_stdlog
,
6074 "gdbarch_update: info.byte_order %d (%s)\n",
6076 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
6077 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
6079 fprintf_unfiltered (gdb_stdlog
,
6080 "gdbarch_update: info.osabi %d (%s)\n",
6081 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
6082 fprintf_unfiltered (gdb_stdlog
,
6083 "gdbarch_update: info.abfd 0x%lx\n",
6085 fprintf_unfiltered (gdb_stdlog
,
6086 "gdbarch_update: info.tdep_info 0x%lx\n",
6087 (long) info
.tdep_info
);
6090 /* Find the target that knows about this architecture. */
6091 for (rego
= gdbarch_registry
;
6094 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
6099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
6103 /* Swap the data belonging to the old target out setting the
6104 installed data to zero. This stops the ->init() function trying
6105 to refer to the previous architecture's global data structures. */
6106 swapout_gdbarch_swap (current_gdbarch
);
6107 clear_gdbarch_swap (current_gdbarch
);
6109 /* Save the previously selected architecture, setting the global to
6110 NULL. This stops ->init() trying to use the previous
6111 architecture's configuration. The previous architecture may not
6112 even be of the same architecture family. The most recent
6113 architecture of the same family is found at the head of the
6114 rego->arches list. */
6115 old_gdbarch
= current_gdbarch
;
6116 current_gdbarch
= NULL
;
6118 /* Ask the target for a replacement architecture. */
6119 new_gdbarch
= rego
->init (info
, rego
->arches
);
6121 /* Did the target like it? No. Reject the change and revert to the
6122 old architecture. */
6123 if (new_gdbarch
== NULL
)
6126 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
6127 swapin_gdbarch_swap (old_gdbarch
);
6128 current_gdbarch
= old_gdbarch
;
6132 /* Did the architecture change? No. Oops, put the old architecture
6134 if (old_gdbarch
== new_gdbarch
)
6137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6139 new_gdbarch
->bfd_arch_info
->printable_name
);
6140 swapin_gdbarch_swap (old_gdbarch
);
6141 current_gdbarch
= old_gdbarch
;
6145 /* Is this a pre-existing architecture? Yes. Move it to the front
6146 of the list of architectures (keeping the list sorted Most
6147 Recently Used) and then copy it in. */
6149 struct gdbarch_list
**list
;
6150 for (list
= ®o
->arches
;
6152 list
= &(*list
)->next
)
6154 if ((*list
)->gdbarch
== new_gdbarch
)
6156 struct gdbarch_list
*this;
6158 fprintf_unfiltered (gdb_stdlog
,
6159 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6161 new_gdbarch
->bfd_arch_info
->printable_name
);
6164 (*list
) = this->next
;
6165 /* Insert in the front. */
6166 this->next
= rego
->arches
;
6167 rego
->arches
= this;
6168 /* Copy the new architecture in. */
6169 current_gdbarch
= new_gdbarch
;
6170 swapin_gdbarch_swap (new_gdbarch
);
6171 architecture_changed_event ();
6177 /* Prepend this new architecture to the architecture list (keep the
6178 list sorted Most Recently Used). */
6180 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
6181 this->next
= rego
->arches
;
6182 this->gdbarch
= new_gdbarch
;
6183 rego
->arches
= this;
6186 /* Switch to this new architecture marking it initialized. */
6187 current_gdbarch
= new_gdbarch
;
6188 current_gdbarch
->initialized_p
= 1;
6191 fprintf_unfiltered (gdb_stdlog
,
6192 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6194 new_gdbarch
->bfd_arch_info
->printable_name
);
6197 /* Check that the newly installed architecture is valid. Plug in
6198 any post init values. */
6199 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
6200 verify_gdbarch (new_gdbarch
);
6202 /* Initialize the per-architecture memory (swap) areas.
6203 CURRENT_GDBARCH must be update before these modules are
6205 init_gdbarch_swap (new_gdbarch
);
6207 /* Initialize the per-architecture data. CURRENT_GDBARCH
6208 must be updated before these modules are called. */
6209 architecture_changed_event ();
6212 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
6220 /* Pointer to the target-dependent disassembly function. */
6221 int (*deprecated_tm_print_insn
) (bfd_vma
, disassemble_info
*);
6223 extern void _initialize_gdbarch (void);
6226 _initialize_gdbarch (void)
6228 struct cmd_list_element
*c
;
6230 add_show_from_set (add_set_cmd ("arch",
6233 (char *)&gdbarch_debug
,
6234 "Set architecture debugging.\n\
6235 When non-zero, architecture debugging is enabled.", &setdebuglist
),
6237 c
= add_set_cmd ("archdebug",
6240 (char *)&gdbarch_debug
,
6241 "Set architecture debugging.\n\
6242 When non-zero, architecture debugging is enabled.", &setlist
);
6244 deprecate_cmd (c
, "set debug arch");
6245 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");