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
;
170 int deprecated_register_size
;
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 deprecated_call_dummy_start_offset
;
192 CORE_ADDR deprecated_call_dummy_breakpoint_offset
;
193 int deprecated_call_dummy_length
;
194 gdbarch_deprecated_pc_in_call_dummy_ftype
*deprecated_pc_in_call_dummy
;
195 LONGEST
* deprecated_call_dummy_words
;
196 int deprecated_sizeof_call_dummy_words
;
197 int deprecated_call_dummy_stack_adjust
;
198 gdbarch_deprecated_fix_call_dummy_ftype
*deprecated_fix_call_dummy
;
199 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
200 gdbarch_deprecated_init_frame_pc_first_ftype
*deprecated_init_frame_pc_first
;
201 gdbarch_deprecated_init_frame_pc_ftype
*deprecated_init_frame_pc
;
202 int believe_pcc_promotion
;
203 int believe_pcc_promotion_type
;
204 gdbarch_deprecated_get_saved_register_ftype
*deprecated_get_saved_register
;
205 gdbarch_register_convertible_ftype
*register_convertible
;
206 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
207 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
208 gdbarch_convert_register_p_ftype
*convert_register_p
;
209 gdbarch_register_to_value_ftype
*register_to_value
;
210 gdbarch_value_to_register_ftype
*value_to_register
;
211 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
212 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
213 gdbarch_integer_to_address_ftype
*integer_to_address
;
214 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
215 gdbarch_deprecated_push_arguments_ftype
*deprecated_push_arguments
;
216 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
217 gdbarch_deprecated_push_dummy_frame_ftype
*deprecated_push_dummy_frame
;
218 gdbarch_deprecated_push_return_address_ftype
*deprecated_push_return_address
;
219 gdbarch_deprecated_pop_frame_ftype
*deprecated_pop_frame
;
220 gdbarch_deprecated_store_struct_return_ftype
*deprecated_store_struct_return
;
221 gdbarch_extract_return_value_ftype
*extract_return_value
;
222 gdbarch_store_return_value_ftype
*store_return_value
;
223 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
224 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
225 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
226 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
227 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
228 gdbarch_deprecated_frame_init_saved_regs_ftype
*deprecated_frame_init_saved_regs
;
229 gdbarch_deprecated_init_extra_frame_info_ftype
*deprecated_init_extra_frame_info
;
230 gdbarch_skip_prologue_ftype
*skip_prologue
;
231 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
232 gdbarch_inner_than_ftype
*inner_than
;
233 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
234 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
235 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
236 CORE_ADDR decr_pc_after_break
;
237 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
238 CORE_ADDR function_start_offset
;
239 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
240 CORE_ADDR frame_args_skip
;
241 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
242 gdbarch_deprecated_frame_chain_ftype
*deprecated_frame_chain
;
243 gdbarch_deprecated_frame_chain_valid_ftype
*deprecated_frame_chain_valid
;
244 gdbarch_deprecated_frame_saved_pc_ftype
*deprecated_frame_saved_pc
;
245 gdbarch_unwind_pc_ftype
*unwind_pc
;
246 gdbarch_frame_args_address_ftype
*frame_args_address
;
247 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
248 gdbarch_deprecated_saved_pc_after_call_ftype
*deprecated_saved_pc_after_call
;
249 gdbarch_frame_num_args_ftype
*frame_num_args
;
250 gdbarch_stack_align_ftype
*stack_align
;
251 gdbarch_frame_align_ftype
*frame_align
;
252 int deprecated_extra_stack_alignment_needed
;
253 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
254 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
255 gdbarch_unwind_dummy_id_ftype
*unwind_dummy_id
;
257 const struct floatformat
* float_format
;
258 const struct floatformat
* double_format
;
259 const struct floatformat
* long_double_format
;
260 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
261 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
262 gdbarch_smash_text_address_ftype
*smash_text_address
;
263 gdbarch_software_single_step_ftype
*software_single_step
;
264 gdbarch_print_insn_ftype
*print_insn
;
265 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
266 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
267 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
268 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
269 gdbarch_sigtramp_start_ftype
*sigtramp_start
;
270 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
271 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
272 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
273 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
274 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
275 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
276 const char * name_of_malloc
;
277 int cannot_step_breakpoint
;
278 int have_nonsteppable_watchpoint
;
279 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
280 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
281 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
282 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
286 /* The default architecture uses host values (for want of a better
289 extern const struct bfd_arch_info bfd_default_arch_struct
;
291 struct gdbarch startup_gdbarch
=
293 1, /* Always initialized. */
294 /* basic architecture information */
295 &bfd_default_arch_struct
,
298 /* target specific vector and its dump routine */
300 /*per-architecture data-pointers and swap regions */
302 /* Multi-arch values */
306 8 * sizeof (LONGEST
),
309 8 * sizeof (long double),
338 generic_register_byte
,
339 generic_register_size
,
341 generic_register_size
,
346 default_print_registers_info
,
360 generic_pc_in_call_dummy
,
405 generic_remote_translate_xfer_address
,
437 generic_in_function_epilogue_p
,
438 construct_inferior_arguments
,
448 default_register_reggroup_p
,
449 /* startup_gdbarch() */
452 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
454 /* Do any initialization needed for a non-multiarch configuration
455 after the _initialize_MODULE functions have been run. */
457 initialize_non_multiarch (void)
459 alloc_gdbarch_data (&startup_gdbarch
);
460 /* Ensure that all swap areas are zeroed so that they again think
461 they are starting from scratch. */
462 clear_gdbarch_swap (&startup_gdbarch
);
463 init_gdbarch_swap (&startup_gdbarch
);
467 /* Create a new ``struct gdbarch'' based on information provided by
468 ``struct gdbarch_info''. */
471 gdbarch_alloc (const struct gdbarch_info
*info
,
472 struct gdbarch_tdep
*tdep
)
474 /* NOTE: The new architecture variable is named ``current_gdbarch''
475 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
476 the current local architecture and not the previous global
477 architecture. This ensures that the new architectures initial
478 values are not influenced by the previous architecture. Once
479 everything is parameterised with gdbarch, this will go away. */
480 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
481 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
483 alloc_gdbarch_data (current_gdbarch
);
485 current_gdbarch
->tdep
= tdep
;
487 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
488 current_gdbarch
->byte_order
= info
->byte_order
;
489 current_gdbarch
->osabi
= info
->osabi
;
491 /* Force the explicit initialization of these. */
492 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
493 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
494 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
495 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
496 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
497 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
498 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
499 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
500 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
501 current_gdbarch
->char_signed
= -1;
502 current_gdbarch
->read_pc
= generic_target_read_pc
;
503 current_gdbarch
->write_pc
= generic_target_write_pc
;
504 current_gdbarch
->read_sp
= generic_target_read_sp
;
505 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
506 current_gdbarch
->num_regs
= -1;
507 current_gdbarch
->sp_regnum
= -1;
508 current_gdbarch
->deprecated_fp_regnum
= -1;
509 current_gdbarch
->pc_regnum
= -1;
510 current_gdbarch
->ps_regnum
= -1;
511 current_gdbarch
->fp0_regnum
= -1;
512 current_gdbarch
->npc_regnum
= -1;
513 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
514 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
515 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
516 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
517 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
518 current_gdbarch
->register_name
= legacy_register_name
;
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
->deprecated_call_dummy_words
= legacy_call_dummy_words
;
531 current_gdbarch
->deprecated_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 /* Skip verify of register_byte, has predicate */
647 /* Skip verify of register_raw_size, invalid_p == 0 */
648 /* Skip verify of deprecated_max_register_raw_size, has predicate */
649 /* Skip verify of register_virtual_size, invalid_p == 0 */
650 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
651 /* Skip verify of register_virtual_type, has predicate */
652 /* Skip verify of register_type, has predicate */
653 /* Skip verify of deprecated_do_registers_info, has predicate */
654 /* Skip verify of print_registers_info, invalid_p == 0 */
655 /* Skip verify of print_float_info, has predicate */
656 /* Skip verify of print_vector_info, has predicate */
657 /* Skip verify of register_sim_regno, invalid_p == 0 */
658 /* Skip verify of register_bytes_ok, has predicate */
659 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
660 /* Skip verify of cannot_store_register, invalid_p == 0 */
661 /* Skip verify of get_longjmp_target, has predicate */
662 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
663 /* Skip verify of call_dummy_location, invalid_p == 0 */
664 /* Skip verify of call_dummy_address, invalid_p == 0 */
665 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
666 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
667 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
668 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
669 /* Skip verify of deprecated_fix_call_dummy, has predicate */
670 /* Skip verify of push_dummy_code, has predicate */
671 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
672 /* Skip verify of deprecated_init_frame_pc, has predicate */
673 /* Skip verify of deprecated_get_saved_register, has predicate */
674 /* Skip verify of register_convertible, invalid_p == 0 */
675 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
676 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
677 /* Skip verify of convert_register_p, invalid_p == 0 */
678 /* Skip verify of register_to_value, invalid_p == 0 */
679 /* Skip verify of value_to_register, invalid_p == 0 */
680 /* Skip verify of pointer_to_address, invalid_p == 0 */
681 /* Skip verify of address_to_pointer, invalid_p == 0 */
682 /* Skip verify of integer_to_address, has predicate */
683 /* Skip verify of return_value_on_stack, invalid_p == 0 */
684 /* Skip verify of deprecated_push_arguments, has predicate */
685 /* Skip verify of push_dummy_call, has predicate */
686 /* Skip verify of deprecated_push_dummy_frame, has predicate */
687 /* Skip verify of deprecated_push_return_address, has predicate */
688 /* Skip verify of deprecated_pop_frame, has predicate */
689 /* Skip verify of deprecated_store_struct_return, has predicate */
690 /* Skip verify of extract_return_value, invalid_p == 0 */
691 /* Skip verify of store_return_value, invalid_p == 0 */
692 /* Skip verify of extract_struct_value_address, has predicate */
693 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
694 /* Skip verify of use_struct_convention, invalid_p == 0 */
695 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
696 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
697 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
698 && (gdbarch
->skip_prologue
== 0))
699 fprintf_unfiltered (log
, "\n\tskip_prologue");
700 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
701 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
702 && (gdbarch
->inner_than
== 0))
703 fprintf_unfiltered (log
, "\n\tinner_than");
704 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
705 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
706 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
707 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
708 && (gdbarch
->decr_pc_after_break
== -1))
709 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
710 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
711 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
712 && (gdbarch
->function_start_offset
== -1))
713 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
714 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
715 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
716 && (gdbarch
->frame_args_skip
== -1))
717 fprintf_unfiltered (log
, "\n\tframe_args_skip");
718 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
719 /* Skip verify of deprecated_frame_chain, has predicate */
720 /* Skip verify of deprecated_frame_chain_valid, has predicate */
721 /* Skip verify of deprecated_frame_saved_pc, has predicate */
722 /* Skip verify of unwind_pc, has predicate */
723 /* Skip verify of frame_args_address, invalid_p == 0 */
724 /* Skip verify of frame_locals_address, invalid_p == 0 */
725 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
726 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
727 && (gdbarch
->frame_num_args
== 0))
728 fprintf_unfiltered (log
, "\n\tframe_num_args");
729 /* Skip verify of stack_align, has predicate */
730 /* Skip verify of frame_align, has predicate */
731 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
732 /* Skip verify of reg_struct_has_addr, has predicate */
733 /* Skip verify of save_dummy_frame_tos, has predicate */
734 /* Skip verify of unwind_dummy_id, has predicate */
735 if (gdbarch
->float_format
== 0)
736 gdbarch
->float_format
= default_float_format (gdbarch
);
737 if (gdbarch
->double_format
== 0)
738 gdbarch
->double_format
= default_double_format (gdbarch
);
739 if (gdbarch
->long_double_format
== 0)
740 gdbarch
->long_double_format
= default_double_format (gdbarch
);
741 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
742 /* Skip verify of addr_bits_remove, invalid_p == 0 */
743 /* Skip verify of smash_text_address, invalid_p == 0 */
744 /* Skip verify of software_single_step, has predicate */
745 /* Skip verify of print_insn, invalid_p == 0 */
746 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
747 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
748 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
749 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
750 /* Skip verify of sigtramp_start, has predicate */
751 /* Skip verify of sigtramp_end, has predicate */
752 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
753 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
754 /* Skip verify of dwarf2_build_frame_info, has predicate */
755 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
756 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
757 /* Skip verify of name_of_malloc, invalid_p == 0 */
758 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
759 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
760 /* Skip verify of address_class_type_flags, has predicate */
761 /* Skip verify of address_class_type_flags_to_name, has predicate */
762 /* Skip verify of address_class_name_to_type_flags, has predicate */
763 /* Skip verify of register_reggroup_p, invalid_p == 0 */
764 buf
= ui_file_xstrdup (log
, &dummy
);
765 make_cleanup (xfree
, buf
);
766 if (strlen (buf
) > 0)
767 internal_error (__FILE__
, __LINE__
,
768 "verify_gdbarch: the following are invalid ...%s",
770 do_cleanups (cleanups
);
774 /* Print out the details of the current architecture. */
776 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
777 just happens to match the global variable ``current_gdbarch''. That
778 way macros refering to that variable get the local and not the global
779 version - ulgh. Once everything is parameterised with gdbarch, this
783 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
785 fprintf_unfiltered (file
,
786 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
789 fprintf_unfiltered (file
,
790 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
791 gdbarch_frame_align_p (current_gdbarch
));
793 fprintf_unfiltered (file
,
794 "gdbarch_dump: frame_align = 0x%08lx\n",
795 (long) current_gdbarch
->frame_align
);
797 fprintf_unfiltered (file
,
798 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
799 (long) current_gdbarch
->in_function_epilogue_p
);
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
803 (long) current_gdbarch
->register_reggroup_p
);
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
807 gdbarch_pseudo_register_read_p (current_gdbarch
));
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
811 (long) current_gdbarch
->pseudo_register_read
);
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
815 gdbarch_pseudo_register_write_p (current_gdbarch
));
817 fprintf_unfiltered (file
,
818 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
819 (long) current_gdbarch
->pseudo_register_write
);
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
823 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
827 (long) current_gdbarch
->address_class_name_to_type_flags
);
828 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: %s # %s\n",
831 "ADDRESS_CLASS_TYPE_FLAGS_P()",
832 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
835 ADDRESS_CLASS_TYPE_FLAGS_P ());
837 #ifdef ADDRESS_CLASS_TYPE_FLAGS
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: %s # %s\n",
840 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
841 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
845 (long) current_gdbarch
->address_class_type_flags
846 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
851 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
855 (long) current_gdbarch
->address_class_type_flags_to_name
);
856 #ifdef ADDRESS_TO_POINTER
858 /* Macro might contain `[{}]' when not multi-arch */
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: %s # %s\n",
861 "ADDRESS_TO_POINTER(type, buf, addr)",
862 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
867 (long) current_gdbarch
->address_to_pointer
868 /*ADDRESS_TO_POINTER ()*/);
870 #ifdef ADDR_BITS_REMOVE
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: %s # %s\n",
873 "ADDR_BITS_REMOVE(addr)",
874 XSTRING (ADDR_BITS_REMOVE (addr
)));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
878 (long) current_gdbarch
->addr_bits_remove
879 /*ADDR_BITS_REMOVE ()*/);
881 #ifdef BELIEVE_PCC_PROMOTION
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
884 XSTRING (BELIEVE_PCC_PROMOTION
));
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
887 BELIEVE_PCC_PROMOTION
);
889 #ifdef BELIEVE_PCC_PROMOTION_TYPE
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
892 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
895 BELIEVE_PCC_PROMOTION_TYPE
);
897 #ifdef BREAKPOINT_FROM_PC
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: %s # %s\n",
900 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
901 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
905 (long) current_gdbarch
->breakpoint_from_pc
906 /*BREAKPOINT_FROM_PC ()*/);
908 #ifdef CALL_DUMMY_ADDRESS
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: %s # %s\n",
911 "CALL_DUMMY_ADDRESS()",
912 XSTRING (CALL_DUMMY_ADDRESS ()));
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
916 (long) current_gdbarch
->call_dummy_address
917 /*CALL_DUMMY_ADDRESS ()*/);
919 #ifdef CALL_DUMMY_LOCATION
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
922 XSTRING (CALL_DUMMY_LOCATION
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
925 CALL_DUMMY_LOCATION
);
927 #ifdef CANNOT_FETCH_REGISTER
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: %s # %s\n",
930 "CANNOT_FETCH_REGISTER(regnum)",
931 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
935 (long) current_gdbarch
->cannot_fetch_register
936 /*CANNOT_FETCH_REGISTER ()*/);
938 #ifdef CANNOT_STEP_BREAKPOINT
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
941 XSTRING (CANNOT_STEP_BREAKPOINT
));
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
944 CANNOT_STEP_BREAKPOINT
);
946 #ifdef CANNOT_STORE_REGISTER
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: %s # %s\n",
949 "CANNOT_STORE_REGISTER(regnum)",
950 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
954 (long) current_gdbarch
->cannot_store_register
955 /*CANNOT_STORE_REGISTER ()*/);
957 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
959 /* Macro might contain `[{}]' when not multi-arch */
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: %s # %s\n",
962 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
963 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
968 (long) current_gdbarch
->coff_make_msymbol_special
969 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
972 fprintf_unfiltered (file
,
973 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
974 (long) current_gdbarch
->construct_inferior_arguments
);
975 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
976 fprintf_unfiltered (file
,
977 "gdbarch_dump: %s # %s\n",
978 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
979 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
983 (long) current_gdbarch
->convert_from_func_ptr_addr
984 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
986 #ifdef CONVERT_REGISTER_P
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: %s # %s\n",
989 "CONVERT_REGISTER_P(regnum)",
990 XSTRING (CONVERT_REGISTER_P (regnum
)));
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
994 (long) current_gdbarch
->convert_register_p
995 /*CONVERT_REGISTER_P ()*/);
997 #ifdef DECR_PC_AFTER_BREAK
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1000 XSTRING (DECR_PC_AFTER_BREAK
));
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1003 (long) DECR_PC_AFTER_BREAK
);
1005 #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1008 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
));
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
1011 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
);
1013 #ifdef DEPRECATED_CALL_DUMMY_LENGTH
1014 fprintf_unfiltered (file
,
1015 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
1016 XSTRING (DEPRECATED_CALL_DUMMY_LENGTH
));
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
1019 DEPRECATED_CALL_DUMMY_LENGTH
);
1021 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: %s # %s\n",
1024 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1025 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1028 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1030 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1033 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST
));
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1036 DEPRECATED_CALL_DUMMY_STACK_ADJUST
);
1038 #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
1041 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET
));
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
1044 (long) DEPRECATED_CALL_DUMMY_START_OFFSET
);
1046 #ifdef DEPRECATED_CALL_DUMMY_WORDS
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
1049 XSTRING (DEPRECATED_CALL_DUMMY_WORDS
));
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
1052 (long) DEPRECATED_CALL_DUMMY_WORDS
);
1054 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: %s # %s\n",
1057 "DEPRECATED_DO_REGISTERS_INFO_P()",
1058 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1061 DEPRECATED_DO_REGISTERS_INFO_P ());
1063 #ifdef DEPRECATED_DO_REGISTERS_INFO
1065 /* Macro might contain `[{}]' when not multi-arch */
1066 fprintf_unfiltered (file
,
1067 "gdbarch_dump: %s # %s\n",
1068 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1069 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1072 fprintf_unfiltered (file
,
1073 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1074 (long) current_gdbarch
->deprecated_do_registers_info
1075 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1077 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1078 fprintf_unfiltered (file
,
1079 "gdbarch_dump: %s # %s\n",
1080 "DEPRECATED_DUMMY_WRITE_SP_P()",
1081 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1084 DEPRECATED_DUMMY_WRITE_SP_P ());
1086 #ifdef DEPRECATED_DUMMY_WRITE_SP
1088 /* Macro might contain `[{}]' when not multi-arch */
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: %s # %s\n",
1091 "DEPRECATED_DUMMY_WRITE_SP(val)",
1092 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val
)));
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1097 (long) current_gdbarch
->deprecated_dummy_write_sp
1098 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1100 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1102 /* Macro might contain `[{}]' when not multi-arch */
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: %s # %s\n",
1105 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1106 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1111 (long) current_gdbarch
->deprecated_extract_return_value
1112 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1114 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: %s # %s\n",
1117 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1118 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1121 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1123 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: %s # %s\n",
1126 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1127 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1131 (long) current_gdbarch
->deprecated_extract_struct_value_address
1132 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1134 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1137 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
));
1138 fprintf_unfiltered (file
,
1139 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1140 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
);
1142 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: %s # %s\n",
1145 "DEPRECATED_FIX_CALL_DUMMY_P()",
1146 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1149 DEPRECATED_FIX_CALL_DUMMY_P ());
1151 #ifdef DEPRECATED_FIX_CALL_DUMMY
1153 /* Macro might contain `[{}]' when not multi-arch */
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: %s # %s\n",
1156 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1157 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1162 (long) current_gdbarch
->deprecated_fix_call_dummy
1163 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1165 #ifdef DEPRECATED_FP_REGNUM
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1168 XSTRING (DEPRECATED_FP_REGNUM
));
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1171 DEPRECATED_FP_REGNUM
);
1173 #ifdef DEPRECATED_FRAME_CHAIN_P
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: %s # %s\n",
1176 "DEPRECATED_FRAME_CHAIN_P()",
1177 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1180 DEPRECATED_FRAME_CHAIN_P ());
1182 #ifdef DEPRECATED_FRAME_CHAIN
1183 fprintf_unfiltered (file
,
1184 "gdbarch_dump: %s # %s\n",
1185 "DEPRECATED_FRAME_CHAIN(frame)",
1186 XSTRING (DEPRECATED_FRAME_CHAIN (frame
)));
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1190 (long) current_gdbarch
->deprecated_frame_chain
1191 /*DEPRECATED_FRAME_CHAIN ()*/);
1193 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: %s # %s\n",
1196 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1197 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1200 DEPRECATED_FRAME_CHAIN_VALID_P ());
1202 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: %s # %s\n",
1205 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1206 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain
, thisframe
)));
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1210 (long) current_gdbarch
->deprecated_frame_chain_valid
1211 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1213 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: %s # %s\n",
1216 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1217 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1220 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1222 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1224 /* Macro might contain `[{}]' when not multi-arch */
1225 fprintf_unfiltered (file
,
1226 "gdbarch_dump: %s # %s\n",
1227 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1228 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
1231 fprintf_unfiltered (file
,
1232 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1233 (long) current_gdbarch
->deprecated_frame_init_saved_regs
1234 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1236 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: %s # %s\n",
1239 "DEPRECATED_FRAME_SAVED_PC_P()",
1240 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1243 DEPRECATED_FRAME_SAVED_PC_P ());
1245 #ifdef DEPRECATED_FRAME_SAVED_PC
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: %s # %s\n",
1248 "DEPRECATED_FRAME_SAVED_PC(fi)",
1249 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi
)));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1253 (long) current_gdbarch
->deprecated_frame_saved_pc
1254 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1256 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: %s # %s\n",
1259 "DEPRECATED_GET_SAVED_REGISTER_P()",
1260 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1261 fprintf_unfiltered (file
,
1262 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1263 DEPRECATED_GET_SAVED_REGISTER_P ());
1265 #ifdef DEPRECATED_GET_SAVED_REGISTER
1267 /* Macro might contain `[{}]' when not multi-arch */
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: %s # %s\n",
1270 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1271 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1276 (long) current_gdbarch
->deprecated_get_saved_register
1277 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1279 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: %s # %s\n",
1282 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1283 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1284 fprintf_unfiltered (file
,
1285 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1286 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1288 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1290 /* Macro might contain `[{}]' when not multi-arch */
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: %s # %s\n",
1293 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1294 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1299 (long) current_gdbarch
->deprecated_init_extra_frame_info
1300 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1302 #ifdef DEPRECATED_INIT_FRAME_PC_P
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: %s # %s\n",
1305 "DEPRECATED_INIT_FRAME_PC_P()",
1306 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1309 DEPRECATED_INIT_FRAME_PC_P ());
1311 #ifdef DEPRECATED_INIT_FRAME_PC
1312 fprintf_unfiltered (file
,
1313 "gdbarch_dump: %s # %s\n",
1314 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1315 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1319 (long) current_gdbarch
->deprecated_init_frame_pc
1320 /*DEPRECATED_INIT_FRAME_PC ()*/);
1322 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1323 fprintf_unfiltered (file
,
1324 "gdbarch_dump: %s # %s\n",
1325 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1326 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1329 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1331 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: %s # %s\n",
1334 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1335 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1339 (long) current_gdbarch
->deprecated_init_frame_pc_first
1340 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1342 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: %s # %s\n",
1345 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1346 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1347 fprintf_unfiltered (file
,
1348 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1349 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1351 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1354 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE
));
1355 fprintf_unfiltered (file
,
1356 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1357 DEPRECATED_MAX_REGISTER_RAW_SIZE
);
1359 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: %s # %s\n",
1362 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1363 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1366 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1368 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1371 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
));
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1374 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
);
1376 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1377 fprintf_unfiltered (file
,
1378 "gdbarch_dump: %s # %s\n",
1379 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1380 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1383 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1385 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: %s # %s\n",
1388 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1389 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1393 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1394 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1396 #ifdef DEPRECATED_POP_FRAME_P
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: %s # %s\n",
1399 "DEPRECATED_POP_FRAME_P()",
1400 XSTRING (DEPRECATED_POP_FRAME_P ()));
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1403 DEPRECATED_POP_FRAME_P ());
1405 #ifdef DEPRECATED_POP_FRAME
1407 /* Macro might contain `[{}]' when not multi-arch */
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: %s # %s\n",
1410 "DEPRECATED_POP_FRAME(-)",
1411 XSTRING (DEPRECATED_POP_FRAME (-)));
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1416 (long) current_gdbarch
->deprecated_pop_frame
1417 /*DEPRECATED_POP_FRAME ()*/);
1419 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: %s # %s\n",
1422 "DEPRECATED_PUSH_ARGUMENTS_P()",
1423 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1426 DEPRECATED_PUSH_ARGUMENTS_P ());
1428 #ifdef DEPRECATED_PUSH_ARGUMENTS
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: %s # %s\n",
1431 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1432 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1434 fprintf_unfiltered (file
,
1435 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1436 (long) current_gdbarch
->deprecated_push_arguments
1437 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1439 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: %s # %s\n",
1442 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1443 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1444 fprintf_unfiltered (file
,
1445 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1446 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1448 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1450 /* Macro might contain `[{}]' when not multi-arch */
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: %s # %s\n",
1453 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1454 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1459 (long) current_gdbarch
->deprecated_push_dummy_frame
1460 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1462 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1463 fprintf_unfiltered (file
,
1464 "gdbarch_dump: %s # %s\n",
1465 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1466 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1469 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1471 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1472 fprintf_unfiltered (file
,
1473 "gdbarch_dump: %s # %s\n",
1474 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1475 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc
, sp
)));
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1479 (long) current_gdbarch
->deprecated_push_return_address
1480 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1482 #ifdef DEPRECATED_REGISTER_SIZE
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1485 XSTRING (DEPRECATED_REGISTER_SIZE
));
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1488 DEPRECATED_REGISTER_SIZE
);
1490 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1491 fprintf_unfiltered (file
,
1492 "gdbarch_dump: %s # %s\n",
1493 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1494 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1497 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1499 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1500 fprintf_unfiltered (file
,
1501 "gdbarch_dump: %s # %s\n",
1502 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1503 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame
)));
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1507 (long) current_gdbarch
->deprecated_saved_pc_after_call
1508 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1510 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1513 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
));
1514 fprintf_unfiltered (file
,
1515 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1516 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
);
1518 #ifdef DEPRECATED_STORE_RETURN_VALUE
1520 /* Macro might contain `[{}]' when not multi-arch */
1521 fprintf_unfiltered (file
,
1522 "gdbarch_dump: %s # %s\n",
1523 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1524 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1527 fprintf_unfiltered (file
,
1528 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1529 (long) current_gdbarch
->deprecated_store_return_value
1530 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1532 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1533 fprintf_unfiltered (file
,
1534 "gdbarch_dump: %s # %s\n",
1535 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1536 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1539 DEPRECATED_STORE_STRUCT_RETURN_P ());
1541 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1543 /* Macro might contain `[{}]' when not multi-arch */
1544 fprintf_unfiltered (file
,
1545 "gdbarch_dump: %s # %s\n",
1546 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1547 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1552 (long) current_gdbarch
->deprecated_store_struct_return
1553 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1555 #ifdef DEPRECATED_TARGET_READ_FP_P
1556 fprintf_unfiltered (file
,
1557 "gdbarch_dump: %s # %s\n",
1558 "DEPRECATED_TARGET_READ_FP_P()",
1559 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1562 DEPRECATED_TARGET_READ_FP_P ());
1564 #ifdef DEPRECATED_TARGET_READ_FP
1565 fprintf_unfiltered (file
,
1566 "gdbarch_dump: %s # %s\n",
1567 "DEPRECATED_TARGET_READ_FP()",
1568 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1572 (long) current_gdbarch
->deprecated_target_read_fp
1573 /*DEPRECATED_TARGET_READ_FP ()*/);
1575 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1578 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
));
1579 fprintf_unfiltered (file
,
1580 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1581 DEPRECATED_USE_GENERIC_DUMMY_FRAMES
);
1583 #ifdef DWARF2_BUILD_FRAME_INFO_P
1584 fprintf_unfiltered (file
,
1585 "gdbarch_dump: %s # %s\n",
1586 "DWARF2_BUILD_FRAME_INFO_P()",
1587 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1590 DWARF2_BUILD_FRAME_INFO_P ());
1592 #ifdef DWARF2_BUILD_FRAME_INFO
1594 /* Macro might contain `[{}]' when not multi-arch */
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: %s # %s\n",
1597 "DWARF2_BUILD_FRAME_INFO(objfile)",
1598 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1603 (long) current_gdbarch
->dwarf2_build_frame_info
1604 /*DWARF2_BUILD_FRAME_INFO ()*/);
1606 #ifdef DWARF2_REG_TO_REGNUM
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: %s # %s\n",
1609 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1610 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1614 (long) current_gdbarch
->dwarf2_reg_to_regnum
1615 /*DWARF2_REG_TO_REGNUM ()*/);
1617 #ifdef DWARF_REG_TO_REGNUM
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: %s # %s\n",
1620 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1621 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1625 (long) current_gdbarch
->dwarf_reg_to_regnum
1626 /*DWARF_REG_TO_REGNUM ()*/);
1628 #ifdef ECOFF_REG_TO_REGNUM
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: %s # %s\n",
1631 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1632 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1634 fprintf_unfiltered (file
,
1635 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1636 (long) current_gdbarch
->ecoff_reg_to_regnum
1637 /*ECOFF_REG_TO_REGNUM ()*/);
1639 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1641 /* Macro might contain `[{}]' when not multi-arch */
1642 fprintf_unfiltered (file
,
1643 "gdbarch_dump: %s # %s\n",
1644 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1645 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1650 (long) current_gdbarch
->elf_make_msymbol_special
1651 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1653 #ifdef EXTRACT_RETURN_VALUE
1655 /* Macro might contain `[{}]' when not multi-arch */
1656 fprintf_unfiltered (file
,
1657 "gdbarch_dump: %s # %s\n",
1658 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1659 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1662 fprintf_unfiltered (file
,
1663 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1664 (long) current_gdbarch
->extract_return_value
1665 /*EXTRACT_RETURN_VALUE ()*/);
1667 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: %s # %s\n",
1670 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1671 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1672 fprintf_unfiltered (file
,
1673 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1674 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1676 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: %s # %s\n",
1679 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1680 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1682 fprintf_unfiltered (file
,
1683 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1684 (long) current_gdbarch
->extract_struct_value_address
1685 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: FP0_REGNUM # %s\n",
1690 XSTRING (FP0_REGNUM
));
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: FP0_REGNUM = %d\n",
1695 #ifdef FRAMELESS_FUNCTION_INVOCATION
1696 fprintf_unfiltered (file
,
1697 "gdbarch_dump: %s # %s\n",
1698 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1699 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1701 fprintf_unfiltered (file
,
1702 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1703 (long) current_gdbarch
->frameless_function_invocation
1704 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1706 #ifdef FRAME_ARGS_ADDRESS
1707 fprintf_unfiltered (file
,
1708 "gdbarch_dump: %s # %s\n",
1709 "FRAME_ARGS_ADDRESS(fi)",
1710 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1712 fprintf_unfiltered (file
,
1713 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1714 (long) current_gdbarch
->frame_args_address
1715 /*FRAME_ARGS_ADDRESS ()*/);
1717 #ifdef FRAME_ARGS_SKIP
1718 fprintf_unfiltered (file
,
1719 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1720 XSTRING (FRAME_ARGS_SKIP
));
1721 fprintf_unfiltered (file
,
1722 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1723 (long) FRAME_ARGS_SKIP
);
1725 #ifdef FRAME_LOCALS_ADDRESS
1726 fprintf_unfiltered (file
,
1727 "gdbarch_dump: %s # %s\n",
1728 "FRAME_LOCALS_ADDRESS(fi)",
1729 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1731 fprintf_unfiltered (file
,
1732 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1733 (long) current_gdbarch
->frame_locals_address
1734 /*FRAME_LOCALS_ADDRESS ()*/);
1736 #ifdef FRAME_NUM_ARGS
1737 fprintf_unfiltered (file
,
1738 "gdbarch_dump: %s # %s\n",
1739 "FRAME_NUM_ARGS(frame)",
1740 XSTRING (FRAME_NUM_ARGS (frame
)));
1742 fprintf_unfiltered (file
,
1743 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1744 (long) current_gdbarch
->frame_num_args
1745 /*FRAME_NUM_ARGS ()*/);
1747 #ifdef FUNCTION_START_OFFSET
1748 fprintf_unfiltered (file
,
1749 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1750 XSTRING (FUNCTION_START_OFFSET
));
1751 fprintf_unfiltered (file
,
1752 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1753 (long) FUNCTION_START_OFFSET
);
1755 #ifdef GET_LONGJMP_TARGET_P
1756 fprintf_unfiltered (file
,
1757 "gdbarch_dump: %s # %s\n",
1758 "GET_LONGJMP_TARGET_P()",
1759 XSTRING (GET_LONGJMP_TARGET_P ()));
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1762 GET_LONGJMP_TARGET_P ());
1764 #ifdef GET_LONGJMP_TARGET
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: %s # %s\n",
1767 "GET_LONGJMP_TARGET(pc)",
1768 XSTRING (GET_LONGJMP_TARGET (pc
)));
1770 fprintf_unfiltered (file
,
1771 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1772 (long) current_gdbarch
->get_longjmp_target
1773 /*GET_LONGJMP_TARGET ()*/);
1775 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1778 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1781 HAVE_NONSTEPPABLE_WATCHPOINT
);
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: %s # %s\n",
1786 "INNER_THAN(lhs, rhs)",
1787 XSTRING (INNER_THAN (lhs
, rhs
)));
1789 fprintf_unfiltered (file
,
1790 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1791 (long) current_gdbarch
->inner_than
1794 #ifdef INTEGER_TO_ADDRESS_P
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: %s # %s\n",
1797 "INTEGER_TO_ADDRESS_P()",
1798 XSTRING (INTEGER_TO_ADDRESS_P ()));
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1801 INTEGER_TO_ADDRESS_P ());
1803 #ifdef INTEGER_TO_ADDRESS
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: %s # %s\n",
1806 "INTEGER_TO_ADDRESS(type, buf)",
1807 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1809 fprintf_unfiltered (file
,
1810 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1811 (long) current_gdbarch
->integer_to_address
1812 /*INTEGER_TO_ADDRESS ()*/);
1814 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: %s # %s\n",
1817 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1818 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1822 (long) current_gdbarch
->in_solib_call_trampoline
1823 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1825 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: %s # %s\n",
1828 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1829 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1833 (long) current_gdbarch
->in_solib_return_trampoline
1834 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1836 #ifdef MEMORY_INSERT_BREAKPOINT
1837 fprintf_unfiltered (file
,
1838 "gdbarch_dump: %s # %s\n",
1839 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1840 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1844 (long) current_gdbarch
->memory_insert_breakpoint
1845 /*MEMORY_INSERT_BREAKPOINT ()*/);
1847 #ifdef MEMORY_REMOVE_BREAKPOINT
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: %s # %s\n",
1850 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1851 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1853 fprintf_unfiltered (file
,
1854 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1855 (long) current_gdbarch
->memory_remove_breakpoint
1856 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1858 #ifdef NAME_OF_MALLOC
1859 fprintf_unfiltered (file
,
1860 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1861 XSTRING (NAME_OF_MALLOC
));
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: NPC_REGNUM # %s\n",
1869 XSTRING (NPC_REGNUM
));
1870 fprintf_unfiltered (file
,
1871 "gdbarch_dump: NPC_REGNUM = %d\n",
1874 #ifdef NUM_PSEUDO_REGS
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1877 XSTRING (NUM_PSEUDO_REGS
));
1878 fprintf_unfiltered (file
,
1879 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: NUM_REGS # %s\n",
1885 XSTRING (NUM_REGS
));
1886 fprintf_unfiltered (file
,
1887 "gdbarch_dump: NUM_REGS = %d\n",
1890 #ifdef PARM_BOUNDARY
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1893 XSTRING (PARM_BOUNDARY
));
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1898 #ifdef PC_IN_SIGTRAMP
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: %s # %s\n",
1901 "PC_IN_SIGTRAMP(pc, name)",
1902 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1906 (long) current_gdbarch
->pc_in_sigtramp
1907 /*PC_IN_SIGTRAMP ()*/);
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: PC_REGNUM # %s\n",
1912 XSTRING (PC_REGNUM
));
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: PC_REGNUM = %d\n",
1917 #ifdef POINTER_TO_ADDRESS
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: %s # %s\n",
1920 "POINTER_TO_ADDRESS(type, buf)",
1921 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1925 (long) current_gdbarch
->pointer_to_address
1926 /*POINTER_TO_ADDRESS ()*/);
1928 #ifdef PREPARE_TO_PROCEED
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: %s # %s\n",
1931 "PREPARE_TO_PROCEED(select_it)",
1932 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1936 (long) current_gdbarch
->prepare_to_proceed
1937 /*PREPARE_TO_PROCEED ()*/);
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1942 gdbarch_print_float_info_p (current_gdbarch
));
1944 fprintf_unfiltered (file
,
1945 "gdbarch_dump: print_float_info = 0x%08lx\n",
1946 (long) current_gdbarch
->print_float_info
);
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1950 (long) current_gdbarch
->print_registers_info
);
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1954 gdbarch_print_vector_info_p (current_gdbarch
));
1956 fprintf_unfiltered (file
,
1957 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1958 (long) current_gdbarch
->print_vector_info
);
1959 #ifdef PROLOGUE_FRAMELESS_P
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: %s # %s\n",
1962 "PROLOGUE_FRAMELESS_P(ip)",
1963 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1967 (long) current_gdbarch
->prologue_frameless_p
1968 /*PROLOGUE_FRAMELESS_P ()*/);
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: PS_REGNUM # %s\n",
1973 XSTRING (PS_REGNUM
));
1974 fprintf_unfiltered (file
,
1975 "gdbarch_dump: PS_REGNUM = %d\n",
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1981 gdbarch_push_dummy_call_p (current_gdbarch
));
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1985 (long) current_gdbarch
->push_dummy_call
);
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1989 gdbarch_push_dummy_code_p (current_gdbarch
));
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1993 (long) current_gdbarch
->push_dummy_code
);
1994 #ifdef REGISTER_BYTE_P
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: %s # %s\n",
1997 "REGISTER_BYTE_P()",
1998 XSTRING (REGISTER_BYTE_P ()));
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: REGISTER_BYTE_P() = %d\n",
2001 REGISTER_BYTE_P ());
2003 #ifdef REGISTER_BYTE
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: %s # %s\n",
2006 "REGISTER_BYTE(reg_nr)",
2007 XSTRING (REGISTER_BYTE (reg_nr
)));
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
2011 (long) current_gdbarch
->register_byte
2012 /*REGISTER_BYTE ()*/);
2014 #ifdef REGISTER_BYTES
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: REGISTER_BYTES # %s\n",
2017 XSTRING (REGISTER_BYTES
));
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: REGISTER_BYTES = %d\n",
2022 #ifdef REGISTER_BYTES_OK_P
2023 fprintf_unfiltered (file
,
2024 "gdbarch_dump: %s # %s\n",
2025 "REGISTER_BYTES_OK_P()",
2026 XSTRING (REGISTER_BYTES_OK_P ()));
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2029 REGISTER_BYTES_OK_P ());
2031 #ifdef REGISTER_BYTES_OK
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: %s # %s\n",
2034 "REGISTER_BYTES_OK(nr_bytes)",
2035 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2039 (long) current_gdbarch
->register_bytes_ok
2040 /*REGISTER_BYTES_OK ()*/);
2042 #ifdef REGISTER_CONVERTIBLE
2043 fprintf_unfiltered (file
,
2044 "gdbarch_dump: %s # %s\n",
2045 "REGISTER_CONVERTIBLE(nr)",
2046 XSTRING (REGISTER_CONVERTIBLE (nr
)));
2048 fprintf_unfiltered (file
,
2049 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
2050 (long) current_gdbarch
->register_convertible
2051 /*REGISTER_CONVERTIBLE ()*/);
2053 #ifdef REGISTER_CONVERT_TO_RAW
2055 /* Macro might contain `[{}]' when not multi-arch */
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: %s # %s\n",
2058 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2059 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
2064 (long) current_gdbarch
->register_convert_to_raw
2065 /*REGISTER_CONVERT_TO_RAW ()*/);
2067 #ifdef REGISTER_CONVERT_TO_VIRTUAL
2069 /* Macro might contain `[{}]' when not multi-arch */
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: %s # %s\n",
2072 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2073 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
2076 fprintf_unfiltered (file
,
2077 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2078 (long) current_gdbarch
->register_convert_to_virtual
2079 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2081 #ifdef REGISTER_NAME
2082 fprintf_unfiltered (file
,
2083 "gdbarch_dump: %s # %s\n",
2084 "REGISTER_NAME(regnr)",
2085 XSTRING (REGISTER_NAME (regnr
)));
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2089 (long) current_gdbarch
->register_name
2090 /*REGISTER_NAME ()*/);
2092 #ifdef REGISTER_RAW_SIZE
2093 fprintf_unfiltered (file
,
2094 "gdbarch_dump: %s # %s\n",
2095 "REGISTER_RAW_SIZE(reg_nr)",
2096 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
2098 fprintf_unfiltered (file
,
2099 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2100 (long) current_gdbarch
->register_raw_size
2101 /*REGISTER_RAW_SIZE ()*/);
2103 #ifdef REGISTER_SIM_REGNO
2104 fprintf_unfiltered (file
,
2105 "gdbarch_dump: %s # %s\n",
2106 "REGISTER_SIM_REGNO(reg_nr)",
2107 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2111 (long) current_gdbarch
->register_sim_regno
2112 /*REGISTER_SIM_REGNO ()*/);
2114 #ifdef REGISTER_TO_VALUE
2116 /* Macro might contain `[{}]' when not multi-arch */
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: %s # %s\n",
2119 "REGISTER_TO_VALUE(regnum, type, from, to)",
2120 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2125 (long) current_gdbarch
->register_to_value
2126 /*REGISTER_TO_VALUE ()*/);
2129 fprintf_unfiltered (file
,
2130 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2131 gdbarch_register_type_p (current_gdbarch
));
2133 fprintf_unfiltered (file
,
2134 "gdbarch_dump: register_type = 0x%08lx\n",
2135 (long) current_gdbarch
->register_type
);
2136 #ifdef REGISTER_VIRTUAL_SIZE
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: %s # %s\n",
2139 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2140 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
2142 fprintf_unfiltered (file
,
2143 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2144 (long) current_gdbarch
->register_virtual_size
2145 /*REGISTER_VIRTUAL_SIZE ()*/);
2147 #ifdef REGISTER_VIRTUAL_TYPE_P
2148 fprintf_unfiltered (file
,
2149 "gdbarch_dump: %s # %s\n",
2150 "REGISTER_VIRTUAL_TYPE_P()",
2151 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2152 fprintf_unfiltered (file
,
2153 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2154 REGISTER_VIRTUAL_TYPE_P ());
2156 #ifdef REGISTER_VIRTUAL_TYPE
2157 fprintf_unfiltered (file
,
2158 "gdbarch_dump: %s # %s\n",
2159 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2160 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
2162 fprintf_unfiltered (file
,
2163 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2164 (long) current_gdbarch
->register_virtual_type
2165 /*REGISTER_VIRTUAL_TYPE ()*/);
2167 #ifdef REG_STRUCT_HAS_ADDR_P
2168 fprintf_unfiltered (file
,
2169 "gdbarch_dump: %s # %s\n",
2170 "REG_STRUCT_HAS_ADDR_P()",
2171 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2172 fprintf_unfiltered (file
,
2173 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2174 REG_STRUCT_HAS_ADDR_P ());
2176 #ifdef REG_STRUCT_HAS_ADDR
2177 fprintf_unfiltered (file
,
2178 "gdbarch_dump: %s # %s\n",
2179 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2180 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
2182 fprintf_unfiltered (file
,
2183 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2184 (long) current_gdbarch
->reg_struct_has_addr
2185 /*REG_STRUCT_HAS_ADDR ()*/);
2188 fprintf_unfiltered (file
,
2189 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
2190 (long) current_gdbarch
->remote_translate_xfer_address
);
2191 #ifdef RETURN_VALUE_ON_STACK
2192 fprintf_unfiltered (file
,
2193 "gdbarch_dump: %s # %s\n",
2194 "RETURN_VALUE_ON_STACK(type)",
2195 XSTRING (RETURN_VALUE_ON_STACK (type
)));
2197 fprintf_unfiltered (file
,
2198 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2199 (long) current_gdbarch
->return_value_on_stack
2200 /*RETURN_VALUE_ON_STACK ()*/);
2202 #ifdef SAVE_DUMMY_FRAME_TOS_P
2203 fprintf_unfiltered (file
,
2204 "gdbarch_dump: %s # %s\n",
2205 "SAVE_DUMMY_FRAME_TOS_P()",
2206 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2207 fprintf_unfiltered (file
,
2208 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2209 SAVE_DUMMY_FRAME_TOS_P ());
2211 #ifdef SAVE_DUMMY_FRAME_TOS
2213 /* Macro might contain `[{}]' when not multi-arch */
2214 fprintf_unfiltered (file
,
2215 "gdbarch_dump: %s # %s\n",
2216 "SAVE_DUMMY_FRAME_TOS(sp)",
2217 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
2220 fprintf_unfiltered (file
,
2221 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2222 (long) current_gdbarch
->save_dummy_frame_tos
2223 /*SAVE_DUMMY_FRAME_TOS ()*/);
2225 #ifdef SDB_REG_TO_REGNUM
2226 fprintf_unfiltered (file
,
2227 "gdbarch_dump: %s # %s\n",
2228 "SDB_REG_TO_REGNUM(sdb_regnr)",
2229 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
2231 fprintf_unfiltered (file
,
2232 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2233 (long) current_gdbarch
->sdb_reg_to_regnum
2234 /*SDB_REG_TO_REGNUM ()*/);
2236 #ifdef SIGTRAMP_END_P
2237 fprintf_unfiltered (file
,
2238 "gdbarch_dump: %s # %s\n",
2240 XSTRING (SIGTRAMP_END_P ()));
2241 fprintf_unfiltered (file
,
2242 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2246 fprintf_unfiltered (file
,
2247 "gdbarch_dump: %s # %s\n",
2249 XSTRING (SIGTRAMP_END (pc
)));
2251 fprintf_unfiltered (file
,
2252 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2253 (long) current_gdbarch
->sigtramp_end
2254 /*SIGTRAMP_END ()*/);
2256 #ifdef SIGTRAMP_START_P
2257 fprintf_unfiltered (file
,
2258 "gdbarch_dump: %s # %s\n",
2259 "SIGTRAMP_START_P()",
2260 XSTRING (SIGTRAMP_START_P ()));
2261 fprintf_unfiltered (file
,
2262 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2263 SIGTRAMP_START_P ());
2265 #ifdef SIGTRAMP_START
2266 fprintf_unfiltered (file
,
2267 "gdbarch_dump: %s # %s\n",
2268 "SIGTRAMP_START(pc)",
2269 XSTRING (SIGTRAMP_START (pc
)));
2271 fprintf_unfiltered (file
,
2272 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2273 (long) current_gdbarch
->sigtramp_start
2274 /*SIGTRAMP_START ()*/);
2276 #ifdef SKIP_PROLOGUE
2277 fprintf_unfiltered (file
,
2278 "gdbarch_dump: %s # %s\n",
2279 "SKIP_PROLOGUE(ip)",
2280 XSTRING (SKIP_PROLOGUE (ip
)));
2282 fprintf_unfiltered (file
,
2283 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2284 (long) current_gdbarch
->skip_prologue
2285 /*SKIP_PROLOGUE ()*/);
2287 #ifdef SKIP_TRAMPOLINE_CODE
2288 fprintf_unfiltered (file
,
2289 "gdbarch_dump: %s # %s\n",
2290 "SKIP_TRAMPOLINE_CODE(pc)",
2291 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
2293 fprintf_unfiltered (file
,
2294 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2295 (long) current_gdbarch
->skip_trampoline_code
2296 /*SKIP_TRAMPOLINE_CODE ()*/);
2298 #ifdef SMASH_TEXT_ADDRESS
2299 fprintf_unfiltered (file
,
2300 "gdbarch_dump: %s # %s\n",
2301 "SMASH_TEXT_ADDRESS(addr)",
2302 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2304 fprintf_unfiltered (file
,
2305 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2306 (long) current_gdbarch
->smash_text_address
2307 /*SMASH_TEXT_ADDRESS ()*/);
2309 #ifdef SOFTWARE_SINGLE_STEP_P
2310 fprintf_unfiltered (file
,
2311 "gdbarch_dump: %s # %s\n",
2312 "SOFTWARE_SINGLE_STEP_P()",
2313 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2314 fprintf_unfiltered (file
,
2315 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2316 SOFTWARE_SINGLE_STEP_P ());
2318 #ifdef SOFTWARE_SINGLE_STEP
2320 /* Macro might contain `[{}]' when not multi-arch */
2321 fprintf_unfiltered (file
,
2322 "gdbarch_dump: %s # %s\n",
2323 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2324 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2327 fprintf_unfiltered (file
,
2328 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2329 (long) current_gdbarch
->software_single_step
2330 /*SOFTWARE_SINGLE_STEP ()*/);
2333 fprintf_unfiltered (file
,
2334 "gdbarch_dump: SP_REGNUM # %s\n",
2335 XSTRING (SP_REGNUM
));
2336 fprintf_unfiltered (file
,
2337 "gdbarch_dump: SP_REGNUM = %d\n",
2340 #ifdef STAB_REG_TO_REGNUM
2341 fprintf_unfiltered (file
,
2342 "gdbarch_dump: %s # %s\n",
2343 "STAB_REG_TO_REGNUM(stab_regnr)",
2344 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2346 fprintf_unfiltered (file
,
2347 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2348 (long) current_gdbarch
->stab_reg_to_regnum
2349 /*STAB_REG_TO_REGNUM ()*/);
2351 #ifdef STACK_ALIGN_P
2352 fprintf_unfiltered (file
,
2353 "gdbarch_dump: %s # %s\n",
2355 XSTRING (STACK_ALIGN_P ()));
2356 fprintf_unfiltered (file
,
2357 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2361 fprintf_unfiltered (file
,
2362 "gdbarch_dump: %s # %s\n",
2364 XSTRING (STACK_ALIGN (sp
)));
2366 fprintf_unfiltered (file
,
2367 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2368 (long) current_gdbarch
->stack_align
2369 /*STACK_ALIGN ()*/);
2371 #ifdef STORE_RETURN_VALUE
2373 /* Macro might contain `[{}]' when not multi-arch */
2374 fprintf_unfiltered (file
,
2375 "gdbarch_dump: %s # %s\n",
2376 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2377 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2380 fprintf_unfiltered (file
,
2381 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2382 (long) current_gdbarch
->store_return_value
2383 /*STORE_RETURN_VALUE ()*/);
2385 #ifdef TARGET_ADDR_BIT
2386 fprintf_unfiltered (file
,
2387 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2388 XSTRING (TARGET_ADDR_BIT
));
2389 fprintf_unfiltered (file
,
2390 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2393 #ifdef TARGET_ARCHITECTURE
2394 fprintf_unfiltered (file
,
2395 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2396 XSTRING (TARGET_ARCHITECTURE
));
2397 if (TARGET_ARCHITECTURE
!= NULL
)
2398 fprintf_unfiltered (file
,
2399 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2400 TARGET_ARCHITECTURE
->printable_name
);
2402 #ifdef TARGET_BFD_VMA_BIT
2403 fprintf_unfiltered (file
,
2404 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2405 XSTRING (TARGET_BFD_VMA_BIT
));
2406 fprintf_unfiltered (file
,
2407 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2408 TARGET_BFD_VMA_BIT
);
2410 #ifdef TARGET_BYTE_ORDER
2411 fprintf_unfiltered (file
,
2412 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2413 XSTRING (TARGET_BYTE_ORDER
));
2414 fprintf_unfiltered (file
,
2415 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2416 (long) TARGET_BYTE_ORDER
);
2418 #ifdef TARGET_CHAR_SIGNED
2419 fprintf_unfiltered (file
,
2420 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2421 XSTRING (TARGET_CHAR_SIGNED
));
2422 fprintf_unfiltered (file
,
2423 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2424 TARGET_CHAR_SIGNED
);
2426 #ifdef TARGET_DOUBLE_BIT
2427 fprintf_unfiltered (file
,
2428 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2429 XSTRING (TARGET_DOUBLE_BIT
));
2430 fprintf_unfiltered (file
,
2431 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2434 #ifdef TARGET_DOUBLE_FORMAT
2435 fprintf_unfiltered (file
,
2436 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2437 XSTRING (TARGET_DOUBLE_FORMAT
));
2438 fprintf_unfiltered (file
,
2439 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2440 (TARGET_DOUBLE_FORMAT
)->name
);
2442 #ifdef TARGET_FLOAT_BIT
2443 fprintf_unfiltered (file
,
2444 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2445 XSTRING (TARGET_FLOAT_BIT
));
2446 fprintf_unfiltered (file
,
2447 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2450 #ifdef TARGET_FLOAT_FORMAT
2451 fprintf_unfiltered (file
,
2452 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2453 XSTRING (TARGET_FLOAT_FORMAT
));
2454 fprintf_unfiltered (file
,
2455 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2456 (TARGET_FLOAT_FORMAT
)->name
);
2458 #ifdef TARGET_INT_BIT
2459 fprintf_unfiltered (file
,
2460 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2461 XSTRING (TARGET_INT_BIT
));
2462 fprintf_unfiltered (file
,
2463 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2466 #ifdef TARGET_LONG_BIT
2467 fprintf_unfiltered (file
,
2468 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2469 XSTRING (TARGET_LONG_BIT
));
2470 fprintf_unfiltered (file
,
2471 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2474 #ifdef TARGET_LONG_DOUBLE_BIT
2475 fprintf_unfiltered (file
,
2476 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2477 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2478 fprintf_unfiltered (file
,
2479 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2480 TARGET_LONG_DOUBLE_BIT
);
2482 #ifdef TARGET_LONG_DOUBLE_FORMAT
2483 fprintf_unfiltered (file
,
2484 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2485 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2486 fprintf_unfiltered (file
,
2487 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2488 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2490 #ifdef TARGET_LONG_LONG_BIT
2491 fprintf_unfiltered (file
,
2492 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2493 XSTRING (TARGET_LONG_LONG_BIT
));
2494 fprintf_unfiltered (file
,
2495 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2496 TARGET_LONG_LONG_BIT
);
2499 fprintf_unfiltered (file
,
2500 "gdbarch_dump: TARGET_OSABI # %s\n",
2501 XSTRING (TARGET_OSABI
));
2502 fprintf_unfiltered (file
,
2503 "gdbarch_dump: TARGET_OSABI = %ld\n",
2504 (long) TARGET_OSABI
);
2506 #ifdef TARGET_PRINT_INSN
2507 fprintf_unfiltered (file
,
2508 "gdbarch_dump: %s # %s\n",
2509 "TARGET_PRINT_INSN(vma, info)",
2510 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2512 fprintf_unfiltered (file
,
2513 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2514 (long) current_gdbarch
->print_insn
2515 /*TARGET_PRINT_INSN ()*/);
2517 #ifdef TARGET_PTR_BIT
2518 fprintf_unfiltered (file
,
2519 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2520 XSTRING (TARGET_PTR_BIT
));
2521 fprintf_unfiltered (file
,
2522 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2525 #ifdef TARGET_READ_PC
2526 fprintf_unfiltered (file
,
2527 "gdbarch_dump: %s # %s\n",
2528 "TARGET_READ_PC(ptid)",
2529 XSTRING (TARGET_READ_PC (ptid
)));
2531 fprintf_unfiltered (file
,
2532 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2533 (long) current_gdbarch
->read_pc
2534 /*TARGET_READ_PC ()*/);
2536 #ifdef TARGET_READ_SP
2537 fprintf_unfiltered (file
,
2538 "gdbarch_dump: %s # %s\n",
2540 XSTRING (TARGET_READ_SP ()));
2542 fprintf_unfiltered (file
,
2543 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2544 (long) current_gdbarch
->read_sp
2545 /*TARGET_READ_SP ()*/);
2547 #ifdef TARGET_SHORT_BIT
2548 fprintf_unfiltered (file
,
2549 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2550 XSTRING (TARGET_SHORT_BIT
));
2551 fprintf_unfiltered (file
,
2552 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2555 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2557 /* Macro might contain `[{}]' when not multi-arch */
2558 fprintf_unfiltered (file
,
2559 "gdbarch_dump: %s # %s\n",
2560 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2561 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2564 fprintf_unfiltered (file
,
2565 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2566 (long) current_gdbarch
->virtual_frame_pointer
2567 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2569 #ifdef TARGET_WRITE_PC
2571 /* Macro might contain `[{}]' when not multi-arch */
2572 fprintf_unfiltered (file
,
2573 "gdbarch_dump: %s # %s\n",
2574 "TARGET_WRITE_PC(val, ptid)",
2575 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2578 fprintf_unfiltered (file
,
2579 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2580 (long) current_gdbarch
->write_pc
2581 /*TARGET_WRITE_PC ()*/);
2584 fprintf_unfiltered (file
,
2585 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2586 gdbarch_unwind_dummy_id_p (current_gdbarch
));
2588 fprintf_unfiltered (file
,
2589 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2590 (long) current_gdbarch
->unwind_dummy_id
);
2592 fprintf_unfiltered (file
,
2593 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2594 gdbarch_unwind_pc_p (current_gdbarch
));
2596 fprintf_unfiltered (file
,
2597 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2598 (long) current_gdbarch
->unwind_pc
);
2599 #ifdef USE_STRUCT_CONVENTION
2600 fprintf_unfiltered (file
,
2601 "gdbarch_dump: %s # %s\n",
2602 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2603 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2605 fprintf_unfiltered (file
,
2606 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2607 (long) current_gdbarch
->use_struct_convention
2608 /*USE_STRUCT_CONVENTION ()*/);
2610 #ifdef VALUE_TO_REGISTER
2612 /* Macro might contain `[{}]' when not multi-arch */
2613 fprintf_unfiltered (file
,
2614 "gdbarch_dump: %s # %s\n",
2615 "VALUE_TO_REGISTER(type, regnum, from, to)",
2616 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2619 fprintf_unfiltered (file
,
2620 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2621 (long) current_gdbarch
->value_to_register
2622 /*VALUE_TO_REGISTER ()*/);
2624 if (current_gdbarch
->dump_tdep
!= NULL
)
2625 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2628 struct gdbarch_tdep
*
2629 gdbarch_tdep (struct gdbarch
*gdbarch
)
2631 if (gdbarch_debug
>= 2)
2632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2633 return gdbarch
->tdep
;
2637 const struct bfd_arch_info
*
2638 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2640 gdb_assert (gdbarch
!= NULL
);
2641 if (gdbarch_debug
>= 2)
2642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2643 return gdbarch
->bfd_arch_info
;
2647 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2649 gdb_assert (gdbarch
!= NULL
);
2650 if (gdbarch_debug
>= 2)
2651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2652 return gdbarch
->byte_order
;
2656 gdbarch_osabi (struct gdbarch
*gdbarch
)
2658 gdb_assert (gdbarch
!= NULL
);
2659 if (gdbarch_debug
>= 2)
2660 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2661 return gdbarch
->osabi
;
2665 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2667 gdb_assert (gdbarch
!= NULL
);
2668 /* Skip verify of short_bit, invalid_p == 0 */
2669 if (gdbarch_debug
>= 2)
2670 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2671 return gdbarch
->short_bit
;
2675 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2678 gdbarch
->short_bit
= short_bit
;
2682 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2684 gdb_assert (gdbarch
!= NULL
);
2685 /* Skip verify of int_bit, invalid_p == 0 */
2686 if (gdbarch_debug
>= 2)
2687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2688 return gdbarch
->int_bit
;
2692 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2695 gdbarch
->int_bit
= int_bit
;
2699 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2701 gdb_assert (gdbarch
!= NULL
);
2702 /* Skip verify of long_bit, invalid_p == 0 */
2703 if (gdbarch_debug
>= 2)
2704 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2705 return gdbarch
->long_bit
;
2709 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2712 gdbarch
->long_bit
= long_bit
;
2716 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2718 gdb_assert (gdbarch
!= NULL
);
2719 /* Skip verify of long_long_bit, invalid_p == 0 */
2720 if (gdbarch_debug
>= 2)
2721 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2722 return gdbarch
->long_long_bit
;
2726 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2729 gdbarch
->long_long_bit
= long_long_bit
;
2733 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2735 gdb_assert (gdbarch
!= NULL
);
2736 /* Skip verify of float_bit, invalid_p == 0 */
2737 if (gdbarch_debug
>= 2)
2738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2739 return gdbarch
->float_bit
;
2743 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2746 gdbarch
->float_bit
= float_bit
;
2750 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2752 gdb_assert (gdbarch
!= NULL
);
2753 /* Skip verify of double_bit, invalid_p == 0 */
2754 if (gdbarch_debug
>= 2)
2755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2756 return gdbarch
->double_bit
;
2760 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2763 gdbarch
->double_bit
= double_bit
;
2767 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2769 gdb_assert (gdbarch
!= NULL
);
2770 /* Skip verify of long_double_bit, invalid_p == 0 */
2771 if (gdbarch_debug
>= 2)
2772 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2773 return gdbarch
->long_double_bit
;
2777 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2778 int long_double_bit
)
2780 gdbarch
->long_double_bit
= long_double_bit
;
2784 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2786 gdb_assert (gdbarch
!= NULL
);
2787 /* Skip verify of ptr_bit, invalid_p == 0 */
2788 if (gdbarch_debug
>= 2)
2789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2790 return gdbarch
->ptr_bit
;
2794 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2797 gdbarch
->ptr_bit
= ptr_bit
;
2801 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2803 gdb_assert (gdbarch
!= NULL
);
2804 if (gdbarch
->addr_bit
== 0)
2805 internal_error (__FILE__
, __LINE__
,
2806 "gdbarch: gdbarch_addr_bit invalid");
2807 if (gdbarch_debug
>= 2)
2808 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2809 return gdbarch
->addr_bit
;
2813 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2816 gdbarch
->addr_bit
= addr_bit
;
2820 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2822 gdb_assert (gdbarch
!= NULL
);
2823 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2824 if (gdbarch_debug
>= 2)
2825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2826 return gdbarch
->bfd_vma_bit
;
2830 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2833 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2837 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2839 gdb_assert (gdbarch
!= NULL
);
2840 if (gdbarch
->char_signed
== -1)
2841 internal_error (__FILE__
, __LINE__
,
2842 "gdbarch: gdbarch_char_signed invalid");
2843 if (gdbarch_debug
>= 2)
2844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2845 return gdbarch
->char_signed
;
2849 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2852 gdbarch
->char_signed
= char_signed
;
2856 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2858 gdb_assert (gdbarch
!= NULL
);
2859 if (gdbarch
->read_pc
== 0)
2860 internal_error (__FILE__
, __LINE__
,
2861 "gdbarch: gdbarch_read_pc invalid");
2862 if (gdbarch_debug
>= 2)
2863 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2864 return gdbarch
->read_pc (ptid
);
2868 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2869 gdbarch_read_pc_ftype read_pc
)
2871 gdbarch
->read_pc
= read_pc
;
2875 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2877 gdb_assert (gdbarch
!= NULL
);
2878 if (gdbarch
->write_pc
== 0)
2879 internal_error (__FILE__
, __LINE__
,
2880 "gdbarch: gdbarch_write_pc invalid");
2881 if (gdbarch_debug
>= 2)
2882 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2883 gdbarch
->write_pc (val
, ptid
);
2887 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2888 gdbarch_write_pc_ftype write_pc
)
2890 gdbarch
->write_pc
= write_pc
;
2894 gdbarch_deprecated_target_read_fp_p (struct gdbarch
*gdbarch
)
2896 gdb_assert (gdbarch
!= NULL
);
2897 return gdbarch
->deprecated_target_read_fp
!= 0;
2901 gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
)
2903 gdb_assert (gdbarch
!= NULL
);
2904 if (gdbarch
->deprecated_target_read_fp
== 0)
2905 internal_error (__FILE__
, __LINE__
,
2906 "gdbarch: gdbarch_deprecated_target_read_fp invalid");
2907 if (gdbarch_debug
>= 2)
2908 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_target_read_fp called\n");
2909 return gdbarch
->deprecated_target_read_fp ();
2913 set_gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
,
2914 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp
)
2916 gdbarch
->deprecated_target_read_fp
= deprecated_target_read_fp
;
2920 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2922 gdb_assert (gdbarch
!= NULL
);
2923 if (gdbarch
->read_sp
== 0)
2924 internal_error (__FILE__
, __LINE__
,
2925 "gdbarch: gdbarch_read_sp invalid");
2926 if (gdbarch_debug
>= 2)
2927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2928 return gdbarch
->read_sp ();
2932 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2933 gdbarch_read_sp_ftype read_sp
)
2935 gdbarch
->read_sp
= read_sp
;
2939 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch
*gdbarch
)
2941 gdb_assert (gdbarch
!= NULL
);
2942 return gdbarch
->deprecated_dummy_write_sp
!= 0;
2946 gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2948 gdb_assert (gdbarch
!= NULL
);
2949 if (gdbarch
->deprecated_dummy_write_sp
== 0)
2950 internal_error (__FILE__
, __LINE__
,
2951 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
2952 if (gdbarch_debug
>= 2)
2953 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_dummy_write_sp called\n");
2954 gdbarch
->deprecated_dummy_write_sp (val
);
2958 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
,
2959 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp
)
2961 gdbarch
->deprecated_dummy_write_sp
= deprecated_dummy_write_sp
;
2965 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2967 gdb_assert (gdbarch
!= NULL
);
2968 if (gdbarch
->virtual_frame_pointer
== 0)
2969 internal_error (__FILE__
, __LINE__
,
2970 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2971 if (gdbarch_debug
>= 2)
2972 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2973 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2977 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2978 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2980 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2984 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2986 gdb_assert (gdbarch
!= NULL
);
2987 return gdbarch
->pseudo_register_read
!= 0;
2991 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2993 gdb_assert (gdbarch
!= NULL
);
2994 if (gdbarch
->pseudo_register_read
== 0)
2995 internal_error (__FILE__
, __LINE__
,
2996 "gdbarch: gdbarch_pseudo_register_read invalid");
2997 if (gdbarch_debug
>= 2)
2998 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2999 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
3003 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
3004 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
3006 gdbarch
->pseudo_register_read
= pseudo_register_read
;
3010 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
3012 gdb_assert (gdbarch
!= NULL
);
3013 return gdbarch
->pseudo_register_write
!= 0;
3017 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
3019 gdb_assert (gdbarch
!= NULL
);
3020 if (gdbarch
->pseudo_register_write
== 0)
3021 internal_error (__FILE__
, __LINE__
,
3022 "gdbarch: gdbarch_pseudo_register_write invalid");
3023 if (gdbarch_debug
>= 2)
3024 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
3025 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
3029 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
3030 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
3032 gdbarch
->pseudo_register_write
= pseudo_register_write
;
3036 gdbarch_num_regs (struct gdbarch
*gdbarch
)
3038 gdb_assert (gdbarch
!= NULL
);
3039 if (gdbarch
->num_regs
== -1)
3040 internal_error (__FILE__
, __LINE__
,
3041 "gdbarch: gdbarch_num_regs invalid");
3042 if (gdbarch_debug
>= 2)
3043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
3044 return gdbarch
->num_regs
;
3048 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
3051 gdbarch
->num_regs
= num_regs
;
3055 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
3057 gdb_assert (gdbarch
!= NULL
);
3058 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3059 if (gdbarch_debug
>= 2)
3060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
3061 return gdbarch
->num_pseudo_regs
;
3065 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
3066 int num_pseudo_regs
)
3068 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
3072 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
3074 gdb_assert (gdbarch
!= NULL
);
3075 /* Skip verify of sp_regnum, invalid_p == 0 */
3076 if (gdbarch_debug
>= 2)
3077 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
3078 return gdbarch
->sp_regnum
;
3082 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
3085 gdbarch
->sp_regnum
= sp_regnum
;
3089 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
3091 gdb_assert (gdbarch
!= NULL
);
3092 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3093 if (gdbarch_debug
>= 2)
3094 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
3095 return gdbarch
->deprecated_fp_regnum
;
3099 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
3100 int deprecated_fp_regnum
)
3102 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
3106 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
3108 gdb_assert (gdbarch
!= NULL
);
3109 /* Skip verify of pc_regnum, invalid_p == 0 */
3110 if (gdbarch_debug
>= 2)
3111 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
3112 return gdbarch
->pc_regnum
;
3116 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
3119 gdbarch
->pc_regnum
= pc_regnum
;
3123 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
3125 gdb_assert (gdbarch
!= NULL
);
3126 /* Skip verify of ps_regnum, invalid_p == 0 */
3127 if (gdbarch_debug
>= 2)
3128 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
3129 return gdbarch
->ps_regnum
;
3133 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
3136 gdbarch
->ps_regnum
= ps_regnum
;
3140 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
3142 gdb_assert (gdbarch
!= NULL
);
3143 /* Skip verify of fp0_regnum, invalid_p == 0 */
3144 if (gdbarch_debug
>= 2)
3145 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
3146 return gdbarch
->fp0_regnum
;
3150 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
3153 gdbarch
->fp0_regnum
= fp0_regnum
;
3157 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
3159 gdb_assert (gdbarch
!= NULL
);
3160 /* Skip verify of npc_regnum, invalid_p == 0 */
3161 if (gdbarch_debug
>= 2)
3162 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
3163 return gdbarch
->npc_regnum
;
3167 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
3170 gdbarch
->npc_regnum
= npc_regnum
;
3174 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
3176 gdb_assert (gdbarch
!= NULL
);
3177 if (gdbarch
->stab_reg_to_regnum
== 0)
3178 internal_error (__FILE__
, __LINE__
,
3179 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3180 if (gdbarch_debug
>= 2)
3181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
3182 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
3186 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
3187 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
3189 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
3193 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
3195 gdb_assert (gdbarch
!= NULL
);
3196 if (gdbarch
->ecoff_reg_to_regnum
== 0)
3197 internal_error (__FILE__
, __LINE__
,
3198 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3199 if (gdbarch_debug
>= 2)
3200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
3201 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
3205 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
3206 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
3208 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
3212 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
3214 gdb_assert (gdbarch
!= NULL
);
3215 if (gdbarch
->dwarf_reg_to_regnum
== 0)
3216 internal_error (__FILE__
, __LINE__
,
3217 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3218 if (gdbarch_debug
>= 2)
3219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
3220 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
3224 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
3225 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
3227 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
3231 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
3233 gdb_assert (gdbarch
!= NULL
);
3234 if (gdbarch
->sdb_reg_to_regnum
== 0)
3235 internal_error (__FILE__
, __LINE__
,
3236 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3237 if (gdbarch_debug
>= 2)
3238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
3239 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
3243 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
3244 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
3246 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
3250 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
3252 gdb_assert (gdbarch
!= NULL
);
3253 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
3254 internal_error (__FILE__
, __LINE__
,
3255 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3256 if (gdbarch_debug
>= 2)
3257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
3258 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
3262 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
3263 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
3265 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
3269 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
3271 gdb_assert (gdbarch
!= NULL
);
3272 if (gdbarch
->register_name
== 0)
3273 internal_error (__FILE__
, __LINE__
,
3274 "gdbarch: gdbarch_register_name invalid");
3275 if (gdbarch_debug
>= 2)
3276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
3277 return gdbarch
->register_name (regnr
);
3281 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
3282 gdbarch_register_name_ftype register_name
)
3284 gdbarch
->register_name
= register_name
;
3288 gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
)
3290 gdb_assert (gdbarch
!= NULL
);
3291 if (gdbarch_debug
>= 2)
3292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_size called\n");
3293 return gdbarch
->deprecated_register_size
;
3297 set_gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
,
3298 int deprecated_register_size
)
3300 gdbarch
->deprecated_register_size
= deprecated_register_size
;
3304 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
3306 gdb_assert (gdbarch
!= NULL
);
3307 if (gdbarch_debug
>= 2)
3308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
3309 return gdbarch
->register_bytes
;
3313 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
3316 gdbarch
->register_bytes
= register_bytes
;
3320 gdbarch_register_byte_p (struct gdbarch
*gdbarch
)
3322 gdb_assert (gdbarch
!= NULL
);
3323 return gdbarch
->register_byte
!= generic_register_byte
;
3327 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3329 gdb_assert (gdbarch
!= NULL
);
3330 if (gdbarch
->register_byte
== 0)
3331 internal_error (__FILE__
, __LINE__
,
3332 "gdbarch: gdbarch_register_byte invalid");
3333 /* Ignore predicate (gdbarch->register_byte != generic_register_byte). */
3334 if (gdbarch_debug
>= 2)
3335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
3336 return gdbarch
->register_byte (reg_nr
);
3340 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
3341 gdbarch_register_byte_ftype register_byte
)
3343 gdbarch
->register_byte
= register_byte
;
3347 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3349 gdb_assert (gdbarch
!= NULL
);
3350 if (gdbarch
->register_raw_size
== 0)
3351 internal_error (__FILE__
, __LINE__
,
3352 "gdbarch: gdbarch_register_raw_size invalid");
3353 if (gdbarch_debug
>= 2)
3354 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
3355 return gdbarch
->register_raw_size (reg_nr
);
3359 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
3360 gdbarch_register_raw_size_ftype register_raw_size
)
3362 gdbarch
->register_raw_size
= register_raw_size
;
3366 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
3368 gdb_assert (gdbarch
!= NULL
);
3369 return gdbarch
->deprecated_max_register_raw_size
!= 0;
3373 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
3375 gdb_assert (gdbarch
!= NULL
);
3376 if (gdbarch_debug
>= 2)
3377 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
3378 return gdbarch
->deprecated_max_register_raw_size
;
3382 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
3383 int deprecated_max_register_raw_size
)
3385 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
3389 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3391 gdb_assert (gdbarch
!= NULL
);
3392 if (gdbarch
->register_virtual_size
== 0)
3393 internal_error (__FILE__
, __LINE__
,
3394 "gdbarch: gdbarch_register_virtual_size invalid");
3395 if (gdbarch_debug
>= 2)
3396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3397 return gdbarch
->register_virtual_size (reg_nr
);
3401 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3402 gdbarch_register_virtual_size_ftype register_virtual_size
)
3404 gdbarch
->register_virtual_size
= register_virtual_size
;
3408 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
3410 gdb_assert (gdbarch
!= NULL
);
3411 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
3415 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
3417 gdb_assert (gdbarch
!= NULL
);
3418 if (gdbarch_debug
>= 2)
3419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
3420 return gdbarch
->deprecated_max_register_virtual_size
;
3424 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
3425 int deprecated_max_register_virtual_size
)
3427 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
3431 gdbarch_register_virtual_type_p (struct gdbarch
*gdbarch
)
3433 gdb_assert (gdbarch
!= NULL
);
3434 return gdbarch
->register_virtual_type
!= 0;
3438 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3440 gdb_assert (gdbarch
!= NULL
);
3441 if (gdbarch
->register_virtual_type
== 0)
3442 internal_error (__FILE__
, __LINE__
,
3443 "gdbarch: gdbarch_register_virtual_type invalid");
3444 if (gdbarch_debug
>= 2)
3445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3446 return gdbarch
->register_virtual_type (reg_nr
);
3450 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3451 gdbarch_register_virtual_type_ftype register_virtual_type
)
3453 gdbarch
->register_virtual_type
= register_virtual_type
;
3457 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
3459 gdb_assert (gdbarch
!= NULL
);
3460 return gdbarch
->register_type
!= 0;
3464 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
3466 gdb_assert (gdbarch
!= NULL
);
3467 if (gdbarch
->register_type
== 0)
3468 internal_error (__FILE__
, __LINE__
,
3469 "gdbarch: gdbarch_register_type invalid");
3470 if (gdbarch_debug
>= 2)
3471 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
3472 return gdbarch
->register_type (gdbarch
, reg_nr
);
3476 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
3477 gdbarch_register_type_ftype register_type
)
3479 gdbarch
->register_type
= register_type
;
3483 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3485 gdb_assert (gdbarch
!= NULL
);
3486 return gdbarch
->deprecated_do_registers_info
!= 0;
3490 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3492 gdb_assert (gdbarch
!= NULL
);
3493 if (gdbarch
->deprecated_do_registers_info
== 0)
3494 internal_error (__FILE__
, __LINE__
,
3495 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3496 if (gdbarch_debug
>= 2)
3497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3498 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3502 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3503 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3505 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3509 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3511 gdb_assert (gdbarch
!= NULL
);
3512 if (gdbarch
->print_registers_info
== 0)
3513 internal_error (__FILE__
, __LINE__
,
3514 "gdbarch: gdbarch_print_registers_info invalid");
3515 if (gdbarch_debug
>= 2)
3516 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3517 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3521 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3522 gdbarch_print_registers_info_ftype print_registers_info
)
3524 gdbarch
->print_registers_info
= print_registers_info
;
3528 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3530 gdb_assert (gdbarch
!= NULL
);
3531 return gdbarch
->print_float_info
!= 0;
3535 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3537 gdb_assert (gdbarch
!= NULL
);
3538 if (gdbarch
->print_float_info
== 0)
3539 internal_error (__FILE__
, __LINE__
,
3540 "gdbarch: gdbarch_print_float_info invalid");
3541 if (gdbarch_debug
>= 2)
3542 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3543 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3547 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3548 gdbarch_print_float_info_ftype print_float_info
)
3550 gdbarch
->print_float_info
= print_float_info
;
3554 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3556 gdb_assert (gdbarch
!= NULL
);
3557 return gdbarch
->print_vector_info
!= 0;
3561 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3563 gdb_assert (gdbarch
!= NULL
);
3564 if (gdbarch
->print_vector_info
== 0)
3565 internal_error (__FILE__
, __LINE__
,
3566 "gdbarch: gdbarch_print_vector_info invalid");
3567 if (gdbarch_debug
>= 2)
3568 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3569 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3573 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3574 gdbarch_print_vector_info_ftype print_vector_info
)
3576 gdbarch
->print_vector_info
= print_vector_info
;
3580 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3582 gdb_assert (gdbarch
!= NULL
);
3583 if (gdbarch
->register_sim_regno
== 0)
3584 internal_error (__FILE__
, __LINE__
,
3585 "gdbarch: gdbarch_register_sim_regno invalid");
3586 if (gdbarch_debug
>= 2)
3587 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3588 return gdbarch
->register_sim_regno (reg_nr
);
3592 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3593 gdbarch_register_sim_regno_ftype register_sim_regno
)
3595 gdbarch
->register_sim_regno
= register_sim_regno
;
3599 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3601 gdb_assert (gdbarch
!= NULL
);
3602 return gdbarch
->register_bytes_ok
!= 0;
3606 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3608 gdb_assert (gdbarch
!= NULL
);
3609 if (gdbarch
->register_bytes_ok
== 0)
3610 internal_error (__FILE__
, __LINE__
,
3611 "gdbarch: gdbarch_register_bytes_ok invalid");
3612 if (gdbarch_debug
>= 2)
3613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3614 return gdbarch
->register_bytes_ok (nr_bytes
);
3618 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3619 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3621 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3625 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3627 gdb_assert (gdbarch
!= NULL
);
3628 if (gdbarch
->cannot_fetch_register
== 0)
3629 internal_error (__FILE__
, __LINE__
,
3630 "gdbarch: gdbarch_cannot_fetch_register invalid");
3631 if (gdbarch_debug
>= 2)
3632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3633 return gdbarch
->cannot_fetch_register (regnum
);
3637 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3638 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3640 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3644 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3646 gdb_assert (gdbarch
!= NULL
);
3647 if (gdbarch
->cannot_store_register
== 0)
3648 internal_error (__FILE__
, __LINE__
,
3649 "gdbarch: gdbarch_cannot_store_register invalid");
3650 if (gdbarch_debug
>= 2)
3651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3652 return gdbarch
->cannot_store_register (regnum
);
3656 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3657 gdbarch_cannot_store_register_ftype cannot_store_register
)
3659 gdbarch
->cannot_store_register
= cannot_store_register
;
3663 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3665 gdb_assert (gdbarch
!= NULL
);
3666 return gdbarch
->get_longjmp_target
!= 0;
3670 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3672 gdb_assert (gdbarch
!= NULL
);
3673 if (gdbarch
->get_longjmp_target
== 0)
3674 internal_error (__FILE__
, __LINE__
,
3675 "gdbarch: gdbarch_get_longjmp_target invalid");
3676 if (gdbarch_debug
>= 2)
3677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3678 return gdbarch
->get_longjmp_target (pc
);
3682 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3683 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3685 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3689 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3691 gdb_assert (gdbarch
!= NULL
);
3692 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3693 if (gdbarch_debug
>= 2)
3694 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3695 return gdbarch
->deprecated_use_generic_dummy_frames
;
3699 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3700 int deprecated_use_generic_dummy_frames
)
3702 gdbarch
->deprecated_use_generic_dummy_frames
= deprecated_use_generic_dummy_frames
;
3706 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3708 gdb_assert (gdbarch
!= NULL
);
3709 /* Skip verify of call_dummy_location, invalid_p == 0 */
3710 if (gdbarch_debug
>= 2)
3711 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3712 return gdbarch
->call_dummy_location
;
3716 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3717 int call_dummy_location
)
3719 gdbarch
->call_dummy_location
= call_dummy_location
;
3723 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3725 gdb_assert (gdbarch
!= NULL
);
3726 if (gdbarch
->call_dummy_address
== 0)
3727 internal_error (__FILE__
, __LINE__
,
3728 "gdbarch: gdbarch_call_dummy_address invalid");
3729 if (gdbarch_debug
>= 2)
3730 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3731 return gdbarch
->call_dummy_address ();
3735 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3736 gdbarch_call_dummy_address_ftype call_dummy_address
)
3738 gdbarch
->call_dummy_address
= call_dummy_address
;
3742 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3744 gdb_assert (gdbarch
!= NULL
);
3745 if (gdbarch_debug
>= 2)
3746 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_start_offset called\n");
3747 return gdbarch
->deprecated_call_dummy_start_offset
;
3751 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3752 CORE_ADDR deprecated_call_dummy_start_offset
)
3754 gdbarch
->deprecated_call_dummy_start_offset
= deprecated_call_dummy_start_offset
;
3758 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3760 gdb_assert (gdbarch
!= NULL
);
3761 if (gdbarch_debug
>= 2)
3762 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3763 return gdbarch
->deprecated_call_dummy_breakpoint_offset
;
3767 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3768 CORE_ADDR deprecated_call_dummy_breakpoint_offset
)
3770 gdbarch
->deprecated_call_dummy_breakpoint_offset
= deprecated_call_dummy_breakpoint_offset
;
3774 gdbarch_deprecated_call_dummy_length (struct gdbarch
*gdbarch
)
3776 gdb_assert (gdbarch
!= NULL
);
3777 if (gdbarch_debug
>= 2)
3778 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_length called\n");
3779 return gdbarch
->deprecated_call_dummy_length
;
3783 set_gdbarch_deprecated_call_dummy_length (struct gdbarch
*gdbarch
,
3784 int deprecated_call_dummy_length
)
3786 gdbarch
->deprecated_call_dummy_length
= deprecated_call_dummy_length
;
3790 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3792 gdb_assert (gdbarch
!= NULL
);
3793 return gdbarch
->deprecated_pc_in_call_dummy
!= generic_pc_in_call_dummy
;
3797 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3799 gdb_assert (gdbarch
!= NULL
);
3800 if (gdbarch
->deprecated_pc_in_call_dummy
== 0)
3801 internal_error (__FILE__
, __LINE__
,
3802 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3803 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3804 if (gdbarch_debug
>= 2)
3805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3806 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3810 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3811 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3813 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3817 gdbarch_deprecated_call_dummy_words (struct gdbarch
*gdbarch
)
3819 gdb_assert (gdbarch
!= NULL
);
3820 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3821 if (gdbarch_debug
>= 2)
3822 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_words called\n");
3823 return gdbarch
->deprecated_call_dummy_words
;
3827 set_gdbarch_deprecated_call_dummy_words (struct gdbarch
*gdbarch
,
3828 LONGEST
* deprecated_call_dummy_words
)
3830 gdbarch
->deprecated_call_dummy_words
= deprecated_call_dummy_words
;
3834 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3836 gdb_assert (gdbarch
!= NULL
);
3837 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3838 if (gdbarch_debug
>= 2)
3839 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3840 return gdbarch
->deprecated_sizeof_call_dummy_words
;
3844 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3845 int deprecated_sizeof_call_dummy_words
)
3847 gdbarch
->deprecated_sizeof_call_dummy_words
= deprecated_sizeof_call_dummy_words
;
3851 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3853 gdb_assert (gdbarch
!= NULL
);
3854 return gdbarch
->deprecated_call_dummy_stack_adjust
!= 0;
3858 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3860 gdb_assert (gdbarch
!= NULL
);
3861 if (gdbarch_debug
>= 2)
3862 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3863 return gdbarch
->deprecated_call_dummy_stack_adjust
;
3867 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3868 int deprecated_call_dummy_stack_adjust
)
3870 gdbarch
->deprecated_call_dummy_stack_adjust
= deprecated_call_dummy_stack_adjust
;
3874 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch
*gdbarch
)
3876 gdb_assert (gdbarch
!= NULL
);
3877 return gdbarch
->deprecated_fix_call_dummy
!= 0;
3881 gdbarch_deprecated_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
)
3883 gdb_assert (gdbarch
!= NULL
);
3884 if (gdbarch
->deprecated_fix_call_dummy
== 0)
3885 internal_error (__FILE__
, __LINE__
,
3886 "gdbarch: gdbarch_deprecated_fix_call_dummy invalid");
3887 if (gdbarch_debug
>= 2)
3888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fix_call_dummy called\n");
3889 gdbarch
->deprecated_fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3893 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch
*gdbarch
,
3894 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy
)
3896 gdbarch
->deprecated_fix_call_dummy
= deprecated_fix_call_dummy
;
3900 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
3902 gdb_assert (gdbarch
!= NULL
);
3903 return gdbarch
->push_dummy_code
!= 0;
3907 gdbarch_push_dummy_code (struct gdbarch
*gdbarch
, CORE_ADDR sp
, CORE_ADDR funaddr
, int using_gcc
, struct value
**args
, int nargs
, struct type
*value_type
, CORE_ADDR
*real_pc
, CORE_ADDR
*bp_addr
)
3909 gdb_assert (gdbarch
!= NULL
);
3910 if (gdbarch
->push_dummy_code
== 0)
3911 internal_error (__FILE__
, __LINE__
,
3912 "gdbarch: gdbarch_push_dummy_code invalid");
3913 if (gdbarch_debug
>= 2)
3914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
3915 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, using_gcc
, args
, nargs
, value_type
, real_pc
, bp_addr
);
3919 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
3920 gdbarch_push_dummy_code_ftype push_dummy_code
)
3922 gdbarch
->push_dummy_code
= push_dummy_code
;
3926 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch
*gdbarch
)
3928 gdb_assert (gdbarch
!= NULL
);
3929 return gdbarch
->deprecated_init_frame_pc_first
!= 0;
3933 gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3935 gdb_assert (gdbarch
!= NULL
);
3936 if (gdbarch
->deprecated_init_frame_pc_first
== 0)
3937 internal_error (__FILE__
, __LINE__
,
3938 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3939 if (gdbarch_debug
>= 2)
3940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc_first called\n");
3941 return gdbarch
->deprecated_init_frame_pc_first (fromleaf
, prev
);
3945 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
,
3946 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first
)
3948 gdbarch
->deprecated_init_frame_pc_first
= deprecated_init_frame_pc_first
;
3952 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3954 gdb_assert (gdbarch
!= NULL
);
3955 return gdbarch
->deprecated_init_frame_pc
!= 0;
3959 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3961 gdb_assert (gdbarch
!= NULL
);
3962 if (gdbarch
->deprecated_init_frame_pc
== 0)
3963 internal_error (__FILE__
, __LINE__
,
3964 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3965 if (gdbarch_debug
>= 2)
3966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3967 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3971 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3972 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3974 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3978 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3980 gdb_assert (gdbarch
!= NULL
);
3981 if (gdbarch_debug
>= 2)
3982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3983 return gdbarch
->believe_pcc_promotion
;
3987 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3988 int believe_pcc_promotion
)
3990 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3994 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3996 gdb_assert (gdbarch
!= NULL
);
3997 if (gdbarch_debug
>= 2)
3998 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3999 return gdbarch
->believe_pcc_promotion_type
;
4003 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
4004 int believe_pcc_promotion_type
)
4006 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
4010 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
4012 gdb_assert (gdbarch
!= NULL
);
4013 return gdbarch
->deprecated_get_saved_register
!= 0;
4017 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
)
4019 gdb_assert (gdbarch
!= NULL
);
4020 if (gdbarch
->deprecated_get_saved_register
== 0)
4021 internal_error (__FILE__
, __LINE__
,
4022 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
4023 if (gdbarch_debug
>= 2)
4024 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
4025 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
4029 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
4030 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
4032 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
4036 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
4038 gdb_assert (gdbarch
!= NULL
);
4039 if (gdbarch
->register_convertible
== 0)
4040 internal_error (__FILE__
, __LINE__
,
4041 "gdbarch: gdbarch_register_convertible invalid");
4042 if (gdbarch_debug
>= 2)
4043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
4044 return gdbarch
->register_convertible (nr
);
4048 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
4049 gdbarch_register_convertible_ftype register_convertible
)
4051 gdbarch
->register_convertible
= register_convertible
;
4055 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4057 gdb_assert (gdbarch
!= NULL
);
4058 if (gdbarch
->register_convert_to_virtual
== 0)
4059 internal_error (__FILE__
, __LINE__
,
4060 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4061 if (gdbarch_debug
>= 2)
4062 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
4063 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
4067 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
4068 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
4070 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
4074 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4076 gdb_assert (gdbarch
!= NULL
);
4077 if (gdbarch
->register_convert_to_raw
== 0)
4078 internal_error (__FILE__
, __LINE__
,
4079 "gdbarch: gdbarch_register_convert_to_raw invalid");
4080 if (gdbarch_debug
>= 2)
4081 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
4082 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
4086 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
4087 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
4089 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
4093 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
4095 gdb_assert (gdbarch
!= NULL
);
4096 if (gdbarch
->convert_register_p
== 0)
4097 internal_error (__FILE__
, __LINE__
,
4098 "gdbarch: gdbarch_convert_register_p invalid");
4099 if (gdbarch_debug
>= 2)
4100 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
4101 return gdbarch
->convert_register_p (regnum
);
4105 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
4106 gdbarch_convert_register_p_ftype convert_register_p
)
4108 gdbarch
->convert_register_p
= convert_register_p
;
4112 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4114 gdb_assert (gdbarch
!= NULL
);
4115 if (gdbarch
->register_to_value
== 0)
4116 internal_error (__FILE__
, __LINE__
,
4117 "gdbarch: gdbarch_register_to_value invalid");
4118 if (gdbarch_debug
>= 2)
4119 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
4120 gdbarch
->register_to_value (regnum
, type
, from
, to
);
4124 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
4125 gdbarch_register_to_value_ftype register_to_value
)
4127 gdbarch
->register_to_value
= register_to_value
;
4131 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4133 gdb_assert (gdbarch
!= NULL
);
4134 if (gdbarch
->value_to_register
== 0)
4135 internal_error (__FILE__
, __LINE__
,
4136 "gdbarch: gdbarch_value_to_register invalid");
4137 if (gdbarch_debug
>= 2)
4138 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
4139 gdbarch
->value_to_register (type
, regnum
, from
, to
);
4143 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
4144 gdbarch_value_to_register_ftype value_to_register
)
4146 gdbarch
->value_to_register
= value_to_register
;
4150 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
4152 gdb_assert (gdbarch
!= NULL
);
4153 if (gdbarch
->pointer_to_address
== 0)
4154 internal_error (__FILE__
, __LINE__
,
4155 "gdbarch: gdbarch_pointer_to_address invalid");
4156 if (gdbarch_debug
>= 2)
4157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
4158 return gdbarch
->pointer_to_address (type
, buf
);
4162 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
4163 gdbarch_pointer_to_address_ftype pointer_to_address
)
4165 gdbarch
->pointer_to_address
= pointer_to_address
;
4169 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
4171 gdb_assert (gdbarch
!= NULL
);
4172 if (gdbarch
->address_to_pointer
== 0)
4173 internal_error (__FILE__
, __LINE__
,
4174 "gdbarch: gdbarch_address_to_pointer invalid");
4175 if (gdbarch_debug
>= 2)
4176 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
4177 gdbarch
->address_to_pointer (type
, buf
, addr
);
4181 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
4182 gdbarch_address_to_pointer_ftype address_to_pointer
)
4184 gdbarch
->address_to_pointer
= address_to_pointer
;
4188 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
4190 gdb_assert (gdbarch
!= NULL
);
4191 return gdbarch
->integer_to_address
!= 0;
4195 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
4197 gdb_assert (gdbarch
!= NULL
);
4198 if (gdbarch
->integer_to_address
== 0)
4199 internal_error (__FILE__
, __LINE__
,
4200 "gdbarch: gdbarch_integer_to_address invalid");
4201 if (gdbarch_debug
>= 2)
4202 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
4203 return gdbarch
->integer_to_address (type
, buf
);
4207 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
4208 gdbarch_integer_to_address_ftype integer_to_address
)
4210 gdbarch
->integer_to_address
= integer_to_address
;
4214 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
4216 gdb_assert (gdbarch
!= NULL
);
4217 if (gdbarch
->return_value_on_stack
== 0)
4218 internal_error (__FILE__
, __LINE__
,
4219 "gdbarch: gdbarch_return_value_on_stack invalid");
4220 if (gdbarch_debug
>= 2)
4221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
4222 return gdbarch
->return_value_on_stack (type
);
4226 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
4227 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
4229 gdbarch
->return_value_on_stack
= return_value_on_stack
;
4233 gdbarch_deprecated_push_arguments_p (struct gdbarch
*gdbarch
)
4235 gdb_assert (gdbarch
!= NULL
);
4236 return gdbarch
->deprecated_push_arguments
!= 0;
4240 gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
4242 gdb_assert (gdbarch
!= NULL
);
4243 if (gdbarch
->deprecated_push_arguments
== 0)
4244 internal_error (__FILE__
, __LINE__
,
4245 "gdbarch: gdbarch_deprecated_push_arguments invalid");
4246 if (gdbarch_debug
>= 2)
4247 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_arguments called\n");
4248 return gdbarch
->deprecated_push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
4252 set_gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
,
4253 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments
)
4255 gdbarch
->deprecated_push_arguments
= deprecated_push_arguments
;
4259 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
4261 gdb_assert (gdbarch
!= NULL
);
4262 return gdbarch
->push_dummy_call
!= 0;
4266 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
)
4268 gdb_assert (gdbarch
!= NULL
);
4269 if (gdbarch
->push_dummy_call
== 0)
4270 internal_error (__FILE__
, __LINE__
,
4271 "gdbarch: gdbarch_push_dummy_call invalid");
4272 if (gdbarch_debug
>= 2)
4273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
4274 return gdbarch
->push_dummy_call (gdbarch
, regcache
, dummy_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
4278 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
4279 gdbarch_push_dummy_call_ftype push_dummy_call
)
4281 gdbarch
->push_dummy_call
= push_dummy_call
;
4285 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch
*gdbarch
)
4287 gdb_assert (gdbarch
!= NULL
);
4288 return gdbarch
->deprecated_push_dummy_frame
!= 0;
4292 gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
)
4294 gdb_assert (gdbarch
!= NULL
);
4295 if (gdbarch
->deprecated_push_dummy_frame
== 0)
4296 internal_error (__FILE__
, __LINE__
,
4297 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4298 if (gdbarch_debug
>= 2)
4299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_dummy_frame called\n");
4300 gdbarch
->deprecated_push_dummy_frame ();
4304 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
,
4305 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame
)
4307 gdbarch
->deprecated_push_dummy_frame
= deprecated_push_dummy_frame
;
4311 gdbarch_deprecated_push_return_address_p (struct gdbarch
*gdbarch
)
4313 gdb_assert (gdbarch
!= NULL
);
4314 return gdbarch
->deprecated_push_return_address
!= 0;
4318 gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
4320 gdb_assert (gdbarch
!= NULL
);
4321 if (gdbarch
->deprecated_push_return_address
== 0)
4322 internal_error (__FILE__
, __LINE__
,
4323 "gdbarch: gdbarch_deprecated_push_return_address invalid");
4324 if (gdbarch_debug
>= 2)
4325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_return_address called\n");
4326 return gdbarch
->deprecated_push_return_address (pc
, sp
);
4330 set_gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
,
4331 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address
)
4333 gdbarch
->deprecated_push_return_address
= deprecated_push_return_address
;
4337 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
4339 gdb_assert (gdbarch
!= NULL
);
4340 return gdbarch
->deprecated_pop_frame
!= 0;
4344 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
4346 gdb_assert (gdbarch
!= NULL
);
4347 if (gdbarch
->deprecated_pop_frame
== 0)
4348 internal_error (__FILE__
, __LINE__
,
4349 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4350 if (gdbarch_debug
>= 2)
4351 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
4352 gdbarch
->deprecated_pop_frame ();
4356 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
4357 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
4359 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
4363 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
4365 gdb_assert (gdbarch
!= NULL
);
4366 return gdbarch
->deprecated_store_struct_return
!= 0;
4370 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
4372 gdb_assert (gdbarch
!= NULL
);
4373 if (gdbarch
->deprecated_store_struct_return
== 0)
4374 internal_error (__FILE__
, __LINE__
,
4375 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4376 if (gdbarch_debug
>= 2)
4377 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
4378 gdbarch
->deprecated_store_struct_return (addr
, sp
);
4382 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
4383 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
4385 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
4389 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4391 gdb_assert (gdbarch
!= NULL
);
4392 if (gdbarch
->extract_return_value
== 0)
4393 internal_error (__FILE__
, __LINE__
,
4394 "gdbarch: gdbarch_extract_return_value invalid");
4395 if (gdbarch_debug
>= 2)
4396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4397 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4401 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4402 gdbarch_extract_return_value_ftype extract_return_value
)
4404 gdbarch
->extract_return_value
= extract_return_value
;
4408 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4410 gdb_assert (gdbarch
!= NULL
);
4411 if (gdbarch
->store_return_value
== 0)
4412 internal_error (__FILE__
, __LINE__
,
4413 "gdbarch: gdbarch_store_return_value invalid");
4414 if (gdbarch_debug
>= 2)
4415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4416 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4420 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4421 gdbarch_store_return_value_ftype store_return_value
)
4423 gdbarch
->store_return_value
= store_return_value
;
4427 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4429 gdb_assert (gdbarch
!= NULL
);
4430 if (gdbarch
->deprecated_extract_return_value
== 0)
4431 internal_error (__FILE__
, __LINE__
,
4432 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4433 if (gdbarch_debug
>= 2)
4434 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4435 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4439 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4440 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4442 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4446 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4448 gdb_assert (gdbarch
!= NULL
);
4449 if (gdbarch
->deprecated_store_return_value
== 0)
4450 internal_error (__FILE__
, __LINE__
,
4451 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4452 if (gdbarch_debug
>= 2)
4453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4454 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4458 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4459 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4461 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4465 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4467 gdb_assert (gdbarch
!= NULL
);
4468 return gdbarch
->extract_struct_value_address
!= 0;
4472 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4474 gdb_assert (gdbarch
!= NULL
);
4475 if (gdbarch
->extract_struct_value_address
== 0)
4476 internal_error (__FILE__
, __LINE__
,
4477 "gdbarch: gdbarch_extract_struct_value_address invalid");
4478 if (gdbarch_debug
>= 2)
4479 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4480 return gdbarch
->extract_struct_value_address (regcache
);
4484 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4485 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4487 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4491 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4493 gdb_assert (gdbarch
!= NULL
);
4494 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4498 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4500 gdb_assert (gdbarch
!= NULL
);
4501 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4502 internal_error (__FILE__
, __LINE__
,
4503 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4504 if (gdbarch_debug
>= 2)
4505 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4506 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4510 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4511 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4513 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4517 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4519 gdb_assert (gdbarch
!= NULL
);
4520 if (gdbarch
->use_struct_convention
== 0)
4521 internal_error (__FILE__
, __LINE__
,
4522 "gdbarch: gdbarch_use_struct_convention invalid");
4523 if (gdbarch_debug
>= 2)
4524 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4525 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4529 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4530 gdbarch_use_struct_convention_ftype use_struct_convention
)
4532 gdbarch
->use_struct_convention
= use_struct_convention
;
4536 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
4538 gdb_assert (gdbarch
!= NULL
);
4539 return gdbarch
->deprecated_frame_init_saved_regs
!= 0;
4543 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4545 gdb_assert (gdbarch
!= NULL
);
4546 if (gdbarch
->deprecated_frame_init_saved_regs
== 0)
4547 internal_error (__FILE__
, __LINE__
,
4548 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4549 if (gdbarch_debug
>= 2)
4550 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
4551 gdbarch
->deprecated_frame_init_saved_regs (frame
);
4555 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4556 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
4558 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
4562 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4564 gdb_assert (gdbarch
!= NULL
);
4565 return gdbarch
->deprecated_init_extra_frame_info
!= 0;
4569 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4571 gdb_assert (gdbarch
!= NULL
);
4572 if (gdbarch
->deprecated_init_extra_frame_info
== 0)
4573 internal_error (__FILE__
, __LINE__
,
4574 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4575 if (gdbarch_debug
>= 2)
4576 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
4577 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
4581 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
4582 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
4584 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
4588 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4590 gdb_assert (gdbarch
!= NULL
);
4591 if (gdbarch
->skip_prologue
== 0)
4592 internal_error (__FILE__
, __LINE__
,
4593 "gdbarch: gdbarch_skip_prologue invalid");
4594 if (gdbarch_debug
>= 2)
4595 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4596 return gdbarch
->skip_prologue (ip
);
4600 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4601 gdbarch_skip_prologue_ftype skip_prologue
)
4603 gdbarch
->skip_prologue
= skip_prologue
;
4607 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4609 gdb_assert (gdbarch
!= NULL
);
4610 if (gdbarch
->prologue_frameless_p
== 0)
4611 internal_error (__FILE__
, __LINE__
,
4612 "gdbarch: gdbarch_prologue_frameless_p invalid");
4613 if (gdbarch_debug
>= 2)
4614 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4615 return gdbarch
->prologue_frameless_p (ip
);
4619 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4620 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4622 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4626 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4628 gdb_assert (gdbarch
!= NULL
);
4629 if (gdbarch
->inner_than
== 0)
4630 internal_error (__FILE__
, __LINE__
,
4631 "gdbarch: gdbarch_inner_than invalid");
4632 if (gdbarch_debug
>= 2)
4633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4634 return gdbarch
->inner_than (lhs
, rhs
);
4638 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4639 gdbarch_inner_than_ftype inner_than
)
4641 gdbarch
->inner_than
= inner_than
;
4644 const unsigned char *
4645 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4647 gdb_assert (gdbarch
!= NULL
);
4648 if (gdbarch
->breakpoint_from_pc
== 0)
4649 internal_error (__FILE__
, __LINE__
,
4650 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4651 if (gdbarch_debug
>= 2)
4652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4653 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4657 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4658 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4660 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4664 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4666 gdb_assert (gdbarch
!= NULL
);
4667 if (gdbarch
->memory_insert_breakpoint
== 0)
4668 internal_error (__FILE__
, __LINE__
,
4669 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4670 if (gdbarch_debug
>= 2)
4671 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4672 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4676 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4677 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4679 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4683 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4685 gdb_assert (gdbarch
!= NULL
);
4686 if (gdbarch
->memory_remove_breakpoint
== 0)
4687 internal_error (__FILE__
, __LINE__
,
4688 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4689 if (gdbarch_debug
>= 2)
4690 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4691 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4695 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4696 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4698 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4702 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4704 gdb_assert (gdbarch
!= NULL
);
4705 if (gdbarch
->decr_pc_after_break
== -1)
4706 internal_error (__FILE__
, __LINE__
,
4707 "gdbarch: gdbarch_decr_pc_after_break invalid");
4708 if (gdbarch_debug
>= 2)
4709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4710 return gdbarch
->decr_pc_after_break
;
4714 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4715 CORE_ADDR decr_pc_after_break
)
4717 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4721 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4723 gdb_assert (gdbarch
!= NULL
);
4724 if (gdbarch
->prepare_to_proceed
== 0)
4725 internal_error (__FILE__
, __LINE__
,
4726 "gdbarch: gdbarch_prepare_to_proceed invalid");
4727 if (gdbarch_debug
>= 2)
4728 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4729 return gdbarch
->prepare_to_proceed (select_it
);
4733 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4734 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4736 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4740 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4742 gdb_assert (gdbarch
!= NULL
);
4743 if (gdbarch
->function_start_offset
== -1)
4744 internal_error (__FILE__
, __LINE__
,
4745 "gdbarch: gdbarch_function_start_offset invalid");
4746 if (gdbarch_debug
>= 2)
4747 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4748 return gdbarch
->function_start_offset
;
4752 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4753 CORE_ADDR function_start_offset
)
4755 gdbarch
->function_start_offset
= function_start_offset
;
4759 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4761 gdb_assert (gdbarch
!= NULL
);
4762 if (gdbarch
->remote_translate_xfer_address
== 0)
4763 internal_error (__FILE__
, __LINE__
,
4764 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4765 if (gdbarch_debug
>= 2)
4766 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4767 gdbarch
->remote_translate_xfer_address (gdbarch
, regcache
, gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4771 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4772 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4774 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4778 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4780 gdb_assert (gdbarch
!= NULL
);
4781 if (gdbarch
->frame_args_skip
== -1)
4782 internal_error (__FILE__
, __LINE__
,
4783 "gdbarch: gdbarch_frame_args_skip invalid");
4784 if (gdbarch_debug
>= 2)
4785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4786 return gdbarch
->frame_args_skip
;
4790 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4791 CORE_ADDR frame_args_skip
)
4793 gdbarch
->frame_args_skip
= frame_args_skip
;
4797 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4799 gdb_assert (gdbarch
!= NULL
);
4800 if (gdbarch
->frameless_function_invocation
== 0)
4801 internal_error (__FILE__
, __LINE__
,
4802 "gdbarch: gdbarch_frameless_function_invocation invalid");
4803 if (gdbarch_debug
>= 2)
4804 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4805 return gdbarch
->frameless_function_invocation (fi
);
4809 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4810 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4812 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4816 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
4818 gdb_assert (gdbarch
!= NULL
);
4819 return gdbarch
->deprecated_frame_chain
!= 0;
4823 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4825 gdb_assert (gdbarch
!= NULL
);
4826 if (gdbarch
->deprecated_frame_chain
== 0)
4827 internal_error (__FILE__
, __LINE__
,
4828 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4829 if (gdbarch_debug
>= 2)
4830 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
4831 return gdbarch
->deprecated_frame_chain (frame
);
4835 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
4836 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
4838 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
4842 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4844 gdb_assert (gdbarch
!= NULL
);
4845 return gdbarch
->deprecated_frame_chain_valid
!= 0;
4849 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4851 gdb_assert (gdbarch
!= NULL
);
4852 if (gdbarch
->deprecated_frame_chain_valid
== 0)
4853 internal_error (__FILE__
, __LINE__
,
4854 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4855 if (gdbarch_debug
>= 2)
4856 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
4857 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
4861 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
4862 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
4864 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
4868 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4870 gdb_assert (gdbarch
!= NULL
);
4871 return gdbarch
->deprecated_frame_saved_pc
!= 0;
4875 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4877 gdb_assert (gdbarch
!= NULL
);
4878 if (gdbarch
->deprecated_frame_saved_pc
== 0)
4879 internal_error (__FILE__
, __LINE__
,
4880 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4881 if (gdbarch_debug
>= 2)
4882 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
4883 return gdbarch
->deprecated_frame_saved_pc (fi
);
4887 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
4888 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
4890 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
4894 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
4896 gdb_assert (gdbarch
!= NULL
);
4897 return gdbarch
->unwind_pc
!= 0;
4901 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4903 gdb_assert (gdbarch
!= NULL
);
4904 if (gdbarch
->unwind_pc
== 0)
4905 internal_error (__FILE__
, __LINE__
,
4906 "gdbarch: gdbarch_unwind_pc invalid");
4907 if (gdbarch_debug
>= 2)
4908 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
4909 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
4913 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
4914 gdbarch_unwind_pc_ftype unwind_pc
)
4916 gdbarch
->unwind_pc
= unwind_pc
;
4920 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4922 gdb_assert (gdbarch
!= NULL
);
4923 if (gdbarch
->frame_args_address
== 0)
4924 internal_error (__FILE__
, __LINE__
,
4925 "gdbarch: gdbarch_frame_args_address invalid");
4926 if (gdbarch_debug
>= 2)
4927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4928 return gdbarch
->frame_args_address (fi
);
4932 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4933 gdbarch_frame_args_address_ftype frame_args_address
)
4935 gdbarch
->frame_args_address
= frame_args_address
;
4939 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4941 gdb_assert (gdbarch
!= NULL
);
4942 if (gdbarch
->frame_locals_address
== 0)
4943 internal_error (__FILE__
, __LINE__
,
4944 "gdbarch: gdbarch_frame_locals_address invalid");
4945 if (gdbarch_debug
>= 2)
4946 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4947 return gdbarch
->frame_locals_address (fi
);
4951 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4952 gdbarch_frame_locals_address_ftype frame_locals_address
)
4954 gdbarch
->frame_locals_address
= frame_locals_address
;
4958 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch
*gdbarch
)
4960 gdb_assert (gdbarch
!= NULL
);
4961 return gdbarch
->deprecated_saved_pc_after_call
!= 0;
4965 gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4967 gdb_assert (gdbarch
!= NULL
);
4968 if (gdbarch
->deprecated_saved_pc_after_call
== 0)
4969 internal_error (__FILE__
, __LINE__
,
4970 "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
4971 if (gdbarch_debug
>= 2)
4972 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_saved_pc_after_call called\n");
4973 return gdbarch
->deprecated_saved_pc_after_call (frame
);
4977 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
,
4978 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call
)
4980 gdbarch
->deprecated_saved_pc_after_call
= deprecated_saved_pc_after_call
;
4984 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4986 gdb_assert (gdbarch
!= NULL
);
4987 if (gdbarch
->frame_num_args
== 0)
4988 internal_error (__FILE__
, __LINE__
,
4989 "gdbarch: gdbarch_frame_num_args invalid");
4990 if (gdbarch_debug
>= 2)
4991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4992 return gdbarch
->frame_num_args (frame
);
4996 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4997 gdbarch_frame_num_args_ftype frame_num_args
)
4999 gdbarch
->frame_num_args
= frame_num_args
;
5003 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
5005 gdb_assert (gdbarch
!= NULL
);
5006 return gdbarch
->stack_align
!= 0;
5010 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
5012 gdb_assert (gdbarch
!= NULL
);
5013 if (gdbarch
->stack_align
== 0)
5014 internal_error (__FILE__
, __LINE__
,
5015 "gdbarch: gdbarch_stack_align invalid");
5016 if (gdbarch_debug
>= 2)
5017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
5018 return gdbarch
->stack_align (sp
);
5022 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
5023 gdbarch_stack_align_ftype stack_align
)
5025 gdbarch
->stack_align
= stack_align
;
5029 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
5031 gdb_assert (gdbarch
!= NULL
);
5032 return gdbarch
->frame_align
!= 0;
5036 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
5038 gdb_assert (gdbarch
!= NULL
);
5039 if (gdbarch
->frame_align
== 0)
5040 internal_error (__FILE__
, __LINE__
,
5041 "gdbarch: gdbarch_frame_align invalid");
5042 if (gdbarch_debug
>= 2)
5043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
5044 return gdbarch
->frame_align (gdbarch
, address
);
5048 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
5049 gdbarch_frame_align_ftype frame_align
)
5051 gdbarch
->frame_align
= frame_align
;
5055 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
5057 gdb_assert (gdbarch
!= NULL
);
5058 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
5059 if (gdbarch_debug
>= 2)
5060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5061 return gdbarch
->deprecated_extra_stack_alignment_needed
;
5065 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
5066 int deprecated_extra_stack_alignment_needed
)
5068 gdbarch
->deprecated_extra_stack_alignment_needed
= deprecated_extra_stack_alignment_needed
;
5072 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
5074 gdb_assert (gdbarch
!= NULL
);
5075 return gdbarch
->reg_struct_has_addr
!= 0;
5079 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
5081 gdb_assert (gdbarch
!= NULL
);
5082 if (gdbarch
->reg_struct_has_addr
== 0)
5083 internal_error (__FILE__
, __LINE__
,
5084 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5085 if (gdbarch_debug
>= 2)
5086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
5087 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
5091 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
5092 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
5094 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
5098 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
5100 gdb_assert (gdbarch
!= NULL
);
5101 return gdbarch
->save_dummy_frame_tos
!= 0;
5105 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
5107 gdb_assert (gdbarch
!= NULL
);
5108 if (gdbarch
->save_dummy_frame_tos
== 0)
5109 internal_error (__FILE__
, __LINE__
,
5110 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5111 if (gdbarch_debug
>= 2)
5112 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
5113 gdbarch
->save_dummy_frame_tos (sp
);
5117 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
5118 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
5120 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
5124 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
5126 gdb_assert (gdbarch
!= NULL
);
5127 return gdbarch
->unwind_dummy_id
!= 0;
5131 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
5133 gdb_assert (gdbarch
!= NULL
);
5134 if (gdbarch
->unwind_dummy_id
== 0)
5135 internal_error (__FILE__
, __LINE__
,
5136 "gdbarch: gdbarch_unwind_dummy_id invalid");
5137 if (gdbarch_debug
>= 2)
5138 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
5139 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
5143 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
5144 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
5146 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
5150 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
5152 gdb_assert (gdbarch
!= NULL
);
5153 if (gdbarch_debug
>= 2)
5154 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
5155 return gdbarch
->parm_boundary
;
5159 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
5162 gdbarch
->parm_boundary
= parm_boundary
;
5165 const struct floatformat
*
5166 gdbarch_float_format (struct gdbarch
*gdbarch
)
5168 gdb_assert (gdbarch
!= NULL
);
5169 if (gdbarch_debug
>= 2)
5170 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
5171 return gdbarch
->float_format
;
5175 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
5176 const struct floatformat
* float_format
)
5178 gdbarch
->float_format
= float_format
;
5181 const struct floatformat
*
5182 gdbarch_double_format (struct gdbarch
*gdbarch
)
5184 gdb_assert (gdbarch
!= NULL
);
5185 if (gdbarch_debug
>= 2)
5186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
5187 return gdbarch
->double_format
;
5191 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
5192 const struct floatformat
* double_format
)
5194 gdbarch
->double_format
= double_format
;
5197 const struct floatformat
*
5198 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
5200 gdb_assert (gdbarch
!= NULL
);
5201 if (gdbarch_debug
>= 2)
5202 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
5203 return gdbarch
->long_double_format
;
5207 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
5208 const struct floatformat
* long_double_format
)
5210 gdbarch
->long_double_format
= long_double_format
;
5214 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5216 gdb_assert (gdbarch
!= NULL
);
5217 if (gdbarch
->convert_from_func_ptr_addr
== 0)
5218 internal_error (__FILE__
, __LINE__
,
5219 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5220 if (gdbarch_debug
>= 2)
5221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
5222 return gdbarch
->convert_from_func_ptr_addr (addr
);
5226 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
5227 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
5229 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
5233 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5235 gdb_assert (gdbarch
!= NULL
);
5236 if (gdbarch
->addr_bits_remove
== 0)
5237 internal_error (__FILE__
, __LINE__
,
5238 "gdbarch: gdbarch_addr_bits_remove invalid");
5239 if (gdbarch_debug
>= 2)
5240 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
5241 return gdbarch
->addr_bits_remove (addr
);
5245 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
5246 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
5248 gdbarch
->addr_bits_remove
= addr_bits_remove
;
5252 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5254 gdb_assert (gdbarch
!= NULL
);
5255 if (gdbarch
->smash_text_address
== 0)
5256 internal_error (__FILE__
, __LINE__
,
5257 "gdbarch: gdbarch_smash_text_address invalid");
5258 if (gdbarch_debug
>= 2)
5259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
5260 return gdbarch
->smash_text_address (addr
);
5264 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
5265 gdbarch_smash_text_address_ftype smash_text_address
)
5267 gdbarch
->smash_text_address
= smash_text_address
;
5271 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
5273 gdb_assert (gdbarch
!= NULL
);
5274 return gdbarch
->software_single_step
!= 0;
5278 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
5280 gdb_assert (gdbarch
!= NULL
);
5281 if (gdbarch
->software_single_step
== 0)
5282 internal_error (__FILE__
, __LINE__
,
5283 "gdbarch: gdbarch_software_single_step invalid");
5284 if (gdbarch_debug
>= 2)
5285 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
5286 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
5290 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
5291 gdbarch_software_single_step_ftype software_single_step
)
5293 gdbarch
->software_single_step
= software_single_step
;
5297 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
5299 gdb_assert (gdbarch
!= NULL
);
5300 if (gdbarch
->print_insn
== 0)
5301 internal_error (__FILE__
, __LINE__
,
5302 "gdbarch: gdbarch_print_insn invalid");
5303 if (gdbarch_debug
>= 2)
5304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
5305 return gdbarch
->print_insn (vma
, info
);
5309 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
5310 gdbarch_print_insn_ftype print_insn
)
5312 gdbarch
->print_insn
= print_insn
;
5316 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5318 gdb_assert (gdbarch
!= NULL
);
5319 if (gdbarch
->skip_trampoline_code
== 0)
5320 internal_error (__FILE__
, __LINE__
,
5321 "gdbarch: gdbarch_skip_trampoline_code invalid");
5322 if (gdbarch_debug
>= 2)
5323 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
5324 return gdbarch
->skip_trampoline_code (pc
);
5328 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
5329 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
5331 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
5335 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5337 gdb_assert (gdbarch
!= NULL
);
5338 if (gdbarch
->in_solib_call_trampoline
== 0)
5339 internal_error (__FILE__
, __LINE__
,
5340 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5341 if (gdbarch_debug
>= 2)
5342 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
5343 return gdbarch
->in_solib_call_trampoline (pc
, name
);
5347 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
5348 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
5350 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
5354 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5356 gdb_assert (gdbarch
!= NULL
);
5357 if (gdbarch
->in_solib_return_trampoline
== 0)
5358 internal_error (__FILE__
, __LINE__
,
5359 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5360 if (gdbarch_debug
>= 2)
5361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
5362 return gdbarch
->in_solib_return_trampoline (pc
, name
);
5366 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
5367 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
5369 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
5373 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5375 gdb_assert (gdbarch
!= NULL
);
5376 if (gdbarch
->pc_in_sigtramp
== 0)
5377 internal_error (__FILE__
, __LINE__
,
5378 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5379 if (gdbarch_debug
>= 2)
5380 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
5381 return gdbarch
->pc_in_sigtramp (pc
, name
);
5385 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
5386 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
5388 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
5392 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
5394 gdb_assert (gdbarch
!= NULL
);
5395 return gdbarch
->sigtramp_start
!= 0;
5399 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5401 gdb_assert (gdbarch
!= NULL
);
5402 if (gdbarch
->sigtramp_start
== 0)
5403 internal_error (__FILE__
, __LINE__
,
5404 "gdbarch: gdbarch_sigtramp_start invalid");
5405 if (gdbarch_debug
>= 2)
5406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
5407 return gdbarch
->sigtramp_start (pc
);
5411 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
5412 gdbarch_sigtramp_start_ftype sigtramp_start
)
5414 gdbarch
->sigtramp_start
= sigtramp_start
;
5418 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
5420 gdb_assert (gdbarch
!= NULL
);
5421 return gdbarch
->sigtramp_end
!= 0;
5425 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5427 gdb_assert (gdbarch
!= NULL
);
5428 if (gdbarch
->sigtramp_end
== 0)
5429 internal_error (__FILE__
, __LINE__
,
5430 "gdbarch: gdbarch_sigtramp_end invalid");
5431 if (gdbarch_debug
>= 2)
5432 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
5433 return gdbarch
->sigtramp_end (pc
);
5437 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
5438 gdbarch_sigtramp_end_ftype sigtramp_end
)
5440 gdbarch
->sigtramp_end
= sigtramp_end
;
5444 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5446 gdb_assert (gdbarch
!= NULL
);
5447 if (gdbarch
->in_function_epilogue_p
== 0)
5448 internal_error (__FILE__
, __LINE__
,
5449 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5450 if (gdbarch_debug
>= 2)
5451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
5452 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
5456 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
5457 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
5459 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
5463 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
5465 gdb_assert (gdbarch
!= NULL
);
5466 if (gdbarch
->construct_inferior_arguments
== 0)
5467 internal_error (__FILE__
, __LINE__
,
5468 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5469 if (gdbarch_debug
>= 2)
5470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5471 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5475 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5476 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5478 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5482 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
5484 gdb_assert (gdbarch
!= NULL
);
5485 return gdbarch
->dwarf2_build_frame_info
!= 0;
5489 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
5491 gdb_assert (gdbarch
!= NULL
);
5492 if (gdbarch
->dwarf2_build_frame_info
== 0)
5493 internal_error (__FILE__
, __LINE__
,
5494 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5495 if (gdbarch_debug
>= 2)
5496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
5497 gdbarch
->dwarf2_build_frame_info (objfile
);
5501 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
5502 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
5504 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
5508 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5510 gdb_assert (gdbarch
!= NULL
);
5511 if (gdbarch
->elf_make_msymbol_special
== 0)
5512 internal_error (__FILE__
, __LINE__
,
5513 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5514 if (gdbarch_debug
>= 2)
5515 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5516 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5520 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5521 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5523 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5527 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5529 gdb_assert (gdbarch
!= NULL
);
5530 if (gdbarch
->coff_make_msymbol_special
== 0)
5531 internal_error (__FILE__
, __LINE__
,
5532 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5533 if (gdbarch_debug
>= 2)
5534 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5535 gdbarch
->coff_make_msymbol_special (val
, msym
);
5539 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5540 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5542 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5546 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5548 gdb_assert (gdbarch
!= NULL
);
5549 /* Skip verify of name_of_malloc, invalid_p == 0 */
5550 if (gdbarch_debug
>= 2)
5551 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5552 return gdbarch
->name_of_malloc
;
5556 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5557 const char * name_of_malloc
)
5559 gdbarch
->name_of_malloc
= name_of_malloc
;
5563 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5565 gdb_assert (gdbarch
!= NULL
);
5566 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5567 if (gdbarch_debug
>= 2)
5568 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5569 return gdbarch
->cannot_step_breakpoint
;
5573 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5574 int cannot_step_breakpoint
)
5576 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5580 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5582 gdb_assert (gdbarch
!= NULL
);
5583 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5584 if (gdbarch_debug
>= 2)
5585 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5586 return gdbarch
->have_nonsteppable_watchpoint
;
5590 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5591 int have_nonsteppable_watchpoint
)
5593 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5597 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5599 gdb_assert (gdbarch
!= NULL
);
5600 return gdbarch
->address_class_type_flags
!= 0;
5604 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5606 gdb_assert (gdbarch
!= NULL
);
5607 if (gdbarch
->address_class_type_flags
== 0)
5608 internal_error (__FILE__
, __LINE__
,
5609 "gdbarch: gdbarch_address_class_type_flags invalid");
5610 if (gdbarch_debug
>= 2)
5611 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5612 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5616 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5617 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5619 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5623 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5625 gdb_assert (gdbarch
!= NULL
);
5626 return gdbarch
->address_class_type_flags_to_name
!= 0;
5630 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5632 gdb_assert (gdbarch
!= NULL
);
5633 if (gdbarch
->address_class_type_flags_to_name
== 0)
5634 internal_error (__FILE__
, __LINE__
,
5635 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5636 if (gdbarch_debug
>= 2)
5637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5638 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5642 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5643 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5645 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5649 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5651 gdb_assert (gdbarch
!= NULL
);
5652 return gdbarch
->address_class_name_to_type_flags
!= 0;
5656 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
5658 gdb_assert (gdbarch
!= NULL
);
5659 if (gdbarch
->address_class_name_to_type_flags
== 0)
5660 internal_error (__FILE__
, __LINE__
,
5661 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5662 if (gdbarch_debug
>= 2)
5663 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5664 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5668 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5669 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5671 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5675 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5677 gdb_assert (gdbarch
!= NULL
);
5678 if (gdbarch
->register_reggroup_p
== 0)
5679 internal_error (__FILE__
, __LINE__
,
5680 "gdbarch: gdbarch_register_reggroup_p invalid");
5681 if (gdbarch_debug
>= 2)
5682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5683 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5687 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5688 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5690 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5694 /* Keep a registry of per-architecture data-pointers required by GDB
5701 gdbarch_data_init_ftype
*init
;
5702 gdbarch_data_free_ftype
*free
;
5705 struct gdbarch_data_registration
5707 struct gdbarch_data
*data
;
5708 struct gdbarch_data_registration
*next
;
5711 struct gdbarch_data_registry
5714 struct gdbarch_data_registration
*registrations
;
5717 struct gdbarch_data_registry gdbarch_data_registry
=
5722 struct gdbarch_data
*
5723 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5724 gdbarch_data_free_ftype
*free
)
5726 struct gdbarch_data_registration
**curr
;
5727 /* Append the new registraration. */
5728 for (curr
= &gdbarch_data_registry
.registrations
;
5730 curr
= &(*curr
)->next
);
5731 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5732 (*curr
)->next
= NULL
;
5733 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5734 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5735 (*curr
)->data
->init
= init
;
5736 (*curr
)->data
->init_p
= 1;
5737 (*curr
)->data
->free
= free
;
5738 return (*curr
)->data
;
5742 /* Create/delete the gdbarch data vector. */
5745 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5747 gdb_assert (gdbarch
->data
== NULL
);
5748 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5749 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5753 free_gdbarch_data (struct gdbarch
*gdbarch
)
5755 struct gdbarch_data_registration
*rego
;
5756 gdb_assert (gdbarch
->data
!= NULL
);
5757 for (rego
= gdbarch_data_registry
.registrations
;
5761 struct gdbarch_data
*data
= rego
->data
;
5762 gdb_assert (data
->index
< gdbarch
->nr_data
);
5763 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5765 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5766 gdbarch
->data
[data
->index
] = NULL
;
5769 xfree (gdbarch
->data
);
5770 gdbarch
->data
= NULL
;
5774 /* Initialize the current value of the specified per-architecture
5778 set_gdbarch_data (struct gdbarch
*gdbarch
,
5779 struct gdbarch_data
*data
,
5782 gdb_assert (data
->index
< gdbarch
->nr_data
);
5783 if (gdbarch
->data
[data
->index
] != NULL
)
5785 gdb_assert (data
->free
!= NULL
);
5786 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5788 gdbarch
->data
[data
->index
] = pointer
;
5791 /* Return the current value of the specified per-architecture
5795 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5797 gdb_assert (data
->index
< gdbarch
->nr_data
);
5798 /* The data-pointer isn't initialized, call init() to get a value but
5799 only if the architecture initializaiton has completed. Otherwise
5800 punt - hope that the caller knows what they are doing. */
5801 if (gdbarch
->data
[data
->index
] == NULL
5802 && gdbarch
->initialized_p
)
5804 /* Be careful to detect an initialization cycle. */
5805 gdb_assert (data
->init_p
);
5807 gdb_assert (data
->init
!= NULL
);
5808 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5810 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5812 return gdbarch
->data
[data
->index
];
5817 /* Keep a registry of swapped data required by GDB modules. */
5822 struct gdbarch_swap_registration
*source
;
5823 struct gdbarch_swap
*next
;
5826 struct gdbarch_swap_registration
5829 unsigned long sizeof_data
;
5830 gdbarch_swap_ftype
*init
;
5831 struct gdbarch_swap_registration
*next
;
5834 struct gdbarch_swap_registry
5837 struct gdbarch_swap_registration
*registrations
;
5840 struct gdbarch_swap_registry gdbarch_swap_registry
=
5846 register_gdbarch_swap (void *data
,
5847 unsigned long sizeof_data
,
5848 gdbarch_swap_ftype
*init
)
5850 struct gdbarch_swap_registration
**rego
;
5851 for (rego
= &gdbarch_swap_registry
.registrations
;
5853 rego
= &(*rego
)->next
);
5854 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5855 (*rego
)->next
= NULL
;
5856 (*rego
)->init
= init
;
5857 (*rego
)->data
= data
;
5858 (*rego
)->sizeof_data
= sizeof_data
;
5862 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5864 struct gdbarch_swap
*curr
;
5865 for (curr
= gdbarch
->swap
;
5869 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5874 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5876 struct gdbarch_swap_registration
*rego
;
5877 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5878 for (rego
= gdbarch_swap_registry
.registrations
;
5882 if (rego
->data
!= NULL
)
5884 (*curr
) = XMALLOC (struct gdbarch_swap
);
5885 (*curr
)->source
= rego
;
5886 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5887 (*curr
)->next
= NULL
;
5888 curr
= &(*curr
)->next
;
5890 if (rego
->init
!= NULL
)
5896 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5898 struct gdbarch_swap
*curr
;
5899 for (curr
= gdbarch
->swap
;
5902 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5906 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5908 struct gdbarch_swap
*curr
;
5909 for (curr
= gdbarch
->swap
;
5912 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5916 /* Keep a registry of the architectures known by GDB. */
5918 struct gdbarch_registration
5920 enum bfd_architecture bfd_architecture
;
5921 gdbarch_init_ftype
*init
;
5922 gdbarch_dump_tdep_ftype
*dump_tdep
;
5923 struct gdbarch_list
*arches
;
5924 struct gdbarch_registration
*next
;
5927 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5930 append_name (const char ***buf
, int *nr
, const char *name
)
5932 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5938 gdbarch_printable_names (void)
5942 /* Accumulate a list of names based on the registed list of
5944 enum bfd_architecture a
;
5946 const char **arches
= NULL
;
5947 struct gdbarch_registration
*rego
;
5948 for (rego
= gdbarch_registry
;
5952 const struct bfd_arch_info
*ap
;
5953 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5955 internal_error (__FILE__
, __LINE__
,
5956 "gdbarch_architecture_names: multi-arch unknown");
5959 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5964 append_name (&arches
, &nr_arches
, NULL
);
5968 /* Just return all the architectures that BFD knows. Assume that
5969 the legacy architecture framework supports them. */
5970 return bfd_arch_list ();
5975 gdbarch_register (enum bfd_architecture bfd_architecture
,
5976 gdbarch_init_ftype
*init
,
5977 gdbarch_dump_tdep_ftype
*dump_tdep
)
5979 struct gdbarch_registration
**curr
;
5980 const struct bfd_arch_info
*bfd_arch_info
;
5981 /* Check that BFD recognizes this architecture */
5982 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5983 if (bfd_arch_info
== NULL
)
5985 internal_error (__FILE__
, __LINE__
,
5986 "gdbarch: Attempt to register unknown architecture (%d)",
5989 /* Check that we haven't seen this architecture before */
5990 for (curr
= &gdbarch_registry
;
5992 curr
= &(*curr
)->next
)
5994 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5995 internal_error (__FILE__
, __LINE__
,
5996 "gdbarch: Duplicate registraration of architecture (%s)",
5997 bfd_arch_info
->printable_name
);
6001 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
6002 bfd_arch_info
->printable_name
,
6005 (*curr
) = XMALLOC (struct gdbarch_registration
);
6006 (*curr
)->bfd_architecture
= bfd_architecture
;
6007 (*curr
)->init
= init
;
6008 (*curr
)->dump_tdep
= dump_tdep
;
6009 (*curr
)->arches
= NULL
;
6010 (*curr
)->next
= NULL
;
6011 /* When non- multi-arch, install whatever target dump routine we've
6012 been provided - hopefully that routine has been written correctly
6013 and works regardless of multi-arch. */
6014 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
6015 && startup_gdbarch
.dump_tdep
== NULL
)
6016 startup_gdbarch
.dump_tdep
= dump_tdep
;
6020 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
6021 gdbarch_init_ftype
*init
)
6023 gdbarch_register (bfd_architecture
, init
, NULL
);
6027 /* Look for an architecture using gdbarch_info. Base search on only
6028 BFD_ARCH_INFO and BYTE_ORDER. */
6030 struct gdbarch_list
*
6031 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
6032 const struct gdbarch_info
*info
)
6034 for (; arches
!= NULL
; arches
= arches
->next
)
6036 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
6038 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
6040 if (info
->osabi
!= arches
->gdbarch
->osabi
)
6048 /* Update the current architecture. Return ZERO if the update request
6052 gdbarch_update_p (struct gdbarch_info info
)
6054 struct gdbarch
*new_gdbarch
;
6055 struct gdbarch
*old_gdbarch
;
6056 struct gdbarch_registration
*rego
;
6058 /* Fill in missing parts of the INFO struct using a number of
6059 sources: ``set ...''; INFOabfd supplied; existing target. */
6061 /* ``(gdb) set architecture ...'' */
6062 if (info
.bfd_arch_info
== NULL
6063 && !TARGET_ARCHITECTURE_AUTO
)
6064 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6065 if (info
.bfd_arch_info
== NULL
6066 && info
.abfd
!= NULL
6067 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
6068 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
6069 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
6070 if (info
.bfd_arch_info
== NULL
)
6071 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6073 /* ``(gdb) set byte-order ...'' */
6074 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6075 && !TARGET_BYTE_ORDER_AUTO
)
6076 info
.byte_order
= TARGET_BYTE_ORDER
;
6077 /* From the INFO struct. */
6078 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6079 && info
.abfd
!= NULL
)
6080 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
6081 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
6082 : BFD_ENDIAN_UNKNOWN
);
6083 /* From the current target. */
6084 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
6085 info
.byte_order
= TARGET_BYTE_ORDER
;
6087 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6088 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6089 info
.osabi
= gdbarch_lookup_osabi (info
.abfd
);
6090 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6091 info
.osabi
= current_gdbarch
->osabi
;
6093 /* Must have found some sort of architecture. */
6094 gdb_assert (info
.bfd_arch_info
!= NULL
);
6098 fprintf_unfiltered (gdb_stdlog
,
6099 "gdbarch_update: info.bfd_arch_info %s\n",
6100 (info
.bfd_arch_info
!= NULL
6101 ? info
.bfd_arch_info
->printable_name
6103 fprintf_unfiltered (gdb_stdlog
,
6104 "gdbarch_update: info.byte_order %d (%s)\n",
6106 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
6107 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
6109 fprintf_unfiltered (gdb_stdlog
,
6110 "gdbarch_update: info.osabi %d (%s)\n",
6111 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
6112 fprintf_unfiltered (gdb_stdlog
,
6113 "gdbarch_update: info.abfd 0x%lx\n",
6115 fprintf_unfiltered (gdb_stdlog
,
6116 "gdbarch_update: info.tdep_info 0x%lx\n",
6117 (long) info
.tdep_info
);
6120 /* Find the target that knows about this architecture. */
6121 for (rego
= gdbarch_registry
;
6124 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
6129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
6133 /* Swap the data belonging to the old target out setting the
6134 installed data to zero. This stops the ->init() function trying
6135 to refer to the previous architecture's global data structures. */
6136 swapout_gdbarch_swap (current_gdbarch
);
6137 clear_gdbarch_swap (current_gdbarch
);
6139 /* Save the previously selected architecture, setting the global to
6140 NULL. This stops ->init() trying to use the previous
6141 architecture's configuration. The previous architecture may not
6142 even be of the same architecture family. The most recent
6143 architecture of the same family is found at the head of the
6144 rego->arches list. */
6145 old_gdbarch
= current_gdbarch
;
6146 current_gdbarch
= NULL
;
6148 /* Ask the target for a replacement architecture. */
6149 new_gdbarch
= rego
->init (info
, rego
->arches
);
6151 /* Did the target like it? No. Reject the change and revert to the
6152 old architecture. */
6153 if (new_gdbarch
== NULL
)
6156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
6157 swapin_gdbarch_swap (old_gdbarch
);
6158 current_gdbarch
= old_gdbarch
;
6162 /* Did the architecture change? No. Oops, put the old architecture
6164 if (old_gdbarch
== new_gdbarch
)
6167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6169 new_gdbarch
->bfd_arch_info
->printable_name
);
6170 swapin_gdbarch_swap (old_gdbarch
);
6171 current_gdbarch
= old_gdbarch
;
6175 /* Is this a pre-existing architecture? Yes. Move it to the front
6176 of the list of architectures (keeping the list sorted Most
6177 Recently Used) and then copy it in. */
6179 struct gdbarch_list
**list
;
6180 for (list
= ®o
->arches
;
6182 list
= &(*list
)->next
)
6184 if ((*list
)->gdbarch
== new_gdbarch
)
6186 struct gdbarch_list
*this;
6188 fprintf_unfiltered (gdb_stdlog
,
6189 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6191 new_gdbarch
->bfd_arch_info
->printable_name
);
6194 (*list
) = this->next
;
6195 /* Insert in the front. */
6196 this->next
= rego
->arches
;
6197 rego
->arches
= this;
6198 /* Copy the new architecture in. */
6199 current_gdbarch
= new_gdbarch
;
6200 swapin_gdbarch_swap (new_gdbarch
);
6201 architecture_changed_event ();
6207 /* Prepend this new architecture to the architecture list (keep the
6208 list sorted Most Recently Used). */
6210 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
6211 this->next
= rego
->arches
;
6212 this->gdbarch
= new_gdbarch
;
6213 rego
->arches
= this;
6216 /* Switch to this new architecture marking it initialized. */
6217 current_gdbarch
= new_gdbarch
;
6218 current_gdbarch
->initialized_p
= 1;
6221 fprintf_unfiltered (gdb_stdlog
,
6222 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6224 new_gdbarch
->bfd_arch_info
->printable_name
);
6227 /* Check that the newly installed architecture is valid. Plug in
6228 any post init values. */
6229 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
6230 verify_gdbarch (new_gdbarch
);
6232 /* Initialize the per-architecture memory (swap) areas.
6233 CURRENT_GDBARCH must be update before these modules are
6235 init_gdbarch_swap (new_gdbarch
);
6237 /* Initialize the per-architecture data. CURRENT_GDBARCH
6238 must be updated before these modules are called. */
6239 architecture_changed_event ();
6242 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
6250 /* Pointer to the target-dependent disassembly function. */
6251 int (*deprecated_tm_print_insn
) (bfd_vma
, disassemble_info
*);
6253 extern void _initialize_gdbarch (void);
6256 _initialize_gdbarch (void)
6258 struct cmd_list_element
*c
;
6260 add_show_from_set (add_set_cmd ("arch",
6263 (char *)&gdbarch_debug
,
6264 "Set architecture debugging.\n\
6265 When non-zero, architecture debugging is enabled.", &setdebuglist
),
6267 c
= add_set_cmd ("archdebug",
6270 (char *)&gdbarch_debug
,
6271 "Set architecture debugging.\n\
6272 When non-zero, architecture debugging is enabled.", &setlist
);
6274 deprecate_cmd (c
, "set debug arch");
6275 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");