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
;
171 int deprecated_register_bytes
;
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
;
283 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
287 /* The default architecture uses host values (for want of a better
290 extern const struct bfd_arch_info bfd_default_arch_struct
;
292 struct gdbarch startup_gdbarch
=
294 1, /* Always initialized. */
295 /* basic architecture information */
296 &bfd_default_arch_struct
,
299 /* target specific vector and its dump routine */
301 /*per-architecture data-pointers and swap regions */
303 /* Multi-arch values */
307 8 * sizeof (LONGEST
),
310 8 * sizeof (long double),
339 generic_register_byte
,
340 generic_register_size
,
342 generic_register_size
,
347 default_print_registers_info
,
361 generic_pc_in_call_dummy
,
406 generic_remote_translate_xfer_address
,
438 generic_in_function_epilogue_p
,
439 construct_inferior_arguments
,
449 default_register_reggroup_p
,
451 /* startup_gdbarch() */
454 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
456 /* Do any initialization needed for a non-multiarch configuration
457 after the _initialize_MODULE functions have been run. */
459 initialize_non_multiarch (void)
461 alloc_gdbarch_data (&startup_gdbarch
);
462 /* Ensure that all swap areas are zeroed so that they again think
463 they are starting from scratch. */
464 clear_gdbarch_swap (&startup_gdbarch
);
465 init_gdbarch_swap (&startup_gdbarch
);
469 /* Create a new ``struct gdbarch'' based on information provided by
470 ``struct gdbarch_info''. */
473 gdbarch_alloc (const struct gdbarch_info
*info
,
474 struct gdbarch_tdep
*tdep
)
476 /* NOTE: The new architecture variable is named ``current_gdbarch''
477 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
478 the current local architecture and not the previous global
479 architecture. This ensures that the new architectures initial
480 values are not influenced by the previous architecture. Once
481 everything is parameterised with gdbarch, this will go away. */
482 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
483 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
485 alloc_gdbarch_data (current_gdbarch
);
487 current_gdbarch
->tdep
= tdep
;
489 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
490 current_gdbarch
->byte_order
= info
->byte_order
;
491 current_gdbarch
->osabi
= info
->osabi
;
493 /* Force the explicit initialization of these. */
494 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
495 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
496 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
497 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
498 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
499 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
500 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
501 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
502 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
503 current_gdbarch
->char_signed
= -1;
504 current_gdbarch
->write_pc
= generic_target_write_pc
;
505 current_gdbarch
->read_sp
= generic_target_read_sp
;
506 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
507 current_gdbarch
->num_regs
= -1;
508 current_gdbarch
->sp_regnum
= -1;
509 current_gdbarch
->deprecated_fp_regnum
= -1;
510 current_gdbarch
->pc_regnum
= -1;
511 current_gdbarch
->ps_regnum
= -1;
512 current_gdbarch
->fp0_regnum
= -1;
513 current_gdbarch
->npc_regnum
= -1;
514 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
515 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
516 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
517 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
518 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
519 current_gdbarch
->register_name
= legacy_register_name
;
520 current_gdbarch
->register_byte
= generic_register_byte
;
521 current_gdbarch
->register_raw_size
= generic_register_size
;
522 current_gdbarch
->register_virtual_size
= generic_register_size
;
523 current_gdbarch
->print_registers_info
= default_print_registers_info
;
524 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
525 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
526 current_gdbarch
->cannot_store_register
= cannot_register_not
;
527 current_gdbarch
->deprecated_use_generic_dummy_frames
= 1;
528 current_gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
529 current_gdbarch
->call_dummy_address
= entry_point_address
;
530 current_gdbarch
->deprecated_pc_in_call_dummy
= generic_pc_in_call_dummy
;
531 current_gdbarch
->deprecated_call_dummy_words
= legacy_call_dummy_words
;
532 current_gdbarch
->deprecated_sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
533 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
534 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
535 current_gdbarch
->register_to_value
= legacy_register_to_value
;
536 current_gdbarch
->value_to_register
= legacy_value_to_register
;
537 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
538 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
539 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
540 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
541 current_gdbarch
->store_return_value
= legacy_store_return_value
;
542 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
543 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
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, has predicate */
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 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
705 && (gdbarch
->breakpoint_from_pc
== 0))
706 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
707 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
708 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
709 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
710 && (gdbarch
->decr_pc_after_break
== -1))
711 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
712 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
713 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
714 && (gdbarch
->function_start_offset
== -1))
715 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
716 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
717 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
718 && (gdbarch
->frame_args_skip
== -1))
719 fprintf_unfiltered (log
, "\n\tframe_args_skip");
720 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
721 /* Skip verify of deprecated_frame_chain, has predicate */
722 /* Skip verify of deprecated_frame_chain_valid, has predicate */
723 /* Skip verify of deprecated_frame_saved_pc, has predicate */
724 /* Skip verify of unwind_pc, has predicate */
725 /* Skip verify of frame_args_address, invalid_p == 0 */
726 /* Skip verify of frame_locals_address, invalid_p == 0 */
727 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
728 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
729 && (gdbarch
->frame_num_args
== 0))
730 fprintf_unfiltered (log
, "\n\tframe_num_args");
731 /* Skip verify of stack_align, has predicate */
732 /* Skip verify of frame_align, has predicate */
733 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
734 /* Skip verify of reg_struct_has_addr, has predicate */
735 /* Skip verify of save_dummy_frame_tos, has predicate */
736 /* Skip verify of unwind_dummy_id, has predicate */
737 if (gdbarch
->float_format
== 0)
738 gdbarch
->float_format
= default_float_format (gdbarch
);
739 if (gdbarch
->double_format
== 0)
740 gdbarch
->double_format
= default_double_format (gdbarch
);
741 if (gdbarch
->long_double_format
== 0)
742 gdbarch
->long_double_format
= default_double_format (gdbarch
);
743 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
744 /* Skip verify of addr_bits_remove, invalid_p == 0 */
745 /* Skip verify of smash_text_address, invalid_p == 0 */
746 /* Skip verify of software_single_step, has predicate */
747 /* Skip verify of print_insn, invalid_p == 0 */
748 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
749 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
750 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
751 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
752 /* Skip verify of sigtramp_start, has predicate */
753 /* Skip verify of sigtramp_end, has predicate */
754 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
755 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
756 /* Skip verify of dwarf2_build_frame_info, has predicate */
757 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
758 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
759 /* Skip verify of name_of_malloc, invalid_p == 0 */
760 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
761 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
762 /* Skip verify of address_class_type_flags, has predicate */
763 /* Skip verify of address_class_type_flags_to_name, has predicate */
764 /* Skip verify of address_class_name_to_type_flags, has predicate */
765 /* Skip verify of register_reggroup_p, invalid_p == 0 */
766 /* Skip verify of fetch_pointer_argument, has predicate */
767 buf
= ui_file_xstrdup (log
, &dummy
);
768 make_cleanup (xfree
, buf
);
769 if (strlen (buf
) > 0)
770 internal_error (__FILE__
, __LINE__
,
771 "verify_gdbarch: the following are invalid ...%s",
773 do_cleanups (cleanups
);
777 /* Print out the details of the current architecture. */
779 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
780 just happens to match the global variable ``current_gdbarch''. That
781 way macros refering to that variable get the local and not the global
782 version - ulgh. Once everything is parameterised with gdbarch, this
786 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
788 fprintf_unfiltered (file
,
789 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
792 fprintf_unfiltered (file
,
793 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
794 gdbarch_frame_align_p (current_gdbarch
));
796 fprintf_unfiltered (file
,
797 "gdbarch_dump: frame_align = 0x%08lx\n",
798 (long) current_gdbarch
->frame_align
);
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
802 (long) current_gdbarch
->in_function_epilogue_p
);
804 fprintf_unfiltered (file
,
805 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
806 (long) current_gdbarch
->register_reggroup_p
);
808 fprintf_unfiltered (file
,
809 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
810 gdbarch_pseudo_register_read_p (current_gdbarch
));
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
814 (long) current_gdbarch
->pseudo_register_read
);
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
818 gdbarch_pseudo_register_write_p (current_gdbarch
));
820 fprintf_unfiltered (file
,
821 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
822 (long) current_gdbarch
->pseudo_register_write
);
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
826 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
830 (long) current_gdbarch
->address_class_name_to_type_flags
);
831 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: %s # %s\n",
834 "ADDRESS_CLASS_TYPE_FLAGS_P()",
835 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
838 ADDRESS_CLASS_TYPE_FLAGS_P ());
840 #ifdef ADDRESS_CLASS_TYPE_FLAGS
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: %s # %s\n",
843 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
844 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
848 (long) current_gdbarch
->address_class_type_flags
849 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
854 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
858 (long) current_gdbarch
->address_class_type_flags_to_name
);
859 #ifdef ADDRESS_TO_POINTER
861 /* Macro might contain `[{}]' when not multi-arch */
862 fprintf_unfiltered (file
,
863 "gdbarch_dump: %s # %s\n",
864 "ADDRESS_TO_POINTER(type, buf, addr)",
865 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
868 fprintf_unfiltered (file
,
869 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
870 (long) current_gdbarch
->address_to_pointer
871 /*ADDRESS_TO_POINTER ()*/);
873 #ifdef ADDR_BITS_REMOVE
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: %s # %s\n",
876 "ADDR_BITS_REMOVE(addr)",
877 XSTRING (ADDR_BITS_REMOVE (addr
)));
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
881 (long) current_gdbarch
->addr_bits_remove
882 /*ADDR_BITS_REMOVE ()*/);
884 #ifdef BELIEVE_PCC_PROMOTION
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
887 XSTRING (BELIEVE_PCC_PROMOTION
));
888 fprintf_unfiltered (file
,
889 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
890 BELIEVE_PCC_PROMOTION
);
892 #ifdef BELIEVE_PCC_PROMOTION_TYPE
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
895 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
898 BELIEVE_PCC_PROMOTION_TYPE
);
900 #ifdef BREAKPOINT_FROM_PC
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: %s # %s\n",
903 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
904 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
908 (long) current_gdbarch
->breakpoint_from_pc
909 /*BREAKPOINT_FROM_PC ()*/);
911 #ifdef CALL_DUMMY_ADDRESS
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: %s # %s\n",
914 "CALL_DUMMY_ADDRESS()",
915 XSTRING (CALL_DUMMY_ADDRESS ()));
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
919 (long) current_gdbarch
->call_dummy_address
920 /*CALL_DUMMY_ADDRESS ()*/);
922 #ifdef CALL_DUMMY_LOCATION
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
925 XSTRING (CALL_DUMMY_LOCATION
));
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
928 CALL_DUMMY_LOCATION
);
930 #ifdef CANNOT_FETCH_REGISTER
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: %s # %s\n",
933 "CANNOT_FETCH_REGISTER(regnum)",
934 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
938 (long) current_gdbarch
->cannot_fetch_register
939 /*CANNOT_FETCH_REGISTER ()*/);
941 #ifdef CANNOT_STEP_BREAKPOINT
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
944 XSTRING (CANNOT_STEP_BREAKPOINT
));
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
947 CANNOT_STEP_BREAKPOINT
);
949 #ifdef CANNOT_STORE_REGISTER
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: %s # %s\n",
952 "CANNOT_STORE_REGISTER(regnum)",
953 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
957 (long) current_gdbarch
->cannot_store_register
958 /*CANNOT_STORE_REGISTER ()*/);
960 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
962 /* Macro might contain `[{}]' when not multi-arch */
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: %s # %s\n",
965 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
966 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
971 (long) current_gdbarch
->coff_make_msymbol_special
972 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
977 (long) current_gdbarch
->construct_inferior_arguments
);
978 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: %s # %s\n",
981 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
982 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
986 (long) current_gdbarch
->convert_from_func_ptr_addr
987 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
989 #ifdef CONVERT_REGISTER_P
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: %s # %s\n",
992 "CONVERT_REGISTER_P(regnum)",
993 XSTRING (CONVERT_REGISTER_P (regnum
)));
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
997 (long) current_gdbarch
->convert_register_p
998 /*CONVERT_REGISTER_P ()*/);
1000 #ifdef DECR_PC_AFTER_BREAK
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1003 XSTRING (DECR_PC_AFTER_BREAK
));
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1006 (long) DECR_PC_AFTER_BREAK
);
1008 #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1011 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
));
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
1014 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
);
1016 #ifdef DEPRECATED_CALL_DUMMY_LENGTH
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
1019 XSTRING (DEPRECATED_CALL_DUMMY_LENGTH
));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
1022 DEPRECATED_CALL_DUMMY_LENGTH
);
1024 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: %s # %s\n",
1027 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1028 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1031 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1033 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1036 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST
));
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1039 DEPRECATED_CALL_DUMMY_STACK_ADJUST
);
1041 #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
1044 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET
));
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
1047 (long) DEPRECATED_CALL_DUMMY_START_OFFSET
);
1049 #ifdef DEPRECATED_CALL_DUMMY_WORDS
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
1052 XSTRING (DEPRECATED_CALL_DUMMY_WORDS
));
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
1055 (long) DEPRECATED_CALL_DUMMY_WORDS
);
1057 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: %s # %s\n",
1060 "DEPRECATED_DO_REGISTERS_INFO_P()",
1061 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1064 DEPRECATED_DO_REGISTERS_INFO_P ());
1066 #ifdef DEPRECATED_DO_REGISTERS_INFO
1068 /* Macro might contain `[{}]' when not multi-arch */
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: %s # %s\n",
1071 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1072 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1075 fprintf_unfiltered (file
,
1076 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1077 (long) current_gdbarch
->deprecated_do_registers_info
1078 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1080 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: %s # %s\n",
1083 "DEPRECATED_DUMMY_WRITE_SP_P()",
1084 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1087 DEPRECATED_DUMMY_WRITE_SP_P ());
1089 #ifdef DEPRECATED_DUMMY_WRITE_SP
1091 /* Macro might contain `[{}]' when not multi-arch */
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: %s # %s\n",
1094 "DEPRECATED_DUMMY_WRITE_SP(val)",
1095 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val
)));
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1100 (long) current_gdbarch
->deprecated_dummy_write_sp
1101 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1103 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1105 /* Macro might contain `[{}]' when not multi-arch */
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: %s # %s\n",
1108 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1109 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1114 (long) current_gdbarch
->deprecated_extract_return_value
1115 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1117 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: %s # %s\n",
1120 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1121 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1124 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1126 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1127 fprintf_unfiltered (file
,
1128 "gdbarch_dump: %s # %s\n",
1129 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1130 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1132 fprintf_unfiltered (file
,
1133 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1134 (long) current_gdbarch
->deprecated_extract_struct_value_address
1135 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1137 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1138 fprintf_unfiltered (file
,
1139 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1140 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
));
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1143 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
);
1145 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: %s # %s\n",
1148 "DEPRECATED_FIX_CALL_DUMMY_P()",
1149 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1152 DEPRECATED_FIX_CALL_DUMMY_P ());
1154 #ifdef DEPRECATED_FIX_CALL_DUMMY
1156 /* Macro might contain `[{}]' when not multi-arch */
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: %s # %s\n",
1159 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1160 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1165 (long) current_gdbarch
->deprecated_fix_call_dummy
1166 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1168 #ifdef DEPRECATED_FP_REGNUM
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1171 XSTRING (DEPRECATED_FP_REGNUM
));
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1174 DEPRECATED_FP_REGNUM
);
1176 #ifdef DEPRECATED_FRAME_CHAIN_P
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: %s # %s\n",
1179 "DEPRECATED_FRAME_CHAIN_P()",
1180 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1183 DEPRECATED_FRAME_CHAIN_P ());
1185 #ifdef DEPRECATED_FRAME_CHAIN
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: %s # %s\n",
1188 "DEPRECATED_FRAME_CHAIN(frame)",
1189 XSTRING (DEPRECATED_FRAME_CHAIN (frame
)));
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1193 (long) current_gdbarch
->deprecated_frame_chain
1194 /*DEPRECATED_FRAME_CHAIN ()*/);
1196 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: %s # %s\n",
1199 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1200 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1203 DEPRECATED_FRAME_CHAIN_VALID_P ());
1205 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: %s # %s\n",
1208 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1209 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain
, thisframe
)));
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1213 (long) current_gdbarch
->deprecated_frame_chain_valid
1214 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1216 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: %s # %s\n",
1219 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1220 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1223 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1225 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1227 /* Macro might contain `[{}]' when not multi-arch */
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: %s # %s\n",
1230 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1231 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
1234 fprintf_unfiltered (file
,
1235 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1236 (long) current_gdbarch
->deprecated_frame_init_saved_regs
1237 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1239 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1240 fprintf_unfiltered (file
,
1241 "gdbarch_dump: %s # %s\n",
1242 "DEPRECATED_FRAME_SAVED_PC_P()",
1243 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1246 DEPRECATED_FRAME_SAVED_PC_P ());
1248 #ifdef DEPRECATED_FRAME_SAVED_PC
1249 fprintf_unfiltered (file
,
1250 "gdbarch_dump: %s # %s\n",
1251 "DEPRECATED_FRAME_SAVED_PC(fi)",
1252 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi
)));
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1256 (long) current_gdbarch
->deprecated_frame_saved_pc
1257 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1259 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: %s # %s\n",
1262 "DEPRECATED_GET_SAVED_REGISTER_P()",
1263 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1264 fprintf_unfiltered (file
,
1265 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1266 DEPRECATED_GET_SAVED_REGISTER_P ());
1268 #ifdef DEPRECATED_GET_SAVED_REGISTER
1270 /* Macro might contain `[{}]' when not multi-arch */
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: %s # %s\n",
1273 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1274 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1279 (long) current_gdbarch
->deprecated_get_saved_register
1280 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1282 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: %s # %s\n",
1285 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1286 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1289 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1291 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1293 /* Macro might contain `[{}]' when not multi-arch */
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: %s # %s\n",
1296 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1297 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1300 fprintf_unfiltered (file
,
1301 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1302 (long) current_gdbarch
->deprecated_init_extra_frame_info
1303 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1305 #ifdef DEPRECATED_INIT_FRAME_PC_P
1306 fprintf_unfiltered (file
,
1307 "gdbarch_dump: %s # %s\n",
1308 "DEPRECATED_INIT_FRAME_PC_P()",
1309 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1312 DEPRECATED_INIT_FRAME_PC_P ());
1314 #ifdef DEPRECATED_INIT_FRAME_PC
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: %s # %s\n",
1317 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1318 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1320 fprintf_unfiltered (file
,
1321 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1322 (long) current_gdbarch
->deprecated_init_frame_pc
1323 /*DEPRECATED_INIT_FRAME_PC ()*/);
1325 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: %s # %s\n",
1328 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1329 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1330 fprintf_unfiltered (file
,
1331 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1332 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1334 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1335 fprintf_unfiltered (file
,
1336 "gdbarch_dump: %s # %s\n",
1337 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1338 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1342 (long) current_gdbarch
->deprecated_init_frame_pc_first
1343 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1345 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: %s # %s\n",
1348 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1349 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1350 fprintf_unfiltered (file
,
1351 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1352 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1354 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1355 fprintf_unfiltered (file
,
1356 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1357 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE
));
1358 fprintf_unfiltered (file
,
1359 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1360 DEPRECATED_MAX_REGISTER_RAW_SIZE
);
1362 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: %s # %s\n",
1365 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1366 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1369 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1371 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1374 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
));
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1377 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
);
1379 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: %s # %s\n",
1382 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1383 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1386 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1388 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: %s # %s\n",
1391 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1392 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1396 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1397 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1399 #ifdef DEPRECATED_POP_FRAME_P
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: %s # %s\n",
1402 "DEPRECATED_POP_FRAME_P()",
1403 XSTRING (DEPRECATED_POP_FRAME_P ()));
1404 fprintf_unfiltered (file
,
1405 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1406 DEPRECATED_POP_FRAME_P ());
1408 #ifdef DEPRECATED_POP_FRAME
1410 /* Macro might contain `[{}]' when not multi-arch */
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: %s # %s\n",
1413 "DEPRECATED_POP_FRAME(-)",
1414 XSTRING (DEPRECATED_POP_FRAME (-)));
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1419 (long) current_gdbarch
->deprecated_pop_frame
1420 /*DEPRECATED_POP_FRAME ()*/);
1422 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: %s # %s\n",
1425 "DEPRECATED_PUSH_ARGUMENTS_P()",
1426 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1429 DEPRECATED_PUSH_ARGUMENTS_P ());
1431 #ifdef DEPRECATED_PUSH_ARGUMENTS
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: %s # %s\n",
1434 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1435 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1439 (long) current_gdbarch
->deprecated_push_arguments
1440 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1442 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: %s # %s\n",
1445 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1446 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1449 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1451 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1453 /* Macro might contain `[{}]' when not multi-arch */
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: %s # %s\n",
1456 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1457 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1462 (long) current_gdbarch
->deprecated_push_dummy_frame
1463 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1465 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: %s # %s\n",
1468 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1469 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1472 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1474 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: %s # %s\n",
1477 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1478 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc
, sp
)));
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1482 (long) current_gdbarch
->deprecated_push_return_address
1483 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1485 #ifdef DEPRECATED_REGISTER_BYTES
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1488 XSTRING (DEPRECATED_REGISTER_BYTES
));
1489 fprintf_unfiltered (file
,
1490 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1491 DEPRECATED_REGISTER_BYTES
);
1493 #ifdef DEPRECATED_REGISTER_SIZE
1494 fprintf_unfiltered (file
,
1495 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1496 XSTRING (DEPRECATED_REGISTER_SIZE
));
1497 fprintf_unfiltered (file
,
1498 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1499 DEPRECATED_REGISTER_SIZE
);
1501 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1502 fprintf_unfiltered (file
,
1503 "gdbarch_dump: %s # %s\n",
1504 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1505 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1508 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1510 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: %s # %s\n",
1513 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1514 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame
)));
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1518 (long) current_gdbarch
->deprecated_saved_pc_after_call
1519 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1521 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1524 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
));
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1527 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
);
1529 #ifdef DEPRECATED_STORE_RETURN_VALUE
1531 /* Macro might contain `[{}]' when not multi-arch */
1532 fprintf_unfiltered (file
,
1533 "gdbarch_dump: %s # %s\n",
1534 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1535 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1540 (long) current_gdbarch
->deprecated_store_return_value
1541 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1543 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1544 fprintf_unfiltered (file
,
1545 "gdbarch_dump: %s # %s\n",
1546 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1547 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1548 fprintf_unfiltered (file
,
1549 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1550 DEPRECATED_STORE_STRUCT_RETURN_P ());
1552 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1554 /* Macro might contain `[{}]' when not multi-arch */
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: %s # %s\n",
1557 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1558 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1563 (long) current_gdbarch
->deprecated_store_struct_return
1564 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1566 #ifdef DEPRECATED_TARGET_READ_FP_P
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: %s # %s\n",
1569 "DEPRECATED_TARGET_READ_FP_P()",
1570 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1571 fprintf_unfiltered (file
,
1572 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1573 DEPRECATED_TARGET_READ_FP_P ());
1575 #ifdef DEPRECATED_TARGET_READ_FP
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: %s # %s\n",
1578 "DEPRECATED_TARGET_READ_FP()",
1579 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1583 (long) current_gdbarch
->deprecated_target_read_fp
1584 /*DEPRECATED_TARGET_READ_FP ()*/);
1586 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1589 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
));
1590 fprintf_unfiltered (file
,
1591 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1592 DEPRECATED_USE_GENERIC_DUMMY_FRAMES
);
1594 #ifdef DWARF2_BUILD_FRAME_INFO_P
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: %s # %s\n",
1597 "DWARF2_BUILD_FRAME_INFO_P()",
1598 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1599 fprintf_unfiltered (file
,
1600 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1601 DWARF2_BUILD_FRAME_INFO_P ());
1603 #ifdef DWARF2_BUILD_FRAME_INFO
1605 /* Macro might contain `[{}]' when not multi-arch */
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: %s # %s\n",
1608 "DWARF2_BUILD_FRAME_INFO(objfile)",
1609 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1614 (long) current_gdbarch
->dwarf2_build_frame_info
1615 /*DWARF2_BUILD_FRAME_INFO ()*/);
1617 #ifdef DWARF2_REG_TO_REGNUM
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: %s # %s\n",
1620 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1621 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1625 (long) current_gdbarch
->dwarf2_reg_to_regnum
1626 /*DWARF2_REG_TO_REGNUM ()*/);
1628 #ifdef DWARF_REG_TO_REGNUM
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: %s # %s\n",
1631 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1632 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1634 fprintf_unfiltered (file
,
1635 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1636 (long) current_gdbarch
->dwarf_reg_to_regnum
1637 /*DWARF_REG_TO_REGNUM ()*/);
1639 #ifdef ECOFF_REG_TO_REGNUM
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: %s # %s\n",
1642 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1643 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1645 fprintf_unfiltered (file
,
1646 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1647 (long) current_gdbarch
->ecoff_reg_to_regnum
1648 /*ECOFF_REG_TO_REGNUM ()*/);
1650 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1652 /* Macro might contain `[{}]' when not multi-arch */
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: %s # %s\n",
1655 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1656 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1659 fprintf_unfiltered (file
,
1660 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1661 (long) current_gdbarch
->elf_make_msymbol_special
1662 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1664 #ifdef EXTRACT_RETURN_VALUE
1666 /* Macro might contain `[{}]' when not multi-arch */
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: %s # %s\n",
1669 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1670 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1673 fprintf_unfiltered (file
,
1674 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1675 (long) current_gdbarch
->extract_return_value
1676 /*EXTRACT_RETURN_VALUE ()*/);
1678 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1679 fprintf_unfiltered (file
,
1680 "gdbarch_dump: %s # %s\n",
1681 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1682 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1685 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1687 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: %s # %s\n",
1690 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1691 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1695 (long) current_gdbarch
->extract_struct_value_address
1696 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1698 #ifdef FETCH_POINTER_ARGUMENT_P
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: %s # %s\n",
1701 "FETCH_POINTER_ARGUMENT_P()",
1702 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1705 FETCH_POINTER_ARGUMENT_P ());
1707 #ifdef FETCH_POINTER_ARGUMENT
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: %s # %s\n",
1710 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1711 XSTRING (FETCH_POINTER_ARGUMENT (frame
, argi
, type
)));
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1715 (long) current_gdbarch
->fetch_pointer_argument
1716 /*FETCH_POINTER_ARGUMENT ()*/);
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: FP0_REGNUM # %s\n",
1721 XSTRING (FP0_REGNUM
));
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: FP0_REGNUM = %d\n",
1726 #ifdef FRAMELESS_FUNCTION_INVOCATION
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: %s # %s\n",
1729 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1730 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1732 fprintf_unfiltered (file
,
1733 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1734 (long) current_gdbarch
->frameless_function_invocation
1735 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1737 #ifdef FRAME_ARGS_ADDRESS
1738 fprintf_unfiltered (file
,
1739 "gdbarch_dump: %s # %s\n",
1740 "FRAME_ARGS_ADDRESS(fi)",
1741 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1743 fprintf_unfiltered (file
,
1744 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1745 (long) current_gdbarch
->frame_args_address
1746 /*FRAME_ARGS_ADDRESS ()*/);
1748 #ifdef FRAME_ARGS_SKIP
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1751 XSTRING (FRAME_ARGS_SKIP
));
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1754 (long) FRAME_ARGS_SKIP
);
1756 #ifdef FRAME_LOCALS_ADDRESS
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: %s # %s\n",
1759 "FRAME_LOCALS_ADDRESS(fi)",
1760 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1762 fprintf_unfiltered (file
,
1763 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1764 (long) current_gdbarch
->frame_locals_address
1765 /*FRAME_LOCALS_ADDRESS ()*/);
1767 #ifdef FRAME_NUM_ARGS
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: %s # %s\n",
1770 "FRAME_NUM_ARGS(frame)",
1771 XSTRING (FRAME_NUM_ARGS (frame
)));
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1775 (long) current_gdbarch
->frame_num_args
1776 /*FRAME_NUM_ARGS ()*/);
1778 #ifdef FUNCTION_START_OFFSET
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1781 XSTRING (FUNCTION_START_OFFSET
));
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1784 (long) FUNCTION_START_OFFSET
);
1786 #ifdef GET_LONGJMP_TARGET_P
1787 fprintf_unfiltered (file
,
1788 "gdbarch_dump: %s # %s\n",
1789 "GET_LONGJMP_TARGET_P()",
1790 XSTRING (GET_LONGJMP_TARGET_P ()));
1791 fprintf_unfiltered (file
,
1792 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1793 GET_LONGJMP_TARGET_P ());
1795 #ifdef GET_LONGJMP_TARGET
1796 fprintf_unfiltered (file
,
1797 "gdbarch_dump: %s # %s\n",
1798 "GET_LONGJMP_TARGET(pc)",
1799 XSTRING (GET_LONGJMP_TARGET (pc
)));
1801 fprintf_unfiltered (file
,
1802 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1803 (long) current_gdbarch
->get_longjmp_target
1804 /*GET_LONGJMP_TARGET ()*/);
1806 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1807 fprintf_unfiltered (file
,
1808 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1809 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1812 HAVE_NONSTEPPABLE_WATCHPOINT
);
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: %s # %s\n",
1817 "INNER_THAN(lhs, rhs)",
1818 XSTRING (INNER_THAN (lhs
, rhs
)));
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1822 (long) current_gdbarch
->inner_than
1825 #ifdef INTEGER_TO_ADDRESS_P
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: %s # %s\n",
1828 "INTEGER_TO_ADDRESS_P()",
1829 XSTRING (INTEGER_TO_ADDRESS_P ()));
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1832 INTEGER_TO_ADDRESS_P ());
1834 #ifdef INTEGER_TO_ADDRESS
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: %s # %s\n",
1837 "INTEGER_TO_ADDRESS(type, buf)",
1838 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1842 (long) current_gdbarch
->integer_to_address
1843 /*INTEGER_TO_ADDRESS ()*/);
1845 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: %s # %s\n",
1848 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1849 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1851 fprintf_unfiltered (file
,
1852 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1853 (long) current_gdbarch
->in_solib_call_trampoline
1854 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1856 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: %s # %s\n",
1859 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1860 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1864 (long) current_gdbarch
->in_solib_return_trampoline
1865 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1867 #ifdef MEMORY_INSERT_BREAKPOINT
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: %s # %s\n",
1870 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1871 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1875 (long) current_gdbarch
->memory_insert_breakpoint
1876 /*MEMORY_INSERT_BREAKPOINT ()*/);
1878 #ifdef MEMORY_REMOVE_BREAKPOINT
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: %s # %s\n",
1881 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1882 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1886 (long) current_gdbarch
->memory_remove_breakpoint
1887 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1889 #ifdef NAME_OF_MALLOC
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1892 XSTRING (NAME_OF_MALLOC
));
1893 fprintf_unfiltered (file
,
1894 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1898 fprintf_unfiltered (file
,
1899 "gdbarch_dump: NPC_REGNUM # %s\n",
1900 XSTRING (NPC_REGNUM
));
1901 fprintf_unfiltered (file
,
1902 "gdbarch_dump: NPC_REGNUM = %d\n",
1905 #ifdef NUM_PSEUDO_REGS
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1908 XSTRING (NUM_PSEUDO_REGS
));
1909 fprintf_unfiltered (file
,
1910 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: NUM_REGS # %s\n",
1916 XSTRING (NUM_REGS
));
1917 fprintf_unfiltered (file
,
1918 "gdbarch_dump: NUM_REGS = %d\n",
1921 #ifdef PARM_BOUNDARY
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1924 XSTRING (PARM_BOUNDARY
));
1925 fprintf_unfiltered (file
,
1926 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1929 #ifdef PC_IN_SIGTRAMP
1930 fprintf_unfiltered (file
,
1931 "gdbarch_dump: %s # %s\n",
1932 "PC_IN_SIGTRAMP(pc, name)",
1933 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1937 (long) current_gdbarch
->pc_in_sigtramp
1938 /*PC_IN_SIGTRAMP ()*/);
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: PC_REGNUM # %s\n",
1943 XSTRING (PC_REGNUM
));
1944 fprintf_unfiltered (file
,
1945 "gdbarch_dump: PC_REGNUM = %d\n",
1948 #ifdef POINTER_TO_ADDRESS
1949 fprintf_unfiltered (file
,
1950 "gdbarch_dump: %s # %s\n",
1951 "POINTER_TO_ADDRESS(type, buf)",
1952 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1956 (long) current_gdbarch
->pointer_to_address
1957 /*POINTER_TO_ADDRESS ()*/);
1959 #ifdef PREPARE_TO_PROCEED
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: %s # %s\n",
1962 "PREPARE_TO_PROCEED(select_it)",
1963 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1967 (long) current_gdbarch
->prepare_to_proceed
1968 /*PREPARE_TO_PROCEED ()*/);
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1973 gdbarch_print_float_info_p (current_gdbarch
));
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: print_float_info = 0x%08lx\n",
1977 (long) current_gdbarch
->print_float_info
);
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1981 (long) current_gdbarch
->print_registers_info
);
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1985 gdbarch_print_vector_info_p (current_gdbarch
));
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1989 (long) current_gdbarch
->print_vector_info
);
1990 #ifdef PROLOGUE_FRAMELESS_P
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: %s # %s\n",
1993 "PROLOGUE_FRAMELESS_P(ip)",
1994 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1998 (long) current_gdbarch
->prologue_frameless_p
1999 /*PROLOGUE_FRAMELESS_P ()*/);
2002 fprintf_unfiltered (file
,
2003 "gdbarch_dump: PS_REGNUM # %s\n",
2004 XSTRING (PS_REGNUM
));
2005 fprintf_unfiltered (file
,
2006 "gdbarch_dump: PS_REGNUM = %d\n",
2010 fprintf_unfiltered (file
,
2011 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
2012 gdbarch_push_dummy_call_p (current_gdbarch
));
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
2016 (long) current_gdbarch
->push_dummy_call
);
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
2020 gdbarch_push_dummy_code_p (current_gdbarch
));
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
2024 (long) current_gdbarch
->push_dummy_code
);
2025 #ifdef REGISTER_BYTE_P
2026 fprintf_unfiltered (file
,
2027 "gdbarch_dump: %s # %s\n",
2028 "REGISTER_BYTE_P()",
2029 XSTRING (REGISTER_BYTE_P ()));
2030 fprintf_unfiltered (file
,
2031 "gdbarch_dump: REGISTER_BYTE_P() = %d\n",
2032 REGISTER_BYTE_P ());
2034 #ifdef REGISTER_BYTE
2035 fprintf_unfiltered (file
,
2036 "gdbarch_dump: %s # %s\n",
2037 "REGISTER_BYTE(reg_nr)",
2038 XSTRING (REGISTER_BYTE (reg_nr
)));
2040 fprintf_unfiltered (file
,
2041 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
2042 (long) current_gdbarch
->register_byte
2043 /*REGISTER_BYTE ()*/);
2045 #ifdef REGISTER_BYTES_OK_P
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: %s # %s\n",
2048 "REGISTER_BYTES_OK_P()",
2049 XSTRING (REGISTER_BYTES_OK_P ()));
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2052 REGISTER_BYTES_OK_P ());
2054 #ifdef REGISTER_BYTES_OK
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: %s # %s\n",
2057 "REGISTER_BYTES_OK(nr_bytes)",
2058 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2062 (long) current_gdbarch
->register_bytes_ok
2063 /*REGISTER_BYTES_OK ()*/);
2065 #ifdef REGISTER_CONVERTIBLE
2066 fprintf_unfiltered (file
,
2067 "gdbarch_dump: %s # %s\n",
2068 "REGISTER_CONVERTIBLE(nr)",
2069 XSTRING (REGISTER_CONVERTIBLE (nr
)));
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
2073 (long) current_gdbarch
->register_convertible
2074 /*REGISTER_CONVERTIBLE ()*/);
2076 #ifdef REGISTER_CONVERT_TO_RAW
2078 /* Macro might contain `[{}]' when not multi-arch */
2079 fprintf_unfiltered (file
,
2080 "gdbarch_dump: %s # %s\n",
2081 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2082 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
2085 fprintf_unfiltered (file
,
2086 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
2087 (long) current_gdbarch
->register_convert_to_raw
2088 /*REGISTER_CONVERT_TO_RAW ()*/);
2090 #ifdef REGISTER_CONVERT_TO_VIRTUAL
2092 /* Macro might contain `[{}]' when not multi-arch */
2093 fprintf_unfiltered (file
,
2094 "gdbarch_dump: %s # %s\n",
2095 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2096 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
2099 fprintf_unfiltered (file
,
2100 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2101 (long) current_gdbarch
->register_convert_to_virtual
2102 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2104 #ifdef REGISTER_NAME
2105 fprintf_unfiltered (file
,
2106 "gdbarch_dump: %s # %s\n",
2107 "REGISTER_NAME(regnr)",
2108 XSTRING (REGISTER_NAME (regnr
)));
2110 fprintf_unfiltered (file
,
2111 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2112 (long) current_gdbarch
->register_name
2113 /*REGISTER_NAME ()*/);
2115 #ifdef REGISTER_RAW_SIZE
2116 fprintf_unfiltered (file
,
2117 "gdbarch_dump: %s # %s\n",
2118 "REGISTER_RAW_SIZE(reg_nr)",
2119 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
2121 fprintf_unfiltered (file
,
2122 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2123 (long) current_gdbarch
->register_raw_size
2124 /*REGISTER_RAW_SIZE ()*/);
2126 #ifdef REGISTER_SIM_REGNO
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: %s # %s\n",
2129 "REGISTER_SIM_REGNO(reg_nr)",
2130 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
2132 fprintf_unfiltered (file
,
2133 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2134 (long) current_gdbarch
->register_sim_regno
2135 /*REGISTER_SIM_REGNO ()*/);
2137 #ifdef REGISTER_TO_VALUE
2139 /* Macro might contain `[{}]' when not multi-arch */
2140 fprintf_unfiltered (file
,
2141 "gdbarch_dump: %s # %s\n",
2142 "REGISTER_TO_VALUE(regnum, type, from, to)",
2143 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
2146 fprintf_unfiltered (file
,
2147 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2148 (long) current_gdbarch
->register_to_value
2149 /*REGISTER_TO_VALUE ()*/);
2152 fprintf_unfiltered (file
,
2153 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2154 gdbarch_register_type_p (current_gdbarch
));
2156 fprintf_unfiltered (file
,
2157 "gdbarch_dump: register_type = 0x%08lx\n",
2158 (long) current_gdbarch
->register_type
);
2159 #ifdef REGISTER_VIRTUAL_SIZE
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: %s # %s\n",
2162 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2163 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
2165 fprintf_unfiltered (file
,
2166 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2167 (long) current_gdbarch
->register_virtual_size
2168 /*REGISTER_VIRTUAL_SIZE ()*/);
2170 #ifdef REGISTER_VIRTUAL_TYPE_P
2171 fprintf_unfiltered (file
,
2172 "gdbarch_dump: %s # %s\n",
2173 "REGISTER_VIRTUAL_TYPE_P()",
2174 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2175 fprintf_unfiltered (file
,
2176 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2177 REGISTER_VIRTUAL_TYPE_P ());
2179 #ifdef REGISTER_VIRTUAL_TYPE
2180 fprintf_unfiltered (file
,
2181 "gdbarch_dump: %s # %s\n",
2182 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2183 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
2185 fprintf_unfiltered (file
,
2186 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2187 (long) current_gdbarch
->register_virtual_type
2188 /*REGISTER_VIRTUAL_TYPE ()*/);
2190 #ifdef REG_STRUCT_HAS_ADDR_P
2191 fprintf_unfiltered (file
,
2192 "gdbarch_dump: %s # %s\n",
2193 "REG_STRUCT_HAS_ADDR_P()",
2194 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2195 fprintf_unfiltered (file
,
2196 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2197 REG_STRUCT_HAS_ADDR_P ());
2199 #ifdef REG_STRUCT_HAS_ADDR
2200 fprintf_unfiltered (file
,
2201 "gdbarch_dump: %s # %s\n",
2202 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2203 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
2205 fprintf_unfiltered (file
,
2206 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2207 (long) current_gdbarch
->reg_struct_has_addr
2208 /*REG_STRUCT_HAS_ADDR ()*/);
2211 fprintf_unfiltered (file
,
2212 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
2213 (long) current_gdbarch
->remote_translate_xfer_address
);
2214 #ifdef RETURN_VALUE_ON_STACK
2215 fprintf_unfiltered (file
,
2216 "gdbarch_dump: %s # %s\n",
2217 "RETURN_VALUE_ON_STACK(type)",
2218 XSTRING (RETURN_VALUE_ON_STACK (type
)));
2220 fprintf_unfiltered (file
,
2221 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2222 (long) current_gdbarch
->return_value_on_stack
2223 /*RETURN_VALUE_ON_STACK ()*/);
2225 #ifdef SAVE_DUMMY_FRAME_TOS_P
2226 fprintf_unfiltered (file
,
2227 "gdbarch_dump: %s # %s\n",
2228 "SAVE_DUMMY_FRAME_TOS_P()",
2229 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2230 fprintf_unfiltered (file
,
2231 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2232 SAVE_DUMMY_FRAME_TOS_P ());
2234 #ifdef SAVE_DUMMY_FRAME_TOS
2236 /* Macro might contain `[{}]' when not multi-arch */
2237 fprintf_unfiltered (file
,
2238 "gdbarch_dump: %s # %s\n",
2239 "SAVE_DUMMY_FRAME_TOS(sp)",
2240 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
2243 fprintf_unfiltered (file
,
2244 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2245 (long) current_gdbarch
->save_dummy_frame_tos
2246 /*SAVE_DUMMY_FRAME_TOS ()*/);
2248 #ifdef SDB_REG_TO_REGNUM
2249 fprintf_unfiltered (file
,
2250 "gdbarch_dump: %s # %s\n",
2251 "SDB_REG_TO_REGNUM(sdb_regnr)",
2252 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
2254 fprintf_unfiltered (file
,
2255 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2256 (long) current_gdbarch
->sdb_reg_to_regnum
2257 /*SDB_REG_TO_REGNUM ()*/);
2259 #ifdef SIGTRAMP_END_P
2260 fprintf_unfiltered (file
,
2261 "gdbarch_dump: %s # %s\n",
2263 XSTRING (SIGTRAMP_END_P ()));
2264 fprintf_unfiltered (file
,
2265 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2269 fprintf_unfiltered (file
,
2270 "gdbarch_dump: %s # %s\n",
2272 XSTRING (SIGTRAMP_END (pc
)));
2274 fprintf_unfiltered (file
,
2275 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2276 (long) current_gdbarch
->sigtramp_end
2277 /*SIGTRAMP_END ()*/);
2279 #ifdef SIGTRAMP_START_P
2280 fprintf_unfiltered (file
,
2281 "gdbarch_dump: %s # %s\n",
2282 "SIGTRAMP_START_P()",
2283 XSTRING (SIGTRAMP_START_P ()));
2284 fprintf_unfiltered (file
,
2285 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2286 SIGTRAMP_START_P ());
2288 #ifdef SIGTRAMP_START
2289 fprintf_unfiltered (file
,
2290 "gdbarch_dump: %s # %s\n",
2291 "SIGTRAMP_START(pc)",
2292 XSTRING (SIGTRAMP_START (pc
)));
2294 fprintf_unfiltered (file
,
2295 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2296 (long) current_gdbarch
->sigtramp_start
2297 /*SIGTRAMP_START ()*/);
2299 #ifdef SKIP_PROLOGUE
2300 fprintf_unfiltered (file
,
2301 "gdbarch_dump: %s # %s\n",
2302 "SKIP_PROLOGUE(ip)",
2303 XSTRING (SKIP_PROLOGUE (ip
)));
2305 fprintf_unfiltered (file
,
2306 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2307 (long) current_gdbarch
->skip_prologue
2308 /*SKIP_PROLOGUE ()*/);
2310 #ifdef SKIP_TRAMPOLINE_CODE
2311 fprintf_unfiltered (file
,
2312 "gdbarch_dump: %s # %s\n",
2313 "SKIP_TRAMPOLINE_CODE(pc)",
2314 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
2316 fprintf_unfiltered (file
,
2317 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2318 (long) current_gdbarch
->skip_trampoline_code
2319 /*SKIP_TRAMPOLINE_CODE ()*/);
2321 #ifdef SMASH_TEXT_ADDRESS
2322 fprintf_unfiltered (file
,
2323 "gdbarch_dump: %s # %s\n",
2324 "SMASH_TEXT_ADDRESS(addr)",
2325 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2327 fprintf_unfiltered (file
,
2328 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2329 (long) current_gdbarch
->smash_text_address
2330 /*SMASH_TEXT_ADDRESS ()*/);
2332 #ifdef SOFTWARE_SINGLE_STEP_P
2333 fprintf_unfiltered (file
,
2334 "gdbarch_dump: %s # %s\n",
2335 "SOFTWARE_SINGLE_STEP_P()",
2336 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2337 fprintf_unfiltered (file
,
2338 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2339 SOFTWARE_SINGLE_STEP_P ());
2341 #ifdef SOFTWARE_SINGLE_STEP
2343 /* Macro might contain `[{}]' when not multi-arch */
2344 fprintf_unfiltered (file
,
2345 "gdbarch_dump: %s # %s\n",
2346 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2347 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2350 fprintf_unfiltered (file
,
2351 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2352 (long) current_gdbarch
->software_single_step
2353 /*SOFTWARE_SINGLE_STEP ()*/);
2356 fprintf_unfiltered (file
,
2357 "gdbarch_dump: SP_REGNUM # %s\n",
2358 XSTRING (SP_REGNUM
));
2359 fprintf_unfiltered (file
,
2360 "gdbarch_dump: SP_REGNUM = %d\n",
2363 #ifdef STAB_REG_TO_REGNUM
2364 fprintf_unfiltered (file
,
2365 "gdbarch_dump: %s # %s\n",
2366 "STAB_REG_TO_REGNUM(stab_regnr)",
2367 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2369 fprintf_unfiltered (file
,
2370 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2371 (long) current_gdbarch
->stab_reg_to_regnum
2372 /*STAB_REG_TO_REGNUM ()*/);
2374 #ifdef STACK_ALIGN_P
2375 fprintf_unfiltered (file
,
2376 "gdbarch_dump: %s # %s\n",
2378 XSTRING (STACK_ALIGN_P ()));
2379 fprintf_unfiltered (file
,
2380 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2384 fprintf_unfiltered (file
,
2385 "gdbarch_dump: %s # %s\n",
2387 XSTRING (STACK_ALIGN (sp
)));
2389 fprintf_unfiltered (file
,
2390 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2391 (long) current_gdbarch
->stack_align
2392 /*STACK_ALIGN ()*/);
2394 #ifdef STORE_RETURN_VALUE
2396 /* Macro might contain `[{}]' when not multi-arch */
2397 fprintf_unfiltered (file
,
2398 "gdbarch_dump: %s # %s\n",
2399 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2400 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2403 fprintf_unfiltered (file
,
2404 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2405 (long) current_gdbarch
->store_return_value
2406 /*STORE_RETURN_VALUE ()*/);
2408 #ifdef TARGET_ADDR_BIT
2409 fprintf_unfiltered (file
,
2410 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2411 XSTRING (TARGET_ADDR_BIT
));
2412 fprintf_unfiltered (file
,
2413 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2416 #ifdef TARGET_ARCHITECTURE
2417 fprintf_unfiltered (file
,
2418 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2419 XSTRING (TARGET_ARCHITECTURE
));
2420 if (TARGET_ARCHITECTURE
!= NULL
)
2421 fprintf_unfiltered (file
,
2422 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2423 TARGET_ARCHITECTURE
->printable_name
);
2425 #ifdef TARGET_BFD_VMA_BIT
2426 fprintf_unfiltered (file
,
2427 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2428 XSTRING (TARGET_BFD_VMA_BIT
));
2429 fprintf_unfiltered (file
,
2430 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2431 TARGET_BFD_VMA_BIT
);
2433 #ifdef TARGET_BYTE_ORDER
2434 fprintf_unfiltered (file
,
2435 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2436 XSTRING (TARGET_BYTE_ORDER
));
2437 fprintf_unfiltered (file
,
2438 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2439 (long) TARGET_BYTE_ORDER
);
2441 #ifdef TARGET_CHAR_SIGNED
2442 fprintf_unfiltered (file
,
2443 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2444 XSTRING (TARGET_CHAR_SIGNED
));
2445 fprintf_unfiltered (file
,
2446 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2447 TARGET_CHAR_SIGNED
);
2449 #ifdef TARGET_DOUBLE_BIT
2450 fprintf_unfiltered (file
,
2451 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2452 XSTRING (TARGET_DOUBLE_BIT
));
2453 fprintf_unfiltered (file
,
2454 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2457 #ifdef TARGET_DOUBLE_FORMAT
2458 fprintf_unfiltered (file
,
2459 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2460 XSTRING (TARGET_DOUBLE_FORMAT
));
2461 fprintf_unfiltered (file
,
2462 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2463 (TARGET_DOUBLE_FORMAT
)->name
);
2465 #ifdef TARGET_FLOAT_BIT
2466 fprintf_unfiltered (file
,
2467 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2468 XSTRING (TARGET_FLOAT_BIT
));
2469 fprintf_unfiltered (file
,
2470 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2473 #ifdef TARGET_FLOAT_FORMAT
2474 fprintf_unfiltered (file
,
2475 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2476 XSTRING (TARGET_FLOAT_FORMAT
));
2477 fprintf_unfiltered (file
,
2478 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2479 (TARGET_FLOAT_FORMAT
)->name
);
2481 #ifdef TARGET_INT_BIT
2482 fprintf_unfiltered (file
,
2483 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2484 XSTRING (TARGET_INT_BIT
));
2485 fprintf_unfiltered (file
,
2486 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2489 #ifdef TARGET_LONG_BIT
2490 fprintf_unfiltered (file
,
2491 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2492 XSTRING (TARGET_LONG_BIT
));
2493 fprintf_unfiltered (file
,
2494 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2497 #ifdef TARGET_LONG_DOUBLE_BIT
2498 fprintf_unfiltered (file
,
2499 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2500 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2501 fprintf_unfiltered (file
,
2502 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2503 TARGET_LONG_DOUBLE_BIT
);
2505 #ifdef TARGET_LONG_DOUBLE_FORMAT
2506 fprintf_unfiltered (file
,
2507 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2508 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2509 fprintf_unfiltered (file
,
2510 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2511 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2513 #ifdef TARGET_LONG_LONG_BIT
2514 fprintf_unfiltered (file
,
2515 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2516 XSTRING (TARGET_LONG_LONG_BIT
));
2517 fprintf_unfiltered (file
,
2518 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2519 TARGET_LONG_LONG_BIT
);
2522 fprintf_unfiltered (file
,
2523 "gdbarch_dump: TARGET_OSABI # %s\n",
2524 XSTRING (TARGET_OSABI
));
2525 fprintf_unfiltered (file
,
2526 "gdbarch_dump: TARGET_OSABI = %ld\n",
2527 (long) TARGET_OSABI
);
2529 #ifdef TARGET_PRINT_INSN
2530 fprintf_unfiltered (file
,
2531 "gdbarch_dump: %s # %s\n",
2532 "TARGET_PRINT_INSN(vma, info)",
2533 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2535 fprintf_unfiltered (file
,
2536 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2537 (long) current_gdbarch
->print_insn
2538 /*TARGET_PRINT_INSN ()*/);
2540 #ifdef TARGET_PTR_BIT
2541 fprintf_unfiltered (file
,
2542 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2543 XSTRING (TARGET_PTR_BIT
));
2544 fprintf_unfiltered (file
,
2545 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2548 #ifdef TARGET_READ_PC_P
2549 fprintf_unfiltered (file
,
2550 "gdbarch_dump: %s # %s\n",
2551 "TARGET_READ_PC_P()",
2552 XSTRING (TARGET_READ_PC_P ()));
2553 fprintf_unfiltered (file
,
2554 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2555 TARGET_READ_PC_P ());
2557 #ifdef TARGET_READ_PC
2558 fprintf_unfiltered (file
,
2559 "gdbarch_dump: %s # %s\n",
2560 "TARGET_READ_PC(ptid)",
2561 XSTRING (TARGET_READ_PC (ptid
)));
2563 fprintf_unfiltered (file
,
2564 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2565 (long) current_gdbarch
->read_pc
2566 /*TARGET_READ_PC ()*/);
2568 #ifdef TARGET_READ_SP
2569 fprintf_unfiltered (file
,
2570 "gdbarch_dump: %s # %s\n",
2572 XSTRING (TARGET_READ_SP ()));
2574 fprintf_unfiltered (file
,
2575 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2576 (long) current_gdbarch
->read_sp
2577 /*TARGET_READ_SP ()*/);
2579 #ifdef TARGET_SHORT_BIT
2580 fprintf_unfiltered (file
,
2581 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2582 XSTRING (TARGET_SHORT_BIT
));
2583 fprintf_unfiltered (file
,
2584 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2587 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2589 /* Macro might contain `[{}]' when not multi-arch */
2590 fprintf_unfiltered (file
,
2591 "gdbarch_dump: %s # %s\n",
2592 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2593 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2596 fprintf_unfiltered (file
,
2597 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2598 (long) current_gdbarch
->virtual_frame_pointer
2599 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2601 #ifdef TARGET_WRITE_PC
2603 /* Macro might contain `[{}]' when not multi-arch */
2604 fprintf_unfiltered (file
,
2605 "gdbarch_dump: %s # %s\n",
2606 "TARGET_WRITE_PC(val, ptid)",
2607 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2610 fprintf_unfiltered (file
,
2611 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2612 (long) current_gdbarch
->write_pc
2613 /*TARGET_WRITE_PC ()*/);
2616 fprintf_unfiltered (file
,
2617 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2618 gdbarch_unwind_dummy_id_p (current_gdbarch
));
2620 fprintf_unfiltered (file
,
2621 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2622 (long) current_gdbarch
->unwind_dummy_id
);
2624 fprintf_unfiltered (file
,
2625 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2626 gdbarch_unwind_pc_p (current_gdbarch
));
2628 fprintf_unfiltered (file
,
2629 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2630 (long) current_gdbarch
->unwind_pc
);
2631 #ifdef USE_STRUCT_CONVENTION
2632 fprintf_unfiltered (file
,
2633 "gdbarch_dump: %s # %s\n",
2634 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2635 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2637 fprintf_unfiltered (file
,
2638 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2639 (long) current_gdbarch
->use_struct_convention
2640 /*USE_STRUCT_CONVENTION ()*/);
2642 #ifdef VALUE_TO_REGISTER
2644 /* Macro might contain `[{}]' when not multi-arch */
2645 fprintf_unfiltered (file
,
2646 "gdbarch_dump: %s # %s\n",
2647 "VALUE_TO_REGISTER(type, regnum, from, to)",
2648 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2651 fprintf_unfiltered (file
,
2652 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2653 (long) current_gdbarch
->value_to_register
2654 /*VALUE_TO_REGISTER ()*/);
2656 if (current_gdbarch
->dump_tdep
!= NULL
)
2657 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2660 struct gdbarch_tdep
*
2661 gdbarch_tdep (struct gdbarch
*gdbarch
)
2663 if (gdbarch_debug
>= 2)
2664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2665 return gdbarch
->tdep
;
2669 const struct bfd_arch_info
*
2670 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2672 gdb_assert (gdbarch
!= NULL
);
2673 if (gdbarch_debug
>= 2)
2674 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2675 return gdbarch
->bfd_arch_info
;
2679 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2681 gdb_assert (gdbarch
!= NULL
);
2682 if (gdbarch_debug
>= 2)
2683 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2684 return gdbarch
->byte_order
;
2688 gdbarch_osabi (struct gdbarch
*gdbarch
)
2690 gdb_assert (gdbarch
!= NULL
);
2691 if (gdbarch_debug
>= 2)
2692 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2693 return gdbarch
->osabi
;
2697 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2699 gdb_assert (gdbarch
!= NULL
);
2700 /* Skip verify of short_bit, invalid_p == 0 */
2701 if (gdbarch_debug
>= 2)
2702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2703 return gdbarch
->short_bit
;
2707 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2710 gdbarch
->short_bit
= short_bit
;
2714 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2716 gdb_assert (gdbarch
!= NULL
);
2717 /* Skip verify of int_bit, invalid_p == 0 */
2718 if (gdbarch_debug
>= 2)
2719 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2720 return gdbarch
->int_bit
;
2724 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2727 gdbarch
->int_bit
= int_bit
;
2731 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2733 gdb_assert (gdbarch
!= NULL
);
2734 /* Skip verify of long_bit, invalid_p == 0 */
2735 if (gdbarch_debug
>= 2)
2736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2737 return gdbarch
->long_bit
;
2741 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2744 gdbarch
->long_bit
= long_bit
;
2748 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2750 gdb_assert (gdbarch
!= NULL
);
2751 /* Skip verify of long_long_bit, invalid_p == 0 */
2752 if (gdbarch_debug
>= 2)
2753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2754 return gdbarch
->long_long_bit
;
2758 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2761 gdbarch
->long_long_bit
= long_long_bit
;
2765 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2767 gdb_assert (gdbarch
!= NULL
);
2768 /* Skip verify of float_bit, invalid_p == 0 */
2769 if (gdbarch_debug
>= 2)
2770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2771 return gdbarch
->float_bit
;
2775 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2778 gdbarch
->float_bit
= float_bit
;
2782 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2784 gdb_assert (gdbarch
!= NULL
);
2785 /* Skip verify of double_bit, invalid_p == 0 */
2786 if (gdbarch_debug
>= 2)
2787 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2788 return gdbarch
->double_bit
;
2792 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2795 gdbarch
->double_bit
= double_bit
;
2799 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2801 gdb_assert (gdbarch
!= NULL
);
2802 /* Skip verify of long_double_bit, invalid_p == 0 */
2803 if (gdbarch_debug
>= 2)
2804 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2805 return gdbarch
->long_double_bit
;
2809 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2810 int long_double_bit
)
2812 gdbarch
->long_double_bit
= long_double_bit
;
2816 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2818 gdb_assert (gdbarch
!= NULL
);
2819 /* Skip verify of ptr_bit, invalid_p == 0 */
2820 if (gdbarch_debug
>= 2)
2821 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2822 return gdbarch
->ptr_bit
;
2826 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2829 gdbarch
->ptr_bit
= ptr_bit
;
2833 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2835 gdb_assert (gdbarch
!= NULL
);
2836 if (gdbarch
->addr_bit
== 0)
2837 internal_error (__FILE__
, __LINE__
,
2838 "gdbarch: gdbarch_addr_bit invalid");
2839 if (gdbarch_debug
>= 2)
2840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2841 return gdbarch
->addr_bit
;
2845 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2848 gdbarch
->addr_bit
= addr_bit
;
2852 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2854 gdb_assert (gdbarch
!= NULL
);
2855 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2856 if (gdbarch_debug
>= 2)
2857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2858 return gdbarch
->bfd_vma_bit
;
2862 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2865 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2869 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2871 gdb_assert (gdbarch
!= NULL
);
2872 if (gdbarch
->char_signed
== -1)
2873 internal_error (__FILE__
, __LINE__
,
2874 "gdbarch: gdbarch_char_signed invalid");
2875 if (gdbarch_debug
>= 2)
2876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2877 return gdbarch
->char_signed
;
2881 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2884 gdbarch
->char_signed
= char_signed
;
2888 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
2890 gdb_assert (gdbarch
!= NULL
);
2891 return gdbarch
->read_pc
!= 0;
2895 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2897 gdb_assert (gdbarch
!= NULL
);
2898 if (gdbarch
->read_pc
== 0)
2899 internal_error (__FILE__
, __LINE__
,
2900 "gdbarch: gdbarch_read_pc invalid");
2901 if (gdbarch_debug
>= 2)
2902 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2903 return gdbarch
->read_pc (ptid
);
2907 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2908 gdbarch_read_pc_ftype read_pc
)
2910 gdbarch
->read_pc
= read_pc
;
2914 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2916 gdb_assert (gdbarch
!= NULL
);
2917 if (gdbarch
->write_pc
== 0)
2918 internal_error (__FILE__
, __LINE__
,
2919 "gdbarch: gdbarch_write_pc invalid");
2920 if (gdbarch_debug
>= 2)
2921 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2922 gdbarch
->write_pc (val
, ptid
);
2926 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2927 gdbarch_write_pc_ftype write_pc
)
2929 gdbarch
->write_pc
= write_pc
;
2933 gdbarch_deprecated_target_read_fp_p (struct gdbarch
*gdbarch
)
2935 gdb_assert (gdbarch
!= NULL
);
2936 return gdbarch
->deprecated_target_read_fp
!= 0;
2940 gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
)
2942 gdb_assert (gdbarch
!= NULL
);
2943 if (gdbarch
->deprecated_target_read_fp
== 0)
2944 internal_error (__FILE__
, __LINE__
,
2945 "gdbarch: gdbarch_deprecated_target_read_fp invalid");
2946 if (gdbarch_debug
>= 2)
2947 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_target_read_fp called\n");
2948 return gdbarch
->deprecated_target_read_fp ();
2952 set_gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
,
2953 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp
)
2955 gdbarch
->deprecated_target_read_fp
= deprecated_target_read_fp
;
2959 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2961 gdb_assert (gdbarch
!= NULL
);
2962 if (gdbarch
->read_sp
== 0)
2963 internal_error (__FILE__
, __LINE__
,
2964 "gdbarch: gdbarch_read_sp invalid");
2965 if (gdbarch_debug
>= 2)
2966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2967 return gdbarch
->read_sp ();
2971 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2972 gdbarch_read_sp_ftype read_sp
)
2974 gdbarch
->read_sp
= read_sp
;
2978 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch
*gdbarch
)
2980 gdb_assert (gdbarch
!= NULL
);
2981 return gdbarch
->deprecated_dummy_write_sp
!= 0;
2985 gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2987 gdb_assert (gdbarch
!= NULL
);
2988 if (gdbarch
->deprecated_dummy_write_sp
== 0)
2989 internal_error (__FILE__
, __LINE__
,
2990 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
2991 if (gdbarch_debug
>= 2)
2992 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_dummy_write_sp called\n");
2993 gdbarch
->deprecated_dummy_write_sp (val
);
2997 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
,
2998 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp
)
3000 gdbarch
->deprecated_dummy_write_sp
= deprecated_dummy_write_sp
;
3004 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
3006 gdb_assert (gdbarch
!= NULL
);
3007 if (gdbarch
->virtual_frame_pointer
== 0)
3008 internal_error (__FILE__
, __LINE__
,
3009 "gdbarch: gdbarch_virtual_frame_pointer invalid");
3010 if (gdbarch_debug
>= 2)
3011 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
3012 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
3016 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
3017 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
3019 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
3023 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
3025 gdb_assert (gdbarch
!= NULL
);
3026 return gdbarch
->pseudo_register_read
!= 0;
3030 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
3032 gdb_assert (gdbarch
!= NULL
);
3033 if (gdbarch
->pseudo_register_read
== 0)
3034 internal_error (__FILE__
, __LINE__
,
3035 "gdbarch: gdbarch_pseudo_register_read invalid");
3036 if (gdbarch_debug
>= 2)
3037 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
3038 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
3042 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
3043 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
3045 gdbarch
->pseudo_register_read
= pseudo_register_read
;
3049 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
3051 gdb_assert (gdbarch
!= NULL
);
3052 return gdbarch
->pseudo_register_write
!= 0;
3056 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
3058 gdb_assert (gdbarch
!= NULL
);
3059 if (gdbarch
->pseudo_register_write
== 0)
3060 internal_error (__FILE__
, __LINE__
,
3061 "gdbarch: gdbarch_pseudo_register_write invalid");
3062 if (gdbarch_debug
>= 2)
3063 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
3064 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
3068 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
3069 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
3071 gdbarch
->pseudo_register_write
= pseudo_register_write
;
3075 gdbarch_num_regs (struct gdbarch
*gdbarch
)
3077 gdb_assert (gdbarch
!= NULL
);
3078 if (gdbarch
->num_regs
== -1)
3079 internal_error (__FILE__
, __LINE__
,
3080 "gdbarch: gdbarch_num_regs invalid");
3081 if (gdbarch_debug
>= 2)
3082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
3083 return gdbarch
->num_regs
;
3087 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
3090 gdbarch
->num_regs
= num_regs
;
3094 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
3096 gdb_assert (gdbarch
!= NULL
);
3097 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3098 if (gdbarch_debug
>= 2)
3099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
3100 return gdbarch
->num_pseudo_regs
;
3104 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
3105 int num_pseudo_regs
)
3107 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
3111 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
3113 gdb_assert (gdbarch
!= NULL
);
3114 /* Skip verify of sp_regnum, invalid_p == 0 */
3115 if (gdbarch_debug
>= 2)
3116 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
3117 return gdbarch
->sp_regnum
;
3121 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
3124 gdbarch
->sp_regnum
= sp_regnum
;
3128 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
3130 gdb_assert (gdbarch
!= NULL
);
3131 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3132 if (gdbarch_debug
>= 2)
3133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
3134 return gdbarch
->deprecated_fp_regnum
;
3138 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
3139 int deprecated_fp_regnum
)
3141 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
3145 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
3147 gdb_assert (gdbarch
!= NULL
);
3148 /* Skip verify of pc_regnum, invalid_p == 0 */
3149 if (gdbarch_debug
>= 2)
3150 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
3151 return gdbarch
->pc_regnum
;
3155 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
3158 gdbarch
->pc_regnum
= pc_regnum
;
3162 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
3164 gdb_assert (gdbarch
!= NULL
);
3165 /* Skip verify of ps_regnum, invalid_p == 0 */
3166 if (gdbarch_debug
>= 2)
3167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
3168 return gdbarch
->ps_regnum
;
3172 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
3175 gdbarch
->ps_regnum
= ps_regnum
;
3179 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
3181 gdb_assert (gdbarch
!= NULL
);
3182 /* Skip verify of fp0_regnum, invalid_p == 0 */
3183 if (gdbarch_debug
>= 2)
3184 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
3185 return gdbarch
->fp0_regnum
;
3189 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
3192 gdbarch
->fp0_regnum
= fp0_regnum
;
3196 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
3198 gdb_assert (gdbarch
!= NULL
);
3199 /* Skip verify of npc_regnum, invalid_p == 0 */
3200 if (gdbarch_debug
>= 2)
3201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
3202 return gdbarch
->npc_regnum
;
3206 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
3209 gdbarch
->npc_regnum
= npc_regnum
;
3213 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
3215 gdb_assert (gdbarch
!= NULL
);
3216 if (gdbarch
->stab_reg_to_regnum
== 0)
3217 internal_error (__FILE__
, __LINE__
,
3218 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3219 if (gdbarch_debug
>= 2)
3220 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
3221 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
3225 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
3226 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
3228 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
3232 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
3234 gdb_assert (gdbarch
!= NULL
);
3235 if (gdbarch
->ecoff_reg_to_regnum
== 0)
3236 internal_error (__FILE__
, __LINE__
,
3237 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3238 if (gdbarch_debug
>= 2)
3239 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
3240 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
3244 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
3245 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
3247 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
3251 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
3253 gdb_assert (gdbarch
!= NULL
);
3254 if (gdbarch
->dwarf_reg_to_regnum
== 0)
3255 internal_error (__FILE__
, __LINE__
,
3256 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3257 if (gdbarch_debug
>= 2)
3258 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
3259 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
3263 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
3264 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
3266 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
3270 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
3272 gdb_assert (gdbarch
!= NULL
);
3273 if (gdbarch
->sdb_reg_to_regnum
== 0)
3274 internal_error (__FILE__
, __LINE__
,
3275 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3276 if (gdbarch_debug
>= 2)
3277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
3278 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
3282 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
3283 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
3285 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
3289 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
3291 gdb_assert (gdbarch
!= NULL
);
3292 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
3293 internal_error (__FILE__
, __LINE__
,
3294 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3295 if (gdbarch_debug
>= 2)
3296 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
3297 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
3301 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
3302 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
3304 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
3308 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
3310 gdb_assert (gdbarch
!= NULL
);
3311 if (gdbarch
->register_name
== 0)
3312 internal_error (__FILE__
, __LINE__
,
3313 "gdbarch: gdbarch_register_name invalid");
3314 if (gdbarch_debug
>= 2)
3315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
3316 return gdbarch
->register_name (regnr
);
3320 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
3321 gdbarch_register_name_ftype register_name
)
3323 gdbarch
->register_name
= register_name
;
3327 gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
)
3329 gdb_assert (gdbarch
!= NULL
);
3330 if (gdbarch_debug
>= 2)
3331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_size called\n");
3332 return gdbarch
->deprecated_register_size
;
3336 set_gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
,
3337 int deprecated_register_size
)
3339 gdbarch
->deprecated_register_size
= deprecated_register_size
;
3343 gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
)
3345 gdb_assert (gdbarch
!= NULL
);
3346 if (gdbarch_debug
>= 2)
3347 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_bytes called\n");
3348 return gdbarch
->deprecated_register_bytes
;
3352 set_gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
,
3353 int deprecated_register_bytes
)
3355 gdbarch
->deprecated_register_bytes
= deprecated_register_bytes
;
3359 gdbarch_register_byte_p (struct gdbarch
*gdbarch
)
3361 gdb_assert (gdbarch
!= NULL
);
3362 return gdbarch
->register_byte
!= generic_register_byte
;
3366 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3368 gdb_assert (gdbarch
!= NULL
);
3369 if (gdbarch
->register_byte
== 0)
3370 internal_error (__FILE__
, __LINE__
,
3371 "gdbarch: gdbarch_register_byte invalid");
3372 /* Ignore predicate (gdbarch->register_byte != generic_register_byte). */
3373 if (gdbarch_debug
>= 2)
3374 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
3375 return gdbarch
->register_byte (reg_nr
);
3379 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
3380 gdbarch_register_byte_ftype register_byte
)
3382 gdbarch
->register_byte
= register_byte
;
3386 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3388 gdb_assert (gdbarch
!= NULL
);
3389 if (gdbarch
->register_raw_size
== 0)
3390 internal_error (__FILE__
, __LINE__
,
3391 "gdbarch: gdbarch_register_raw_size invalid");
3392 if (gdbarch_debug
>= 2)
3393 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
3394 return gdbarch
->register_raw_size (reg_nr
);
3398 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
3399 gdbarch_register_raw_size_ftype register_raw_size
)
3401 gdbarch
->register_raw_size
= register_raw_size
;
3405 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
3407 gdb_assert (gdbarch
!= NULL
);
3408 return gdbarch
->deprecated_max_register_raw_size
!= 0;
3412 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
3414 gdb_assert (gdbarch
!= NULL
);
3415 if (gdbarch_debug
>= 2)
3416 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
3417 return gdbarch
->deprecated_max_register_raw_size
;
3421 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
3422 int deprecated_max_register_raw_size
)
3424 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
3428 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3430 gdb_assert (gdbarch
!= NULL
);
3431 if (gdbarch
->register_virtual_size
== 0)
3432 internal_error (__FILE__
, __LINE__
,
3433 "gdbarch: gdbarch_register_virtual_size invalid");
3434 if (gdbarch_debug
>= 2)
3435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3436 return gdbarch
->register_virtual_size (reg_nr
);
3440 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3441 gdbarch_register_virtual_size_ftype register_virtual_size
)
3443 gdbarch
->register_virtual_size
= register_virtual_size
;
3447 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
3449 gdb_assert (gdbarch
!= NULL
);
3450 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
3454 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
3456 gdb_assert (gdbarch
!= NULL
);
3457 if (gdbarch_debug
>= 2)
3458 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
3459 return gdbarch
->deprecated_max_register_virtual_size
;
3463 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
3464 int deprecated_max_register_virtual_size
)
3466 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
3470 gdbarch_register_virtual_type_p (struct gdbarch
*gdbarch
)
3472 gdb_assert (gdbarch
!= NULL
);
3473 return gdbarch
->register_virtual_type
!= 0;
3477 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3479 gdb_assert (gdbarch
!= NULL
);
3480 if (gdbarch
->register_virtual_type
== 0)
3481 internal_error (__FILE__
, __LINE__
,
3482 "gdbarch: gdbarch_register_virtual_type invalid");
3483 if (gdbarch_debug
>= 2)
3484 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3485 return gdbarch
->register_virtual_type (reg_nr
);
3489 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3490 gdbarch_register_virtual_type_ftype register_virtual_type
)
3492 gdbarch
->register_virtual_type
= register_virtual_type
;
3496 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
3498 gdb_assert (gdbarch
!= NULL
);
3499 return gdbarch
->register_type
!= 0;
3503 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
3505 gdb_assert (gdbarch
!= NULL
);
3506 if (gdbarch
->register_type
== 0)
3507 internal_error (__FILE__
, __LINE__
,
3508 "gdbarch: gdbarch_register_type invalid");
3509 if (gdbarch_debug
>= 2)
3510 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
3511 return gdbarch
->register_type (gdbarch
, reg_nr
);
3515 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
3516 gdbarch_register_type_ftype register_type
)
3518 gdbarch
->register_type
= register_type
;
3522 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3524 gdb_assert (gdbarch
!= NULL
);
3525 return gdbarch
->deprecated_do_registers_info
!= 0;
3529 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3531 gdb_assert (gdbarch
!= NULL
);
3532 if (gdbarch
->deprecated_do_registers_info
== 0)
3533 internal_error (__FILE__
, __LINE__
,
3534 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3535 if (gdbarch_debug
>= 2)
3536 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3537 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3541 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3542 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3544 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3548 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3550 gdb_assert (gdbarch
!= NULL
);
3551 if (gdbarch
->print_registers_info
== 0)
3552 internal_error (__FILE__
, __LINE__
,
3553 "gdbarch: gdbarch_print_registers_info invalid");
3554 if (gdbarch_debug
>= 2)
3555 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3556 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3560 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3561 gdbarch_print_registers_info_ftype print_registers_info
)
3563 gdbarch
->print_registers_info
= print_registers_info
;
3567 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3569 gdb_assert (gdbarch
!= NULL
);
3570 return gdbarch
->print_float_info
!= 0;
3574 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3576 gdb_assert (gdbarch
!= NULL
);
3577 if (gdbarch
->print_float_info
== 0)
3578 internal_error (__FILE__
, __LINE__
,
3579 "gdbarch: gdbarch_print_float_info invalid");
3580 if (gdbarch_debug
>= 2)
3581 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3582 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3586 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3587 gdbarch_print_float_info_ftype print_float_info
)
3589 gdbarch
->print_float_info
= print_float_info
;
3593 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3595 gdb_assert (gdbarch
!= NULL
);
3596 return gdbarch
->print_vector_info
!= 0;
3600 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3602 gdb_assert (gdbarch
!= NULL
);
3603 if (gdbarch
->print_vector_info
== 0)
3604 internal_error (__FILE__
, __LINE__
,
3605 "gdbarch: gdbarch_print_vector_info invalid");
3606 if (gdbarch_debug
>= 2)
3607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3608 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3612 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3613 gdbarch_print_vector_info_ftype print_vector_info
)
3615 gdbarch
->print_vector_info
= print_vector_info
;
3619 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3621 gdb_assert (gdbarch
!= NULL
);
3622 if (gdbarch
->register_sim_regno
== 0)
3623 internal_error (__FILE__
, __LINE__
,
3624 "gdbarch: gdbarch_register_sim_regno invalid");
3625 if (gdbarch_debug
>= 2)
3626 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3627 return gdbarch
->register_sim_regno (reg_nr
);
3631 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3632 gdbarch_register_sim_regno_ftype register_sim_regno
)
3634 gdbarch
->register_sim_regno
= register_sim_regno
;
3638 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3640 gdb_assert (gdbarch
!= NULL
);
3641 return gdbarch
->register_bytes_ok
!= 0;
3645 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3647 gdb_assert (gdbarch
!= NULL
);
3648 if (gdbarch
->register_bytes_ok
== 0)
3649 internal_error (__FILE__
, __LINE__
,
3650 "gdbarch: gdbarch_register_bytes_ok invalid");
3651 if (gdbarch_debug
>= 2)
3652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3653 return gdbarch
->register_bytes_ok (nr_bytes
);
3657 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3658 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3660 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3664 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3666 gdb_assert (gdbarch
!= NULL
);
3667 if (gdbarch
->cannot_fetch_register
== 0)
3668 internal_error (__FILE__
, __LINE__
,
3669 "gdbarch: gdbarch_cannot_fetch_register invalid");
3670 if (gdbarch_debug
>= 2)
3671 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3672 return gdbarch
->cannot_fetch_register (regnum
);
3676 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3677 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3679 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3683 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3685 gdb_assert (gdbarch
!= NULL
);
3686 if (gdbarch
->cannot_store_register
== 0)
3687 internal_error (__FILE__
, __LINE__
,
3688 "gdbarch: gdbarch_cannot_store_register invalid");
3689 if (gdbarch_debug
>= 2)
3690 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3691 return gdbarch
->cannot_store_register (regnum
);
3695 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3696 gdbarch_cannot_store_register_ftype cannot_store_register
)
3698 gdbarch
->cannot_store_register
= cannot_store_register
;
3702 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3704 gdb_assert (gdbarch
!= NULL
);
3705 return gdbarch
->get_longjmp_target
!= 0;
3709 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3711 gdb_assert (gdbarch
!= NULL
);
3712 if (gdbarch
->get_longjmp_target
== 0)
3713 internal_error (__FILE__
, __LINE__
,
3714 "gdbarch: gdbarch_get_longjmp_target invalid");
3715 if (gdbarch_debug
>= 2)
3716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3717 return gdbarch
->get_longjmp_target (pc
);
3721 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3722 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3724 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3728 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3730 gdb_assert (gdbarch
!= NULL
);
3731 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3732 if (gdbarch_debug
>= 2)
3733 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3734 return gdbarch
->deprecated_use_generic_dummy_frames
;
3738 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3739 int deprecated_use_generic_dummy_frames
)
3741 gdbarch
->deprecated_use_generic_dummy_frames
= deprecated_use_generic_dummy_frames
;
3745 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3747 gdb_assert (gdbarch
!= NULL
);
3748 /* Skip verify of call_dummy_location, invalid_p == 0 */
3749 if (gdbarch_debug
>= 2)
3750 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3751 return gdbarch
->call_dummy_location
;
3755 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3756 int call_dummy_location
)
3758 gdbarch
->call_dummy_location
= call_dummy_location
;
3762 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3764 gdb_assert (gdbarch
!= NULL
);
3765 if (gdbarch
->call_dummy_address
== 0)
3766 internal_error (__FILE__
, __LINE__
,
3767 "gdbarch: gdbarch_call_dummy_address invalid");
3768 if (gdbarch_debug
>= 2)
3769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3770 return gdbarch
->call_dummy_address ();
3774 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3775 gdbarch_call_dummy_address_ftype call_dummy_address
)
3777 gdbarch
->call_dummy_address
= call_dummy_address
;
3781 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3783 gdb_assert (gdbarch
!= NULL
);
3784 if (gdbarch_debug
>= 2)
3785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_start_offset called\n");
3786 return gdbarch
->deprecated_call_dummy_start_offset
;
3790 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3791 CORE_ADDR deprecated_call_dummy_start_offset
)
3793 gdbarch
->deprecated_call_dummy_start_offset
= deprecated_call_dummy_start_offset
;
3797 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3799 gdb_assert (gdbarch
!= NULL
);
3800 if (gdbarch_debug
>= 2)
3801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3802 return gdbarch
->deprecated_call_dummy_breakpoint_offset
;
3806 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3807 CORE_ADDR deprecated_call_dummy_breakpoint_offset
)
3809 gdbarch
->deprecated_call_dummy_breakpoint_offset
= deprecated_call_dummy_breakpoint_offset
;
3813 gdbarch_deprecated_call_dummy_length (struct gdbarch
*gdbarch
)
3815 gdb_assert (gdbarch
!= NULL
);
3816 if (gdbarch_debug
>= 2)
3817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_length called\n");
3818 return gdbarch
->deprecated_call_dummy_length
;
3822 set_gdbarch_deprecated_call_dummy_length (struct gdbarch
*gdbarch
,
3823 int deprecated_call_dummy_length
)
3825 gdbarch
->deprecated_call_dummy_length
= deprecated_call_dummy_length
;
3829 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3831 gdb_assert (gdbarch
!= NULL
);
3832 return gdbarch
->deprecated_pc_in_call_dummy
!= generic_pc_in_call_dummy
;
3836 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3838 gdb_assert (gdbarch
!= NULL
);
3839 if (gdbarch
->deprecated_pc_in_call_dummy
== 0)
3840 internal_error (__FILE__
, __LINE__
,
3841 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3842 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3843 if (gdbarch_debug
>= 2)
3844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3845 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3849 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3850 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3852 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3856 gdbarch_deprecated_call_dummy_words (struct gdbarch
*gdbarch
)
3858 gdb_assert (gdbarch
!= NULL
);
3859 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3860 if (gdbarch_debug
>= 2)
3861 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_words called\n");
3862 return gdbarch
->deprecated_call_dummy_words
;
3866 set_gdbarch_deprecated_call_dummy_words (struct gdbarch
*gdbarch
,
3867 LONGEST
* deprecated_call_dummy_words
)
3869 gdbarch
->deprecated_call_dummy_words
= deprecated_call_dummy_words
;
3873 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3875 gdb_assert (gdbarch
!= NULL
);
3876 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3877 if (gdbarch_debug
>= 2)
3878 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3879 return gdbarch
->deprecated_sizeof_call_dummy_words
;
3883 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3884 int deprecated_sizeof_call_dummy_words
)
3886 gdbarch
->deprecated_sizeof_call_dummy_words
= deprecated_sizeof_call_dummy_words
;
3890 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3892 gdb_assert (gdbarch
!= NULL
);
3893 return gdbarch
->deprecated_call_dummy_stack_adjust
!= 0;
3897 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3899 gdb_assert (gdbarch
!= NULL
);
3900 if (gdbarch_debug
>= 2)
3901 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3902 return gdbarch
->deprecated_call_dummy_stack_adjust
;
3906 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3907 int deprecated_call_dummy_stack_adjust
)
3909 gdbarch
->deprecated_call_dummy_stack_adjust
= deprecated_call_dummy_stack_adjust
;
3913 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch
*gdbarch
)
3915 gdb_assert (gdbarch
!= NULL
);
3916 return gdbarch
->deprecated_fix_call_dummy
!= 0;
3920 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
)
3922 gdb_assert (gdbarch
!= NULL
);
3923 if (gdbarch
->deprecated_fix_call_dummy
== 0)
3924 internal_error (__FILE__
, __LINE__
,
3925 "gdbarch: gdbarch_deprecated_fix_call_dummy invalid");
3926 if (gdbarch_debug
>= 2)
3927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fix_call_dummy called\n");
3928 gdbarch
->deprecated_fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3932 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch
*gdbarch
,
3933 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy
)
3935 gdbarch
->deprecated_fix_call_dummy
= deprecated_fix_call_dummy
;
3939 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
3941 gdb_assert (gdbarch
!= NULL
);
3942 return gdbarch
->push_dummy_code
!= 0;
3946 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
)
3948 gdb_assert (gdbarch
!= NULL
);
3949 if (gdbarch
->push_dummy_code
== 0)
3950 internal_error (__FILE__
, __LINE__
,
3951 "gdbarch: gdbarch_push_dummy_code invalid");
3952 if (gdbarch_debug
>= 2)
3953 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
3954 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, using_gcc
, args
, nargs
, value_type
, real_pc
, bp_addr
);
3958 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
3959 gdbarch_push_dummy_code_ftype push_dummy_code
)
3961 gdbarch
->push_dummy_code
= push_dummy_code
;
3965 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch
*gdbarch
)
3967 gdb_assert (gdbarch
!= NULL
);
3968 return gdbarch
->deprecated_init_frame_pc_first
!= 0;
3972 gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3974 gdb_assert (gdbarch
!= NULL
);
3975 if (gdbarch
->deprecated_init_frame_pc_first
== 0)
3976 internal_error (__FILE__
, __LINE__
,
3977 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3978 if (gdbarch_debug
>= 2)
3979 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc_first called\n");
3980 return gdbarch
->deprecated_init_frame_pc_first (fromleaf
, prev
);
3984 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
,
3985 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first
)
3987 gdbarch
->deprecated_init_frame_pc_first
= deprecated_init_frame_pc_first
;
3991 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3993 gdb_assert (gdbarch
!= NULL
);
3994 return gdbarch
->deprecated_init_frame_pc
!= 0;
3998 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
4000 gdb_assert (gdbarch
!= NULL
);
4001 if (gdbarch
->deprecated_init_frame_pc
== 0)
4002 internal_error (__FILE__
, __LINE__
,
4003 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
4004 if (gdbarch_debug
>= 2)
4005 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
4006 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
4010 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
4011 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
4013 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
4017 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
4019 gdb_assert (gdbarch
!= NULL
);
4020 if (gdbarch_debug
>= 2)
4021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
4022 return gdbarch
->believe_pcc_promotion
;
4026 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
4027 int believe_pcc_promotion
)
4029 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
4033 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
4035 gdb_assert (gdbarch
!= NULL
);
4036 if (gdbarch_debug
>= 2)
4037 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
4038 return gdbarch
->believe_pcc_promotion_type
;
4042 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
4043 int believe_pcc_promotion_type
)
4045 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
4049 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
4051 gdb_assert (gdbarch
!= NULL
);
4052 return gdbarch
->deprecated_get_saved_register
!= 0;
4056 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
)
4058 gdb_assert (gdbarch
!= NULL
);
4059 if (gdbarch
->deprecated_get_saved_register
== 0)
4060 internal_error (__FILE__
, __LINE__
,
4061 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
4062 if (gdbarch_debug
>= 2)
4063 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
4064 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
4068 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
4069 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
4071 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
4075 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
4077 gdb_assert (gdbarch
!= NULL
);
4078 if (gdbarch
->register_convertible
== 0)
4079 internal_error (__FILE__
, __LINE__
,
4080 "gdbarch: gdbarch_register_convertible invalid");
4081 if (gdbarch_debug
>= 2)
4082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
4083 return gdbarch
->register_convertible (nr
);
4087 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
4088 gdbarch_register_convertible_ftype register_convertible
)
4090 gdbarch
->register_convertible
= register_convertible
;
4094 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4096 gdb_assert (gdbarch
!= NULL
);
4097 if (gdbarch
->register_convert_to_virtual
== 0)
4098 internal_error (__FILE__
, __LINE__
,
4099 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4100 if (gdbarch_debug
>= 2)
4101 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
4102 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
4106 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
4107 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
4109 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
4113 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4115 gdb_assert (gdbarch
!= NULL
);
4116 if (gdbarch
->register_convert_to_raw
== 0)
4117 internal_error (__FILE__
, __LINE__
,
4118 "gdbarch: gdbarch_register_convert_to_raw invalid");
4119 if (gdbarch_debug
>= 2)
4120 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
4121 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
4125 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
4126 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
4128 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
4132 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
4134 gdb_assert (gdbarch
!= NULL
);
4135 if (gdbarch
->convert_register_p
== 0)
4136 internal_error (__FILE__
, __LINE__
,
4137 "gdbarch: gdbarch_convert_register_p invalid");
4138 if (gdbarch_debug
>= 2)
4139 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
4140 return gdbarch
->convert_register_p (regnum
);
4144 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
4145 gdbarch_convert_register_p_ftype convert_register_p
)
4147 gdbarch
->convert_register_p
= convert_register_p
;
4151 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4153 gdb_assert (gdbarch
!= NULL
);
4154 if (gdbarch
->register_to_value
== 0)
4155 internal_error (__FILE__
, __LINE__
,
4156 "gdbarch: gdbarch_register_to_value invalid");
4157 if (gdbarch_debug
>= 2)
4158 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
4159 gdbarch
->register_to_value (regnum
, type
, from
, to
);
4163 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
4164 gdbarch_register_to_value_ftype register_to_value
)
4166 gdbarch
->register_to_value
= register_to_value
;
4170 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4172 gdb_assert (gdbarch
!= NULL
);
4173 if (gdbarch
->value_to_register
== 0)
4174 internal_error (__FILE__
, __LINE__
,
4175 "gdbarch: gdbarch_value_to_register invalid");
4176 if (gdbarch_debug
>= 2)
4177 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
4178 gdbarch
->value_to_register (type
, regnum
, from
, to
);
4182 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
4183 gdbarch_value_to_register_ftype value_to_register
)
4185 gdbarch
->value_to_register
= value_to_register
;
4189 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
4191 gdb_assert (gdbarch
!= NULL
);
4192 if (gdbarch
->pointer_to_address
== 0)
4193 internal_error (__FILE__
, __LINE__
,
4194 "gdbarch: gdbarch_pointer_to_address invalid");
4195 if (gdbarch_debug
>= 2)
4196 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
4197 return gdbarch
->pointer_to_address (type
, buf
);
4201 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
4202 gdbarch_pointer_to_address_ftype pointer_to_address
)
4204 gdbarch
->pointer_to_address
= pointer_to_address
;
4208 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
4210 gdb_assert (gdbarch
!= NULL
);
4211 if (gdbarch
->address_to_pointer
== 0)
4212 internal_error (__FILE__
, __LINE__
,
4213 "gdbarch: gdbarch_address_to_pointer invalid");
4214 if (gdbarch_debug
>= 2)
4215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
4216 gdbarch
->address_to_pointer (type
, buf
, addr
);
4220 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
4221 gdbarch_address_to_pointer_ftype address_to_pointer
)
4223 gdbarch
->address_to_pointer
= address_to_pointer
;
4227 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
4229 gdb_assert (gdbarch
!= NULL
);
4230 return gdbarch
->integer_to_address
!= 0;
4234 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
4236 gdb_assert (gdbarch
!= NULL
);
4237 if (gdbarch
->integer_to_address
== 0)
4238 internal_error (__FILE__
, __LINE__
,
4239 "gdbarch: gdbarch_integer_to_address invalid");
4240 if (gdbarch_debug
>= 2)
4241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
4242 return gdbarch
->integer_to_address (type
, buf
);
4246 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
4247 gdbarch_integer_to_address_ftype integer_to_address
)
4249 gdbarch
->integer_to_address
= integer_to_address
;
4253 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
4255 gdb_assert (gdbarch
!= NULL
);
4256 if (gdbarch
->return_value_on_stack
== 0)
4257 internal_error (__FILE__
, __LINE__
,
4258 "gdbarch: gdbarch_return_value_on_stack invalid");
4259 if (gdbarch_debug
>= 2)
4260 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
4261 return gdbarch
->return_value_on_stack (type
);
4265 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
4266 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
4268 gdbarch
->return_value_on_stack
= return_value_on_stack
;
4272 gdbarch_deprecated_push_arguments_p (struct gdbarch
*gdbarch
)
4274 gdb_assert (gdbarch
!= NULL
);
4275 return gdbarch
->deprecated_push_arguments
!= 0;
4279 gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
4281 gdb_assert (gdbarch
!= NULL
);
4282 if (gdbarch
->deprecated_push_arguments
== 0)
4283 internal_error (__FILE__
, __LINE__
,
4284 "gdbarch: gdbarch_deprecated_push_arguments invalid");
4285 if (gdbarch_debug
>= 2)
4286 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_arguments called\n");
4287 return gdbarch
->deprecated_push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
4291 set_gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
,
4292 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments
)
4294 gdbarch
->deprecated_push_arguments
= deprecated_push_arguments
;
4298 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
4300 gdb_assert (gdbarch
!= NULL
);
4301 return gdbarch
->push_dummy_call
!= 0;
4305 gdbarch_push_dummy_call (struct gdbarch
*gdbarch
, CORE_ADDR func_addr
, struct regcache
*regcache
, CORE_ADDR bp_addr
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
4307 gdb_assert (gdbarch
!= NULL
);
4308 if (gdbarch
->push_dummy_call
== 0)
4309 internal_error (__FILE__
, __LINE__
,
4310 "gdbarch: gdbarch_push_dummy_call invalid");
4311 if (gdbarch_debug
>= 2)
4312 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
4313 return gdbarch
->push_dummy_call (gdbarch
, func_addr
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
4317 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
4318 gdbarch_push_dummy_call_ftype push_dummy_call
)
4320 gdbarch
->push_dummy_call
= push_dummy_call
;
4324 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch
*gdbarch
)
4326 gdb_assert (gdbarch
!= NULL
);
4327 return gdbarch
->deprecated_push_dummy_frame
!= 0;
4331 gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
)
4333 gdb_assert (gdbarch
!= NULL
);
4334 if (gdbarch
->deprecated_push_dummy_frame
== 0)
4335 internal_error (__FILE__
, __LINE__
,
4336 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4337 if (gdbarch_debug
>= 2)
4338 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_dummy_frame called\n");
4339 gdbarch
->deprecated_push_dummy_frame ();
4343 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
,
4344 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame
)
4346 gdbarch
->deprecated_push_dummy_frame
= deprecated_push_dummy_frame
;
4350 gdbarch_deprecated_push_return_address_p (struct gdbarch
*gdbarch
)
4352 gdb_assert (gdbarch
!= NULL
);
4353 return gdbarch
->deprecated_push_return_address
!= 0;
4357 gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
4359 gdb_assert (gdbarch
!= NULL
);
4360 if (gdbarch
->deprecated_push_return_address
== 0)
4361 internal_error (__FILE__
, __LINE__
,
4362 "gdbarch: gdbarch_deprecated_push_return_address invalid");
4363 if (gdbarch_debug
>= 2)
4364 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_return_address called\n");
4365 return gdbarch
->deprecated_push_return_address (pc
, sp
);
4369 set_gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
,
4370 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address
)
4372 gdbarch
->deprecated_push_return_address
= deprecated_push_return_address
;
4376 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
4378 gdb_assert (gdbarch
!= NULL
);
4379 return gdbarch
->deprecated_pop_frame
!= 0;
4383 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
4385 gdb_assert (gdbarch
!= NULL
);
4386 if (gdbarch
->deprecated_pop_frame
== 0)
4387 internal_error (__FILE__
, __LINE__
,
4388 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4389 if (gdbarch_debug
>= 2)
4390 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
4391 gdbarch
->deprecated_pop_frame ();
4395 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
4396 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
4398 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
4402 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
4404 gdb_assert (gdbarch
!= NULL
);
4405 return gdbarch
->deprecated_store_struct_return
!= 0;
4409 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
4411 gdb_assert (gdbarch
!= NULL
);
4412 if (gdbarch
->deprecated_store_struct_return
== 0)
4413 internal_error (__FILE__
, __LINE__
,
4414 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4415 if (gdbarch_debug
>= 2)
4416 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
4417 gdbarch
->deprecated_store_struct_return (addr
, sp
);
4421 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
4422 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
4424 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
4428 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4430 gdb_assert (gdbarch
!= NULL
);
4431 if (gdbarch
->extract_return_value
== 0)
4432 internal_error (__FILE__
, __LINE__
,
4433 "gdbarch: gdbarch_extract_return_value invalid");
4434 if (gdbarch_debug
>= 2)
4435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4436 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4440 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4441 gdbarch_extract_return_value_ftype extract_return_value
)
4443 gdbarch
->extract_return_value
= extract_return_value
;
4447 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4449 gdb_assert (gdbarch
!= NULL
);
4450 if (gdbarch
->store_return_value
== 0)
4451 internal_error (__FILE__
, __LINE__
,
4452 "gdbarch: gdbarch_store_return_value invalid");
4453 if (gdbarch_debug
>= 2)
4454 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4455 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4459 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4460 gdbarch_store_return_value_ftype store_return_value
)
4462 gdbarch
->store_return_value
= store_return_value
;
4466 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4468 gdb_assert (gdbarch
!= NULL
);
4469 if (gdbarch
->deprecated_extract_return_value
== 0)
4470 internal_error (__FILE__
, __LINE__
,
4471 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4472 if (gdbarch_debug
>= 2)
4473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4474 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4478 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4479 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4481 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4485 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4487 gdb_assert (gdbarch
!= NULL
);
4488 if (gdbarch
->deprecated_store_return_value
== 0)
4489 internal_error (__FILE__
, __LINE__
,
4490 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4491 if (gdbarch_debug
>= 2)
4492 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4493 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4497 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4498 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4500 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4504 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4506 gdb_assert (gdbarch
!= NULL
);
4507 return gdbarch
->extract_struct_value_address
!= 0;
4511 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4513 gdb_assert (gdbarch
!= NULL
);
4514 if (gdbarch
->extract_struct_value_address
== 0)
4515 internal_error (__FILE__
, __LINE__
,
4516 "gdbarch: gdbarch_extract_struct_value_address invalid");
4517 if (gdbarch_debug
>= 2)
4518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4519 return gdbarch
->extract_struct_value_address (regcache
);
4523 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4524 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4526 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4530 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4532 gdb_assert (gdbarch
!= NULL
);
4533 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4537 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4539 gdb_assert (gdbarch
!= NULL
);
4540 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4541 internal_error (__FILE__
, __LINE__
,
4542 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4543 if (gdbarch_debug
>= 2)
4544 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4545 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4549 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4550 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4552 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4556 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4558 gdb_assert (gdbarch
!= NULL
);
4559 if (gdbarch
->use_struct_convention
== 0)
4560 internal_error (__FILE__
, __LINE__
,
4561 "gdbarch: gdbarch_use_struct_convention invalid");
4562 if (gdbarch_debug
>= 2)
4563 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4564 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4568 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4569 gdbarch_use_struct_convention_ftype use_struct_convention
)
4571 gdbarch
->use_struct_convention
= use_struct_convention
;
4575 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
4577 gdb_assert (gdbarch
!= NULL
);
4578 return gdbarch
->deprecated_frame_init_saved_regs
!= 0;
4582 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4584 gdb_assert (gdbarch
!= NULL
);
4585 if (gdbarch
->deprecated_frame_init_saved_regs
== 0)
4586 internal_error (__FILE__
, __LINE__
,
4587 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4588 if (gdbarch_debug
>= 2)
4589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
4590 gdbarch
->deprecated_frame_init_saved_regs (frame
);
4594 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4595 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
4597 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
4601 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4603 gdb_assert (gdbarch
!= NULL
);
4604 return gdbarch
->deprecated_init_extra_frame_info
!= 0;
4608 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4610 gdb_assert (gdbarch
!= NULL
);
4611 if (gdbarch
->deprecated_init_extra_frame_info
== 0)
4612 internal_error (__FILE__
, __LINE__
,
4613 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4614 if (gdbarch_debug
>= 2)
4615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
4616 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
4620 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
4621 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
4623 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
4627 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4629 gdb_assert (gdbarch
!= NULL
);
4630 if (gdbarch
->skip_prologue
== 0)
4631 internal_error (__FILE__
, __LINE__
,
4632 "gdbarch: gdbarch_skip_prologue invalid");
4633 if (gdbarch_debug
>= 2)
4634 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4635 return gdbarch
->skip_prologue (ip
);
4639 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4640 gdbarch_skip_prologue_ftype skip_prologue
)
4642 gdbarch
->skip_prologue
= skip_prologue
;
4646 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4648 gdb_assert (gdbarch
!= NULL
);
4649 if (gdbarch
->prologue_frameless_p
== 0)
4650 internal_error (__FILE__
, __LINE__
,
4651 "gdbarch: gdbarch_prologue_frameless_p invalid");
4652 if (gdbarch_debug
>= 2)
4653 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4654 return gdbarch
->prologue_frameless_p (ip
);
4658 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4659 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4661 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4665 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4667 gdb_assert (gdbarch
!= NULL
);
4668 if (gdbarch
->inner_than
== 0)
4669 internal_error (__FILE__
, __LINE__
,
4670 "gdbarch: gdbarch_inner_than invalid");
4671 if (gdbarch_debug
>= 2)
4672 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4673 return gdbarch
->inner_than (lhs
, rhs
);
4677 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4678 gdbarch_inner_than_ftype inner_than
)
4680 gdbarch
->inner_than
= inner_than
;
4683 const unsigned char *
4684 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4686 gdb_assert (gdbarch
!= NULL
);
4687 if (gdbarch
->breakpoint_from_pc
== 0)
4688 internal_error (__FILE__
, __LINE__
,
4689 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4690 if (gdbarch_debug
>= 2)
4691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4692 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4696 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4697 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4699 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4703 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4705 gdb_assert (gdbarch
!= NULL
);
4706 if (gdbarch
->memory_insert_breakpoint
== 0)
4707 internal_error (__FILE__
, __LINE__
,
4708 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4709 if (gdbarch_debug
>= 2)
4710 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4711 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4715 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4716 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4718 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4722 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4724 gdb_assert (gdbarch
!= NULL
);
4725 if (gdbarch
->memory_remove_breakpoint
== 0)
4726 internal_error (__FILE__
, __LINE__
,
4727 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4728 if (gdbarch_debug
>= 2)
4729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4730 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4734 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4735 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4737 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4741 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4743 gdb_assert (gdbarch
!= NULL
);
4744 if (gdbarch
->decr_pc_after_break
== -1)
4745 internal_error (__FILE__
, __LINE__
,
4746 "gdbarch: gdbarch_decr_pc_after_break invalid");
4747 if (gdbarch_debug
>= 2)
4748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4749 return gdbarch
->decr_pc_after_break
;
4753 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4754 CORE_ADDR decr_pc_after_break
)
4756 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4760 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4762 gdb_assert (gdbarch
!= NULL
);
4763 if (gdbarch
->prepare_to_proceed
== 0)
4764 internal_error (__FILE__
, __LINE__
,
4765 "gdbarch: gdbarch_prepare_to_proceed invalid");
4766 if (gdbarch_debug
>= 2)
4767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4768 return gdbarch
->prepare_to_proceed (select_it
);
4772 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4773 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4775 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4779 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4781 gdb_assert (gdbarch
!= NULL
);
4782 if (gdbarch
->function_start_offset
== -1)
4783 internal_error (__FILE__
, __LINE__
,
4784 "gdbarch: gdbarch_function_start_offset invalid");
4785 if (gdbarch_debug
>= 2)
4786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4787 return gdbarch
->function_start_offset
;
4791 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4792 CORE_ADDR function_start_offset
)
4794 gdbarch
->function_start_offset
= function_start_offset
;
4798 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
)
4800 gdb_assert (gdbarch
!= NULL
);
4801 if (gdbarch
->remote_translate_xfer_address
== 0)
4802 internal_error (__FILE__
, __LINE__
,
4803 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4804 if (gdbarch_debug
>= 2)
4805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4806 gdbarch
->remote_translate_xfer_address (gdbarch
, regcache
, gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4810 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4811 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4813 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4817 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4819 gdb_assert (gdbarch
!= NULL
);
4820 if (gdbarch
->frame_args_skip
== -1)
4821 internal_error (__FILE__
, __LINE__
,
4822 "gdbarch: gdbarch_frame_args_skip invalid");
4823 if (gdbarch_debug
>= 2)
4824 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4825 return gdbarch
->frame_args_skip
;
4829 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4830 CORE_ADDR frame_args_skip
)
4832 gdbarch
->frame_args_skip
= frame_args_skip
;
4836 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4838 gdb_assert (gdbarch
!= NULL
);
4839 if (gdbarch
->frameless_function_invocation
== 0)
4840 internal_error (__FILE__
, __LINE__
,
4841 "gdbarch: gdbarch_frameless_function_invocation invalid");
4842 if (gdbarch_debug
>= 2)
4843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4844 return gdbarch
->frameless_function_invocation (fi
);
4848 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4849 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4851 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4855 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
4857 gdb_assert (gdbarch
!= NULL
);
4858 return gdbarch
->deprecated_frame_chain
!= 0;
4862 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4864 gdb_assert (gdbarch
!= NULL
);
4865 if (gdbarch
->deprecated_frame_chain
== 0)
4866 internal_error (__FILE__
, __LINE__
,
4867 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4868 if (gdbarch_debug
>= 2)
4869 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
4870 return gdbarch
->deprecated_frame_chain (frame
);
4874 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
4875 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
4877 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
4881 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4883 gdb_assert (gdbarch
!= NULL
);
4884 return gdbarch
->deprecated_frame_chain_valid
!= 0;
4888 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4890 gdb_assert (gdbarch
!= NULL
);
4891 if (gdbarch
->deprecated_frame_chain_valid
== 0)
4892 internal_error (__FILE__
, __LINE__
,
4893 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4894 if (gdbarch_debug
>= 2)
4895 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
4896 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
4900 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
4901 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
4903 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
4907 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4909 gdb_assert (gdbarch
!= NULL
);
4910 return gdbarch
->deprecated_frame_saved_pc
!= 0;
4914 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4916 gdb_assert (gdbarch
!= NULL
);
4917 if (gdbarch
->deprecated_frame_saved_pc
== 0)
4918 internal_error (__FILE__
, __LINE__
,
4919 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4920 if (gdbarch_debug
>= 2)
4921 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
4922 return gdbarch
->deprecated_frame_saved_pc (fi
);
4926 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
4927 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
4929 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
4933 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
4935 gdb_assert (gdbarch
!= NULL
);
4936 return gdbarch
->unwind_pc
!= 0;
4940 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4942 gdb_assert (gdbarch
!= NULL
);
4943 if (gdbarch
->unwind_pc
== 0)
4944 internal_error (__FILE__
, __LINE__
,
4945 "gdbarch: gdbarch_unwind_pc invalid");
4946 if (gdbarch_debug
>= 2)
4947 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
4948 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
4952 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
4953 gdbarch_unwind_pc_ftype unwind_pc
)
4955 gdbarch
->unwind_pc
= unwind_pc
;
4959 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4961 gdb_assert (gdbarch
!= NULL
);
4962 if (gdbarch
->frame_args_address
== 0)
4963 internal_error (__FILE__
, __LINE__
,
4964 "gdbarch: gdbarch_frame_args_address invalid");
4965 if (gdbarch_debug
>= 2)
4966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4967 return gdbarch
->frame_args_address (fi
);
4971 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4972 gdbarch_frame_args_address_ftype frame_args_address
)
4974 gdbarch
->frame_args_address
= frame_args_address
;
4978 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4980 gdb_assert (gdbarch
!= NULL
);
4981 if (gdbarch
->frame_locals_address
== 0)
4982 internal_error (__FILE__
, __LINE__
,
4983 "gdbarch: gdbarch_frame_locals_address invalid");
4984 if (gdbarch_debug
>= 2)
4985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4986 return gdbarch
->frame_locals_address (fi
);
4990 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4991 gdbarch_frame_locals_address_ftype frame_locals_address
)
4993 gdbarch
->frame_locals_address
= frame_locals_address
;
4997 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch
*gdbarch
)
4999 gdb_assert (gdbarch
!= NULL
);
5000 return gdbarch
->deprecated_saved_pc_after_call
!= 0;
5004 gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
5006 gdb_assert (gdbarch
!= NULL
);
5007 if (gdbarch
->deprecated_saved_pc_after_call
== 0)
5008 internal_error (__FILE__
, __LINE__
,
5009 "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
5010 if (gdbarch_debug
>= 2)
5011 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_saved_pc_after_call called\n");
5012 return gdbarch
->deprecated_saved_pc_after_call (frame
);
5016 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
,
5017 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call
)
5019 gdbarch
->deprecated_saved_pc_after_call
= deprecated_saved_pc_after_call
;
5023 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
5025 gdb_assert (gdbarch
!= NULL
);
5026 if (gdbarch
->frame_num_args
== 0)
5027 internal_error (__FILE__
, __LINE__
,
5028 "gdbarch: gdbarch_frame_num_args invalid");
5029 if (gdbarch_debug
>= 2)
5030 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
5031 return gdbarch
->frame_num_args (frame
);
5035 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
5036 gdbarch_frame_num_args_ftype frame_num_args
)
5038 gdbarch
->frame_num_args
= frame_num_args
;
5042 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
5044 gdb_assert (gdbarch
!= NULL
);
5045 return gdbarch
->stack_align
!= 0;
5049 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
5051 gdb_assert (gdbarch
!= NULL
);
5052 if (gdbarch
->stack_align
== 0)
5053 internal_error (__FILE__
, __LINE__
,
5054 "gdbarch: gdbarch_stack_align invalid");
5055 if (gdbarch_debug
>= 2)
5056 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
5057 return gdbarch
->stack_align (sp
);
5061 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
5062 gdbarch_stack_align_ftype stack_align
)
5064 gdbarch
->stack_align
= stack_align
;
5068 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
5070 gdb_assert (gdbarch
!= NULL
);
5071 return gdbarch
->frame_align
!= 0;
5075 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
5077 gdb_assert (gdbarch
!= NULL
);
5078 if (gdbarch
->frame_align
== 0)
5079 internal_error (__FILE__
, __LINE__
,
5080 "gdbarch: gdbarch_frame_align invalid");
5081 if (gdbarch_debug
>= 2)
5082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
5083 return gdbarch
->frame_align (gdbarch
, address
);
5087 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
5088 gdbarch_frame_align_ftype frame_align
)
5090 gdbarch
->frame_align
= frame_align
;
5094 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
5096 gdb_assert (gdbarch
!= NULL
);
5097 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
5098 if (gdbarch_debug
>= 2)
5099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5100 return gdbarch
->deprecated_extra_stack_alignment_needed
;
5104 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
5105 int deprecated_extra_stack_alignment_needed
)
5107 gdbarch
->deprecated_extra_stack_alignment_needed
= deprecated_extra_stack_alignment_needed
;
5111 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
5113 gdb_assert (gdbarch
!= NULL
);
5114 return gdbarch
->reg_struct_has_addr
!= 0;
5118 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
5120 gdb_assert (gdbarch
!= NULL
);
5121 if (gdbarch
->reg_struct_has_addr
== 0)
5122 internal_error (__FILE__
, __LINE__
,
5123 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5124 if (gdbarch_debug
>= 2)
5125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
5126 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
5130 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
5131 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
5133 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
5137 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
5139 gdb_assert (gdbarch
!= NULL
);
5140 return gdbarch
->save_dummy_frame_tos
!= 0;
5144 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
5146 gdb_assert (gdbarch
!= NULL
);
5147 if (gdbarch
->save_dummy_frame_tos
== 0)
5148 internal_error (__FILE__
, __LINE__
,
5149 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5150 if (gdbarch_debug
>= 2)
5151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
5152 gdbarch
->save_dummy_frame_tos (sp
);
5156 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
5157 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
5159 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
5163 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
5165 gdb_assert (gdbarch
!= NULL
);
5166 return gdbarch
->unwind_dummy_id
!= 0;
5170 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
5172 gdb_assert (gdbarch
!= NULL
);
5173 if (gdbarch
->unwind_dummy_id
== 0)
5174 internal_error (__FILE__
, __LINE__
,
5175 "gdbarch: gdbarch_unwind_dummy_id invalid");
5176 if (gdbarch_debug
>= 2)
5177 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
5178 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
5182 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
5183 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
5185 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
5189 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
5191 gdb_assert (gdbarch
!= NULL
);
5192 if (gdbarch_debug
>= 2)
5193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
5194 return gdbarch
->parm_boundary
;
5198 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
5201 gdbarch
->parm_boundary
= parm_boundary
;
5204 const struct floatformat
*
5205 gdbarch_float_format (struct gdbarch
*gdbarch
)
5207 gdb_assert (gdbarch
!= NULL
);
5208 if (gdbarch_debug
>= 2)
5209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
5210 return gdbarch
->float_format
;
5214 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
5215 const struct floatformat
* float_format
)
5217 gdbarch
->float_format
= float_format
;
5220 const struct floatformat
*
5221 gdbarch_double_format (struct gdbarch
*gdbarch
)
5223 gdb_assert (gdbarch
!= NULL
);
5224 if (gdbarch_debug
>= 2)
5225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
5226 return gdbarch
->double_format
;
5230 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
5231 const struct floatformat
* double_format
)
5233 gdbarch
->double_format
= double_format
;
5236 const struct floatformat
*
5237 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
5239 gdb_assert (gdbarch
!= NULL
);
5240 if (gdbarch_debug
>= 2)
5241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
5242 return gdbarch
->long_double_format
;
5246 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
5247 const struct floatformat
* long_double_format
)
5249 gdbarch
->long_double_format
= long_double_format
;
5253 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5255 gdb_assert (gdbarch
!= NULL
);
5256 if (gdbarch
->convert_from_func_ptr_addr
== 0)
5257 internal_error (__FILE__
, __LINE__
,
5258 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5259 if (gdbarch_debug
>= 2)
5260 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
5261 return gdbarch
->convert_from_func_ptr_addr (addr
);
5265 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
5266 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
5268 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
5272 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5274 gdb_assert (gdbarch
!= NULL
);
5275 if (gdbarch
->addr_bits_remove
== 0)
5276 internal_error (__FILE__
, __LINE__
,
5277 "gdbarch: gdbarch_addr_bits_remove invalid");
5278 if (gdbarch_debug
>= 2)
5279 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
5280 return gdbarch
->addr_bits_remove (addr
);
5284 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
5285 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
5287 gdbarch
->addr_bits_remove
= addr_bits_remove
;
5291 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5293 gdb_assert (gdbarch
!= NULL
);
5294 if (gdbarch
->smash_text_address
== 0)
5295 internal_error (__FILE__
, __LINE__
,
5296 "gdbarch: gdbarch_smash_text_address invalid");
5297 if (gdbarch_debug
>= 2)
5298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
5299 return gdbarch
->smash_text_address (addr
);
5303 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
5304 gdbarch_smash_text_address_ftype smash_text_address
)
5306 gdbarch
->smash_text_address
= smash_text_address
;
5310 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
5312 gdb_assert (gdbarch
!= NULL
);
5313 return gdbarch
->software_single_step
!= 0;
5317 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
5319 gdb_assert (gdbarch
!= NULL
);
5320 if (gdbarch
->software_single_step
== 0)
5321 internal_error (__FILE__
, __LINE__
,
5322 "gdbarch: gdbarch_software_single_step invalid");
5323 if (gdbarch_debug
>= 2)
5324 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
5325 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
5329 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
5330 gdbarch_software_single_step_ftype software_single_step
)
5332 gdbarch
->software_single_step
= software_single_step
;
5336 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
5338 gdb_assert (gdbarch
!= NULL
);
5339 if (gdbarch
->print_insn
== 0)
5340 internal_error (__FILE__
, __LINE__
,
5341 "gdbarch: gdbarch_print_insn invalid");
5342 if (gdbarch_debug
>= 2)
5343 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
5344 return gdbarch
->print_insn (vma
, info
);
5348 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
5349 gdbarch_print_insn_ftype print_insn
)
5351 gdbarch
->print_insn
= print_insn
;
5355 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5357 gdb_assert (gdbarch
!= NULL
);
5358 if (gdbarch
->skip_trampoline_code
== 0)
5359 internal_error (__FILE__
, __LINE__
,
5360 "gdbarch: gdbarch_skip_trampoline_code invalid");
5361 if (gdbarch_debug
>= 2)
5362 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
5363 return gdbarch
->skip_trampoline_code (pc
);
5367 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
5368 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
5370 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
5374 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5376 gdb_assert (gdbarch
!= NULL
);
5377 if (gdbarch
->in_solib_call_trampoline
== 0)
5378 internal_error (__FILE__
, __LINE__
,
5379 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5380 if (gdbarch_debug
>= 2)
5381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
5382 return gdbarch
->in_solib_call_trampoline (pc
, name
);
5386 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
5387 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
5389 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
5393 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5395 gdb_assert (gdbarch
!= NULL
);
5396 if (gdbarch
->in_solib_return_trampoline
== 0)
5397 internal_error (__FILE__
, __LINE__
,
5398 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5399 if (gdbarch_debug
>= 2)
5400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
5401 return gdbarch
->in_solib_return_trampoline (pc
, name
);
5405 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
5406 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
5408 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
5412 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5414 gdb_assert (gdbarch
!= NULL
);
5415 if (gdbarch
->pc_in_sigtramp
== 0)
5416 internal_error (__FILE__
, __LINE__
,
5417 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5418 if (gdbarch_debug
>= 2)
5419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
5420 return gdbarch
->pc_in_sigtramp (pc
, name
);
5424 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
5425 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
5427 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
5431 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
5433 gdb_assert (gdbarch
!= NULL
);
5434 return gdbarch
->sigtramp_start
!= 0;
5438 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5440 gdb_assert (gdbarch
!= NULL
);
5441 if (gdbarch
->sigtramp_start
== 0)
5442 internal_error (__FILE__
, __LINE__
,
5443 "gdbarch: gdbarch_sigtramp_start invalid");
5444 if (gdbarch_debug
>= 2)
5445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
5446 return gdbarch
->sigtramp_start (pc
);
5450 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
5451 gdbarch_sigtramp_start_ftype sigtramp_start
)
5453 gdbarch
->sigtramp_start
= sigtramp_start
;
5457 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
5459 gdb_assert (gdbarch
!= NULL
);
5460 return gdbarch
->sigtramp_end
!= 0;
5464 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5466 gdb_assert (gdbarch
!= NULL
);
5467 if (gdbarch
->sigtramp_end
== 0)
5468 internal_error (__FILE__
, __LINE__
,
5469 "gdbarch: gdbarch_sigtramp_end invalid");
5470 if (gdbarch_debug
>= 2)
5471 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
5472 return gdbarch
->sigtramp_end (pc
);
5476 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
5477 gdbarch_sigtramp_end_ftype sigtramp_end
)
5479 gdbarch
->sigtramp_end
= sigtramp_end
;
5483 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5485 gdb_assert (gdbarch
!= NULL
);
5486 if (gdbarch
->in_function_epilogue_p
== 0)
5487 internal_error (__FILE__
, __LINE__
,
5488 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5489 if (gdbarch_debug
>= 2)
5490 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
5491 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
5495 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
5496 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
5498 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
5502 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
5504 gdb_assert (gdbarch
!= NULL
);
5505 if (gdbarch
->construct_inferior_arguments
== 0)
5506 internal_error (__FILE__
, __LINE__
,
5507 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5508 if (gdbarch_debug
>= 2)
5509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5510 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5514 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5515 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5517 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5521 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
5523 gdb_assert (gdbarch
!= NULL
);
5524 return gdbarch
->dwarf2_build_frame_info
!= 0;
5528 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
5530 gdb_assert (gdbarch
!= NULL
);
5531 if (gdbarch
->dwarf2_build_frame_info
== 0)
5532 internal_error (__FILE__
, __LINE__
,
5533 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5534 if (gdbarch_debug
>= 2)
5535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
5536 gdbarch
->dwarf2_build_frame_info (objfile
);
5540 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
5541 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
5543 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
5547 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5549 gdb_assert (gdbarch
!= NULL
);
5550 if (gdbarch
->elf_make_msymbol_special
== 0)
5551 internal_error (__FILE__
, __LINE__
,
5552 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5553 if (gdbarch_debug
>= 2)
5554 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5555 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5559 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5560 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5562 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5566 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5568 gdb_assert (gdbarch
!= NULL
);
5569 if (gdbarch
->coff_make_msymbol_special
== 0)
5570 internal_error (__FILE__
, __LINE__
,
5571 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5572 if (gdbarch_debug
>= 2)
5573 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5574 gdbarch
->coff_make_msymbol_special (val
, msym
);
5578 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5579 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5581 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5585 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5587 gdb_assert (gdbarch
!= NULL
);
5588 /* Skip verify of name_of_malloc, invalid_p == 0 */
5589 if (gdbarch_debug
>= 2)
5590 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5591 return gdbarch
->name_of_malloc
;
5595 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5596 const char * name_of_malloc
)
5598 gdbarch
->name_of_malloc
= name_of_malloc
;
5602 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5604 gdb_assert (gdbarch
!= NULL
);
5605 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5606 if (gdbarch_debug
>= 2)
5607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5608 return gdbarch
->cannot_step_breakpoint
;
5612 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5613 int cannot_step_breakpoint
)
5615 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5619 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5621 gdb_assert (gdbarch
!= NULL
);
5622 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5623 if (gdbarch_debug
>= 2)
5624 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5625 return gdbarch
->have_nonsteppable_watchpoint
;
5629 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5630 int have_nonsteppable_watchpoint
)
5632 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5636 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5638 gdb_assert (gdbarch
!= NULL
);
5639 return gdbarch
->address_class_type_flags
!= 0;
5643 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5645 gdb_assert (gdbarch
!= NULL
);
5646 if (gdbarch
->address_class_type_flags
== 0)
5647 internal_error (__FILE__
, __LINE__
,
5648 "gdbarch: gdbarch_address_class_type_flags invalid");
5649 if (gdbarch_debug
>= 2)
5650 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5651 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5655 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5656 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5658 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5662 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5664 gdb_assert (gdbarch
!= NULL
);
5665 return gdbarch
->address_class_type_flags_to_name
!= 0;
5669 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5671 gdb_assert (gdbarch
!= NULL
);
5672 if (gdbarch
->address_class_type_flags_to_name
== 0)
5673 internal_error (__FILE__
, __LINE__
,
5674 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5675 if (gdbarch_debug
>= 2)
5676 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5677 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5681 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5682 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5684 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5688 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5690 gdb_assert (gdbarch
!= NULL
);
5691 return gdbarch
->address_class_name_to_type_flags
!= 0;
5695 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
5697 gdb_assert (gdbarch
!= NULL
);
5698 if (gdbarch
->address_class_name_to_type_flags
== 0)
5699 internal_error (__FILE__
, __LINE__
,
5700 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5701 if (gdbarch_debug
>= 2)
5702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5703 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5707 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5708 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5710 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5714 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5716 gdb_assert (gdbarch
!= NULL
);
5717 if (gdbarch
->register_reggroup_p
== 0)
5718 internal_error (__FILE__
, __LINE__
,
5719 "gdbarch: gdbarch_register_reggroup_p invalid");
5720 if (gdbarch_debug
>= 2)
5721 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5722 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5726 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5727 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5729 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5733 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
5735 gdb_assert (gdbarch
!= NULL
);
5736 return gdbarch
->fetch_pointer_argument
!= 0;
5740 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
5742 gdb_assert (gdbarch
!= NULL
);
5743 if (gdbarch
->fetch_pointer_argument
== 0)
5744 internal_error (__FILE__
, __LINE__
,
5745 "gdbarch: gdbarch_fetch_pointer_argument invalid");
5746 if (gdbarch_debug
>= 2)
5747 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
5748 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
5752 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
5753 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
5755 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
5759 /* Keep a registry of per-architecture data-pointers required by GDB
5766 gdbarch_data_init_ftype
*init
;
5767 gdbarch_data_free_ftype
*free
;
5770 struct gdbarch_data_registration
5772 struct gdbarch_data
*data
;
5773 struct gdbarch_data_registration
*next
;
5776 struct gdbarch_data_registry
5779 struct gdbarch_data_registration
*registrations
;
5782 struct gdbarch_data_registry gdbarch_data_registry
=
5787 struct gdbarch_data
*
5788 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5789 gdbarch_data_free_ftype
*free
)
5791 struct gdbarch_data_registration
**curr
;
5792 /* Append the new registraration. */
5793 for (curr
= &gdbarch_data_registry
.registrations
;
5795 curr
= &(*curr
)->next
);
5796 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5797 (*curr
)->next
= NULL
;
5798 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5799 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5800 (*curr
)->data
->init
= init
;
5801 (*curr
)->data
->init_p
= 1;
5802 (*curr
)->data
->free
= free
;
5803 return (*curr
)->data
;
5807 /* Create/delete the gdbarch data vector. */
5810 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5812 gdb_assert (gdbarch
->data
== NULL
);
5813 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5814 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5818 free_gdbarch_data (struct gdbarch
*gdbarch
)
5820 struct gdbarch_data_registration
*rego
;
5821 gdb_assert (gdbarch
->data
!= NULL
);
5822 for (rego
= gdbarch_data_registry
.registrations
;
5826 struct gdbarch_data
*data
= rego
->data
;
5827 gdb_assert (data
->index
< gdbarch
->nr_data
);
5828 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5830 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5831 gdbarch
->data
[data
->index
] = NULL
;
5834 xfree (gdbarch
->data
);
5835 gdbarch
->data
= NULL
;
5839 /* Initialize the current value of the specified per-architecture
5843 set_gdbarch_data (struct gdbarch
*gdbarch
,
5844 struct gdbarch_data
*data
,
5847 gdb_assert (data
->index
< gdbarch
->nr_data
);
5848 if (gdbarch
->data
[data
->index
] != NULL
)
5850 gdb_assert (data
->free
!= NULL
);
5851 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5853 gdbarch
->data
[data
->index
] = pointer
;
5856 /* Return the current value of the specified per-architecture
5860 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5862 gdb_assert (data
->index
< gdbarch
->nr_data
);
5863 /* The data-pointer isn't initialized, call init() to get a value but
5864 only if the architecture initializaiton has completed. Otherwise
5865 punt - hope that the caller knows what they are doing. */
5866 if (gdbarch
->data
[data
->index
] == NULL
5867 && gdbarch
->initialized_p
)
5869 /* Be careful to detect an initialization cycle. */
5870 gdb_assert (data
->init_p
);
5872 gdb_assert (data
->init
!= NULL
);
5873 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5875 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5877 return gdbarch
->data
[data
->index
];
5882 /* Keep a registry of swapped data required by GDB modules. */
5887 struct gdbarch_swap_registration
*source
;
5888 struct gdbarch_swap
*next
;
5891 struct gdbarch_swap_registration
5894 unsigned long sizeof_data
;
5895 gdbarch_swap_ftype
*init
;
5896 struct gdbarch_swap_registration
*next
;
5899 struct gdbarch_swap_registry
5902 struct gdbarch_swap_registration
*registrations
;
5905 struct gdbarch_swap_registry gdbarch_swap_registry
=
5911 register_gdbarch_swap (void *data
,
5912 unsigned long sizeof_data
,
5913 gdbarch_swap_ftype
*init
)
5915 struct gdbarch_swap_registration
**rego
;
5916 for (rego
= &gdbarch_swap_registry
.registrations
;
5918 rego
= &(*rego
)->next
);
5919 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5920 (*rego
)->next
= NULL
;
5921 (*rego
)->init
= init
;
5922 (*rego
)->data
= data
;
5923 (*rego
)->sizeof_data
= sizeof_data
;
5927 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5929 struct gdbarch_swap
*curr
;
5930 for (curr
= gdbarch
->swap
;
5934 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5939 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5941 struct gdbarch_swap_registration
*rego
;
5942 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5943 for (rego
= gdbarch_swap_registry
.registrations
;
5947 if (rego
->data
!= NULL
)
5949 (*curr
) = XMALLOC (struct gdbarch_swap
);
5950 (*curr
)->source
= rego
;
5951 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5952 (*curr
)->next
= NULL
;
5953 curr
= &(*curr
)->next
;
5955 if (rego
->init
!= NULL
)
5961 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5963 struct gdbarch_swap
*curr
;
5964 for (curr
= gdbarch
->swap
;
5967 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5971 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5973 struct gdbarch_swap
*curr
;
5974 for (curr
= gdbarch
->swap
;
5977 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5981 /* Keep a registry of the architectures known by GDB. */
5983 struct gdbarch_registration
5985 enum bfd_architecture bfd_architecture
;
5986 gdbarch_init_ftype
*init
;
5987 gdbarch_dump_tdep_ftype
*dump_tdep
;
5988 struct gdbarch_list
*arches
;
5989 struct gdbarch_registration
*next
;
5992 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5995 append_name (const char ***buf
, int *nr
, const char *name
)
5997 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
6003 gdbarch_printable_names (void)
6007 /* Accumulate a list of names based on the registed list of
6009 enum bfd_architecture a
;
6011 const char **arches
= NULL
;
6012 struct gdbarch_registration
*rego
;
6013 for (rego
= gdbarch_registry
;
6017 const struct bfd_arch_info
*ap
;
6018 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
6020 internal_error (__FILE__
, __LINE__
,
6021 "gdbarch_architecture_names: multi-arch unknown");
6024 append_name (&arches
, &nr_arches
, ap
->printable_name
);
6029 append_name (&arches
, &nr_arches
, NULL
);
6033 /* Just return all the architectures that BFD knows. Assume that
6034 the legacy architecture framework supports them. */
6035 return bfd_arch_list ();
6040 gdbarch_register (enum bfd_architecture bfd_architecture
,
6041 gdbarch_init_ftype
*init
,
6042 gdbarch_dump_tdep_ftype
*dump_tdep
)
6044 struct gdbarch_registration
**curr
;
6045 const struct bfd_arch_info
*bfd_arch_info
;
6046 /* Check that BFD recognizes this architecture */
6047 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
6048 if (bfd_arch_info
== NULL
)
6050 internal_error (__FILE__
, __LINE__
,
6051 "gdbarch: Attempt to register unknown architecture (%d)",
6054 /* Check that we haven't seen this architecture before */
6055 for (curr
= &gdbarch_registry
;
6057 curr
= &(*curr
)->next
)
6059 if (bfd_architecture
== (*curr
)->bfd_architecture
)
6060 internal_error (__FILE__
, __LINE__
,
6061 "gdbarch: Duplicate registraration of architecture (%s)",
6062 bfd_arch_info
->printable_name
);
6066 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
6067 bfd_arch_info
->printable_name
,
6070 (*curr
) = XMALLOC (struct gdbarch_registration
);
6071 (*curr
)->bfd_architecture
= bfd_architecture
;
6072 (*curr
)->init
= init
;
6073 (*curr
)->dump_tdep
= dump_tdep
;
6074 (*curr
)->arches
= NULL
;
6075 (*curr
)->next
= NULL
;
6076 /* When non- multi-arch, install whatever target dump routine we've
6077 been provided - hopefully that routine has been written correctly
6078 and works regardless of multi-arch. */
6079 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
6080 && startup_gdbarch
.dump_tdep
== NULL
)
6081 startup_gdbarch
.dump_tdep
= dump_tdep
;
6085 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
6086 gdbarch_init_ftype
*init
)
6088 gdbarch_register (bfd_architecture
, init
, NULL
);
6092 /* Look for an architecture using gdbarch_info. Base search on only
6093 BFD_ARCH_INFO and BYTE_ORDER. */
6095 struct gdbarch_list
*
6096 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
6097 const struct gdbarch_info
*info
)
6099 for (; arches
!= NULL
; arches
= arches
->next
)
6101 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
6103 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
6105 if (info
->osabi
!= arches
->gdbarch
->osabi
)
6113 /* Update the current architecture. Return ZERO if the update request
6117 gdbarch_update_p (struct gdbarch_info info
)
6119 struct gdbarch
*new_gdbarch
;
6120 struct gdbarch
*old_gdbarch
;
6121 struct gdbarch_registration
*rego
;
6123 /* Fill in missing parts of the INFO struct using a number of
6124 sources: ``set ...''; INFOabfd supplied; existing target. */
6126 /* ``(gdb) set architecture ...'' */
6127 if (info
.bfd_arch_info
== NULL
6128 && !TARGET_ARCHITECTURE_AUTO
)
6129 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6130 if (info
.bfd_arch_info
== NULL
6131 && info
.abfd
!= NULL
6132 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
6133 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
6134 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
6135 if (info
.bfd_arch_info
== NULL
)
6136 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6138 /* ``(gdb) set byte-order ...'' */
6139 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6140 && !TARGET_BYTE_ORDER_AUTO
)
6141 info
.byte_order
= TARGET_BYTE_ORDER
;
6142 /* From the INFO struct. */
6143 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6144 && info
.abfd
!= NULL
)
6145 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
6146 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
6147 : BFD_ENDIAN_UNKNOWN
);
6148 /* From the current target. */
6149 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
6150 info
.byte_order
= TARGET_BYTE_ORDER
;
6152 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6153 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6154 info
.osabi
= gdbarch_lookup_osabi (info
.abfd
);
6155 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6156 info
.osabi
= current_gdbarch
->osabi
;
6158 /* Must have found some sort of architecture. */
6159 gdb_assert (info
.bfd_arch_info
!= NULL
);
6163 fprintf_unfiltered (gdb_stdlog
,
6164 "gdbarch_update: info.bfd_arch_info %s\n",
6165 (info
.bfd_arch_info
!= NULL
6166 ? info
.bfd_arch_info
->printable_name
6168 fprintf_unfiltered (gdb_stdlog
,
6169 "gdbarch_update: info.byte_order %d (%s)\n",
6171 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
6172 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
6174 fprintf_unfiltered (gdb_stdlog
,
6175 "gdbarch_update: info.osabi %d (%s)\n",
6176 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
6177 fprintf_unfiltered (gdb_stdlog
,
6178 "gdbarch_update: info.abfd 0x%lx\n",
6180 fprintf_unfiltered (gdb_stdlog
,
6181 "gdbarch_update: info.tdep_info 0x%lx\n",
6182 (long) info
.tdep_info
);
6185 /* Find the target that knows about this architecture. */
6186 for (rego
= gdbarch_registry
;
6189 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
6194 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
6198 /* Swap the data belonging to the old target out setting the
6199 installed data to zero. This stops the ->init() function trying
6200 to refer to the previous architecture's global data structures. */
6201 swapout_gdbarch_swap (current_gdbarch
);
6202 clear_gdbarch_swap (current_gdbarch
);
6204 /* Save the previously selected architecture, setting the global to
6205 NULL. This stops ->init() trying to use the previous
6206 architecture's configuration. The previous architecture may not
6207 even be of the same architecture family. The most recent
6208 architecture of the same family is found at the head of the
6209 rego->arches list. */
6210 old_gdbarch
= current_gdbarch
;
6211 current_gdbarch
= NULL
;
6213 /* Ask the target for a replacement architecture. */
6214 new_gdbarch
= rego
->init (info
, rego
->arches
);
6216 /* Did the target like it? No. Reject the change and revert to the
6217 old architecture. */
6218 if (new_gdbarch
== NULL
)
6221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
6222 swapin_gdbarch_swap (old_gdbarch
);
6223 current_gdbarch
= old_gdbarch
;
6227 /* Did the architecture change? No. Oops, put the old architecture
6229 if (old_gdbarch
== new_gdbarch
)
6232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6234 new_gdbarch
->bfd_arch_info
->printable_name
);
6235 swapin_gdbarch_swap (old_gdbarch
);
6236 current_gdbarch
= old_gdbarch
;
6240 /* Is this a pre-existing architecture? Yes. Move it to the front
6241 of the list of architectures (keeping the list sorted Most
6242 Recently Used) and then copy it in. */
6244 struct gdbarch_list
**list
;
6245 for (list
= ®o
->arches
;
6247 list
= &(*list
)->next
)
6249 if ((*list
)->gdbarch
== new_gdbarch
)
6251 struct gdbarch_list
*this;
6253 fprintf_unfiltered (gdb_stdlog
,
6254 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6256 new_gdbarch
->bfd_arch_info
->printable_name
);
6259 (*list
) = this->next
;
6260 /* Insert in the front. */
6261 this->next
= rego
->arches
;
6262 rego
->arches
= this;
6263 /* Copy the new architecture in. */
6264 current_gdbarch
= new_gdbarch
;
6265 swapin_gdbarch_swap (new_gdbarch
);
6266 architecture_changed_event ();
6272 /* Prepend this new architecture to the architecture list (keep the
6273 list sorted Most Recently Used). */
6275 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
6276 this->next
= rego
->arches
;
6277 this->gdbarch
= new_gdbarch
;
6278 rego
->arches
= this;
6281 /* Switch to this new architecture marking it initialized. */
6282 current_gdbarch
= new_gdbarch
;
6283 current_gdbarch
->initialized_p
= 1;
6286 fprintf_unfiltered (gdb_stdlog
,
6287 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6289 new_gdbarch
->bfd_arch_info
->printable_name
);
6292 /* Check that the newly installed architecture is valid. Plug in
6293 any post init values. */
6294 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
6295 verify_gdbarch (new_gdbarch
);
6297 /* Initialize the per-architecture memory (swap) areas.
6298 CURRENT_GDBARCH must be update before these modules are
6300 init_gdbarch_swap (new_gdbarch
);
6302 /* Initialize the per-architecture data. CURRENT_GDBARCH
6303 must be updated before these modules are called. */
6304 architecture_changed_event ();
6307 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
6315 /* Pointer to the target-dependent disassembly function. */
6316 int (*deprecated_tm_print_insn
) (bfd_vma
, disassemble_info
*);
6318 extern void _initialize_gdbarch (void);
6321 _initialize_gdbarch (void)
6323 struct cmd_list_element
*c
;
6325 add_show_from_set (add_set_cmd ("arch",
6328 (char *)&gdbarch_debug
,
6329 "Set architecture debugging.\n\
6330 When non-zero, architecture debugging is enabled.", &setdebuglist
),
6332 c
= add_set_cmd ("archdebug",
6335 (char *)&gdbarch_debug
,
6336 "Set architecture debugging.\n\
6337 When non-zero, architecture debugging is enabled.", &setlist
);
6339 deprecate_cmd (c
, "set debug arch");
6340 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");