1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
67 #include "reggroups.h"
70 /* Static function declarations */
72 static void verify_gdbarch (struct gdbarch
*gdbarch
);
73 static void alloc_gdbarch_data (struct gdbarch
*);
74 static void free_gdbarch_data (struct gdbarch
*);
75 static void init_gdbarch_swap (struct gdbarch
*);
76 static void clear_gdbarch_swap (struct gdbarch
*);
77 static void swapout_gdbarch_swap (struct gdbarch
*);
78 static void swapin_gdbarch_swap (struct gdbarch
*);
80 /* Non-zero if we want to trace architecture code. */
83 #define GDBARCH_DEBUG 0
85 int gdbarch_debug
= GDBARCH_DEBUG
;
88 /* Maintain the struct gdbarch object */
92 /* Has this architecture been fully initialized? */
94 /* basic architectural information */
95 const struct bfd_arch_info
* bfd_arch_info
;
99 /* target specific vector. */
100 struct gdbarch_tdep
*tdep
;
101 gdbarch_dump_tdep_ftype
*dump_tdep
;
103 /* per-architecture data-pointers */
107 /* per-architecture swap-regions */
108 struct gdbarch_swap
*swap
;
110 /* Multi-arch values.
112 When extending this structure you must:
116 Declare set/get functions and define the corresponding
119 gdbarch_alloc(): If zero/NULL is not a suitable default,
120 initialize the new field.
122 verify_gdbarch(): Confirm that the target updated the field
125 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
128 ``startup_gdbarch()'': Append an initial value to the static
129 variable (base values on the host's c-type system).
131 get_gdbarch(): Implement the set/get functions (probably using
132 the macro's as shortcuts).
147 gdbarch_read_pc_ftype
*read_pc
;
148 gdbarch_write_pc_ftype
*write_pc
;
149 gdbarch_read_fp_ftype
*read_fp
;
150 gdbarch_read_sp_ftype
*read_sp
;
151 gdbarch_write_sp_ftype
*write_sp
;
152 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
153 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
154 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
163 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
164 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
165 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
166 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
167 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
168 gdbarch_register_name_ftype
*register_name
;
171 gdbarch_register_byte_ftype
*register_byte
;
172 gdbarch_register_raw_size_ftype
*register_raw_size
;
173 int deprecated_max_register_raw_size
;
174 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
175 int deprecated_max_register_virtual_size
;
176 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
177 gdbarch_register_type_ftype
*register_type
;
178 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
179 gdbarch_print_registers_info_ftype
*print_registers_info
;
180 gdbarch_print_float_info_ftype
*print_float_info
;
181 gdbarch_print_vector_info_ftype
*print_vector_info
;
182 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
183 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
184 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
185 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
186 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
187 int deprecated_use_generic_dummy_frames
;
188 int call_dummy_location
;
189 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
190 CORE_ADDR call_dummy_start_offset
;
191 CORE_ADDR call_dummy_breakpoint_offset
;
192 int call_dummy_breakpoint_offset_p
;
193 int call_dummy_length
;
194 gdbarch_deprecated_pc_in_call_dummy_ftype
*deprecated_pc_in_call_dummy
;
196 LONGEST
* call_dummy_words
;
197 int sizeof_call_dummy_words
;
198 int deprecated_call_dummy_stack_adjust
;
199 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
200 gdbarch_deprecated_init_frame_pc_first_ftype
*deprecated_init_frame_pc_first
;
201 gdbarch_deprecated_init_frame_pc_ftype
*deprecated_init_frame_pc
;
202 int believe_pcc_promotion
;
203 int believe_pcc_promotion_type
;
204 gdbarch_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_push_arguments_ftype
*push_arguments
;
216 gdbarch_deprecated_push_dummy_frame_ftype
*deprecated_push_dummy_frame
;
217 gdbarch_push_return_address_ftype
*push_return_address
;
218 gdbarch_deprecated_pop_frame_ftype
*deprecated_pop_frame
;
219 gdbarch_deprecated_store_struct_return_ftype
*deprecated_store_struct_return
;
220 gdbarch_extract_return_value_ftype
*extract_return_value
;
221 gdbarch_store_return_value_ftype
*store_return_value
;
222 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
223 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
224 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
225 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
226 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
227 gdbarch_deprecated_frame_init_saved_regs_ftype
*deprecated_frame_init_saved_regs
;
228 gdbarch_deprecated_init_extra_frame_info_ftype
*deprecated_init_extra_frame_info
;
229 gdbarch_skip_prologue_ftype
*skip_prologue
;
230 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
231 gdbarch_inner_than_ftype
*inner_than
;
232 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
233 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
234 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
235 CORE_ADDR decr_pc_after_break
;
236 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
237 CORE_ADDR function_start_offset
;
238 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
239 CORE_ADDR frame_args_skip
;
240 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
241 gdbarch_deprecated_frame_chain_ftype
*deprecated_frame_chain
;
242 gdbarch_deprecated_frame_chain_valid_ftype
*deprecated_frame_chain_valid
;
243 gdbarch_deprecated_frame_saved_pc_ftype
*deprecated_frame_saved_pc
;
244 gdbarch_unwind_pc_ftype
*unwind_pc
;
245 gdbarch_frame_args_address_ftype
*frame_args_address
;
246 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
247 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
248 gdbarch_frame_num_args_ftype
*frame_num_args
;
249 gdbarch_stack_align_ftype
*stack_align
;
250 gdbarch_frame_align_ftype
*frame_align
;
251 int deprecated_extra_stack_alignment_needed
;
252 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
253 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
254 gdbarch_unwind_dummy_id_ftype
*unwind_dummy_id
;
256 const struct floatformat
* float_format
;
257 const struct floatformat
* double_format
;
258 const struct floatformat
* long_double_format
;
259 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
260 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
261 gdbarch_smash_text_address_ftype
*smash_text_address
;
262 gdbarch_software_single_step_ftype
*software_single_step
;
263 gdbarch_print_insn_ftype
*print_insn
;
264 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
265 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
266 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
267 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
268 gdbarch_sigtramp_start_ftype
*sigtramp_start
;
269 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
270 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
271 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
272 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
273 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
274 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
275 const char * name_of_malloc
;
276 int cannot_step_breakpoint
;
277 int have_nonsteppable_watchpoint
;
278 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
279 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
280 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
281 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
285 /* The default architecture uses host values (for want of a better
288 extern const struct bfd_arch_info bfd_default_arch_struct
;
290 struct gdbarch startup_gdbarch
=
292 1, /* Always initialized. */
293 /* basic architecture information */
294 &bfd_default_arch_struct
,
297 /* target specific vector and its dump routine */
299 /*per-architecture data-pointers and swap regions */
301 /* Multi-arch values */
305 8 * sizeof (LONGEST
),
308 8 * sizeof (long double),
337 generic_register_byte
,
338 generic_register_size
,
340 generic_register_size
,
345 default_print_registers_info
,
360 generic_pc_in_call_dummy
,
436 generic_in_function_epilogue_p
,
437 construct_inferior_arguments
,
447 default_register_reggroup_p
,
448 /* startup_gdbarch() */
451 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
453 /* Do any initialization needed for a non-multiarch configuration
454 after the _initialize_MODULE functions have been run. */
456 initialize_non_multiarch (void)
458 alloc_gdbarch_data (&startup_gdbarch
);
459 /* Ensure that all swap areas are zeroed so that they again think
460 they are starting from scratch. */
461 clear_gdbarch_swap (&startup_gdbarch
);
462 init_gdbarch_swap (&startup_gdbarch
);
466 /* Create a new ``struct gdbarch'' based on information provided by
467 ``struct gdbarch_info''. */
470 gdbarch_alloc (const struct gdbarch_info
*info
,
471 struct gdbarch_tdep
*tdep
)
473 /* NOTE: The new architecture variable is named ``current_gdbarch''
474 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
475 the current local architecture and not the previous global
476 architecture. This ensures that the new architectures initial
477 values are not influenced by the previous architecture. Once
478 everything is parameterised with gdbarch, this will go away. */
479 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
480 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
482 alloc_gdbarch_data (current_gdbarch
);
484 current_gdbarch
->tdep
= tdep
;
486 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
487 current_gdbarch
->byte_order
= info
->byte_order
;
488 current_gdbarch
->osabi
= info
->osabi
;
490 /* Force the explicit initialization of these. */
491 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
492 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
493 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
494 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
495 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
496 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
497 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
498 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
499 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
500 current_gdbarch
->char_signed
= -1;
501 current_gdbarch
->read_pc
= generic_target_read_pc
;
502 current_gdbarch
->write_pc
= generic_target_write_pc
;
503 current_gdbarch
->read_fp
= generic_target_read_fp
;
504 current_gdbarch
->read_sp
= generic_target_read_sp
;
505 current_gdbarch
->write_sp
= generic_target_write_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
->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_size
= -1;
521 current_gdbarch
->register_bytes
= -1;
522 current_gdbarch
->register_byte
= generic_register_byte
;
523 current_gdbarch
->register_raw_size
= generic_register_size
;
524 current_gdbarch
->register_virtual_size
= generic_register_size
;
525 current_gdbarch
->print_registers_info
= default_print_registers_info
;
526 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
527 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
528 current_gdbarch
->cannot_store_register
= cannot_register_not
;
529 current_gdbarch
->deprecated_use_generic_dummy_frames
= 1;
530 current_gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
531 current_gdbarch
->call_dummy_start_offset
= -1;
532 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
533 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
534 current_gdbarch
->call_dummy_length
= -1;
535 current_gdbarch
->deprecated_pc_in_call_dummy
= generic_pc_in_call_dummy
;
536 current_gdbarch
->call_dummy_p
= -1;
537 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
538 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
539 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
540 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
541 current_gdbarch
->register_to_value
= legacy_register_to_value
;
542 current_gdbarch
->value_to_register
= legacy_value_to_register
;
543 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
544 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
545 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
546 current_gdbarch
->push_arguments
= default_push_arguments
;
547 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
548 current_gdbarch
->store_return_value
= legacy_store_return_value
;
549 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
550 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
551 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
552 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
553 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
554 current_gdbarch
->decr_pc_after_break
= -1;
555 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
556 current_gdbarch
->function_start_offset
= -1;
557 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
558 current_gdbarch
->frame_args_skip
= -1;
559 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
560 current_gdbarch
->frame_args_address
= get_frame_base
;
561 current_gdbarch
->frame_locals_address
= get_frame_base
;
562 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
563 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
564 current_gdbarch
->smash_text_address
= core_addr_identity
;
565 current_gdbarch
->print_insn
= legacy_print_insn
;
566 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
567 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
568 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
569 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
570 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
571 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
572 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
573 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
574 current_gdbarch
->name_of_malloc
= "malloc";
575 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
576 /* gdbarch_alloc() */
578 return current_gdbarch
;
582 /* Free a gdbarch struct. This should never happen in normal
583 operation --- once you've created a gdbarch, you keep it around.
584 However, if an architecture's init function encounters an error
585 building the structure, it may need to clean up a partially
586 constructed gdbarch. */
589 gdbarch_free (struct gdbarch
*arch
)
591 gdb_assert (arch
!= NULL
);
592 free_gdbarch_data (arch
);
597 /* Ensure that all values in a GDBARCH are reasonable. */
600 verify_gdbarch (struct gdbarch
*gdbarch
)
603 struct cleanup
*cleanups
;
606 /* Only perform sanity checks on a multi-arch target. */
609 log
= mem_fileopen ();
610 cleanups
= make_cleanup_ui_file_delete (log
);
612 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
613 fprintf_unfiltered (log
, "\n\tbyte-order");
614 if (gdbarch
->bfd_arch_info
== NULL
)
615 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
616 /* Check those that need to be defined for the given multi-arch level. */
617 /* Skip verify of short_bit, invalid_p == 0 */
618 /* Skip verify of int_bit, invalid_p == 0 */
619 /* Skip verify of long_bit, invalid_p == 0 */
620 /* Skip verify of long_long_bit, invalid_p == 0 */
621 /* Skip verify of float_bit, invalid_p == 0 */
622 /* Skip verify of double_bit, invalid_p == 0 */
623 /* Skip verify of long_double_bit, invalid_p == 0 */
624 /* Skip verify of ptr_bit, invalid_p == 0 */
625 if (gdbarch
->addr_bit
== 0)
626 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
627 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
628 if (gdbarch
->char_signed
== -1)
629 gdbarch
->char_signed
= 1;
630 /* Skip verify of read_pc, invalid_p == 0 */
631 /* Skip verify of write_pc, invalid_p == 0 */
632 /* Skip verify of read_fp, invalid_p == 0 */
633 /* Skip verify of read_sp, invalid_p == 0 */
634 /* Skip verify of write_sp, invalid_p == 0 */
635 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
636 /* Skip verify of pseudo_register_read, has predicate */
637 /* Skip verify of pseudo_register_write, has predicate */
638 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
639 && (gdbarch
->num_regs
== -1))
640 fprintf_unfiltered (log
, "\n\tnum_regs");
641 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
642 /* Skip verify of sp_regnum, invalid_p == 0 */
643 /* Skip verify of fp_regnum, invalid_p == 0 */
644 /* Skip verify of pc_regnum, invalid_p == 0 */
645 /* Skip verify of ps_regnum, invalid_p == 0 */
646 /* Skip verify of fp0_regnum, invalid_p == 0 */
647 /* Skip verify of npc_regnum, invalid_p == 0 */
648 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
649 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
650 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
651 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
652 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
653 /* Skip verify of register_name, invalid_p == 0 */
654 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
655 && (gdbarch
->register_size
== -1))
656 fprintf_unfiltered (log
, "\n\tregister_size");
657 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
658 && (gdbarch
->register_bytes
== -1))
659 fprintf_unfiltered (log
, "\n\tregister_bytes");
660 /* Skip verify of register_byte, invalid_p == 0 */
661 /* Skip verify of register_raw_size, invalid_p == 0 */
662 /* Skip verify of deprecated_max_register_raw_size, has predicate */
663 /* Skip verify of register_virtual_size, invalid_p == 0 */
664 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
665 /* Skip verify of register_virtual_type, has predicate */
666 /* Skip verify of register_type, has predicate */
667 /* Skip verify of deprecated_do_registers_info, has predicate */
668 /* Skip verify of print_registers_info, invalid_p == 0 */
669 /* Skip verify of print_float_info, has predicate */
670 /* Skip verify of print_vector_info, has predicate */
671 /* Skip verify of register_sim_regno, invalid_p == 0 */
672 /* Skip verify of register_bytes_ok, has predicate */
673 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
674 /* Skip verify of cannot_store_register, invalid_p == 0 */
675 /* Skip verify of get_longjmp_target, has predicate */
676 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
677 /* Skip verify of call_dummy_location, invalid_p == 0 */
678 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
679 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
680 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
681 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
682 && (gdbarch
->call_dummy_start_offset
== -1))
683 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
684 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
685 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
686 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
687 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
688 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
689 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
690 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
691 && (gdbarch
->call_dummy_length
== -1))
692 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
693 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
694 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
695 && (gdbarch
->call_dummy_p
== -1))
696 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
697 /* Skip verify of call_dummy_words, invalid_p == 0 */
698 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
699 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
700 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
701 && (gdbarch
->fix_call_dummy
== 0))
702 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
703 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
704 /* Skip verify of deprecated_init_frame_pc, has predicate */
705 /* Skip verify of deprecated_get_saved_register, has predicate */
706 /* Skip verify of register_convertible, invalid_p == 0 */
707 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
708 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
709 /* Skip verify of convert_register_p, invalid_p == 0 */
710 /* Skip verify of register_to_value, invalid_p == 0 */
711 /* Skip verify of value_to_register, invalid_p == 0 */
712 /* Skip verify of pointer_to_address, invalid_p == 0 */
713 /* Skip verify of address_to_pointer, invalid_p == 0 */
714 /* Skip verify of integer_to_address, has predicate */
715 /* Skip verify of return_value_on_stack, invalid_p == 0 */
716 /* Skip verify of push_arguments, invalid_p == 0 */
717 /* Skip verify of deprecated_push_dummy_frame, has predicate */
718 /* Skip verify of push_return_address, has predicate */
719 /* Skip verify of deprecated_pop_frame, has predicate */
720 /* Skip verify of deprecated_store_struct_return, has predicate */
721 /* Skip verify of extract_return_value, invalid_p == 0 */
722 /* Skip verify of store_return_value, invalid_p == 0 */
723 /* Skip verify of extract_struct_value_address, has predicate */
724 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
725 /* Skip verify of use_struct_convention, invalid_p == 0 */
726 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
727 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
728 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
729 && (gdbarch
->skip_prologue
== 0))
730 fprintf_unfiltered (log
, "\n\tskip_prologue");
731 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
733 && (gdbarch
->inner_than
== 0))
734 fprintf_unfiltered (log
, "\n\tinner_than");
735 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
736 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
737 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
738 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
739 && (gdbarch
->decr_pc_after_break
== -1))
740 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
741 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
742 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
743 && (gdbarch
->function_start_offset
== -1))
744 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
745 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
746 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
747 && (gdbarch
->frame_args_skip
== -1))
748 fprintf_unfiltered (log
, "\n\tframe_args_skip");
749 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
750 /* Skip verify of deprecated_frame_chain, has predicate */
751 /* Skip verify of deprecated_frame_chain_valid, has predicate */
752 /* Skip verify of deprecated_frame_saved_pc, has predicate */
753 /* Skip verify of unwind_pc, has predicate */
754 /* Skip verify of frame_args_address, invalid_p == 0 */
755 /* Skip verify of frame_locals_address, invalid_p == 0 */
756 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
757 && (gdbarch
->saved_pc_after_call
== 0))
758 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
759 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
760 && (gdbarch
->frame_num_args
== 0))
761 fprintf_unfiltered (log
, "\n\tframe_num_args");
762 /* Skip verify of stack_align, has predicate */
763 /* Skip verify of frame_align, has predicate */
764 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
765 /* Skip verify of reg_struct_has_addr, has predicate */
766 /* Skip verify of save_dummy_frame_tos, has predicate */
767 /* Skip verify of unwind_dummy_id, has predicate */
768 if (gdbarch
->float_format
== 0)
769 gdbarch
->float_format
= default_float_format (gdbarch
);
770 if (gdbarch
->double_format
== 0)
771 gdbarch
->double_format
= default_double_format (gdbarch
);
772 if (gdbarch
->long_double_format
== 0)
773 gdbarch
->long_double_format
= default_double_format (gdbarch
);
774 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
775 /* Skip verify of addr_bits_remove, invalid_p == 0 */
776 /* Skip verify of smash_text_address, invalid_p == 0 */
777 /* Skip verify of software_single_step, has predicate */
778 /* Skip verify of print_insn, invalid_p == 0 */
779 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
780 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
781 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
782 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
783 /* Skip verify of sigtramp_start, has predicate */
784 /* Skip verify of sigtramp_end, has predicate */
785 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
786 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
787 /* Skip verify of dwarf2_build_frame_info, has predicate */
788 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
789 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
790 /* Skip verify of name_of_malloc, invalid_p == 0 */
791 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
792 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
793 /* Skip verify of address_class_type_flags, has predicate */
794 /* Skip verify of address_class_type_flags_to_name, has predicate */
795 /* Skip verify of address_class_name_to_type_flags, has predicate */
796 /* Skip verify of register_reggroup_p, invalid_p == 0 */
797 buf
= ui_file_xstrdup (log
, &dummy
);
798 make_cleanup (xfree
, buf
);
799 if (strlen (buf
) > 0)
800 internal_error (__FILE__
, __LINE__
,
801 "verify_gdbarch: the following are invalid ...%s",
803 do_cleanups (cleanups
);
807 /* Print out the details of the current architecture. */
809 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
810 just happens to match the global variable ``current_gdbarch''. That
811 way macros refering to that variable get the local and not the global
812 version - ulgh. Once everything is parameterised with gdbarch, this
816 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
824 gdbarch_frame_align_p (current_gdbarch
));
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: frame_align = 0x%08lx\n",
828 (long) current_gdbarch
->frame_align
);
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
832 (long) current_gdbarch
->in_function_epilogue_p
);
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
836 (long) current_gdbarch
->register_reggroup_p
);
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
840 gdbarch_pseudo_register_read_p (current_gdbarch
));
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
844 (long) current_gdbarch
->pseudo_register_read
);
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
848 gdbarch_pseudo_register_write_p (current_gdbarch
));
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
852 (long) current_gdbarch
->pseudo_register_write
);
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
856 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
860 (long) current_gdbarch
->address_class_name_to_type_flags
);
861 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
862 fprintf_unfiltered (file
,
863 "gdbarch_dump: %s # %s\n",
864 "ADDRESS_CLASS_TYPE_FLAGS_P()",
865 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
868 ADDRESS_CLASS_TYPE_FLAGS_P ());
870 #ifdef ADDRESS_CLASS_TYPE_FLAGS
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: %s # %s\n",
873 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
874 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
878 (long) current_gdbarch
->address_class_type_flags
879 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
884 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
888 (long) current_gdbarch
->address_class_type_flags_to_name
);
889 #ifdef ADDRESS_TO_POINTER
891 /* Macro might contain `[{}]' when not multi-arch */
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: %s # %s\n",
894 "ADDRESS_TO_POINTER(type, buf, addr)",
895 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
900 (long) current_gdbarch
->address_to_pointer
901 /*ADDRESS_TO_POINTER ()*/);
903 #ifdef ADDR_BITS_REMOVE
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: %s # %s\n",
906 "ADDR_BITS_REMOVE(addr)",
907 XSTRING (ADDR_BITS_REMOVE (addr
)));
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
911 (long) current_gdbarch
->addr_bits_remove
912 /*ADDR_BITS_REMOVE ()*/);
914 #ifdef BELIEVE_PCC_PROMOTION
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
917 XSTRING (BELIEVE_PCC_PROMOTION
));
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
920 BELIEVE_PCC_PROMOTION
);
922 #ifdef BELIEVE_PCC_PROMOTION_TYPE
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
925 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
928 BELIEVE_PCC_PROMOTION_TYPE
);
930 #ifdef BREAKPOINT_FROM_PC
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: %s # %s\n",
933 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
934 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
938 (long) current_gdbarch
->breakpoint_from_pc
939 /*BREAKPOINT_FROM_PC ()*/);
941 #ifdef CALL_DUMMY_ADDRESS
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: %s # %s\n",
944 "CALL_DUMMY_ADDRESS()",
945 XSTRING (CALL_DUMMY_ADDRESS ()));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
949 (long) current_gdbarch
->call_dummy_address
950 /*CALL_DUMMY_ADDRESS ()*/);
952 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
955 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
956 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
959 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
961 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
964 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
967 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
969 #ifdef CALL_DUMMY_LENGTH
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
972 XSTRING (CALL_DUMMY_LENGTH
));
973 if (gdbarch
->call_dummy_length
>= 0)
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
978 #ifdef CALL_DUMMY_LOCATION
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
981 XSTRING (CALL_DUMMY_LOCATION
));
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
984 CALL_DUMMY_LOCATION
);
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: CALL_DUMMY_P # %s\n",
989 XSTRING (CALL_DUMMY_P
));
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: CALL_DUMMY_P = %d\n",
994 #ifdef CALL_DUMMY_START_OFFSET
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
997 XSTRING (CALL_DUMMY_START_OFFSET
));
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1000 (long) CALL_DUMMY_START_OFFSET
);
1002 #ifdef CALL_DUMMY_WORDS
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1005 XSTRING (CALL_DUMMY_WORDS
));
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1008 (long) CALL_DUMMY_WORDS
);
1010 #ifdef CANNOT_FETCH_REGISTER
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: %s # %s\n",
1013 "CANNOT_FETCH_REGISTER(regnum)",
1014 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
1018 (long) current_gdbarch
->cannot_fetch_register
1019 /*CANNOT_FETCH_REGISTER ()*/);
1021 #ifdef CANNOT_STEP_BREAKPOINT
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1024 XSTRING (CANNOT_STEP_BREAKPOINT
));
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1027 CANNOT_STEP_BREAKPOINT
);
1029 #ifdef CANNOT_STORE_REGISTER
1030 fprintf_unfiltered (file
,
1031 "gdbarch_dump: %s # %s\n",
1032 "CANNOT_STORE_REGISTER(regnum)",
1033 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
1037 (long) current_gdbarch
->cannot_store_register
1038 /*CANNOT_STORE_REGISTER ()*/);
1040 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1042 /* Macro might contain `[{}]' when not multi-arch */
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: %s # %s\n",
1045 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1046 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1051 (long) current_gdbarch
->coff_make_msymbol_special
1052 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1057 (long) current_gdbarch
->construct_inferior_arguments
);
1058 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: %s # %s\n",
1061 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1062 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1066 (long) current_gdbarch
->convert_from_func_ptr_addr
1067 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1069 #ifdef CONVERT_REGISTER_P
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: %s # %s\n",
1072 "CONVERT_REGISTER_P(regnum)",
1073 XSTRING (CONVERT_REGISTER_P (regnum
)));
1075 fprintf_unfiltered (file
,
1076 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1077 (long) current_gdbarch
->convert_register_p
1078 /*CONVERT_REGISTER_P ()*/);
1080 #ifdef DECR_PC_AFTER_BREAK
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1083 XSTRING (DECR_PC_AFTER_BREAK
));
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1086 (long) DECR_PC_AFTER_BREAK
);
1088 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: %s # %s\n",
1091 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1092 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1093 fprintf_unfiltered (file
,
1094 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1095 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1097 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1100 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST
));
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1103 DEPRECATED_CALL_DUMMY_STACK_ADJUST
);
1105 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: %s # %s\n",
1108 "DEPRECATED_DO_REGISTERS_INFO_P()",
1109 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1112 DEPRECATED_DO_REGISTERS_INFO_P ());
1114 #ifdef DEPRECATED_DO_REGISTERS_INFO
1116 /* Macro might contain `[{}]' when not multi-arch */
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: %s # %s\n",
1119 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1120 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1125 (long) current_gdbarch
->deprecated_do_registers_info
1126 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1128 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1130 /* Macro might contain `[{}]' when not multi-arch */
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: %s # %s\n",
1133 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1134 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1139 (long) current_gdbarch
->deprecated_extract_return_value
1140 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1142 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: %s # %s\n",
1145 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1146 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1149 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1151 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: %s # %s\n",
1154 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1155 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1159 (long) current_gdbarch
->deprecated_extract_struct_value_address
1160 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1162 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1165 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
));
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1168 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
);
1170 #ifdef DEPRECATED_FRAME_CHAIN_P
1171 fprintf_unfiltered (file
,
1172 "gdbarch_dump: %s # %s\n",
1173 "DEPRECATED_FRAME_CHAIN_P()",
1174 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1177 DEPRECATED_FRAME_CHAIN_P ());
1179 #ifdef DEPRECATED_FRAME_CHAIN
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: %s # %s\n",
1182 "DEPRECATED_FRAME_CHAIN(frame)",
1183 XSTRING (DEPRECATED_FRAME_CHAIN (frame
)));
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1187 (long) current_gdbarch
->deprecated_frame_chain
1188 /*DEPRECATED_FRAME_CHAIN ()*/);
1190 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: %s # %s\n",
1193 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1194 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1197 DEPRECATED_FRAME_CHAIN_VALID_P ());
1199 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: %s # %s\n",
1202 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1203 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain
, thisframe
)));
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1207 (long) current_gdbarch
->deprecated_frame_chain_valid
1208 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1210 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1213 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1214 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1217 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1219 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1221 /* Macro might contain `[{}]' when not multi-arch */
1222 fprintf_unfiltered (file
,
1223 "gdbarch_dump: %s # %s\n",
1224 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1225 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1230 (long) current_gdbarch
->deprecated_frame_init_saved_regs
1231 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1233 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1234 fprintf_unfiltered (file
,
1235 "gdbarch_dump: %s # %s\n",
1236 "DEPRECATED_FRAME_SAVED_PC_P()",
1237 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1240 DEPRECATED_FRAME_SAVED_PC_P ());
1242 #ifdef DEPRECATED_FRAME_SAVED_PC
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: %s # %s\n",
1245 "DEPRECATED_FRAME_SAVED_PC(fi)",
1246 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi
)));
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1250 (long) current_gdbarch
->deprecated_frame_saved_pc
1251 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1253 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: %s # %s\n",
1256 "DEPRECATED_GET_SAVED_REGISTER_P()",
1257 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1260 DEPRECATED_GET_SAVED_REGISTER_P ());
1262 #ifdef DEPRECATED_GET_SAVED_REGISTER
1264 /* Macro might contain `[{}]' when not multi-arch */
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: %s # %s\n",
1267 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1268 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1273 (long) current_gdbarch
->deprecated_get_saved_register
1274 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1276 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: %s # %s\n",
1279 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1280 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1283 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1285 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1287 /* Macro might contain `[{}]' when not multi-arch */
1288 fprintf_unfiltered (file
,
1289 "gdbarch_dump: %s # %s\n",
1290 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1291 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1296 (long) current_gdbarch
->deprecated_init_extra_frame_info
1297 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1299 #ifdef DEPRECATED_INIT_FRAME_PC_P
1300 fprintf_unfiltered (file
,
1301 "gdbarch_dump: %s # %s\n",
1302 "DEPRECATED_INIT_FRAME_PC_P()",
1303 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1306 DEPRECATED_INIT_FRAME_PC_P ());
1308 #ifdef DEPRECATED_INIT_FRAME_PC
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: %s # %s\n",
1311 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1312 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1314 fprintf_unfiltered (file
,
1315 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1316 (long) current_gdbarch
->deprecated_init_frame_pc
1317 /*DEPRECATED_INIT_FRAME_PC ()*/);
1319 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1320 fprintf_unfiltered (file
,
1321 "gdbarch_dump: %s # %s\n",
1322 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1323 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1326 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1328 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: %s # %s\n",
1331 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1332 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1336 (long) current_gdbarch
->deprecated_init_frame_pc_first
1337 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1339 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: %s # %s\n",
1342 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1343 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1346 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1348 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1351 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE
));
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1354 DEPRECATED_MAX_REGISTER_RAW_SIZE
);
1356 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: %s # %s\n",
1359 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1360 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1363 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1365 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1366 fprintf_unfiltered (file
,
1367 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1368 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
));
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1371 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
);
1373 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: %s # %s\n",
1376 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1377 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1380 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1382 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: %s # %s\n",
1385 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1386 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1390 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1391 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1393 #ifdef DEPRECATED_POP_FRAME_P
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: %s # %s\n",
1396 "DEPRECATED_POP_FRAME_P()",
1397 XSTRING (DEPRECATED_POP_FRAME_P ()));
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1400 DEPRECATED_POP_FRAME_P ());
1402 #ifdef DEPRECATED_POP_FRAME
1404 /* Macro might contain `[{}]' when not multi-arch */
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: %s # %s\n",
1407 "DEPRECATED_POP_FRAME(-)",
1408 XSTRING (DEPRECATED_POP_FRAME (-)));
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1413 (long) current_gdbarch
->deprecated_pop_frame
1414 /*DEPRECATED_POP_FRAME ()*/);
1416 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: %s # %s\n",
1419 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1420 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1423 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1425 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1427 /* Macro might contain `[{}]' when not multi-arch */
1428 fprintf_unfiltered (file
,
1429 "gdbarch_dump: %s # %s\n",
1430 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1431 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1434 fprintf_unfiltered (file
,
1435 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1436 (long) current_gdbarch
->deprecated_push_dummy_frame
1437 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1439 #ifdef DEPRECATED_STORE_RETURN_VALUE
1441 /* Macro might contain `[{}]' when not multi-arch */
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: %s # %s\n",
1444 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1445 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1450 (long) current_gdbarch
->deprecated_store_return_value
1451 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1453 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: %s # %s\n",
1456 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1457 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1460 DEPRECATED_STORE_STRUCT_RETURN_P ());
1462 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1464 /* Macro might contain `[{}]' when not multi-arch */
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: %s # %s\n",
1467 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1468 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1473 (long) current_gdbarch
->deprecated_store_struct_return
1474 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1476 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1479 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
));
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1482 DEPRECATED_USE_GENERIC_DUMMY_FRAMES
);
1484 #ifdef DWARF2_BUILD_FRAME_INFO_P
1485 fprintf_unfiltered (file
,
1486 "gdbarch_dump: %s # %s\n",
1487 "DWARF2_BUILD_FRAME_INFO_P()",
1488 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1489 fprintf_unfiltered (file
,
1490 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1491 DWARF2_BUILD_FRAME_INFO_P ());
1493 #ifdef DWARF2_BUILD_FRAME_INFO
1495 /* Macro might contain `[{}]' when not multi-arch */
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: %s # %s\n",
1498 "DWARF2_BUILD_FRAME_INFO(objfile)",
1499 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1502 fprintf_unfiltered (file
,
1503 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1504 (long) current_gdbarch
->dwarf2_build_frame_info
1505 /*DWARF2_BUILD_FRAME_INFO ()*/);
1507 #ifdef DWARF2_REG_TO_REGNUM
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: %s # %s\n",
1510 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1511 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1515 (long) current_gdbarch
->dwarf2_reg_to_regnum
1516 /*DWARF2_REG_TO_REGNUM ()*/);
1518 #ifdef DWARF_REG_TO_REGNUM
1519 fprintf_unfiltered (file
,
1520 "gdbarch_dump: %s # %s\n",
1521 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1522 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1524 fprintf_unfiltered (file
,
1525 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1526 (long) current_gdbarch
->dwarf_reg_to_regnum
1527 /*DWARF_REG_TO_REGNUM ()*/);
1529 #ifdef ECOFF_REG_TO_REGNUM
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: %s # %s\n",
1532 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1533 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1535 fprintf_unfiltered (file
,
1536 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1537 (long) current_gdbarch
->ecoff_reg_to_regnum
1538 /*ECOFF_REG_TO_REGNUM ()*/);
1540 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1542 /* Macro might contain `[{}]' when not multi-arch */
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: %s # %s\n",
1545 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1546 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1551 (long) current_gdbarch
->elf_make_msymbol_special
1552 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1554 #ifdef EXTRACT_RETURN_VALUE
1556 /* Macro might contain `[{}]' when not multi-arch */
1557 fprintf_unfiltered (file
,
1558 "gdbarch_dump: %s # %s\n",
1559 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1560 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1565 (long) current_gdbarch
->extract_return_value
1566 /*EXTRACT_RETURN_VALUE ()*/);
1568 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1569 fprintf_unfiltered (file
,
1570 "gdbarch_dump: %s # %s\n",
1571 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1572 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1575 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1577 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1578 fprintf_unfiltered (file
,
1579 "gdbarch_dump: %s # %s\n",
1580 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1581 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1585 (long) current_gdbarch
->extract_struct_value_address
1586 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1588 #ifdef FIX_CALL_DUMMY
1590 /* Macro might contain `[{}]' when not multi-arch */
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: %s # %s\n",
1593 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1594 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1599 (long) current_gdbarch
->fix_call_dummy
1600 /*FIX_CALL_DUMMY ()*/);
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: FP0_REGNUM # %s\n",
1605 XSTRING (FP0_REGNUM
));
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: FP0_REGNUM = %d\n",
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: FP_REGNUM # %s\n",
1613 XSTRING (FP_REGNUM
));
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: FP_REGNUM = %d\n",
1618 #ifdef FRAMELESS_FUNCTION_INVOCATION
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: %s # %s\n",
1621 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1622 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1624 fprintf_unfiltered (file
,
1625 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1626 (long) current_gdbarch
->frameless_function_invocation
1627 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1629 #ifdef FRAME_ARGS_ADDRESS
1630 fprintf_unfiltered (file
,
1631 "gdbarch_dump: %s # %s\n",
1632 "FRAME_ARGS_ADDRESS(fi)",
1633 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1637 (long) current_gdbarch
->frame_args_address
1638 /*FRAME_ARGS_ADDRESS ()*/);
1640 #ifdef FRAME_ARGS_SKIP
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1643 XSTRING (FRAME_ARGS_SKIP
));
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1646 (long) FRAME_ARGS_SKIP
);
1648 #ifdef FRAME_LOCALS_ADDRESS
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: %s # %s\n",
1651 "FRAME_LOCALS_ADDRESS(fi)",
1652 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1654 fprintf_unfiltered (file
,
1655 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1656 (long) current_gdbarch
->frame_locals_address
1657 /*FRAME_LOCALS_ADDRESS ()*/);
1659 #ifdef FRAME_NUM_ARGS
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: %s # %s\n",
1662 "FRAME_NUM_ARGS(frame)",
1663 XSTRING (FRAME_NUM_ARGS (frame
)));
1665 fprintf_unfiltered (file
,
1666 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1667 (long) current_gdbarch
->frame_num_args
1668 /*FRAME_NUM_ARGS ()*/);
1670 #ifdef FUNCTION_START_OFFSET
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1673 XSTRING (FUNCTION_START_OFFSET
));
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1676 (long) FUNCTION_START_OFFSET
);
1678 #ifdef GET_LONGJMP_TARGET_P
1679 fprintf_unfiltered (file
,
1680 "gdbarch_dump: %s # %s\n",
1681 "GET_LONGJMP_TARGET_P()",
1682 XSTRING (GET_LONGJMP_TARGET_P ()));
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1685 GET_LONGJMP_TARGET_P ());
1687 #ifdef GET_LONGJMP_TARGET
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: %s # %s\n",
1690 "GET_LONGJMP_TARGET(pc)",
1691 XSTRING (GET_LONGJMP_TARGET (pc
)));
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1695 (long) current_gdbarch
->get_longjmp_target
1696 /*GET_LONGJMP_TARGET ()*/);
1698 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1701 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1702 fprintf_unfiltered (file
,
1703 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1704 HAVE_NONSTEPPABLE_WATCHPOINT
);
1707 fprintf_unfiltered (file
,
1708 "gdbarch_dump: %s # %s\n",
1709 "INNER_THAN(lhs, rhs)",
1710 XSTRING (INNER_THAN (lhs
, rhs
)));
1712 fprintf_unfiltered (file
,
1713 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1714 (long) current_gdbarch
->inner_than
1717 #ifdef INTEGER_TO_ADDRESS_P
1718 fprintf_unfiltered (file
,
1719 "gdbarch_dump: %s # %s\n",
1720 "INTEGER_TO_ADDRESS_P()",
1721 XSTRING (INTEGER_TO_ADDRESS_P ()));
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1724 INTEGER_TO_ADDRESS_P ());
1726 #ifdef INTEGER_TO_ADDRESS
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: %s # %s\n",
1729 "INTEGER_TO_ADDRESS(type, buf)",
1730 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1732 fprintf_unfiltered (file
,
1733 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1734 (long) current_gdbarch
->integer_to_address
1735 /*INTEGER_TO_ADDRESS ()*/);
1737 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1738 fprintf_unfiltered (file
,
1739 "gdbarch_dump: %s # %s\n",
1740 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1741 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1743 fprintf_unfiltered (file
,
1744 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1745 (long) current_gdbarch
->in_solib_call_trampoline
1746 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1748 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: %s # %s\n",
1751 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1752 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1756 (long) current_gdbarch
->in_solib_return_trampoline
1757 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1759 #ifdef MEMORY_INSERT_BREAKPOINT
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: %s # %s\n",
1762 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1763 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1767 (long) current_gdbarch
->memory_insert_breakpoint
1768 /*MEMORY_INSERT_BREAKPOINT ()*/);
1770 #ifdef MEMORY_REMOVE_BREAKPOINT
1771 fprintf_unfiltered (file
,
1772 "gdbarch_dump: %s # %s\n",
1773 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1774 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1778 (long) current_gdbarch
->memory_remove_breakpoint
1779 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1781 #ifdef NAME_OF_MALLOC
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1784 XSTRING (NAME_OF_MALLOC
));
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: NPC_REGNUM # %s\n",
1792 XSTRING (NPC_REGNUM
));
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: NPC_REGNUM = %d\n",
1797 #ifdef NUM_PSEUDO_REGS
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1800 XSTRING (NUM_PSEUDO_REGS
));
1801 fprintf_unfiltered (file
,
1802 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: NUM_REGS # %s\n",
1808 XSTRING (NUM_REGS
));
1809 fprintf_unfiltered (file
,
1810 "gdbarch_dump: NUM_REGS = %d\n",
1813 #ifdef PARM_BOUNDARY
1814 fprintf_unfiltered (file
,
1815 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1816 XSTRING (PARM_BOUNDARY
));
1817 fprintf_unfiltered (file
,
1818 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1821 #ifdef PC_IN_SIGTRAMP
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: %s # %s\n",
1824 "PC_IN_SIGTRAMP(pc, name)",
1825 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1827 fprintf_unfiltered (file
,
1828 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1829 (long) current_gdbarch
->pc_in_sigtramp
1830 /*PC_IN_SIGTRAMP ()*/);
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: PC_REGNUM # %s\n",
1835 XSTRING (PC_REGNUM
));
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: PC_REGNUM = %d\n",
1840 #ifdef POINTER_TO_ADDRESS
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: %s # %s\n",
1843 "POINTER_TO_ADDRESS(type, buf)",
1844 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1848 (long) current_gdbarch
->pointer_to_address
1849 /*POINTER_TO_ADDRESS ()*/);
1851 #ifdef PREPARE_TO_PROCEED
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: %s # %s\n",
1854 "PREPARE_TO_PROCEED(select_it)",
1855 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1859 (long) current_gdbarch
->prepare_to_proceed
1860 /*PREPARE_TO_PROCEED ()*/);
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1865 gdbarch_print_float_info_p (current_gdbarch
));
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: print_float_info = 0x%08lx\n",
1869 (long) current_gdbarch
->print_float_info
);
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1873 (long) current_gdbarch
->print_registers_info
);
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1877 gdbarch_print_vector_info_p (current_gdbarch
));
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1881 (long) current_gdbarch
->print_vector_info
);
1882 #ifdef PROLOGUE_FRAMELESS_P
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: %s # %s\n",
1885 "PROLOGUE_FRAMELESS_P(ip)",
1886 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1890 (long) current_gdbarch
->prologue_frameless_p
1891 /*PROLOGUE_FRAMELESS_P ()*/);
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: PS_REGNUM # %s\n",
1896 XSTRING (PS_REGNUM
));
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: PS_REGNUM = %d\n",
1901 #ifdef PUSH_ARGUMENTS
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: %s # %s\n",
1904 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1905 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1907 fprintf_unfiltered (file
,
1908 "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n",
1909 (long) current_gdbarch
->push_arguments
1910 /*PUSH_ARGUMENTS ()*/);
1912 #ifdef PUSH_RETURN_ADDRESS_P
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: %s # %s\n",
1915 "PUSH_RETURN_ADDRESS_P()",
1916 XSTRING (PUSH_RETURN_ADDRESS_P ()));
1917 fprintf_unfiltered (file
,
1918 "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n",
1919 PUSH_RETURN_ADDRESS_P ());
1921 #ifdef PUSH_RETURN_ADDRESS
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: %s # %s\n",
1924 "PUSH_RETURN_ADDRESS(pc, sp)",
1925 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1929 (long) current_gdbarch
->push_return_address
1930 /*PUSH_RETURN_ADDRESS ()*/);
1932 #ifdef REGISTER_BYTE
1933 fprintf_unfiltered (file
,
1934 "gdbarch_dump: %s # %s\n",
1935 "REGISTER_BYTE(reg_nr)",
1936 XSTRING (REGISTER_BYTE (reg_nr
)));
1938 fprintf_unfiltered (file
,
1939 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1940 (long) current_gdbarch
->register_byte
1941 /*REGISTER_BYTE ()*/);
1943 #ifdef REGISTER_BYTES
1944 fprintf_unfiltered (file
,
1945 "gdbarch_dump: REGISTER_BYTES # %s\n",
1946 XSTRING (REGISTER_BYTES
));
1947 fprintf_unfiltered (file
,
1948 "gdbarch_dump: REGISTER_BYTES = %d\n",
1951 #ifdef REGISTER_BYTES_OK_P
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: %s # %s\n",
1954 "REGISTER_BYTES_OK_P()",
1955 XSTRING (REGISTER_BYTES_OK_P ()));
1956 fprintf_unfiltered (file
,
1957 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1958 REGISTER_BYTES_OK_P ());
1960 #ifdef REGISTER_BYTES_OK
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: %s # %s\n",
1963 "REGISTER_BYTES_OK(nr_bytes)",
1964 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1968 (long) current_gdbarch
->register_bytes_ok
1969 /*REGISTER_BYTES_OK ()*/);
1971 #ifdef REGISTER_CONVERTIBLE
1972 fprintf_unfiltered (file
,
1973 "gdbarch_dump: %s # %s\n",
1974 "REGISTER_CONVERTIBLE(nr)",
1975 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1977 fprintf_unfiltered (file
,
1978 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
1979 (long) current_gdbarch
->register_convertible
1980 /*REGISTER_CONVERTIBLE ()*/);
1982 #ifdef REGISTER_CONVERT_TO_RAW
1984 /* Macro might contain `[{}]' when not multi-arch */
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: %s # %s\n",
1987 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1988 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1993 (long) current_gdbarch
->register_convert_to_raw
1994 /*REGISTER_CONVERT_TO_RAW ()*/);
1996 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1998 /* Macro might contain `[{}]' when not multi-arch */
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: %s # %s\n",
2001 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2002 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
2005 fprintf_unfiltered (file
,
2006 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2007 (long) current_gdbarch
->register_convert_to_virtual
2008 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2010 #ifdef REGISTER_NAME
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: %s # %s\n",
2013 "REGISTER_NAME(regnr)",
2014 XSTRING (REGISTER_NAME (regnr
)));
2016 fprintf_unfiltered (file
,
2017 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2018 (long) current_gdbarch
->register_name
2019 /*REGISTER_NAME ()*/);
2021 #ifdef REGISTER_RAW_SIZE
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: %s # %s\n",
2024 "REGISTER_RAW_SIZE(reg_nr)",
2025 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2029 (long) current_gdbarch
->register_raw_size
2030 /*REGISTER_RAW_SIZE ()*/);
2032 #ifdef REGISTER_SIM_REGNO
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: %s # %s\n",
2035 "REGISTER_SIM_REGNO(reg_nr)",
2036 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2040 (long) current_gdbarch
->register_sim_regno
2041 /*REGISTER_SIM_REGNO ()*/);
2043 #ifdef REGISTER_SIZE
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: REGISTER_SIZE # %s\n",
2046 XSTRING (REGISTER_SIZE
));
2047 fprintf_unfiltered (file
,
2048 "gdbarch_dump: REGISTER_SIZE = %d\n",
2051 #ifdef REGISTER_TO_VALUE
2053 /* Macro might contain `[{}]' when not multi-arch */
2054 fprintf_unfiltered (file
,
2055 "gdbarch_dump: %s # %s\n",
2056 "REGISTER_TO_VALUE(regnum, type, from, to)",
2057 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2062 (long) current_gdbarch
->register_to_value
2063 /*REGISTER_TO_VALUE ()*/);
2066 fprintf_unfiltered (file
,
2067 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2068 gdbarch_register_type_p (current_gdbarch
));
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: register_type = 0x%08lx\n",
2072 (long) current_gdbarch
->register_type
);
2073 #ifdef REGISTER_VIRTUAL_SIZE
2074 fprintf_unfiltered (file
,
2075 "gdbarch_dump: %s # %s\n",
2076 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2077 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
2079 fprintf_unfiltered (file
,
2080 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2081 (long) current_gdbarch
->register_virtual_size
2082 /*REGISTER_VIRTUAL_SIZE ()*/);
2084 #ifdef REGISTER_VIRTUAL_TYPE_P
2085 fprintf_unfiltered (file
,
2086 "gdbarch_dump: %s # %s\n",
2087 "REGISTER_VIRTUAL_TYPE_P()",
2088 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2091 REGISTER_VIRTUAL_TYPE_P ());
2093 #ifdef REGISTER_VIRTUAL_TYPE
2094 fprintf_unfiltered (file
,
2095 "gdbarch_dump: %s # %s\n",
2096 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2097 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
2099 fprintf_unfiltered (file
,
2100 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2101 (long) current_gdbarch
->register_virtual_type
2102 /*REGISTER_VIRTUAL_TYPE ()*/);
2104 #ifdef REG_STRUCT_HAS_ADDR_P
2105 fprintf_unfiltered (file
,
2106 "gdbarch_dump: %s # %s\n",
2107 "REG_STRUCT_HAS_ADDR_P()",
2108 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2111 REG_STRUCT_HAS_ADDR_P ());
2113 #ifdef REG_STRUCT_HAS_ADDR
2114 fprintf_unfiltered (file
,
2115 "gdbarch_dump: %s # %s\n",
2116 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2117 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
2119 fprintf_unfiltered (file
,
2120 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2121 (long) current_gdbarch
->reg_struct_has_addr
2122 /*REG_STRUCT_HAS_ADDR ()*/);
2124 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2126 /* Macro might contain `[{}]' when not multi-arch */
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: %s # %s\n",
2129 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2130 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
2133 fprintf_unfiltered (file
,
2134 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2135 (long) current_gdbarch
->remote_translate_xfer_address
2136 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2138 #ifdef RETURN_VALUE_ON_STACK
2139 fprintf_unfiltered (file
,
2140 "gdbarch_dump: %s # %s\n",
2141 "RETURN_VALUE_ON_STACK(type)",
2142 XSTRING (RETURN_VALUE_ON_STACK (type
)));
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2146 (long) current_gdbarch
->return_value_on_stack
2147 /*RETURN_VALUE_ON_STACK ()*/);
2149 #ifdef SAVED_PC_AFTER_CALL
2150 fprintf_unfiltered (file
,
2151 "gdbarch_dump: %s # %s\n",
2152 "SAVED_PC_AFTER_CALL(frame)",
2153 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
2155 fprintf_unfiltered (file
,
2156 "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n",
2157 (long) current_gdbarch
->saved_pc_after_call
2158 /*SAVED_PC_AFTER_CALL ()*/);
2160 #ifdef SAVE_DUMMY_FRAME_TOS_P
2161 fprintf_unfiltered (file
,
2162 "gdbarch_dump: %s # %s\n",
2163 "SAVE_DUMMY_FRAME_TOS_P()",
2164 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2165 fprintf_unfiltered (file
,
2166 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2167 SAVE_DUMMY_FRAME_TOS_P ());
2169 #ifdef SAVE_DUMMY_FRAME_TOS
2171 /* Macro might contain `[{}]' when not multi-arch */
2172 fprintf_unfiltered (file
,
2173 "gdbarch_dump: %s # %s\n",
2174 "SAVE_DUMMY_FRAME_TOS(sp)",
2175 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
2178 fprintf_unfiltered (file
,
2179 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2180 (long) current_gdbarch
->save_dummy_frame_tos
2181 /*SAVE_DUMMY_FRAME_TOS ()*/);
2183 #ifdef SDB_REG_TO_REGNUM
2184 fprintf_unfiltered (file
,
2185 "gdbarch_dump: %s # %s\n",
2186 "SDB_REG_TO_REGNUM(sdb_regnr)",
2187 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
2189 fprintf_unfiltered (file
,
2190 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2191 (long) current_gdbarch
->sdb_reg_to_regnum
2192 /*SDB_REG_TO_REGNUM ()*/);
2194 #ifdef SIGTRAMP_END_P
2195 fprintf_unfiltered (file
,
2196 "gdbarch_dump: %s # %s\n",
2198 XSTRING (SIGTRAMP_END_P ()));
2199 fprintf_unfiltered (file
,
2200 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2204 fprintf_unfiltered (file
,
2205 "gdbarch_dump: %s # %s\n",
2207 XSTRING (SIGTRAMP_END (pc
)));
2209 fprintf_unfiltered (file
,
2210 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2211 (long) current_gdbarch
->sigtramp_end
2212 /*SIGTRAMP_END ()*/);
2214 #ifdef SIGTRAMP_START_P
2215 fprintf_unfiltered (file
,
2216 "gdbarch_dump: %s # %s\n",
2217 "SIGTRAMP_START_P()",
2218 XSTRING (SIGTRAMP_START_P ()));
2219 fprintf_unfiltered (file
,
2220 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2221 SIGTRAMP_START_P ());
2223 #ifdef SIGTRAMP_START
2224 fprintf_unfiltered (file
,
2225 "gdbarch_dump: %s # %s\n",
2226 "SIGTRAMP_START(pc)",
2227 XSTRING (SIGTRAMP_START (pc
)));
2229 fprintf_unfiltered (file
,
2230 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2231 (long) current_gdbarch
->sigtramp_start
2232 /*SIGTRAMP_START ()*/);
2234 #ifdef SIZEOF_CALL_DUMMY_WORDS
2235 fprintf_unfiltered (file
,
2236 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2237 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
2238 fprintf_unfiltered (file
,
2239 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
2240 (long) SIZEOF_CALL_DUMMY_WORDS
);
2242 #ifdef SKIP_PROLOGUE
2243 fprintf_unfiltered (file
,
2244 "gdbarch_dump: %s # %s\n",
2245 "SKIP_PROLOGUE(ip)",
2246 XSTRING (SKIP_PROLOGUE (ip
)));
2248 fprintf_unfiltered (file
,
2249 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2250 (long) current_gdbarch
->skip_prologue
2251 /*SKIP_PROLOGUE ()*/);
2253 #ifdef SKIP_TRAMPOLINE_CODE
2254 fprintf_unfiltered (file
,
2255 "gdbarch_dump: %s # %s\n",
2256 "SKIP_TRAMPOLINE_CODE(pc)",
2257 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
2259 fprintf_unfiltered (file
,
2260 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2261 (long) current_gdbarch
->skip_trampoline_code
2262 /*SKIP_TRAMPOLINE_CODE ()*/);
2264 #ifdef SMASH_TEXT_ADDRESS
2265 fprintf_unfiltered (file
,
2266 "gdbarch_dump: %s # %s\n",
2267 "SMASH_TEXT_ADDRESS(addr)",
2268 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2270 fprintf_unfiltered (file
,
2271 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2272 (long) current_gdbarch
->smash_text_address
2273 /*SMASH_TEXT_ADDRESS ()*/);
2275 #ifdef SOFTWARE_SINGLE_STEP_P
2276 fprintf_unfiltered (file
,
2277 "gdbarch_dump: %s # %s\n",
2278 "SOFTWARE_SINGLE_STEP_P()",
2279 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2280 fprintf_unfiltered (file
,
2281 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2282 SOFTWARE_SINGLE_STEP_P ());
2284 #ifdef SOFTWARE_SINGLE_STEP
2286 /* Macro might contain `[{}]' when not multi-arch */
2287 fprintf_unfiltered (file
,
2288 "gdbarch_dump: %s # %s\n",
2289 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2290 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2293 fprintf_unfiltered (file
,
2294 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2295 (long) current_gdbarch
->software_single_step
2296 /*SOFTWARE_SINGLE_STEP ()*/);
2299 fprintf_unfiltered (file
,
2300 "gdbarch_dump: SP_REGNUM # %s\n",
2301 XSTRING (SP_REGNUM
));
2302 fprintf_unfiltered (file
,
2303 "gdbarch_dump: SP_REGNUM = %d\n",
2306 #ifdef STAB_REG_TO_REGNUM
2307 fprintf_unfiltered (file
,
2308 "gdbarch_dump: %s # %s\n",
2309 "STAB_REG_TO_REGNUM(stab_regnr)",
2310 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2312 fprintf_unfiltered (file
,
2313 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2314 (long) current_gdbarch
->stab_reg_to_regnum
2315 /*STAB_REG_TO_REGNUM ()*/);
2317 #ifdef STACK_ALIGN_P
2318 fprintf_unfiltered (file
,
2319 "gdbarch_dump: %s # %s\n",
2321 XSTRING (STACK_ALIGN_P ()));
2322 fprintf_unfiltered (file
,
2323 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2327 fprintf_unfiltered (file
,
2328 "gdbarch_dump: %s # %s\n",
2330 XSTRING (STACK_ALIGN (sp
)));
2332 fprintf_unfiltered (file
,
2333 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2334 (long) current_gdbarch
->stack_align
2335 /*STACK_ALIGN ()*/);
2337 #ifdef STORE_RETURN_VALUE
2339 /* Macro might contain `[{}]' when not multi-arch */
2340 fprintf_unfiltered (file
,
2341 "gdbarch_dump: %s # %s\n",
2342 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2343 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2346 fprintf_unfiltered (file
,
2347 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2348 (long) current_gdbarch
->store_return_value
2349 /*STORE_RETURN_VALUE ()*/);
2351 #ifdef TARGET_ADDR_BIT
2352 fprintf_unfiltered (file
,
2353 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2354 XSTRING (TARGET_ADDR_BIT
));
2355 fprintf_unfiltered (file
,
2356 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2359 #ifdef TARGET_ARCHITECTURE
2360 fprintf_unfiltered (file
,
2361 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2362 XSTRING (TARGET_ARCHITECTURE
));
2363 if (TARGET_ARCHITECTURE
!= NULL
)
2364 fprintf_unfiltered (file
,
2365 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2366 TARGET_ARCHITECTURE
->printable_name
);
2368 #ifdef TARGET_BFD_VMA_BIT
2369 fprintf_unfiltered (file
,
2370 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2371 XSTRING (TARGET_BFD_VMA_BIT
));
2372 fprintf_unfiltered (file
,
2373 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2374 TARGET_BFD_VMA_BIT
);
2376 #ifdef TARGET_BYTE_ORDER
2377 fprintf_unfiltered (file
,
2378 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2379 XSTRING (TARGET_BYTE_ORDER
));
2380 fprintf_unfiltered (file
,
2381 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2382 (long) TARGET_BYTE_ORDER
);
2384 #ifdef TARGET_CHAR_SIGNED
2385 fprintf_unfiltered (file
,
2386 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2387 XSTRING (TARGET_CHAR_SIGNED
));
2388 fprintf_unfiltered (file
,
2389 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2390 TARGET_CHAR_SIGNED
);
2392 #ifdef TARGET_DOUBLE_BIT
2393 fprintf_unfiltered (file
,
2394 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2395 XSTRING (TARGET_DOUBLE_BIT
));
2396 fprintf_unfiltered (file
,
2397 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2400 #ifdef TARGET_DOUBLE_FORMAT
2401 fprintf_unfiltered (file
,
2402 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2403 XSTRING (TARGET_DOUBLE_FORMAT
));
2404 fprintf_unfiltered (file
,
2405 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2406 (TARGET_DOUBLE_FORMAT
)->name
);
2408 #ifdef TARGET_FLOAT_BIT
2409 fprintf_unfiltered (file
,
2410 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2411 XSTRING (TARGET_FLOAT_BIT
));
2412 fprintf_unfiltered (file
,
2413 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2416 #ifdef TARGET_FLOAT_FORMAT
2417 fprintf_unfiltered (file
,
2418 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2419 XSTRING (TARGET_FLOAT_FORMAT
));
2420 fprintf_unfiltered (file
,
2421 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2422 (TARGET_FLOAT_FORMAT
)->name
);
2424 #ifdef TARGET_INT_BIT
2425 fprintf_unfiltered (file
,
2426 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2427 XSTRING (TARGET_INT_BIT
));
2428 fprintf_unfiltered (file
,
2429 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2432 #ifdef TARGET_LONG_BIT
2433 fprintf_unfiltered (file
,
2434 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2435 XSTRING (TARGET_LONG_BIT
));
2436 fprintf_unfiltered (file
,
2437 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2440 #ifdef TARGET_LONG_DOUBLE_BIT
2441 fprintf_unfiltered (file
,
2442 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2443 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2444 fprintf_unfiltered (file
,
2445 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2446 TARGET_LONG_DOUBLE_BIT
);
2448 #ifdef TARGET_LONG_DOUBLE_FORMAT
2449 fprintf_unfiltered (file
,
2450 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2451 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2452 fprintf_unfiltered (file
,
2453 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2454 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2456 #ifdef TARGET_LONG_LONG_BIT
2457 fprintf_unfiltered (file
,
2458 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2459 XSTRING (TARGET_LONG_LONG_BIT
));
2460 fprintf_unfiltered (file
,
2461 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2462 TARGET_LONG_LONG_BIT
);
2465 fprintf_unfiltered (file
,
2466 "gdbarch_dump: TARGET_OSABI # %s\n",
2467 XSTRING (TARGET_OSABI
));
2468 fprintf_unfiltered (file
,
2469 "gdbarch_dump: TARGET_OSABI = %ld\n",
2470 (long) TARGET_OSABI
);
2472 #ifdef TARGET_PRINT_INSN
2473 fprintf_unfiltered (file
,
2474 "gdbarch_dump: %s # %s\n",
2475 "TARGET_PRINT_INSN(vma, info)",
2476 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2478 fprintf_unfiltered (file
,
2479 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2480 (long) current_gdbarch
->print_insn
2481 /*TARGET_PRINT_INSN ()*/);
2483 #ifdef TARGET_PTR_BIT
2484 fprintf_unfiltered (file
,
2485 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2486 XSTRING (TARGET_PTR_BIT
));
2487 fprintf_unfiltered (file
,
2488 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2491 #ifdef TARGET_READ_FP
2492 fprintf_unfiltered (file
,
2493 "gdbarch_dump: %s # %s\n",
2495 XSTRING (TARGET_READ_FP ()));
2497 fprintf_unfiltered (file
,
2498 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2499 (long) current_gdbarch
->read_fp
2500 /*TARGET_READ_FP ()*/);
2502 #ifdef TARGET_READ_PC
2503 fprintf_unfiltered (file
,
2504 "gdbarch_dump: %s # %s\n",
2505 "TARGET_READ_PC(ptid)",
2506 XSTRING (TARGET_READ_PC (ptid
)));
2508 fprintf_unfiltered (file
,
2509 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2510 (long) current_gdbarch
->read_pc
2511 /*TARGET_READ_PC ()*/);
2513 #ifdef TARGET_READ_SP
2514 fprintf_unfiltered (file
,
2515 "gdbarch_dump: %s # %s\n",
2517 XSTRING (TARGET_READ_SP ()));
2519 fprintf_unfiltered (file
,
2520 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2521 (long) current_gdbarch
->read_sp
2522 /*TARGET_READ_SP ()*/);
2524 #ifdef TARGET_SHORT_BIT
2525 fprintf_unfiltered (file
,
2526 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2527 XSTRING (TARGET_SHORT_BIT
));
2528 fprintf_unfiltered (file
,
2529 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2532 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2534 /* Macro might contain `[{}]' when not multi-arch */
2535 fprintf_unfiltered (file
,
2536 "gdbarch_dump: %s # %s\n",
2537 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2538 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2541 fprintf_unfiltered (file
,
2542 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2543 (long) current_gdbarch
->virtual_frame_pointer
2544 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2546 #ifdef TARGET_WRITE_PC
2548 /* Macro might contain `[{}]' when not multi-arch */
2549 fprintf_unfiltered (file
,
2550 "gdbarch_dump: %s # %s\n",
2551 "TARGET_WRITE_PC(val, ptid)",
2552 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2555 fprintf_unfiltered (file
,
2556 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2557 (long) current_gdbarch
->write_pc
2558 /*TARGET_WRITE_PC ()*/);
2560 #ifdef TARGET_WRITE_SP
2562 /* Macro might contain `[{}]' when not multi-arch */
2563 fprintf_unfiltered (file
,
2564 "gdbarch_dump: %s # %s\n",
2565 "TARGET_WRITE_SP(val)",
2566 XSTRING (TARGET_WRITE_SP (val
)));
2569 fprintf_unfiltered (file
,
2570 "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
2571 (long) current_gdbarch
->write_sp
2572 /*TARGET_WRITE_SP ()*/);
2575 fprintf_unfiltered (file
,
2576 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2577 gdbarch_unwind_dummy_id_p (current_gdbarch
));
2579 fprintf_unfiltered (file
,
2580 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2581 (long) current_gdbarch
->unwind_dummy_id
);
2583 fprintf_unfiltered (file
,
2584 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2585 gdbarch_unwind_pc_p (current_gdbarch
));
2587 fprintf_unfiltered (file
,
2588 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2589 (long) current_gdbarch
->unwind_pc
);
2590 #ifdef USE_STRUCT_CONVENTION
2591 fprintf_unfiltered (file
,
2592 "gdbarch_dump: %s # %s\n",
2593 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2594 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2596 fprintf_unfiltered (file
,
2597 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2598 (long) current_gdbarch
->use_struct_convention
2599 /*USE_STRUCT_CONVENTION ()*/);
2601 #ifdef VALUE_TO_REGISTER
2603 /* Macro might contain `[{}]' when not multi-arch */
2604 fprintf_unfiltered (file
,
2605 "gdbarch_dump: %s # %s\n",
2606 "VALUE_TO_REGISTER(type, regnum, from, to)",
2607 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2610 fprintf_unfiltered (file
,
2611 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2612 (long) current_gdbarch
->value_to_register
2613 /*VALUE_TO_REGISTER ()*/);
2615 if (current_gdbarch
->dump_tdep
!= NULL
)
2616 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2619 struct gdbarch_tdep
*
2620 gdbarch_tdep (struct gdbarch
*gdbarch
)
2622 if (gdbarch_debug
>= 2)
2623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2624 return gdbarch
->tdep
;
2628 const struct bfd_arch_info
*
2629 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2631 gdb_assert (gdbarch
!= NULL
);
2632 if (gdbarch_debug
>= 2)
2633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2634 return gdbarch
->bfd_arch_info
;
2638 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2640 gdb_assert (gdbarch
!= NULL
);
2641 if (gdbarch_debug
>= 2)
2642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2643 return gdbarch
->byte_order
;
2647 gdbarch_osabi (struct gdbarch
*gdbarch
)
2649 gdb_assert (gdbarch
!= NULL
);
2650 if (gdbarch_debug
>= 2)
2651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2652 return gdbarch
->osabi
;
2656 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2658 gdb_assert (gdbarch
!= NULL
);
2659 /* Skip verify of short_bit, invalid_p == 0 */
2660 if (gdbarch_debug
>= 2)
2661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2662 return gdbarch
->short_bit
;
2666 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2669 gdbarch
->short_bit
= short_bit
;
2673 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2675 gdb_assert (gdbarch
!= NULL
);
2676 /* Skip verify of int_bit, invalid_p == 0 */
2677 if (gdbarch_debug
>= 2)
2678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2679 return gdbarch
->int_bit
;
2683 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2686 gdbarch
->int_bit
= int_bit
;
2690 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2692 gdb_assert (gdbarch
!= NULL
);
2693 /* Skip verify of long_bit, invalid_p == 0 */
2694 if (gdbarch_debug
>= 2)
2695 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2696 return gdbarch
->long_bit
;
2700 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2703 gdbarch
->long_bit
= long_bit
;
2707 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2709 gdb_assert (gdbarch
!= NULL
);
2710 /* Skip verify of long_long_bit, invalid_p == 0 */
2711 if (gdbarch_debug
>= 2)
2712 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2713 return gdbarch
->long_long_bit
;
2717 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2720 gdbarch
->long_long_bit
= long_long_bit
;
2724 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2726 gdb_assert (gdbarch
!= NULL
);
2727 /* Skip verify of float_bit, invalid_p == 0 */
2728 if (gdbarch_debug
>= 2)
2729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2730 return gdbarch
->float_bit
;
2734 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2737 gdbarch
->float_bit
= float_bit
;
2741 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2743 gdb_assert (gdbarch
!= NULL
);
2744 /* Skip verify of double_bit, invalid_p == 0 */
2745 if (gdbarch_debug
>= 2)
2746 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2747 return gdbarch
->double_bit
;
2751 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2754 gdbarch
->double_bit
= double_bit
;
2758 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2760 gdb_assert (gdbarch
!= NULL
);
2761 /* Skip verify of long_double_bit, invalid_p == 0 */
2762 if (gdbarch_debug
>= 2)
2763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2764 return gdbarch
->long_double_bit
;
2768 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2769 int long_double_bit
)
2771 gdbarch
->long_double_bit
= long_double_bit
;
2775 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2777 gdb_assert (gdbarch
!= NULL
);
2778 /* Skip verify of ptr_bit, invalid_p == 0 */
2779 if (gdbarch_debug
>= 2)
2780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2781 return gdbarch
->ptr_bit
;
2785 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2788 gdbarch
->ptr_bit
= ptr_bit
;
2792 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2794 gdb_assert (gdbarch
!= NULL
);
2795 if (gdbarch
->addr_bit
== 0)
2796 internal_error (__FILE__
, __LINE__
,
2797 "gdbarch: gdbarch_addr_bit invalid");
2798 if (gdbarch_debug
>= 2)
2799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2800 return gdbarch
->addr_bit
;
2804 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2807 gdbarch
->addr_bit
= addr_bit
;
2811 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2813 gdb_assert (gdbarch
!= NULL
);
2814 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2815 if (gdbarch_debug
>= 2)
2816 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2817 return gdbarch
->bfd_vma_bit
;
2821 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2824 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2828 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2830 gdb_assert (gdbarch
!= NULL
);
2831 if (gdbarch
->char_signed
== -1)
2832 internal_error (__FILE__
, __LINE__
,
2833 "gdbarch: gdbarch_char_signed invalid");
2834 if (gdbarch_debug
>= 2)
2835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2836 return gdbarch
->char_signed
;
2840 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2843 gdbarch
->char_signed
= char_signed
;
2847 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2849 gdb_assert (gdbarch
!= NULL
);
2850 if (gdbarch
->read_pc
== 0)
2851 internal_error (__FILE__
, __LINE__
,
2852 "gdbarch: gdbarch_read_pc invalid");
2853 if (gdbarch_debug
>= 2)
2854 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2855 return gdbarch
->read_pc (ptid
);
2859 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2860 gdbarch_read_pc_ftype read_pc
)
2862 gdbarch
->read_pc
= read_pc
;
2866 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2868 gdb_assert (gdbarch
!= NULL
);
2869 if (gdbarch
->write_pc
== 0)
2870 internal_error (__FILE__
, __LINE__
,
2871 "gdbarch: gdbarch_write_pc invalid");
2872 if (gdbarch_debug
>= 2)
2873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2874 gdbarch
->write_pc (val
, ptid
);
2878 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2879 gdbarch_write_pc_ftype write_pc
)
2881 gdbarch
->write_pc
= write_pc
;
2885 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2887 gdb_assert (gdbarch
!= NULL
);
2888 if (gdbarch
->read_fp
== 0)
2889 internal_error (__FILE__
, __LINE__
,
2890 "gdbarch: gdbarch_read_fp invalid");
2891 if (gdbarch_debug
>= 2)
2892 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2893 return gdbarch
->read_fp ();
2897 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2898 gdbarch_read_fp_ftype read_fp
)
2900 gdbarch
->read_fp
= read_fp
;
2904 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2906 gdb_assert (gdbarch
!= NULL
);
2907 if (gdbarch
->read_sp
== 0)
2908 internal_error (__FILE__
, __LINE__
,
2909 "gdbarch: gdbarch_read_sp invalid");
2910 if (gdbarch_debug
>= 2)
2911 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2912 return gdbarch
->read_sp ();
2916 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2917 gdbarch_read_sp_ftype read_sp
)
2919 gdbarch
->read_sp
= read_sp
;
2923 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2925 gdb_assert (gdbarch
!= NULL
);
2926 if (gdbarch
->write_sp
== 0)
2927 internal_error (__FILE__
, __LINE__
,
2928 "gdbarch: gdbarch_write_sp invalid");
2929 if (gdbarch_debug
>= 2)
2930 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2931 gdbarch
->write_sp (val
);
2935 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2936 gdbarch_write_sp_ftype write_sp
)
2938 gdbarch
->write_sp
= write_sp
;
2942 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2944 gdb_assert (gdbarch
!= NULL
);
2945 if (gdbarch
->virtual_frame_pointer
== 0)
2946 internal_error (__FILE__
, __LINE__
,
2947 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2948 if (gdbarch_debug
>= 2)
2949 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2950 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2954 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2955 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2957 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2961 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2963 gdb_assert (gdbarch
!= NULL
);
2964 return gdbarch
->pseudo_register_read
!= 0;
2968 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2970 gdb_assert (gdbarch
!= NULL
);
2971 if (gdbarch
->pseudo_register_read
== 0)
2972 internal_error (__FILE__
, __LINE__
,
2973 "gdbarch: gdbarch_pseudo_register_read invalid");
2974 if (gdbarch_debug
>= 2)
2975 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2976 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2980 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2981 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2983 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2987 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2989 gdb_assert (gdbarch
!= NULL
);
2990 return gdbarch
->pseudo_register_write
!= 0;
2994 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2996 gdb_assert (gdbarch
!= NULL
);
2997 if (gdbarch
->pseudo_register_write
== 0)
2998 internal_error (__FILE__
, __LINE__
,
2999 "gdbarch: gdbarch_pseudo_register_write invalid");
3000 if (gdbarch_debug
>= 2)
3001 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
3002 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
3006 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
3007 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
3009 gdbarch
->pseudo_register_write
= pseudo_register_write
;
3013 gdbarch_num_regs (struct gdbarch
*gdbarch
)
3015 gdb_assert (gdbarch
!= NULL
);
3016 if (gdbarch
->num_regs
== -1)
3017 internal_error (__FILE__
, __LINE__
,
3018 "gdbarch: gdbarch_num_regs invalid");
3019 if (gdbarch_debug
>= 2)
3020 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
3021 return gdbarch
->num_regs
;
3025 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
3028 gdbarch
->num_regs
= num_regs
;
3032 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
3034 gdb_assert (gdbarch
!= NULL
);
3035 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3036 if (gdbarch_debug
>= 2)
3037 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
3038 return gdbarch
->num_pseudo_regs
;
3042 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
3043 int num_pseudo_regs
)
3045 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
3049 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
3051 gdb_assert (gdbarch
!= NULL
);
3052 /* Skip verify of sp_regnum, invalid_p == 0 */
3053 if (gdbarch_debug
>= 2)
3054 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
3055 return gdbarch
->sp_regnum
;
3059 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
3062 gdbarch
->sp_regnum
= sp_regnum
;
3066 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
3068 gdb_assert (gdbarch
!= NULL
);
3069 /* Skip verify of fp_regnum, invalid_p == 0 */
3070 if (gdbarch_debug
>= 2)
3071 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
3072 return gdbarch
->fp_regnum
;
3076 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
3079 gdbarch
->fp_regnum
= fp_regnum
;
3083 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
3085 gdb_assert (gdbarch
!= NULL
);
3086 /* Skip verify of pc_regnum, invalid_p == 0 */
3087 if (gdbarch_debug
>= 2)
3088 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
3089 return gdbarch
->pc_regnum
;
3093 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
3096 gdbarch
->pc_regnum
= pc_regnum
;
3100 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
3102 gdb_assert (gdbarch
!= NULL
);
3103 /* Skip verify of ps_regnum, invalid_p == 0 */
3104 if (gdbarch_debug
>= 2)
3105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
3106 return gdbarch
->ps_regnum
;
3110 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
3113 gdbarch
->ps_regnum
= ps_regnum
;
3117 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
3119 gdb_assert (gdbarch
!= NULL
);
3120 /* Skip verify of fp0_regnum, invalid_p == 0 */
3121 if (gdbarch_debug
>= 2)
3122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
3123 return gdbarch
->fp0_regnum
;
3127 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
3130 gdbarch
->fp0_regnum
= fp0_regnum
;
3134 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
3136 gdb_assert (gdbarch
!= NULL
);
3137 /* Skip verify of npc_regnum, invalid_p == 0 */
3138 if (gdbarch_debug
>= 2)
3139 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
3140 return gdbarch
->npc_regnum
;
3144 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
3147 gdbarch
->npc_regnum
= npc_regnum
;
3151 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
3153 gdb_assert (gdbarch
!= NULL
);
3154 if (gdbarch
->stab_reg_to_regnum
== 0)
3155 internal_error (__FILE__
, __LINE__
,
3156 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3157 if (gdbarch_debug
>= 2)
3158 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
3159 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
3163 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
3164 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
3166 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
3170 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
3172 gdb_assert (gdbarch
!= NULL
);
3173 if (gdbarch
->ecoff_reg_to_regnum
== 0)
3174 internal_error (__FILE__
, __LINE__
,
3175 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3176 if (gdbarch_debug
>= 2)
3177 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
3178 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
3182 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
3183 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
3185 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
3189 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
3191 gdb_assert (gdbarch
!= NULL
);
3192 if (gdbarch
->dwarf_reg_to_regnum
== 0)
3193 internal_error (__FILE__
, __LINE__
,
3194 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3195 if (gdbarch_debug
>= 2)
3196 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
3197 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
3201 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
3202 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
3204 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
3208 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
3210 gdb_assert (gdbarch
!= NULL
);
3211 if (gdbarch
->sdb_reg_to_regnum
== 0)
3212 internal_error (__FILE__
, __LINE__
,
3213 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3214 if (gdbarch_debug
>= 2)
3215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
3216 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
3220 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
3221 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
3223 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
3227 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
3229 gdb_assert (gdbarch
!= NULL
);
3230 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
3231 internal_error (__FILE__
, __LINE__
,
3232 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3233 if (gdbarch_debug
>= 2)
3234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
3235 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
3239 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
3240 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
3242 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
3246 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
3248 gdb_assert (gdbarch
!= NULL
);
3249 if (gdbarch
->register_name
== 0)
3250 internal_error (__FILE__
, __LINE__
,
3251 "gdbarch: gdbarch_register_name invalid");
3252 if (gdbarch_debug
>= 2)
3253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
3254 return gdbarch
->register_name (regnr
);
3258 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
3259 gdbarch_register_name_ftype register_name
)
3261 gdbarch
->register_name
= register_name
;
3265 gdbarch_register_size (struct gdbarch
*gdbarch
)
3267 gdb_assert (gdbarch
!= NULL
);
3268 if (gdbarch
->register_size
== -1)
3269 internal_error (__FILE__
, __LINE__
,
3270 "gdbarch: gdbarch_register_size invalid");
3271 if (gdbarch_debug
>= 2)
3272 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
3273 return gdbarch
->register_size
;
3277 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
3280 gdbarch
->register_size
= register_size
;
3284 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
3286 gdb_assert (gdbarch
!= NULL
);
3287 if (gdbarch
->register_bytes
== -1)
3288 internal_error (__FILE__
, __LINE__
,
3289 "gdbarch: gdbarch_register_bytes invalid");
3290 if (gdbarch_debug
>= 2)
3291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
3292 return gdbarch
->register_bytes
;
3296 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
3299 gdbarch
->register_bytes
= register_bytes
;
3303 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3305 gdb_assert (gdbarch
!= NULL
);
3306 if (gdbarch
->register_byte
== 0)
3307 internal_error (__FILE__
, __LINE__
,
3308 "gdbarch: gdbarch_register_byte invalid");
3309 if (gdbarch_debug
>= 2)
3310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
3311 return gdbarch
->register_byte (reg_nr
);
3315 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
3316 gdbarch_register_byte_ftype register_byte
)
3318 gdbarch
->register_byte
= register_byte
;
3322 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3324 gdb_assert (gdbarch
!= NULL
);
3325 if (gdbarch
->register_raw_size
== 0)
3326 internal_error (__FILE__
, __LINE__
,
3327 "gdbarch: gdbarch_register_raw_size invalid");
3328 if (gdbarch_debug
>= 2)
3329 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
3330 return gdbarch
->register_raw_size (reg_nr
);
3334 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
3335 gdbarch_register_raw_size_ftype register_raw_size
)
3337 gdbarch
->register_raw_size
= register_raw_size
;
3341 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
3343 gdb_assert (gdbarch
!= NULL
);
3344 return gdbarch
->deprecated_max_register_raw_size
!= 0;
3348 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
3350 gdb_assert (gdbarch
!= NULL
);
3351 if (gdbarch_debug
>= 2)
3352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
3353 return gdbarch
->deprecated_max_register_raw_size
;
3357 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
3358 int deprecated_max_register_raw_size
)
3360 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
3364 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3366 gdb_assert (gdbarch
!= NULL
);
3367 if (gdbarch
->register_virtual_size
== 0)
3368 internal_error (__FILE__
, __LINE__
,
3369 "gdbarch: gdbarch_register_virtual_size invalid");
3370 if (gdbarch_debug
>= 2)
3371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3372 return gdbarch
->register_virtual_size (reg_nr
);
3376 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3377 gdbarch_register_virtual_size_ftype register_virtual_size
)
3379 gdbarch
->register_virtual_size
= register_virtual_size
;
3383 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
3385 gdb_assert (gdbarch
!= NULL
);
3386 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
3390 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
3392 gdb_assert (gdbarch
!= NULL
);
3393 if (gdbarch_debug
>= 2)
3394 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
3395 return gdbarch
->deprecated_max_register_virtual_size
;
3399 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
3400 int deprecated_max_register_virtual_size
)
3402 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
3406 gdbarch_register_virtual_type_p (struct gdbarch
*gdbarch
)
3408 gdb_assert (gdbarch
!= NULL
);
3409 return gdbarch
->register_virtual_type
!= 0;
3413 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3415 gdb_assert (gdbarch
!= NULL
);
3416 if (gdbarch
->register_virtual_type
== 0)
3417 internal_error (__FILE__
, __LINE__
,
3418 "gdbarch: gdbarch_register_virtual_type invalid");
3419 if (gdbarch_debug
>= 2)
3420 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3421 return gdbarch
->register_virtual_type (reg_nr
);
3425 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3426 gdbarch_register_virtual_type_ftype register_virtual_type
)
3428 gdbarch
->register_virtual_type
= register_virtual_type
;
3432 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
3434 gdb_assert (gdbarch
!= NULL
);
3435 return gdbarch
->register_type
!= 0;
3439 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
3441 gdb_assert (gdbarch
!= NULL
);
3442 if (gdbarch
->register_type
== 0)
3443 internal_error (__FILE__
, __LINE__
,
3444 "gdbarch: gdbarch_register_type invalid");
3445 if (gdbarch_debug
>= 2)
3446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
3447 return gdbarch
->register_type (gdbarch
, reg_nr
);
3451 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
3452 gdbarch_register_type_ftype register_type
)
3454 gdbarch
->register_type
= register_type
;
3458 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3460 gdb_assert (gdbarch
!= NULL
);
3461 return gdbarch
->deprecated_do_registers_info
!= 0;
3465 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3467 gdb_assert (gdbarch
!= NULL
);
3468 if (gdbarch
->deprecated_do_registers_info
== 0)
3469 internal_error (__FILE__
, __LINE__
,
3470 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3471 if (gdbarch_debug
>= 2)
3472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3473 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3477 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3478 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3480 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3484 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3486 gdb_assert (gdbarch
!= NULL
);
3487 if (gdbarch
->print_registers_info
== 0)
3488 internal_error (__FILE__
, __LINE__
,
3489 "gdbarch: gdbarch_print_registers_info invalid");
3490 if (gdbarch_debug
>= 2)
3491 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3492 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3496 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3497 gdbarch_print_registers_info_ftype print_registers_info
)
3499 gdbarch
->print_registers_info
= print_registers_info
;
3503 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3505 gdb_assert (gdbarch
!= NULL
);
3506 return gdbarch
->print_float_info
!= 0;
3510 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3512 gdb_assert (gdbarch
!= NULL
);
3513 if (gdbarch
->print_float_info
== 0)
3514 internal_error (__FILE__
, __LINE__
,
3515 "gdbarch: gdbarch_print_float_info invalid");
3516 if (gdbarch_debug
>= 2)
3517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3518 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3522 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3523 gdbarch_print_float_info_ftype print_float_info
)
3525 gdbarch
->print_float_info
= print_float_info
;
3529 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3531 gdb_assert (gdbarch
!= NULL
);
3532 return gdbarch
->print_vector_info
!= 0;
3536 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3538 gdb_assert (gdbarch
!= NULL
);
3539 if (gdbarch
->print_vector_info
== 0)
3540 internal_error (__FILE__
, __LINE__
,
3541 "gdbarch: gdbarch_print_vector_info invalid");
3542 if (gdbarch_debug
>= 2)
3543 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3544 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3548 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3549 gdbarch_print_vector_info_ftype print_vector_info
)
3551 gdbarch
->print_vector_info
= print_vector_info
;
3555 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3557 gdb_assert (gdbarch
!= NULL
);
3558 if (gdbarch
->register_sim_regno
== 0)
3559 internal_error (__FILE__
, __LINE__
,
3560 "gdbarch: gdbarch_register_sim_regno invalid");
3561 if (gdbarch_debug
>= 2)
3562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3563 return gdbarch
->register_sim_regno (reg_nr
);
3567 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3568 gdbarch_register_sim_regno_ftype register_sim_regno
)
3570 gdbarch
->register_sim_regno
= register_sim_regno
;
3574 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3576 gdb_assert (gdbarch
!= NULL
);
3577 return gdbarch
->register_bytes_ok
!= 0;
3581 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3583 gdb_assert (gdbarch
!= NULL
);
3584 if (gdbarch
->register_bytes_ok
== 0)
3585 internal_error (__FILE__
, __LINE__
,
3586 "gdbarch: gdbarch_register_bytes_ok invalid");
3587 if (gdbarch_debug
>= 2)
3588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3589 return gdbarch
->register_bytes_ok (nr_bytes
);
3593 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3594 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3596 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3600 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3602 gdb_assert (gdbarch
!= NULL
);
3603 if (gdbarch
->cannot_fetch_register
== 0)
3604 internal_error (__FILE__
, __LINE__
,
3605 "gdbarch: gdbarch_cannot_fetch_register invalid");
3606 if (gdbarch_debug
>= 2)
3607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3608 return gdbarch
->cannot_fetch_register (regnum
);
3612 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3613 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3615 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3619 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3621 gdb_assert (gdbarch
!= NULL
);
3622 if (gdbarch
->cannot_store_register
== 0)
3623 internal_error (__FILE__
, __LINE__
,
3624 "gdbarch: gdbarch_cannot_store_register invalid");
3625 if (gdbarch_debug
>= 2)
3626 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3627 return gdbarch
->cannot_store_register (regnum
);
3631 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3632 gdbarch_cannot_store_register_ftype cannot_store_register
)
3634 gdbarch
->cannot_store_register
= cannot_store_register
;
3638 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3640 gdb_assert (gdbarch
!= NULL
);
3641 return gdbarch
->get_longjmp_target
!= 0;
3645 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3647 gdb_assert (gdbarch
!= NULL
);
3648 if (gdbarch
->get_longjmp_target
== 0)
3649 internal_error (__FILE__
, __LINE__
,
3650 "gdbarch: gdbarch_get_longjmp_target invalid");
3651 if (gdbarch_debug
>= 2)
3652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3653 return gdbarch
->get_longjmp_target (pc
);
3657 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3658 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3660 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3664 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3666 gdb_assert (gdbarch
!= NULL
);
3667 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3668 if (gdbarch_debug
>= 2)
3669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3670 return gdbarch
->deprecated_use_generic_dummy_frames
;
3674 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3675 int deprecated_use_generic_dummy_frames
)
3677 gdbarch
->deprecated_use_generic_dummy_frames
= deprecated_use_generic_dummy_frames
;
3681 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3683 gdb_assert (gdbarch
!= NULL
);
3684 /* Skip verify of call_dummy_location, invalid_p == 0 */
3685 if (gdbarch_debug
>= 2)
3686 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3687 return gdbarch
->call_dummy_location
;
3691 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3692 int call_dummy_location
)
3694 gdbarch
->call_dummy_location
= call_dummy_location
;
3698 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3700 gdb_assert (gdbarch
!= NULL
);
3701 if (gdbarch
->call_dummy_address
== 0)
3702 internal_error (__FILE__
, __LINE__
,
3703 "gdbarch: gdbarch_call_dummy_address invalid");
3704 if (gdbarch_debug
>= 2)
3705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3706 return gdbarch
->call_dummy_address ();
3710 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3711 gdbarch_call_dummy_address_ftype call_dummy_address
)
3713 gdbarch
->call_dummy_address
= call_dummy_address
;
3717 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3719 gdb_assert (gdbarch
!= NULL
);
3720 if (gdbarch
->call_dummy_start_offset
== -1)
3721 internal_error (__FILE__
, __LINE__
,
3722 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3723 if (gdbarch_debug
>= 2)
3724 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3725 return gdbarch
->call_dummy_start_offset
;
3729 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3730 CORE_ADDR call_dummy_start_offset
)
3732 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3736 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3738 gdb_assert (gdbarch
!= NULL
);
3739 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3740 internal_error (__FILE__
, __LINE__
,
3741 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3742 if (gdbarch_debug
>= 2)
3743 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3744 return gdbarch
->call_dummy_breakpoint_offset
;
3748 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3749 CORE_ADDR call_dummy_breakpoint_offset
)
3751 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3755 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3757 gdb_assert (gdbarch
!= NULL
);
3758 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3759 internal_error (__FILE__
, __LINE__
,
3760 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3761 if (gdbarch_debug
>= 2)
3762 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3763 return gdbarch
->call_dummy_breakpoint_offset_p
;
3767 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3768 int call_dummy_breakpoint_offset_p
)
3770 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3774 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3776 gdb_assert (gdbarch
!= NULL
);
3777 if (gdbarch
->call_dummy_length
== -1)
3778 internal_error (__FILE__
, __LINE__
,
3779 "gdbarch: gdbarch_call_dummy_length invalid");
3780 if (gdbarch_debug
>= 2)
3781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3782 return gdbarch
->call_dummy_length
;
3786 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3787 int call_dummy_length
)
3789 gdbarch
->call_dummy_length
= call_dummy_length
;
3793 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3795 gdb_assert (gdbarch
!= NULL
);
3796 return gdbarch
->deprecated_pc_in_call_dummy
!= generic_pc_in_call_dummy
;
3800 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3802 gdb_assert (gdbarch
!= NULL
);
3803 if (gdbarch
->deprecated_pc_in_call_dummy
== 0)
3804 internal_error (__FILE__
, __LINE__
,
3805 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3806 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3807 if (gdbarch_debug
>= 2)
3808 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3809 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3813 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3814 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3816 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3820 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3822 gdb_assert (gdbarch
!= NULL
);
3823 if (gdbarch
->call_dummy_p
== -1)
3824 internal_error (__FILE__
, __LINE__
,
3825 "gdbarch: gdbarch_call_dummy_p invalid");
3826 if (gdbarch_debug
>= 2)
3827 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3828 return gdbarch
->call_dummy_p
;
3832 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3835 gdbarch
->call_dummy_p
= call_dummy_p
;
3839 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3841 gdb_assert (gdbarch
!= NULL
);
3842 /* Skip verify of call_dummy_words, invalid_p == 0 */
3843 if (gdbarch_debug
>= 2)
3844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3845 return gdbarch
->call_dummy_words
;
3849 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3850 LONGEST
* call_dummy_words
)
3852 gdbarch
->call_dummy_words
= call_dummy_words
;
3856 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3858 gdb_assert (gdbarch
!= NULL
);
3859 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3860 if (gdbarch_debug
>= 2)
3861 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3862 return gdbarch
->sizeof_call_dummy_words
;
3866 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3867 int sizeof_call_dummy_words
)
3869 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3873 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3875 gdb_assert (gdbarch
!= NULL
);
3876 return gdbarch
->deprecated_call_dummy_stack_adjust
!= 0;
3880 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3882 gdb_assert (gdbarch
!= NULL
);
3883 if (gdbarch_debug
>= 2)
3884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3885 return gdbarch
->deprecated_call_dummy_stack_adjust
;
3889 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3890 int deprecated_call_dummy_stack_adjust
)
3892 gdbarch
->deprecated_call_dummy_stack_adjust
= deprecated_call_dummy_stack_adjust
;
3896 gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
, char *dummy
, CORE_ADDR pc
, CORE_ADDR fun
, int nargs
, struct value
**args
, struct type
*type
, int gcc_p
)
3898 gdb_assert (gdbarch
!= NULL
);
3899 if (gdbarch
->fix_call_dummy
== 0)
3900 internal_error (__FILE__
, __LINE__
,
3901 "gdbarch: gdbarch_fix_call_dummy invalid");
3902 if (gdbarch_debug
>= 2)
3903 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3904 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3908 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3909 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3911 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3915 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch
*gdbarch
)
3917 gdb_assert (gdbarch
!= NULL
);
3918 return gdbarch
->deprecated_init_frame_pc_first
!= 0;
3922 gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3924 gdb_assert (gdbarch
!= NULL
);
3925 if (gdbarch
->deprecated_init_frame_pc_first
== 0)
3926 internal_error (__FILE__
, __LINE__
,
3927 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3928 if (gdbarch_debug
>= 2)
3929 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc_first called\n");
3930 return gdbarch
->deprecated_init_frame_pc_first (fromleaf
, prev
);
3934 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
,
3935 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first
)
3937 gdbarch
->deprecated_init_frame_pc_first
= deprecated_init_frame_pc_first
;
3941 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3943 gdb_assert (gdbarch
!= NULL
);
3944 return gdbarch
->deprecated_init_frame_pc
!= 0;
3948 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3950 gdb_assert (gdbarch
!= NULL
);
3951 if (gdbarch
->deprecated_init_frame_pc
== 0)
3952 internal_error (__FILE__
, __LINE__
,
3953 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3954 if (gdbarch_debug
>= 2)
3955 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3956 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3960 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3961 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3963 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3967 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3969 gdb_assert (gdbarch
!= NULL
);
3970 if (gdbarch_debug
>= 2)
3971 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3972 return gdbarch
->believe_pcc_promotion
;
3976 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3977 int believe_pcc_promotion
)
3979 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3983 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3985 gdb_assert (gdbarch
!= NULL
);
3986 if (gdbarch_debug
>= 2)
3987 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3988 return gdbarch
->believe_pcc_promotion_type
;
3992 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3993 int believe_pcc_promotion_type
)
3995 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3999 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
4001 gdb_assert (gdbarch
!= NULL
);
4002 return gdbarch
->deprecated_get_saved_register
!= 0;
4006 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
)
4008 gdb_assert (gdbarch
!= NULL
);
4009 if (gdbarch
->deprecated_get_saved_register
== 0)
4010 internal_error (__FILE__
, __LINE__
,
4011 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
4012 if (gdbarch_debug
>= 2)
4013 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
4014 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
4018 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
4019 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
4021 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
4025 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
4027 gdb_assert (gdbarch
!= NULL
);
4028 if (gdbarch
->register_convertible
== 0)
4029 internal_error (__FILE__
, __LINE__
,
4030 "gdbarch: gdbarch_register_convertible invalid");
4031 if (gdbarch_debug
>= 2)
4032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
4033 return gdbarch
->register_convertible (nr
);
4037 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
4038 gdbarch_register_convertible_ftype register_convertible
)
4040 gdbarch
->register_convertible
= register_convertible
;
4044 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4046 gdb_assert (gdbarch
!= NULL
);
4047 if (gdbarch
->register_convert_to_virtual
== 0)
4048 internal_error (__FILE__
, __LINE__
,
4049 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4050 if (gdbarch_debug
>= 2)
4051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
4052 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
4056 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
4057 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
4059 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
4063 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4065 gdb_assert (gdbarch
!= NULL
);
4066 if (gdbarch
->register_convert_to_raw
== 0)
4067 internal_error (__FILE__
, __LINE__
,
4068 "gdbarch: gdbarch_register_convert_to_raw invalid");
4069 if (gdbarch_debug
>= 2)
4070 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
4071 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
4075 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
4076 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
4078 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
4082 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
4084 gdb_assert (gdbarch
!= NULL
);
4085 if (gdbarch
->convert_register_p
== 0)
4086 internal_error (__FILE__
, __LINE__
,
4087 "gdbarch: gdbarch_convert_register_p invalid");
4088 if (gdbarch_debug
>= 2)
4089 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
4090 return gdbarch
->convert_register_p (regnum
);
4094 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
4095 gdbarch_convert_register_p_ftype convert_register_p
)
4097 gdbarch
->convert_register_p
= convert_register_p
;
4101 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4103 gdb_assert (gdbarch
!= NULL
);
4104 if (gdbarch
->register_to_value
== 0)
4105 internal_error (__FILE__
, __LINE__
,
4106 "gdbarch: gdbarch_register_to_value invalid");
4107 if (gdbarch_debug
>= 2)
4108 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
4109 gdbarch
->register_to_value (regnum
, type
, from
, to
);
4113 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
4114 gdbarch_register_to_value_ftype register_to_value
)
4116 gdbarch
->register_to_value
= register_to_value
;
4120 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4122 gdb_assert (gdbarch
!= NULL
);
4123 if (gdbarch
->value_to_register
== 0)
4124 internal_error (__FILE__
, __LINE__
,
4125 "gdbarch: gdbarch_value_to_register invalid");
4126 if (gdbarch_debug
>= 2)
4127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
4128 gdbarch
->value_to_register (type
, regnum
, from
, to
);
4132 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
4133 gdbarch_value_to_register_ftype value_to_register
)
4135 gdbarch
->value_to_register
= value_to_register
;
4139 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
4141 gdb_assert (gdbarch
!= NULL
);
4142 if (gdbarch
->pointer_to_address
== 0)
4143 internal_error (__FILE__
, __LINE__
,
4144 "gdbarch: gdbarch_pointer_to_address invalid");
4145 if (gdbarch_debug
>= 2)
4146 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
4147 return gdbarch
->pointer_to_address (type
, buf
);
4151 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
4152 gdbarch_pointer_to_address_ftype pointer_to_address
)
4154 gdbarch
->pointer_to_address
= pointer_to_address
;
4158 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
4160 gdb_assert (gdbarch
!= NULL
);
4161 if (gdbarch
->address_to_pointer
== 0)
4162 internal_error (__FILE__
, __LINE__
,
4163 "gdbarch: gdbarch_address_to_pointer invalid");
4164 if (gdbarch_debug
>= 2)
4165 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
4166 gdbarch
->address_to_pointer (type
, buf
, addr
);
4170 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
4171 gdbarch_address_to_pointer_ftype address_to_pointer
)
4173 gdbarch
->address_to_pointer
= address_to_pointer
;
4177 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
4179 gdb_assert (gdbarch
!= NULL
);
4180 return gdbarch
->integer_to_address
!= 0;
4184 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
4186 gdb_assert (gdbarch
!= NULL
);
4187 if (gdbarch
->integer_to_address
== 0)
4188 internal_error (__FILE__
, __LINE__
,
4189 "gdbarch: gdbarch_integer_to_address invalid");
4190 if (gdbarch_debug
>= 2)
4191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
4192 return gdbarch
->integer_to_address (type
, buf
);
4196 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
4197 gdbarch_integer_to_address_ftype integer_to_address
)
4199 gdbarch
->integer_to_address
= integer_to_address
;
4203 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
4205 gdb_assert (gdbarch
!= NULL
);
4206 if (gdbarch
->return_value_on_stack
== 0)
4207 internal_error (__FILE__
, __LINE__
,
4208 "gdbarch: gdbarch_return_value_on_stack invalid");
4209 if (gdbarch_debug
>= 2)
4210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
4211 return gdbarch
->return_value_on_stack (type
);
4215 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
4216 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
4218 gdbarch
->return_value_on_stack
= return_value_on_stack
;
4222 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
4224 gdb_assert (gdbarch
!= NULL
);
4225 if (gdbarch
->push_arguments
== 0)
4226 internal_error (__FILE__
, __LINE__
,
4227 "gdbarch: gdbarch_push_arguments invalid");
4228 if (gdbarch_debug
>= 2)
4229 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
4230 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
4234 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
4235 gdbarch_push_arguments_ftype push_arguments
)
4237 gdbarch
->push_arguments
= push_arguments
;
4241 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch
*gdbarch
)
4243 gdb_assert (gdbarch
!= NULL
);
4244 return gdbarch
->deprecated_push_dummy_frame
!= 0;
4248 gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
)
4250 gdb_assert (gdbarch
!= NULL
);
4251 if (gdbarch
->deprecated_push_dummy_frame
== 0)
4252 internal_error (__FILE__
, __LINE__
,
4253 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4254 if (gdbarch_debug
>= 2)
4255 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_dummy_frame called\n");
4256 gdbarch
->deprecated_push_dummy_frame ();
4260 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
,
4261 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame
)
4263 gdbarch
->deprecated_push_dummy_frame
= deprecated_push_dummy_frame
;
4267 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
4269 gdb_assert (gdbarch
!= NULL
);
4270 return gdbarch
->push_return_address
!= 0;
4274 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
4276 gdb_assert (gdbarch
!= NULL
);
4277 if (gdbarch
->push_return_address
== 0)
4278 internal_error (__FILE__
, __LINE__
,
4279 "gdbarch: gdbarch_push_return_address invalid");
4280 if (gdbarch_debug
>= 2)
4281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
4282 return gdbarch
->push_return_address (pc
, sp
);
4286 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
4287 gdbarch_push_return_address_ftype push_return_address
)
4289 gdbarch
->push_return_address
= push_return_address
;
4293 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
4295 gdb_assert (gdbarch
!= NULL
);
4296 return gdbarch
->deprecated_pop_frame
!= 0;
4300 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
4302 gdb_assert (gdbarch
!= NULL
);
4303 if (gdbarch
->deprecated_pop_frame
== 0)
4304 internal_error (__FILE__
, __LINE__
,
4305 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4306 if (gdbarch_debug
>= 2)
4307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
4308 gdbarch
->deprecated_pop_frame ();
4312 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
4313 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
4315 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
4319 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
4321 gdb_assert (gdbarch
!= NULL
);
4322 return gdbarch
->deprecated_store_struct_return
!= 0;
4326 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
4328 gdb_assert (gdbarch
!= NULL
);
4329 if (gdbarch
->deprecated_store_struct_return
== 0)
4330 internal_error (__FILE__
, __LINE__
,
4331 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4332 if (gdbarch_debug
>= 2)
4333 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
4334 gdbarch
->deprecated_store_struct_return (addr
, sp
);
4338 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
4339 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
4341 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
4345 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4347 gdb_assert (gdbarch
!= NULL
);
4348 if (gdbarch
->extract_return_value
== 0)
4349 internal_error (__FILE__
, __LINE__
,
4350 "gdbarch: gdbarch_extract_return_value invalid");
4351 if (gdbarch_debug
>= 2)
4352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4353 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4357 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4358 gdbarch_extract_return_value_ftype extract_return_value
)
4360 gdbarch
->extract_return_value
= extract_return_value
;
4364 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4366 gdb_assert (gdbarch
!= NULL
);
4367 if (gdbarch
->store_return_value
== 0)
4368 internal_error (__FILE__
, __LINE__
,
4369 "gdbarch: gdbarch_store_return_value invalid");
4370 if (gdbarch_debug
>= 2)
4371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4372 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4376 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4377 gdbarch_store_return_value_ftype store_return_value
)
4379 gdbarch
->store_return_value
= store_return_value
;
4383 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4385 gdb_assert (gdbarch
!= NULL
);
4386 if (gdbarch
->deprecated_extract_return_value
== 0)
4387 internal_error (__FILE__
, __LINE__
,
4388 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4389 if (gdbarch_debug
>= 2)
4390 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4391 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4395 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4396 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4398 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4402 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4404 gdb_assert (gdbarch
!= NULL
);
4405 if (gdbarch
->deprecated_store_return_value
== 0)
4406 internal_error (__FILE__
, __LINE__
,
4407 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4408 if (gdbarch_debug
>= 2)
4409 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4410 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4414 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4415 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4417 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4421 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4423 gdb_assert (gdbarch
!= NULL
);
4424 return gdbarch
->extract_struct_value_address
!= 0;
4428 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4430 gdb_assert (gdbarch
!= NULL
);
4431 if (gdbarch
->extract_struct_value_address
== 0)
4432 internal_error (__FILE__
, __LINE__
,
4433 "gdbarch: gdbarch_extract_struct_value_address invalid");
4434 if (gdbarch_debug
>= 2)
4435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4436 return gdbarch
->extract_struct_value_address (regcache
);
4440 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4441 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4443 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4447 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4449 gdb_assert (gdbarch
!= NULL
);
4450 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4454 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4456 gdb_assert (gdbarch
!= NULL
);
4457 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4458 internal_error (__FILE__
, __LINE__
,
4459 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4460 if (gdbarch_debug
>= 2)
4461 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4462 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4466 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4467 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4469 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4473 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4475 gdb_assert (gdbarch
!= NULL
);
4476 if (gdbarch
->use_struct_convention
== 0)
4477 internal_error (__FILE__
, __LINE__
,
4478 "gdbarch: gdbarch_use_struct_convention invalid");
4479 if (gdbarch_debug
>= 2)
4480 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4481 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4485 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4486 gdbarch_use_struct_convention_ftype use_struct_convention
)
4488 gdbarch
->use_struct_convention
= use_struct_convention
;
4492 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
4494 gdb_assert (gdbarch
!= NULL
);
4495 return gdbarch
->deprecated_frame_init_saved_regs
!= 0;
4499 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4501 gdb_assert (gdbarch
!= NULL
);
4502 if (gdbarch
->deprecated_frame_init_saved_regs
== 0)
4503 internal_error (__FILE__
, __LINE__
,
4504 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4505 if (gdbarch_debug
>= 2)
4506 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
4507 gdbarch
->deprecated_frame_init_saved_regs (frame
);
4511 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4512 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
4514 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
4518 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4520 gdb_assert (gdbarch
!= NULL
);
4521 return gdbarch
->deprecated_init_extra_frame_info
!= 0;
4525 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4527 gdb_assert (gdbarch
!= NULL
);
4528 if (gdbarch
->deprecated_init_extra_frame_info
== 0)
4529 internal_error (__FILE__
, __LINE__
,
4530 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4531 if (gdbarch_debug
>= 2)
4532 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
4533 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
4537 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
4538 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
4540 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
4544 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4546 gdb_assert (gdbarch
!= NULL
);
4547 if (gdbarch
->skip_prologue
== 0)
4548 internal_error (__FILE__
, __LINE__
,
4549 "gdbarch: gdbarch_skip_prologue invalid");
4550 if (gdbarch_debug
>= 2)
4551 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4552 return gdbarch
->skip_prologue (ip
);
4556 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4557 gdbarch_skip_prologue_ftype skip_prologue
)
4559 gdbarch
->skip_prologue
= skip_prologue
;
4563 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4565 gdb_assert (gdbarch
!= NULL
);
4566 if (gdbarch
->prologue_frameless_p
== 0)
4567 internal_error (__FILE__
, __LINE__
,
4568 "gdbarch: gdbarch_prologue_frameless_p invalid");
4569 if (gdbarch_debug
>= 2)
4570 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4571 return gdbarch
->prologue_frameless_p (ip
);
4575 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4576 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4578 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4582 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4584 gdb_assert (gdbarch
!= NULL
);
4585 if (gdbarch
->inner_than
== 0)
4586 internal_error (__FILE__
, __LINE__
,
4587 "gdbarch: gdbarch_inner_than invalid");
4588 if (gdbarch_debug
>= 2)
4589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4590 return gdbarch
->inner_than (lhs
, rhs
);
4594 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4595 gdbarch_inner_than_ftype inner_than
)
4597 gdbarch
->inner_than
= inner_than
;
4600 const unsigned char *
4601 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4603 gdb_assert (gdbarch
!= NULL
);
4604 if (gdbarch
->breakpoint_from_pc
== 0)
4605 internal_error (__FILE__
, __LINE__
,
4606 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4607 if (gdbarch_debug
>= 2)
4608 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4609 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4613 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4614 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4616 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4620 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4622 gdb_assert (gdbarch
!= NULL
);
4623 if (gdbarch
->memory_insert_breakpoint
== 0)
4624 internal_error (__FILE__
, __LINE__
,
4625 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4626 if (gdbarch_debug
>= 2)
4627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4628 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4632 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4633 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4635 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4639 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4641 gdb_assert (gdbarch
!= NULL
);
4642 if (gdbarch
->memory_remove_breakpoint
== 0)
4643 internal_error (__FILE__
, __LINE__
,
4644 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4645 if (gdbarch_debug
>= 2)
4646 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4647 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4651 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4652 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4654 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4658 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4660 gdb_assert (gdbarch
!= NULL
);
4661 if (gdbarch
->decr_pc_after_break
== -1)
4662 internal_error (__FILE__
, __LINE__
,
4663 "gdbarch: gdbarch_decr_pc_after_break invalid");
4664 if (gdbarch_debug
>= 2)
4665 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4666 return gdbarch
->decr_pc_after_break
;
4670 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4671 CORE_ADDR decr_pc_after_break
)
4673 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4677 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4679 gdb_assert (gdbarch
!= NULL
);
4680 if (gdbarch
->prepare_to_proceed
== 0)
4681 internal_error (__FILE__
, __LINE__
,
4682 "gdbarch: gdbarch_prepare_to_proceed invalid");
4683 if (gdbarch_debug
>= 2)
4684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4685 return gdbarch
->prepare_to_proceed (select_it
);
4689 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4690 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4692 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4696 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4698 gdb_assert (gdbarch
!= NULL
);
4699 if (gdbarch
->function_start_offset
== -1)
4700 internal_error (__FILE__
, __LINE__
,
4701 "gdbarch: gdbarch_function_start_offset invalid");
4702 if (gdbarch_debug
>= 2)
4703 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4704 return gdbarch
->function_start_offset
;
4708 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4709 CORE_ADDR function_start_offset
)
4711 gdbarch
->function_start_offset
= function_start_offset
;
4715 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4717 gdb_assert (gdbarch
!= NULL
);
4718 if (gdbarch
->remote_translate_xfer_address
== 0)
4719 internal_error (__FILE__
, __LINE__
,
4720 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4721 if (gdbarch_debug
>= 2)
4722 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4723 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4727 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4728 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4730 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4734 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4736 gdb_assert (gdbarch
!= NULL
);
4737 if (gdbarch
->frame_args_skip
== -1)
4738 internal_error (__FILE__
, __LINE__
,
4739 "gdbarch: gdbarch_frame_args_skip invalid");
4740 if (gdbarch_debug
>= 2)
4741 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4742 return gdbarch
->frame_args_skip
;
4746 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4747 CORE_ADDR frame_args_skip
)
4749 gdbarch
->frame_args_skip
= frame_args_skip
;
4753 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4755 gdb_assert (gdbarch
!= NULL
);
4756 if (gdbarch
->frameless_function_invocation
== 0)
4757 internal_error (__FILE__
, __LINE__
,
4758 "gdbarch: gdbarch_frameless_function_invocation invalid");
4759 if (gdbarch_debug
>= 2)
4760 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4761 return gdbarch
->frameless_function_invocation (fi
);
4765 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4766 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4768 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4772 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
4774 gdb_assert (gdbarch
!= NULL
);
4775 return gdbarch
->deprecated_frame_chain
!= 0;
4779 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4781 gdb_assert (gdbarch
!= NULL
);
4782 if (gdbarch
->deprecated_frame_chain
== 0)
4783 internal_error (__FILE__
, __LINE__
,
4784 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4785 if (gdbarch_debug
>= 2)
4786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
4787 return gdbarch
->deprecated_frame_chain (frame
);
4791 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
4792 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
4794 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
4798 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4800 gdb_assert (gdbarch
!= NULL
);
4801 return gdbarch
->deprecated_frame_chain_valid
!= 0;
4805 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4807 gdb_assert (gdbarch
!= NULL
);
4808 if (gdbarch
->deprecated_frame_chain_valid
== 0)
4809 internal_error (__FILE__
, __LINE__
,
4810 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4811 if (gdbarch_debug
>= 2)
4812 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
4813 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
4817 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
4818 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
4820 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
4824 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4826 gdb_assert (gdbarch
!= NULL
);
4827 return gdbarch
->deprecated_frame_saved_pc
!= 0;
4831 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4833 gdb_assert (gdbarch
!= NULL
);
4834 if (gdbarch
->deprecated_frame_saved_pc
== 0)
4835 internal_error (__FILE__
, __LINE__
,
4836 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4837 if (gdbarch_debug
>= 2)
4838 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
4839 return gdbarch
->deprecated_frame_saved_pc (fi
);
4843 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
4844 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
4846 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
4850 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
4852 gdb_assert (gdbarch
!= NULL
);
4853 return gdbarch
->unwind_pc
!= 0;
4857 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4859 gdb_assert (gdbarch
!= NULL
);
4860 if (gdbarch
->unwind_pc
== 0)
4861 internal_error (__FILE__
, __LINE__
,
4862 "gdbarch: gdbarch_unwind_pc invalid");
4863 if (gdbarch_debug
>= 2)
4864 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
4865 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
4869 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
4870 gdbarch_unwind_pc_ftype unwind_pc
)
4872 gdbarch
->unwind_pc
= unwind_pc
;
4876 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4878 gdb_assert (gdbarch
!= NULL
);
4879 if (gdbarch
->frame_args_address
== 0)
4880 internal_error (__FILE__
, __LINE__
,
4881 "gdbarch: gdbarch_frame_args_address invalid");
4882 if (gdbarch_debug
>= 2)
4883 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4884 return gdbarch
->frame_args_address (fi
);
4888 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4889 gdbarch_frame_args_address_ftype frame_args_address
)
4891 gdbarch
->frame_args_address
= frame_args_address
;
4895 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4897 gdb_assert (gdbarch
!= NULL
);
4898 if (gdbarch
->frame_locals_address
== 0)
4899 internal_error (__FILE__
, __LINE__
,
4900 "gdbarch: gdbarch_frame_locals_address invalid");
4901 if (gdbarch_debug
>= 2)
4902 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4903 return gdbarch
->frame_locals_address (fi
);
4907 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4908 gdbarch_frame_locals_address_ftype frame_locals_address
)
4910 gdbarch
->frame_locals_address
= frame_locals_address
;
4914 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4916 gdb_assert (gdbarch
!= NULL
);
4917 if (gdbarch
->saved_pc_after_call
== 0)
4918 internal_error (__FILE__
, __LINE__
,
4919 "gdbarch: gdbarch_saved_pc_after_call invalid");
4920 if (gdbarch_debug
>= 2)
4921 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4922 return gdbarch
->saved_pc_after_call (frame
);
4926 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4927 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4929 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4933 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4935 gdb_assert (gdbarch
!= NULL
);
4936 if (gdbarch
->frame_num_args
== 0)
4937 internal_error (__FILE__
, __LINE__
,
4938 "gdbarch: gdbarch_frame_num_args invalid");
4939 if (gdbarch_debug
>= 2)
4940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4941 return gdbarch
->frame_num_args (frame
);
4945 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4946 gdbarch_frame_num_args_ftype frame_num_args
)
4948 gdbarch
->frame_num_args
= frame_num_args
;
4952 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4954 gdb_assert (gdbarch
!= NULL
);
4955 return gdbarch
->stack_align
!= 0;
4959 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4961 gdb_assert (gdbarch
!= NULL
);
4962 if (gdbarch
->stack_align
== 0)
4963 internal_error (__FILE__
, __LINE__
,
4964 "gdbarch: gdbarch_stack_align invalid");
4965 if (gdbarch_debug
>= 2)
4966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4967 return gdbarch
->stack_align (sp
);
4971 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4972 gdbarch_stack_align_ftype stack_align
)
4974 gdbarch
->stack_align
= stack_align
;
4978 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4980 gdb_assert (gdbarch
!= NULL
);
4981 return gdbarch
->frame_align
!= 0;
4985 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4987 gdb_assert (gdbarch
!= NULL
);
4988 if (gdbarch
->frame_align
== 0)
4989 internal_error (__FILE__
, __LINE__
,
4990 "gdbarch: gdbarch_frame_align invalid");
4991 if (gdbarch_debug
>= 2)
4992 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4993 return gdbarch
->frame_align (gdbarch
, address
);
4997 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4998 gdbarch_frame_align_ftype frame_align
)
5000 gdbarch
->frame_align
= frame_align
;
5004 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
5006 gdb_assert (gdbarch
!= NULL
);
5007 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
5008 if (gdbarch_debug
>= 2)
5009 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5010 return gdbarch
->deprecated_extra_stack_alignment_needed
;
5014 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
5015 int deprecated_extra_stack_alignment_needed
)
5017 gdbarch
->deprecated_extra_stack_alignment_needed
= deprecated_extra_stack_alignment_needed
;
5021 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
5023 gdb_assert (gdbarch
!= NULL
);
5024 return gdbarch
->reg_struct_has_addr
!= 0;
5028 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
5030 gdb_assert (gdbarch
!= NULL
);
5031 if (gdbarch
->reg_struct_has_addr
== 0)
5032 internal_error (__FILE__
, __LINE__
,
5033 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5034 if (gdbarch_debug
>= 2)
5035 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
5036 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
5040 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
5041 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
5043 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
5047 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
5049 gdb_assert (gdbarch
!= NULL
);
5050 return gdbarch
->save_dummy_frame_tos
!= 0;
5054 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
5056 gdb_assert (gdbarch
!= NULL
);
5057 if (gdbarch
->save_dummy_frame_tos
== 0)
5058 internal_error (__FILE__
, __LINE__
,
5059 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5060 if (gdbarch_debug
>= 2)
5061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
5062 gdbarch
->save_dummy_frame_tos (sp
);
5066 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
5067 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
5069 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
5073 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
5075 gdb_assert (gdbarch
!= NULL
);
5076 return gdbarch
->unwind_dummy_id
!= 0;
5080 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
5082 gdb_assert (gdbarch
!= NULL
);
5083 if (gdbarch
->unwind_dummy_id
== 0)
5084 internal_error (__FILE__
, __LINE__
,
5085 "gdbarch: gdbarch_unwind_dummy_id invalid");
5086 if (gdbarch_debug
>= 2)
5087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
5088 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
5092 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
5093 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
5095 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
5099 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
5101 gdb_assert (gdbarch
!= NULL
);
5102 if (gdbarch_debug
>= 2)
5103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
5104 return gdbarch
->parm_boundary
;
5108 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
5111 gdbarch
->parm_boundary
= parm_boundary
;
5114 const struct floatformat
*
5115 gdbarch_float_format (struct gdbarch
*gdbarch
)
5117 gdb_assert (gdbarch
!= NULL
);
5118 if (gdbarch_debug
>= 2)
5119 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
5120 return gdbarch
->float_format
;
5124 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
5125 const struct floatformat
* float_format
)
5127 gdbarch
->float_format
= float_format
;
5130 const struct floatformat
*
5131 gdbarch_double_format (struct gdbarch
*gdbarch
)
5133 gdb_assert (gdbarch
!= NULL
);
5134 if (gdbarch_debug
>= 2)
5135 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
5136 return gdbarch
->double_format
;
5140 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
5141 const struct floatformat
* double_format
)
5143 gdbarch
->double_format
= double_format
;
5146 const struct floatformat
*
5147 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
5149 gdb_assert (gdbarch
!= NULL
);
5150 if (gdbarch_debug
>= 2)
5151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
5152 return gdbarch
->long_double_format
;
5156 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
5157 const struct floatformat
* long_double_format
)
5159 gdbarch
->long_double_format
= long_double_format
;
5163 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5165 gdb_assert (gdbarch
!= NULL
);
5166 if (gdbarch
->convert_from_func_ptr_addr
== 0)
5167 internal_error (__FILE__
, __LINE__
,
5168 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5169 if (gdbarch_debug
>= 2)
5170 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
5171 return gdbarch
->convert_from_func_ptr_addr (addr
);
5175 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
5176 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
5178 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
5182 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5184 gdb_assert (gdbarch
!= NULL
);
5185 if (gdbarch
->addr_bits_remove
== 0)
5186 internal_error (__FILE__
, __LINE__
,
5187 "gdbarch: gdbarch_addr_bits_remove invalid");
5188 if (gdbarch_debug
>= 2)
5189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
5190 return gdbarch
->addr_bits_remove (addr
);
5194 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
5195 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
5197 gdbarch
->addr_bits_remove
= addr_bits_remove
;
5201 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5203 gdb_assert (gdbarch
!= NULL
);
5204 if (gdbarch
->smash_text_address
== 0)
5205 internal_error (__FILE__
, __LINE__
,
5206 "gdbarch: gdbarch_smash_text_address invalid");
5207 if (gdbarch_debug
>= 2)
5208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
5209 return gdbarch
->smash_text_address (addr
);
5213 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
5214 gdbarch_smash_text_address_ftype smash_text_address
)
5216 gdbarch
->smash_text_address
= smash_text_address
;
5220 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
5222 gdb_assert (gdbarch
!= NULL
);
5223 return gdbarch
->software_single_step
!= 0;
5227 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
5229 gdb_assert (gdbarch
!= NULL
);
5230 if (gdbarch
->software_single_step
== 0)
5231 internal_error (__FILE__
, __LINE__
,
5232 "gdbarch: gdbarch_software_single_step invalid");
5233 if (gdbarch_debug
>= 2)
5234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
5235 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
5239 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
5240 gdbarch_software_single_step_ftype software_single_step
)
5242 gdbarch
->software_single_step
= software_single_step
;
5246 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
5248 gdb_assert (gdbarch
!= NULL
);
5249 if (gdbarch
->print_insn
== 0)
5250 internal_error (__FILE__
, __LINE__
,
5251 "gdbarch: gdbarch_print_insn invalid");
5252 if (gdbarch_debug
>= 2)
5253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
5254 return gdbarch
->print_insn (vma
, info
);
5258 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
5259 gdbarch_print_insn_ftype print_insn
)
5261 gdbarch
->print_insn
= print_insn
;
5265 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5267 gdb_assert (gdbarch
!= NULL
);
5268 if (gdbarch
->skip_trampoline_code
== 0)
5269 internal_error (__FILE__
, __LINE__
,
5270 "gdbarch: gdbarch_skip_trampoline_code invalid");
5271 if (gdbarch_debug
>= 2)
5272 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
5273 return gdbarch
->skip_trampoline_code (pc
);
5277 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
5278 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
5280 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
5284 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5286 gdb_assert (gdbarch
!= NULL
);
5287 if (gdbarch
->in_solib_call_trampoline
== 0)
5288 internal_error (__FILE__
, __LINE__
,
5289 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5290 if (gdbarch_debug
>= 2)
5291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
5292 return gdbarch
->in_solib_call_trampoline (pc
, name
);
5296 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
5297 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
5299 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
5303 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5305 gdb_assert (gdbarch
!= NULL
);
5306 if (gdbarch
->in_solib_return_trampoline
== 0)
5307 internal_error (__FILE__
, __LINE__
,
5308 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5309 if (gdbarch_debug
>= 2)
5310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
5311 return gdbarch
->in_solib_return_trampoline (pc
, name
);
5315 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
5316 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
5318 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
5322 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5324 gdb_assert (gdbarch
!= NULL
);
5325 if (gdbarch
->pc_in_sigtramp
== 0)
5326 internal_error (__FILE__
, __LINE__
,
5327 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5328 if (gdbarch_debug
>= 2)
5329 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
5330 return gdbarch
->pc_in_sigtramp (pc
, name
);
5334 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
5335 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
5337 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
5341 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
5343 gdb_assert (gdbarch
!= NULL
);
5344 return gdbarch
->sigtramp_start
!= 0;
5348 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5350 gdb_assert (gdbarch
!= NULL
);
5351 if (gdbarch
->sigtramp_start
== 0)
5352 internal_error (__FILE__
, __LINE__
,
5353 "gdbarch: gdbarch_sigtramp_start invalid");
5354 if (gdbarch_debug
>= 2)
5355 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
5356 return gdbarch
->sigtramp_start (pc
);
5360 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
5361 gdbarch_sigtramp_start_ftype sigtramp_start
)
5363 gdbarch
->sigtramp_start
= sigtramp_start
;
5367 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
5369 gdb_assert (gdbarch
!= NULL
);
5370 return gdbarch
->sigtramp_end
!= 0;
5374 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5376 gdb_assert (gdbarch
!= NULL
);
5377 if (gdbarch
->sigtramp_end
== 0)
5378 internal_error (__FILE__
, __LINE__
,
5379 "gdbarch: gdbarch_sigtramp_end invalid");
5380 if (gdbarch_debug
>= 2)
5381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
5382 return gdbarch
->sigtramp_end (pc
);
5386 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
5387 gdbarch_sigtramp_end_ftype sigtramp_end
)
5389 gdbarch
->sigtramp_end
= sigtramp_end
;
5393 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5395 gdb_assert (gdbarch
!= NULL
);
5396 if (gdbarch
->in_function_epilogue_p
== 0)
5397 internal_error (__FILE__
, __LINE__
,
5398 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5399 if (gdbarch_debug
>= 2)
5400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
5401 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
5405 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
5406 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
5408 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
5412 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
5414 gdb_assert (gdbarch
!= NULL
);
5415 if (gdbarch
->construct_inferior_arguments
== 0)
5416 internal_error (__FILE__
, __LINE__
,
5417 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5418 if (gdbarch_debug
>= 2)
5419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5420 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5424 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5425 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5427 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5431 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
5433 gdb_assert (gdbarch
!= NULL
);
5434 return gdbarch
->dwarf2_build_frame_info
!= 0;
5438 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
5440 gdb_assert (gdbarch
!= NULL
);
5441 if (gdbarch
->dwarf2_build_frame_info
== 0)
5442 internal_error (__FILE__
, __LINE__
,
5443 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5444 if (gdbarch_debug
>= 2)
5445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
5446 gdbarch
->dwarf2_build_frame_info (objfile
);
5450 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
5451 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
5453 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
5457 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5459 gdb_assert (gdbarch
!= NULL
);
5460 if (gdbarch
->elf_make_msymbol_special
== 0)
5461 internal_error (__FILE__
, __LINE__
,
5462 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5463 if (gdbarch_debug
>= 2)
5464 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5465 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5469 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5470 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5472 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5476 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5478 gdb_assert (gdbarch
!= NULL
);
5479 if (gdbarch
->coff_make_msymbol_special
== 0)
5480 internal_error (__FILE__
, __LINE__
,
5481 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5482 if (gdbarch_debug
>= 2)
5483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5484 gdbarch
->coff_make_msymbol_special (val
, msym
);
5488 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5489 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5491 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5495 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5497 gdb_assert (gdbarch
!= NULL
);
5498 /* Skip verify of name_of_malloc, invalid_p == 0 */
5499 if (gdbarch_debug
>= 2)
5500 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5501 return gdbarch
->name_of_malloc
;
5505 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5506 const char * name_of_malloc
)
5508 gdbarch
->name_of_malloc
= name_of_malloc
;
5512 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5514 gdb_assert (gdbarch
!= NULL
);
5515 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5516 if (gdbarch_debug
>= 2)
5517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5518 return gdbarch
->cannot_step_breakpoint
;
5522 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5523 int cannot_step_breakpoint
)
5525 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5529 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5531 gdb_assert (gdbarch
!= NULL
);
5532 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5533 if (gdbarch_debug
>= 2)
5534 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5535 return gdbarch
->have_nonsteppable_watchpoint
;
5539 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5540 int have_nonsteppable_watchpoint
)
5542 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5546 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5548 gdb_assert (gdbarch
!= NULL
);
5549 return gdbarch
->address_class_type_flags
!= 0;
5553 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5555 gdb_assert (gdbarch
!= NULL
);
5556 if (gdbarch
->address_class_type_flags
== 0)
5557 internal_error (__FILE__
, __LINE__
,
5558 "gdbarch: gdbarch_address_class_type_flags invalid");
5559 if (gdbarch_debug
>= 2)
5560 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5561 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5565 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5566 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5568 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5572 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5574 gdb_assert (gdbarch
!= NULL
);
5575 return gdbarch
->address_class_type_flags_to_name
!= 0;
5579 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5581 gdb_assert (gdbarch
!= NULL
);
5582 if (gdbarch
->address_class_type_flags_to_name
== 0)
5583 internal_error (__FILE__
, __LINE__
,
5584 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5585 if (gdbarch_debug
>= 2)
5586 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5587 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5591 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5592 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5594 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5598 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5600 gdb_assert (gdbarch
!= NULL
);
5601 return gdbarch
->address_class_name_to_type_flags
!= 0;
5605 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
5607 gdb_assert (gdbarch
!= NULL
);
5608 if (gdbarch
->address_class_name_to_type_flags
== 0)
5609 internal_error (__FILE__
, __LINE__
,
5610 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5611 if (gdbarch_debug
>= 2)
5612 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5613 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5617 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5618 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5620 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5624 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5626 gdb_assert (gdbarch
!= NULL
);
5627 if (gdbarch
->register_reggroup_p
== 0)
5628 internal_error (__FILE__
, __LINE__
,
5629 "gdbarch: gdbarch_register_reggroup_p invalid");
5630 if (gdbarch_debug
>= 2)
5631 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5632 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5636 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5637 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5639 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5643 /* Keep a registry of per-architecture data-pointers required by GDB
5650 gdbarch_data_init_ftype
*init
;
5651 gdbarch_data_free_ftype
*free
;
5654 struct gdbarch_data_registration
5656 struct gdbarch_data
*data
;
5657 struct gdbarch_data_registration
*next
;
5660 struct gdbarch_data_registry
5663 struct gdbarch_data_registration
*registrations
;
5666 struct gdbarch_data_registry gdbarch_data_registry
=
5671 struct gdbarch_data
*
5672 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5673 gdbarch_data_free_ftype
*free
)
5675 struct gdbarch_data_registration
**curr
;
5676 /* Append the new registraration. */
5677 for (curr
= &gdbarch_data_registry
.registrations
;
5679 curr
= &(*curr
)->next
);
5680 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5681 (*curr
)->next
= NULL
;
5682 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5683 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5684 (*curr
)->data
->init
= init
;
5685 (*curr
)->data
->init_p
= 1;
5686 (*curr
)->data
->free
= free
;
5687 return (*curr
)->data
;
5691 /* Create/delete the gdbarch data vector. */
5694 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5696 gdb_assert (gdbarch
->data
== NULL
);
5697 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5698 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5702 free_gdbarch_data (struct gdbarch
*gdbarch
)
5704 struct gdbarch_data_registration
*rego
;
5705 gdb_assert (gdbarch
->data
!= NULL
);
5706 for (rego
= gdbarch_data_registry
.registrations
;
5710 struct gdbarch_data
*data
= rego
->data
;
5711 gdb_assert (data
->index
< gdbarch
->nr_data
);
5712 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5714 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5715 gdbarch
->data
[data
->index
] = NULL
;
5718 xfree (gdbarch
->data
);
5719 gdbarch
->data
= NULL
;
5723 /* Initialize the current value of the specified per-architecture
5727 set_gdbarch_data (struct gdbarch
*gdbarch
,
5728 struct gdbarch_data
*data
,
5731 gdb_assert (data
->index
< gdbarch
->nr_data
);
5732 if (gdbarch
->data
[data
->index
] != NULL
)
5734 gdb_assert (data
->free
!= NULL
);
5735 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5737 gdbarch
->data
[data
->index
] = pointer
;
5740 /* Return the current value of the specified per-architecture
5744 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5746 gdb_assert (data
->index
< gdbarch
->nr_data
);
5747 /* The data-pointer isn't initialized, call init() to get a value but
5748 only if the architecture initializaiton has completed. Otherwise
5749 punt - hope that the caller knows what they are doing. */
5750 if (gdbarch
->data
[data
->index
] == NULL
5751 && gdbarch
->initialized_p
)
5753 /* Be careful to detect an initialization cycle. */
5754 gdb_assert (data
->init_p
);
5756 gdb_assert (data
->init
!= NULL
);
5757 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5759 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5761 return gdbarch
->data
[data
->index
];
5766 /* Keep a registry of swapped data required by GDB modules. */
5771 struct gdbarch_swap_registration
*source
;
5772 struct gdbarch_swap
*next
;
5775 struct gdbarch_swap_registration
5778 unsigned long sizeof_data
;
5779 gdbarch_swap_ftype
*init
;
5780 struct gdbarch_swap_registration
*next
;
5783 struct gdbarch_swap_registry
5786 struct gdbarch_swap_registration
*registrations
;
5789 struct gdbarch_swap_registry gdbarch_swap_registry
=
5795 register_gdbarch_swap (void *data
,
5796 unsigned long sizeof_data
,
5797 gdbarch_swap_ftype
*init
)
5799 struct gdbarch_swap_registration
**rego
;
5800 for (rego
= &gdbarch_swap_registry
.registrations
;
5802 rego
= &(*rego
)->next
);
5803 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5804 (*rego
)->next
= NULL
;
5805 (*rego
)->init
= init
;
5806 (*rego
)->data
= data
;
5807 (*rego
)->sizeof_data
= sizeof_data
;
5811 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5813 struct gdbarch_swap
*curr
;
5814 for (curr
= gdbarch
->swap
;
5818 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5823 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5825 struct gdbarch_swap_registration
*rego
;
5826 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5827 for (rego
= gdbarch_swap_registry
.registrations
;
5831 if (rego
->data
!= NULL
)
5833 (*curr
) = XMALLOC (struct gdbarch_swap
);
5834 (*curr
)->source
= rego
;
5835 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5836 (*curr
)->next
= NULL
;
5837 curr
= &(*curr
)->next
;
5839 if (rego
->init
!= NULL
)
5845 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5847 struct gdbarch_swap
*curr
;
5848 for (curr
= gdbarch
->swap
;
5851 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5855 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5857 struct gdbarch_swap
*curr
;
5858 for (curr
= gdbarch
->swap
;
5861 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5865 /* Keep a registry of the architectures known by GDB. */
5867 struct gdbarch_registration
5869 enum bfd_architecture bfd_architecture
;
5870 gdbarch_init_ftype
*init
;
5871 gdbarch_dump_tdep_ftype
*dump_tdep
;
5872 struct gdbarch_list
*arches
;
5873 struct gdbarch_registration
*next
;
5876 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5879 append_name (const char ***buf
, int *nr
, const char *name
)
5881 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5887 gdbarch_printable_names (void)
5891 /* Accumulate a list of names based on the registed list of
5893 enum bfd_architecture a
;
5895 const char **arches
= NULL
;
5896 struct gdbarch_registration
*rego
;
5897 for (rego
= gdbarch_registry
;
5901 const struct bfd_arch_info
*ap
;
5902 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5904 internal_error (__FILE__
, __LINE__
,
5905 "gdbarch_architecture_names: multi-arch unknown");
5908 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5913 append_name (&arches
, &nr_arches
, NULL
);
5917 /* Just return all the architectures that BFD knows. Assume that
5918 the legacy architecture framework supports them. */
5919 return bfd_arch_list ();
5924 gdbarch_register (enum bfd_architecture bfd_architecture
,
5925 gdbarch_init_ftype
*init
,
5926 gdbarch_dump_tdep_ftype
*dump_tdep
)
5928 struct gdbarch_registration
**curr
;
5929 const struct bfd_arch_info
*bfd_arch_info
;
5930 /* Check that BFD recognizes this architecture */
5931 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5932 if (bfd_arch_info
== NULL
)
5934 internal_error (__FILE__
, __LINE__
,
5935 "gdbarch: Attempt to register unknown architecture (%d)",
5938 /* Check that we haven't seen this architecture before */
5939 for (curr
= &gdbarch_registry
;
5941 curr
= &(*curr
)->next
)
5943 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5944 internal_error (__FILE__
, __LINE__
,
5945 "gdbarch: Duplicate registraration of architecture (%s)",
5946 bfd_arch_info
->printable_name
);
5950 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5951 bfd_arch_info
->printable_name
,
5954 (*curr
) = XMALLOC (struct gdbarch_registration
);
5955 (*curr
)->bfd_architecture
= bfd_architecture
;
5956 (*curr
)->init
= init
;
5957 (*curr
)->dump_tdep
= dump_tdep
;
5958 (*curr
)->arches
= NULL
;
5959 (*curr
)->next
= NULL
;
5960 /* When non- multi-arch, install whatever target dump routine we've
5961 been provided - hopefully that routine has been written correctly
5962 and works regardless of multi-arch. */
5963 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5964 && startup_gdbarch
.dump_tdep
== NULL
)
5965 startup_gdbarch
.dump_tdep
= dump_tdep
;
5969 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5970 gdbarch_init_ftype
*init
)
5972 gdbarch_register (bfd_architecture
, init
, NULL
);
5976 /* Look for an architecture using gdbarch_info. Base search on only
5977 BFD_ARCH_INFO and BYTE_ORDER. */
5979 struct gdbarch_list
*
5980 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5981 const struct gdbarch_info
*info
)
5983 for (; arches
!= NULL
; arches
= arches
->next
)
5985 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5987 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5989 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5997 /* Update the current architecture. Return ZERO if the update request
6001 gdbarch_update_p (struct gdbarch_info info
)
6003 struct gdbarch
*new_gdbarch
;
6004 struct gdbarch
*old_gdbarch
;
6005 struct gdbarch_registration
*rego
;
6007 /* Fill in missing parts of the INFO struct using a number of
6008 sources: ``set ...''; INFOabfd supplied; existing target. */
6010 /* ``(gdb) set architecture ...'' */
6011 if (info
.bfd_arch_info
== NULL
6012 && !TARGET_ARCHITECTURE_AUTO
)
6013 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6014 if (info
.bfd_arch_info
== NULL
6015 && info
.abfd
!= NULL
6016 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
6017 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
6018 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
6019 if (info
.bfd_arch_info
== NULL
)
6020 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6022 /* ``(gdb) set byte-order ...'' */
6023 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6024 && !TARGET_BYTE_ORDER_AUTO
)
6025 info
.byte_order
= TARGET_BYTE_ORDER
;
6026 /* From the INFO struct. */
6027 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6028 && info
.abfd
!= NULL
)
6029 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
6030 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
6031 : BFD_ENDIAN_UNKNOWN
);
6032 /* From the current target. */
6033 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
6034 info
.byte_order
= TARGET_BYTE_ORDER
;
6036 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6037 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6038 info
.osabi
= gdbarch_lookup_osabi (info
.abfd
);
6039 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6040 info
.osabi
= current_gdbarch
->osabi
;
6042 /* Must have found some sort of architecture. */
6043 gdb_assert (info
.bfd_arch_info
!= NULL
);
6047 fprintf_unfiltered (gdb_stdlog
,
6048 "gdbarch_update: info.bfd_arch_info %s\n",
6049 (info
.bfd_arch_info
!= NULL
6050 ? info
.bfd_arch_info
->printable_name
6052 fprintf_unfiltered (gdb_stdlog
,
6053 "gdbarch_update: info.byte_order %d (%s)\n",
6055 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
6056 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
6058 fprintf_unfiltered (gdb_stdlog
,
6059 "gdbarch_update: info.osabi %d (%s)\n",
6060 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
6061 fprintf_unfiltered (gdb_stdlog
,
6062 "gdbarch_update: info.abfd 0x%lx\n",
6064 fprintf_unfiltered (gdb_stdlog
,
6065 "gdbarch_update: info.tdep_info 0x%lx\n",
6066 (long) info
.tdep_info
);
6069 /* Find the target that knows about this architecture. */
6070 for (rego
= gdbarch_registry
;
6073 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
6078 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
6082 /* Swap the data belonging to the old target out setting the
6083 installed data to zero. This stops the ->init() function trying
6084 to refer to the previous architecture's global data structures. */
6085 swapout_gdbarch_swap (current_gdbarch
);
6086 clear_gdbarch_swap (current_gdbarch
);
6088 /* Save the previously selected architecture, setting the global to
6089 NULL. This stops ->init() trying to use the previous
6090 architecture's configuration. The previous architecture may not
6091 even be of the same architecture family. The most recent
6092 architecture of the same family is found at the head of the
6093 rego->arches list. */
6094 old_gdbarch
= current_gdbarch
;
6095 current_gdbarch
= NULL
;
6097 /* Ask the target for a replacement architecture. */
6098 new_gdbarch
= rego
->init (info
, rego
->arches
);
6100 /* Did the target like it? No. Reject the change and revert to the
6101 old architecture. */
6102 if (new_gdbarch
== NULL
)
6105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
6106 swapin_gdbarch_swap (old_gdbarch
);
6107 current_gdbarch
= old_gdbarch
;
6111 /* Did the architecture change? No. Oops, put the old architecture
6113 if (old_gdbarch
== new_gdbarch
)
6116 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6118 new_gdbarch
->bfd_arch_info
->printable_name
);
6119 swapin_gdbarch_swap (old_gdbarch
);
6120 current_gdbarch
= old_gdbarch
;
6124 /* Is this a pre-existing architecture? Yes. Move it to the front
6125 of the list of architectures (keeping the list sorted Most
6126 Recently Used) and then copy it in. */
6128 struct gdbarch_list
**list
;
6129 for (list
= ®o
->arches
;
6131 list
= &(*list
)->next
)
6133 if ((*list
)->gdbarch
== new_gdbarch
)
6135 struct gdbarch_list
*this;
6137 fprintf_unfiltered (gdb_stdlog
,
6138 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6140 new_gdbarch
->bfd_arch_info
->printable_name
);
6143 (*list
) = this->next
;
6144 /* Insert in the front. */
6145 this->next
= rego
->arches
;
6146 rego
->arches
= this;
6147 /* Copy the new architecture in. */
6148 current_gdbarch
= new_gdbarch
;
6149 swapin_gdbarch_swap (new_gdbarch
);
6150 architecture_changed_event ();
6156 /* Prepend this new architecture to the architecture list (keep the
6157 list sorted Most Recently Used). */
6159 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
6160 this->next
= rego
->arches
;
6161 this->gdbarch
= new_gdbarch
;
6162 rego
->arches
= this;
6165 /* Switch to this new architecture marking it initialized. */
6166 current_gdbarch
= new_gdbarch
;
6167 current_gdbarch
->initialized_p
= 1;
6170 fprintf_unfiltered (gdb_stdlog
,
6171 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6173 new_gdbarch
->bfd_arch_info
->printable_name
);
6176 /* Check that the newly installed architecture is valid. Plug in
6177 any post init values. */
6178 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
6179 verify_gdbarch (new_gdbarch
);
6181 /* Initialize the per-architecture memory (swap) areas.
6182 CURRENT_GDBARCH must be update before these modules are
6184 init_gdbarch_swap (new_gdbarch
);
6186 /* Initialize the per-architecture data. CURRENT_GDBARCH
6187 must be updated before these modules are called. */
6188 architecture_changed_event ();
6191 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
6199 /* Pointer to the target-dependent disassembly function. */
6200 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
6201 disassemble_info tm_print_insn_info
;
6204 extern void _initialize_gdbarch (void);
6207 _initialize_gdbarch (void)
6209 struct cmd_list_element
*c
;
6211 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
6212 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
6213 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
6214 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
6215 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
6217 add_show_from_set (add_set_cmd ("arch",
6220 (char *)&gdbarch_debug
,
6221 "Set architecture debugging.\n\
6222 When non-zero, architecture debugging is enabled.", &setdebuglist
),
6224 c
= add_set_cmd ("archdebug",
6227 (char *)&gdbarch_debug
,
6228 "Set architecture debugging.\n\
6229 When non-zero, architecture debugging is enabled.", &setlist
);
6231 deprecate_cmd (c
, "set debug arch");
6232 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");