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 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
->extra_stack_alignment_needed
= 1;
563 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
564 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
565 current_gdbarch
->smash_text_address
= core_addr_identity
;
566 current_gdbarch
->print_insn
= legacy_print_insn
;
567 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
568 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
569 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
570 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
571 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
572 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
573 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
574 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
575 current_gdbarch
->name_of_malloc
= "malloc";
576 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
577 /* gdbarch_alloc() */
579 return current_gdbarch
;
583 /* Free a gdbarch struct. This should never happen in normal
584 operation --- once you've created a gdbarch, you keep it around.
585 However, if an architecture's init function encounters an error
586 building the structure, it may need to clean up a partially
587 constructed gdbarch. */
590 gdbarch_free (struct gdbarch
*arch
)
592 gdb_assert (arch
!= NULL
);
593 free_gdbarch_data (arch
);
598 /* Ensure that all values in a GDBARCH are reasonable. */
601 verify_gdbarch (struct gdbarch
*gdbarch
)
604 struct cleanup
*cleanups
;
607 /* Only perform sanity checks on a multi-arch target. */
610 log
= mem_fileopen ();
611 cleanups
= make_cleanup_ui_file_delete (log
);
613 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
614 fprintf_unfiltered (log
, "\n\tbyte-order");
615 if (gdbarch
->bfd_arch_info
== NULL
)
616 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
617 /* Check those that need to be defined for the given multi-arch level. */
618 /* Skip verify of short_bit, invalid_p == 0 */
619 /* Skip verify of int_bit, invalid_p == 0 */
620 /* Skip verify of long_bit, invalid_p == 0 */
621 /* Skip verify of long_long_bit, invalid_p == 0 */
622 /* Skip verify of float_bit, invalid_p == 0 */
623 /* Skip verify of double_bit, invalid_p == 0 */
624 /* Skip verify of long_double_bit, invalid_p == 0 */
625 /* Skip verify of ptr_bit, invalid_p == 0 */
626 if (gdbarch
->addr_bit
== 0)
627 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
628 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
629 if (gdbarch
->char_signed
== -1)
630 gdbarch
->char_signed
= 1;
631 /* Skip verify of read_pc, invalid_p == 0 */
632 /* Skip verify of write_pc, invalid_p == 0 */
633 /* Skip verify of read_fp, invalid_p == 0 */
634 /* Skip verify of read_sp, invalid_p == 0 */
635 /* Skip verify of write_sp, invalid_p == 0 */
636 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
637 /* Skip verify of pseudo_register_read, has predicate */
638 /* Skip verify of pseudo_register_write, has predicate */
639 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
640 && (gdbarch
->num_regs
== -1))
641 fprintf_unfiltered (log
, "\n\tnum_regs");
642 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
643 /* Skip verify of sp_regnum, invalid_p == 0 */
644 /* Skip verify of fp_regnum, invalid_p == 0 */
645 /* Skip verify of pc_regnum, invalid_p == 0 */
646 /* Skip verify of ps_regnum, invalid_p == 0 */
647 /* Skip verify of fp0_regnum, invalid_p == 0 */
648 /* Skip verify of npc_regnum, invalid_p == 0 */
649 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
650 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
651 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
652 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
653 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
654 /* Skip verify of register_name, invalid_p == 0 */
655 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
656 && (gdbarch
->register_size
== -1))
657 fprintf_unfiltered (log
, "\n\tregister_size");
658 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
659 && (gdbarch
->register_bytes
== -1))
660 fprintf_unfiltered (log
, "\n\tregister_bytes");
661 /* Skip verify of register_byte, invalid_p == 0 */
662 /* Skip verify of register_raw_size, invalid_p == 0 */
663 /* Skip verify of deprecated_max_register_raw_size, has predicate */
664 /* Skip verify of register_virtual_size, invalid_p == 0 */
665 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
666 /* Skip verify of register_virtual_type, has predicate */
667 /* Skip verify of register_type, has predicate */
668 /* Skip verify of deprecated_do_registers_info, has predicate */
669 /* Skip verify of print_registers_info, invalid_p == 0 */
670 /* Skip verify of print_float_info, has predicate */
671 /* Skip verify of print_vector_info, has predicate */
672 /* Skip verify of register_sim_regno, invalid_p == 0 */
673 /* Skip verify of register_bytes_ok, has predicate */
674 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
675 /* Skip verify of cannot_store_register, invalid_p == 0 */
676 /* Skip verify of get_longjmp_target, has predicate */
677 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
678 /* Skip verify of call_dummy_location, invalid_p == 0 */
679 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
680 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
681 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
682 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
683 && (gdbarch
->call_dummy_start_offset
== -1))
684 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
685 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
686 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
687 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
688 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
689 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
690 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
691 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
692 && (gdbarch
->call_dummy_length
== -1))
693 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
694 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
695 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
696 && (gdbarch
->call_dummy_p
== -1))
697 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
698 /* Skip verify of call_dummy_words, invalid_p == 0 */
699 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
700 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
701 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
702 && (gdbarch
->fix_call_dummy
== 0))
703 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
704 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
705 /* Skip verify of deprecated_init_frame_pc, has predicate */
706 /* Skip verify of deprecated_get_saved_register, has predicate */
707 /* Skip verify of register_convertible, invalid_p == 0 */
708 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
709 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
710 /* Skip verify of convert_register_p, invalid_p == 0 */
711 /* Skip verify of register_to_value, invalid_p == 0 */
712 /* Skip verify of value_to_register, invalid_p == 0 */
713 /* Skip verify of pointer_to_address, invalid_p == 0 */
714 /* Skip verify of address_to_pointer, invalid_p == 0 */
715 /* Skip verify of integer_to_address, has predicate */
716 /* Skip verify of return_value_on_stack, invalid_p == 0 */
717 /* Skip verify of push_arguments, invalid_p == 0 */
718 /* Skip verify of deprecated_push_dummy_frame, has predicate */
719 /* Skip verify of push_return_address, has predicate */
720 /* Skip verify of deprecated_pop_frame, has predicate */
721 /* Skip verify of deprecated_store_struct_return, has predicate */
722 /* Skip verify of extract_return_value, invalid_p == 0 */
723 /* Skip verify of store_return_value, invalid_p == 0 */
724 /* Skip verify of extract_struct_value_address, has predicate */
725 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
726 /* Skip verify of use_struct_convention, invalid_p == 0 */
727 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
728 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
729 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
730 && (gdbarch
->skip_prologue
== 0))
731 fprintf_unfiltered (log
, "\n\tskip_prologue");
732 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
733 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
734 && (gdbarch
->inner_than
== 0))
735 fprintf_unfiltered (log
, "\n\tinner_than");
736 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
737 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
738 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
740 && (gdbarch
->decr_pc_after_break
== -1))
741 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
742 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
743 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
744 && (gdbarch
->function_start_offset
== -1))
745 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
746 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
747 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
748 && (gdbarch
->frame_args_skip
== -1))
749 fprintf_unfiltered (log
, "\n\tframe_args_skip");
750 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
751 /* Skip verify of deprecated_frame_chain, has predicate */
752 /* Skip verify of deprecated_frame_chain_valid, has predicate */
753 /* Skip verify of deprecated_frame_saved_pc, has predicate */
754 /* Skip verify of unwind_pc, has predicate */
755 /* Skip verify of frame_args_address, invalid_p == 0 */
756 /* Skip verify of frame_locals_address, invalid_p == 0 */
757 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
758 && (gdbarch
->saved_pc_after_call
== 0))
759 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
760 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
761 && (gdbarch
->frame_num_args
== 0))
762 fprintf_unfiltered (log
, "\n\tframe_num_args");
763 /* Skip verify of stack_align, has predicate */
764 /* Skip verify of frame_align, has predicate */
765 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
766 /* Skip verify of reg_struct_has_addr, has predicate */
767 /* Skip verify of save_dummy_frame_tos, has predicate */
768 /* Skip verify of unwind_dummy_id, has predicate */
769 if (gdbarch
->float_format
== 0)
770 gdbarch
->float_format
= default_float_format (gdbarch
);
771 if (gdbarch
->double_format
== 0)
772 gdbarch
->double_format
= default_double_format (gdbarch
);
773 if (gdbarch
->long_double_format
== 0)
774 gdbarch
->long_double_format
= default_double_format (gdbarch
);
775 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
776 /* Skip verify of addr_bits_remove, invalid_p == 0 */
777 /* Skip verify of smash_text_address, invalid_p == 0 */
778 /* Skip verify of software_single_step, has predicate */
779 /* Skip verify of print_insn, invalid_p == 0 */
780 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
781 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
782 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
783 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
784 /* Skip verify of sigtramp_start, has predicate */
785 /* Skip verify of sigtramp_end, has predicate */
786 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
787 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
788 /* Skip verify of dwarf2_build_frame_info, has predicate */
789 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
790 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
791 /* Skip verify of name_of_malloc, invalid_p == 0 */
792 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
793 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
794 /* Skip verify of address_class_type_flags, has predicate */
795 /* Skip verify of address_class_type_flags_to_name, has predicate */
796 /* Skip verify of address_class_name_to_type_flags, has predicate */
797 /* Skip verify of register_reggroup_p, invalid_p == 0 */
798 buf
= ui_file_xstrdup (log
, &dummy
);
799 make_cleanup (xfree
, buf
);
800 if (strlen (buf
) > 0)
801 internal_error (__FILE__
, __LINE__
,
802 "verify_gdbarch: the following are invalid ...%s",
804 do_cleanups (cleanups
);
808 /* Print out the details of the current architecture. */
810 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
811 just happens to match the global variable ``current_gdbarch''. That
812 way macros refering to that variable get the local and not the global
813 version - ulgh. Once everything is parameterised with gdbarch, this
817 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
825 gdbarch_frame_align_p (current_gdbarch
));
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: frame_align = 0x%08lx\n",
829 (long) current_gdbarch
->frame_align
);
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
833 (long) current_gdbarch
->in_function_epilogue_p
);
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
837 (long) current_gdbarch
->register_reggroup_p
);
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
841 gdbarch_pseudo_register_read_p (current_gdbarch
));
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
845 (long) current_gdbarch
->pseudo_register_read
);
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
849 gdbarch_pseudo_register_write_p (current_gdbarch
));
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
853 (long) current_gdbarch
->pseudo_register_write
);
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
857 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
861 (long) current_gdbarch
->address_class_name_to_type_flags
);
862 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: %s # %s\n",
865 "ADDRESS_CLASS_TYPE_FLAGS_P()",
866 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
869 ADDRESS_CLASS_TYPE_FLAGS_P ());
871 #ifdef ADDRESS_CLASS_TYPE_FLAGS
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: %s # %s\n",
874 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
875 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
879 (long) current_gdbarch
->address_class_type_flags
880 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
885 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
889 (long) current_gdbarch
->address_class_type_flags_to_name
);
890 #ifdef ADDRESS_TO_POINTER
892 /* Macro might contain `[{}]' when not multi-arch */
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: %s # %s\n",
895 "ADDRESS_TO_POINTER(type, buf, addr)",
896 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
901 (long) current_gdbarch
->address_to_pointer
902 /*ADDRESS_TO_POINTER ()*/);
904 #ifdef ADDR_BITS_REMOVE
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: %s # %s\n",
907 "ADDR_BITS_REMOVE(addr)",
908 XSTRING (ADDR_BITS_REMOVE (addr
)));
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
912 (long) current_gdbarch
->addr_bits_remove
913 /*ADDR_BITS_REMOVE ()*/);
915 #ifdef BELIEVE_PCC_PROMOTION
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
918 XSTRING (BELIEVE_PCC_PROMOTION
));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
921 BELIEVE_PCC_PROMOTION
);
923 #ifdef BELIEVE_PCC_PROMOTION_TYPE
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
926 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
929 BELIEVE_PCC_PROMOTION_TYPE
);
931 #ifdef BREAKPOINT_FROM_PC
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: %s # %s\n",
934 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
935 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
939 (long) current_gdbarch
->breakpoint_from_pc
940 /*BREAKPOINT_FROM_PC ()*/);
942 #ifdef CALL_DUMMY_ADDRESS
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: %s # %s\n",
945 "CALL_DUMMY_ADDRESS()",
946 XSTRING (CALL_DUMMY_ADDRESS ()));
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
950 (long) current_gdbarch
->call_dummy_address
951 /*CALL_DUMMY_ADDRESS ()*/);
953 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
954 fprintf_unfiltered (file
,
955 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
956 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
957 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
960 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
962 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
965 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
968 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
970 #ifdef CALL_DUMMY_LENGTH
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
973 XSTRING (CALL_DUMMY_LENGTH
));
974 if (gdbarch
->call_dummy_length
>= 0)
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
979 #ifdef CALL_DUMMY_LOCATION
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
982 XSTRING (CALL_DUMMY_LOCATION
));
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
985 CALL_DUMMY_LOCATION
);
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: CALL_DUMMY_P # %s\n",
990 XSTRING (CALL_DUMMY_P
));
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: CALL_DUMMY_P = %d\n",
995 #ifdef CALL_DUMMY_START_OFFSET
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
998 XSTRING (CALL_DUMMY_START_OFFSET
));
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1001 (long) CALL_DUMMY_START_OFFSET
);
1003 #ifdef CALL_DUMMY_WORDS
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1006 XSTRING (CALL_DUMMY_WORDS
));
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1009 (long) CALL_DUMMY_WORDS
);
1011 #ifdef CANNOT_FETCH_REGISTER
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: %s # %s\n",
1014 "CANNOT_FETCH_REGISTER(regnum)",
1015 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
1019 (long) current_gdbarch
->cannot_fetch_register
1020 /*CANNOT_FETCH_REGISTER ()*/);
1022 #ifdef CANNOT_STEP_BREAKPOINT
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1025 XSTRING (CANNOT_STEP_BREAKPOINT
));
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1028 CANNOT_STEP_BREAKPOINT
);
1030 #ifdef CANNOT_STORE_REGISTER
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: %s # %s\n",
1033 "CANNOT_STORE_REGISTER(regnum)",
1034 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
1038 (long) current_gdbarch
->cannot_store_register
1039 /*CANNOT_STORE_REGISTER ()*/);
1041 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1043 /* Macro might contain `[{}]' when not multi-arch */
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: %s # %s\n",
1046 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1047 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1052 (long) current_gdbarch
->coff_make_msymbol_special
1053 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1058 (long) current_gdbarch
->construct_inferior_arguments
);
1059 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: %s # %s\n",
1062 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1063 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1067 (long) current_gdbarch
->convert_from_func_ptr_addr
1068 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1070 #ifdef CONVERT_REGISTER_P
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: %s # %s\n",
1073 "CONVERT_REGISTER_P(regnum)",
1074 XSTRING (CONVERT_REGISTER_P (regnum
)));
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1078 (long) current_gdbarch
->convert_register_p
1079 /*CONVERT_REGISTER_P ()*/);
1081 #ifdef DECR_PC_AFTER_BREAK
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1084 XSTRING (DECR_PC_AFTER_BREAK
));
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1087 (long) DECR_PC_AFTER_BREAK
);
1089 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: %s # %s\n",
1092 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1093 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1096 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1098 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1101 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST
));
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1104 DEPRECATED_CALL_DUMMY_STACK_ADJUST
);
1106 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: %s # %s\n",
1109 "DEPRECATED_DO_REGISTERS_INFO_P()",
1110 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1113 DEPRECATED_DO_REGISTERS_INFO_P ());
1115 #ifdef DEPRECATED_DO_REGISTERS_INFO
1117 /* Macro might contain `[{}]' when not multi-arch */
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: %s # %s\n",
1120 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1121 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1126 (long) current_gdbarch
->deprecated_do_registers_info
1127 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1129 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1131 /* Macro might contain `[{}]' when not multi-arch */
1132 fprintf_unfiltered (file
,
1133 "gdbarch_dump: %s # %s\n",
1134 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1135 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1138 fprintf_unfiltered (file
,
1139 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1140 (long) current_gdbarch
->deprecated_extract_return_value
1141 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1143 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1144 fprintf_unfiltered (file
,
1145 "gdbarch_dump: %s # %s\n",
1146 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1147 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1150 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1152 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: %s # %s\n",
1155 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1156 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1160 (long) current_gdbarch
->deprecated_extract_struct_value_address
1161 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1163 #ifdef DEPRECATED_FRAME_CHAIN_P
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: %s # %s\n",
1166 "DEPRECATED_FRAME_CHAIN_P()",
1167 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1170 DEPRECATED_FRAME_CHAIN_P ());
1172 #ifdef DEPRECATED_FRAME_CHAIN
1173 fprintf_unfiltered (file
,
1174 "gdbarch_dump: %s # %s\n",
1175 "DEPRECATED_FRAME_CHAIN(frame)",
1176 XSTRING (DEPRECATED_FRAME_CHAIN (frame
)));
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1180 (long) current_gdbarch
->deprecated_frame_chain
1181 /*DEPRECATED_FRAME_CHAIN ()*/);
1183 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: %s # %s\n",
1186 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1187 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1190 DEPRECATED_FRAME_CHAIN_VALID_P ());
1192 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: %s # %s\n",
1195 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1196 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain
, thisframe
)));
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1200 (long) current_gdbarch
->deprecated_frame_chain_valid
1201 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1203 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: %s # %s\n",
1206 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1207 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1210 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1212 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1214 /* Macro might contain `[{}]' when not multi-arch */
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: %s # %s\n",
1217 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1218 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1223 (long) current_gdbarch
->deprecated_frame_init_saved_regs
1224 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1226 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: %s # %s\n",
1229 "DEPRECATED_FRAME_SAVED_PC_P()",
1230 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1231 fprintf_unfiltered (file
,
1232 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1233 DEPRECATED_FRAME_SAVED_PC_P ());
1235 #ifdef DEPRECATED_FRAME_SAVED_PC
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: %s # %s\n",
1238 "DEPRECATED_FRAME_SAVED_PC(fi)",
1239 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi
)));
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1243 (long) current_gdbarch
->deprecated_frame_saved_pc
1244 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1246 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: %s # %s\n",
1249 "DEPRECATED_GET_SAVED_REGISTER_P()",
1250 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1253 DEPRECATED_GET_SAVED_REGISTER_P ());
1255 #ifdef DEPRECATED_GET_SAVED_REGISTER
1257 /* Macro might contain `[{}]' when not multi-arch */
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: %s # %s\n",
1260 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1261 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1264 fprintf_unfiltered (file
,
1265 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1266 (long) current_gdbarch
->deprecated_get_saved_register
1267 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1269 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: %s # %s\n",
1272 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1273 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1276 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1278 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1280 /* Macro might contain `[{}]' when not multi-arch */
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: %s # %s\n",
1283 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1284 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1289 (long) current_gdbarch
->deprecated_init_extra_frame_info
1290 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1292 #ifdef DEPRECATED_INIT_FRAME_PC_P
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "DEPRECATED_INIT_FRAME_PC_P()",
1296 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1299 DEPRECATED_INIT_FRAME_PC_P ());
1301 #ifdef DEPRECATED_INIT_FRAME_PC
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: %s # %s\n",
1304 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1305 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1309 (long) current_gdbarch
->deprecated_init_frame_pc
1310 /*DEPRECATED_INIT_FRAME_PC ()*/);
1312 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: %s # %s\n",
1315 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1316 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1319 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1321 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1322 fprintf_unfiltered (file
,
1323 "gdbarch_dump: %s # %s\n",
1324 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1325 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1329 (long) current_gdbarch
->deprecated_init_frame_pc_first
1330 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1332 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: %s # %s\n",
1335 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1336 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1339 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1341 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1342 fprintf_unfiltered (file
,
1343 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1344 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE
));
1345 fprintf_unfiltered (file
,
1346 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1347 DEPRECATED_MAX_REGISTER_RAW_SIZE
);
1349 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1350 fprintf_unfiltered (file
,
1351 "gdbarch_dump: %s # %s\n",
1352 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1353 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1356 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1358 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1361 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
));
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1364 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
);
1366 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: %s # %s\n",
1369 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1370 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1371 fprintf_unfiltered (file
,
1372 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1373 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1375 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: %s # %s\n",
1378 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1379 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1383 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1384 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1386 #ifdef DEPRECATED_POP_FRAME_P
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: %s # %s\n",
1389 "DEPRECATED_POP_FRAME_P()",
1390 XSTRING (DEPRECATED_POP_FRAME_P ()));
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1393 DEPRECATED_POP_FRAME_P ());
1395 #ifdef DEPRECATED_POP_FRAME
1397 /* Macro might contain `[{}]' when not multi-arch */
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: %s # %s\n",
1400 "DEPRECATED_POP_FRAME(-)",
1401 XSTRING (DEPRECATED_POP_FRAME (-)));
1404 fprintf_unfiltered (file
,
1405 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1406 (long) current_gdbarch
->deprecated_pop_frame
1407 /*DEPRECATED_POP_FRAME ()*/);
1409 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: %s # %s\n",
1412 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1413 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1416 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1418 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1420 /* Macro might contain `[{}]' when not multi-arch */
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: %s # %s\n",
1423 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1424 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1429 (long) current_gdbarch
->deprecated_push_dummy_frame
1430 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1432 #ifdef DEPRECATED_STORE_RETURN_VALUE
1434 /* Macro might contain `[{}]' when not multi-arch */
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: %s # %s\n",
1437 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1438 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1443 (long) current_gdbarch
->deprecated_store_return_value
1444 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1446 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: %s # %s\n",
1449 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1450 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1453 DEPRECATED_STORE_STRUCT_RETURN_P ());
1455 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1457 /* Macro might contain `[{}]' when not multi-arch */
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: %s # %s\n",
1460 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1461 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1464 fprintf_unfiltered (file
,
1465 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1466 (long) current_gdbarch
->deprecated_store_struct_return
1467 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1469 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1472 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
));
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1475 DEPRECATED_USE_GENERIC_DUMMY_FRAMES
);
1477 #ifdef DWARF2_BUILD_FRAME_INFO_P
1478 fprintf_unfiltered (file
,
1479 "gdbarch_dump: %s # %s\n",
1480 "DWARF2_BUILD_FRAME_INFO_P()",
1481 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1484 DWARF2_BUILD_FRAME_INFO_P ());
1486 #ifdef DWARF2_BUILD_FRAME_INFO
1488 /* Macro might contain `[{}]' when not multi-arch */
1489 fprintf_unfiltered (file
,
1490 "gdbarch_dump: %s # %s\n",
1491 "DWARF2_BUILD_FRAME_INFO(objfile)",
1492 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1497 (long) current_gdbarch
->dwarf2_build_frame_info
1498 /*DWARF2_BUILD_FRAME_INFO ()*/);
1500 #ifdef DWARF2_REG_TO_REGNUM
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: %s # %s\n",
1503 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1504 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1508 (long) current_gdbarch
->dwarf2_reg_to_regnum
1509 /*DWARF2_REG_TO_REGNUM ()*/);
1511 #ifdef DWARF_REG_TO_REGNUM
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: %s # %s\n",
1514 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1515 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1519 (long) current_gdbarch
->dwarf_reg_to_regnum
1520 /*DWARF_REG_TO_REGNUM ()*/);
1522 #ifdef ECOFF_REG_TO_REGNUM
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: %s # %s\n",
1525 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1526 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1530 (long) current_gdbarch
->ecoff_reg_to_regnum
1531 /*ECOFF_REG_TO_REGNUM ()*/);
1533 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1535 /* Macro might contain `[{}]' when not multi-arch */
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: %s # %s\n",
1538 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1539 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1544 (long) current_gdbarch
->elf_make_msymbol_special
1545 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1547 #ifdef EXTRACT_RETURN_VALUE
1549 /* Macro might contain `[{}]' when not multi-arch */
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: %s # %s\n",
1552 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1553 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1556 fprintf_unfiltered (file
,
1557 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1558 (long) current_gdbarch
->extract_return_value
1559 /*EXTRACT_RETURN_VALUE ()*/);
1561 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1562 fprintf_unfiltered (file
,
1563 "gdbarch_dump: %s # %s\n",
1564 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1565 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1566 fprintf_unfiltered (file
,
1567 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1568 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1570 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1571 fprintf_unfiltered (file
,
1572 "gdbarch_dump: %s # %s\n",
1573 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1574 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1578 (long) current_gdbarch
->extract_struct_value_address
1579 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1581 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1582 fprintf_unfiltered (file
,
1583 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1584 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1585 fprintf_unfiltered (file
,
1586 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1587 EXTRA_STACK_ALIGNMENT_NEEDED
);
1589 #ifdef FIX_CALL_DUMMY
1591 /* Macro might contain `[{}]' when not multi-arch */
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: %s # %s\n",
1594 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1595 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1600 (long) current_gdbarch
->fix_call_dummy
1601 /*FIX_CALL_DUMMY ()*/);
1604 fprintf_unfiltered (file
,
1605 "gdbarch_dump: FP0_REGNUM # %s\n",
1606 XSTRING (FP0_REGNUM
));
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: FP0_REGNUM = %d\n",
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: FP_REGNUM # %s\n",
1614 XSTRING (FP_REGNUM
));
1615 fprintf_unfiltered (file
,
1616 "gdbarch_dump: FP_REGNUM = %d\n",
1619 #ifdef FRAMELESS_FUNCTION_INVOCATION
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: %s # %s\n",
1622 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1623 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1627 (long) current_gdbarch
->frameless_function_invocation
1628 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1630 #ifdef FRAME_ARGS_ADDRESS
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: %s # %s\n",
1633 "FRAME_ARGS_ADDRESS(fi)",
1634 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1636 fprintf_unfiltered (file
,
1637 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1638 (long) current_gdbarch
->frame_args_address
1639 /*FRAME_ARGS_ADDRESS ()*/);
1641 #ifdef FRAME_ARGS_SKIP
1642 fprintf_unfiltered (file
,
1643 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1644 XSTRING (FRAME_ARGS_SKIP
));
1645 fprintf_unfiltered (file
,
1646 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1647 (long) FRAME_ARGS_SKIP
);
1649 #ifdef FRAME_LOCALS_ADDRESS
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: %s # %s\n",
1652 "FRAME_LOCALS_ADDRESS(fi)",
1653 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1657 (long) current_gdbarch
->frame_locals_address
1658 /*FRAME_LOCALS_ADDRESS ()*/);
1660 #ifdef FRAME_NUM_ARGS
1661 fprintf_unfiltered (file
,
1662 "gdbarch_dump: %s # %s\n",
1663 "FRAME_NUM_ARGS(frame)",
1664 XSTRING (FRAME_NUM_ARGS (frame
)));
1666 fprintf_unfiltered (file
,
1667 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1668 (long) current_gdbarch
->frame_num_args
1669 /*FRAME_NUM_ARGS ()*/);
1671 #ifdef FUNCTION_START_OFFSET
1672 fprintf_unfiltered (file
,
1673 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1674 XSTRING (FUNCTION_START_OFFSET
));
1675 fprintf_unfiltered (file
,
1676 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1677 (long) FUNCTION_START_OFFSET
);
1679 #ifdef GET_LONGJMP_TARGET_P
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: %s # %s\n",
1682 "GET_LONGJMP_TARGET_P()",
1683 XSTRING (GET_LONGJMP_TARGET_P ()));
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1686 GET_LONGJMP_TARGET_P ());
1688 #ifdef GET_LONGJMP_TARGET
1689 fprintf_unfiltered (file
,
1690 "gdbarch_dump: %s # %s\n",
1691 "GET_LONGJMP_TARGET(pc)",
1692 XSTRING (GET_LONGJMP_TARGET (pc
)));
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1696 (long) current_gdbarch
->get_longjmp_target
1697 /*GET_LONGJMP_TARGET ()*/);
1699 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1702 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1705 HAVE_NONSTEPPABLE_WATCHPOINT
);
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: %s # %s\n",
1710 "INNER_THAN(lhs, rhs)",
1711 XSTRING (INNER_THAN (lhs
, rhs
)));
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1715 (long) current_gdbarch
->inner_than
1718 #ifdef INTEGER_TO_ADDRESS_P
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: %s # %s\n",
1721 "INTEGER_TO_ADDRESS_P()",
1722 XSTRING (INTEGER_TO_ADDRESS_P ()));
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1725 INTEGER_TO_ADDRESS_P ());
1727 #ifdef INTEGER_TO_ADDRESS
1728 fprintf_unfiltered (file
,
1729 "gdbarch_dump: %s # %s\n",
1730 "INTEGER_TO_ADDRESS(type, buf)",
1731 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1735 (long) current_gdbarch
->integer_to_address
1736 /*INTEGER_TO_ADDRESS ()*/);
1738 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1739 fprintf_unfiltered (file
,
1740 "gdbarch_dump: %s # %s\n",
1741 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1742 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1746 (long) current_gdbarch
->in_solib_call_trampoline
1747 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1749 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: %s # %s\n",
1752 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1753 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1755 fprintf_unfiltered (file
,
1756 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1757 (long) current_gdbarch
->in_solib_return_trampoline
1758 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1760 #ifdef MEMORY_INSERT_BREAKPOINT
1761 fprintf_unfiltered (file
,
1762 "gdbarch_dump: %s # %s\n",
1763 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1764 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1766 fprintf_unfiltered (file
,
1767 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1768 (long) current_gdbarch
->memory_insert_breakpoint
1769 /*MEMORY_INSERT_BREAKPOINT ()*/);
1771 #ifdef MEMORY_REMOVE_BREAKPOINT
1772 fprintf_unfiltered (file
,
1773 "gdbarch_dump: %s # %s\n",
1774 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1775 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1777 fprintf_unfiltered (file
,
1778 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1779 (long) current_gdbarch
->memory_remove_breakpoint
1780 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1782 #ifdef NAME_OF_MALLOC
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1785 XSTRING (NAME_OF_MALLOC
));
1786 fprintf_unfiltered (file
,
1787 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1791 fprintf_unfiltered (file
,
1792 "gdbarch_dump: NPC_REGNUM # %s\n",
1793 XSTRING (NPC_REGNUM
));
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: NPC_REGNUM = %d\n",
1798 #ifdef NUM_PSEUDO_REGS
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1801 XSTRING (NUM_PSEUDO_REGS
));
1802 fprintf_unfiltered (file
,
1803 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1807 fprintf_unfiltered (file
,
1808 "gdbarch_dump: NUM_REGS # %s\n",
1809 XSTRING (NUM_REGS
));
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: NUM_REGS = %d\n",
1814 #ifdef PARM_BOUNDARY
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1817 XSTRING (PARM_BOUNDARY
));
1818 fprintf_unfiltered (file
,
1819 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1822 #ifdef PC_IN_SIGTRAMP
1823 fprintf_unfiltered (file
,
1824 "gdbarch_dump: %s # %s\n",
1825 "PC_IN_SIGTRAMP(pc, name)",
1826 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1830 (long) current_gdbarch
->pc_in_sigtramp
1831 /*PC_IN_SIGTRAMP ()*/);
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: PC_REGNUM # %s\n",
1836 XSTRING (PC_REGNUM
));
1837 fprintf_unfiltered (file
,
1838 "gdbarch_dump: PC_REGNUM = %d\n",
1841 #ifdef POINTER_TO_ADDRESS
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: %s # %s\n",
1844 "POINTER_TO_ADDRESS(type, buf)",
1845 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1847 fprintf_unfiltered (file
,
1848 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1849 (long) current_gdbarch
->pointer_to_address
1850 /*POINTER_TO_ADDRESS ()*/);
1852 #ifdef PREPARE_TO_PROCEED
1853 fprintf_unfiltered (file
,
1854 "gdbarch_dump: %s # %s\n",
1855 "PREPARE_TO_PROCEED(select_it)",
1856 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1858 fprintf_unfiltered (file
,
1859 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1860 (long) current_gdbarch
->prepare_to_proceed
1861 /*PREPARE_TO_PROCEED ()*/);
1864 fprintf_unfiltered (file
,
1865 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1866 gdbarch_print_float_info_p (current_gdbarch
));
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: print_float_info = 0x%08lx\n",
1870 (long) current_gdbarch
->print_float_info
);
1872 fprintf_unfiltered (file
,
1873 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1874 (long) current_gdbarch
->print_registers_info
);
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1878 gdbarch_print_vector_info_p (current_gdbarch
));
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1882 (long) current_gdbarch
->print_vector_info
);
1883 #ifdef PROLOGUE_FRAMELESS_P
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: %s # %s\n",
1886 "PROLOGUE_FRAMELESS_P(ip)",
1887 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1891 (long) current_gdbarch
->prologue_frameless_p
1892 /*PROLOGUE_FRAMELESS_P ()*/);
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: PS_REGNUM # %s\n",
1897 XSTRING (PS_REGNUM
));
1898 fprintf_unfiltered (file
,
1899 "gdbarch_dump: PS_REGNUM = %d\n",
1902 #ifdef PUSH_ARGUMENTS
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: %s # %s\n",
1905 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1906 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n",
1910 (long) current_gdbarch
->push_arguments
1911 /*PUSH_ARGUMENTS ()*/);
1913 #ifdef PUSH_RETURN_ADDRESS_P
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: %s # %s\n",
1916 "PUSH_RETURN_ADDRESS_P()",
1917 XSTRING (PUSH_RETURN_ADDRESS_P ()));
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n",
1920 PUSH_RETURN_ADDRESS_P ());
1922 #ifdef PUSH_RETURN_ADDRESS
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: %s # %s\n",
1925 "PUSH_RETURN_ADDRESS(pc, sp)",
1926 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1928 fprintf_unfiltered (file
,
1929 "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1930 (long) current_gdbarch
->push_return_address
1931 /*PUSH_RETURN_ADDRESS ()*/);
1933 #ifdef REGISTER_BYTE
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: %s # %s\n",
1936 "REGISTER_BYTE(reg_nr)",
1937 XSTRING (REGISTER_BYTE (reg_nr
)));
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1941 (long) current_gdbarch
->register_byte
1942 /*REGISTER_BYTE ()*/);
1944 #ifdef REGISTER_BYTES
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: REGISTER_BYTES # %s\n",
1947 XSTRING (REGISTER_BYTES
));
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: REGISTER_BYTES = %d\n",
1952 #ifdef REGISTER_BYTES_OK_P
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: %s # %s\n",
1955 "REGISTER_BYTES_OK_P()",
1956 XSTRING (REGISTER_BYTES_OK_P ()));
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1959 REGISTER_BYTES_OK_P ());
1961 #ifdef REGISTER_BYTES_OK
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: %s # %s\n",
1964 "REGISTER_BYTES_OK(nr_bytes)",
1965 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1969 (long) current_gdbarch
->register_bytes_ok
1970 /*REGISTER_BYTES_OK ()*/);
1972 #ifdef REGISTER_CONVERTIBLE
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: %s # %s\n",
1975 "REGISTER_CONVERTIBLE(nr)",
1976 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
1980 (long) current_gdbarch
->register_convertible
1981 /*REGISTER_CONVERTIBLE ()*/);
1983 #ifdef REGISTER_CONVERT_TO_RAW
1985 /* Macro might contain `[{}]' when not multi-arch */
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: %s # %s\n",
1988 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1989 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1992 fprintf_unfiltered (file
,
1993 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1994 (long) current_gdbarch
->register_convert_to_raw
1995 /*REGISTER_CONVERT_TO_RAW ()*/);
1997 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1999 /* Macro might contain `[{}]' when not multi-arch */
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: %s # %s\n",
2002 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2003 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2008 (long) current_gdbarch
->register_convert_to_virtual
2009 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2011 #ifdef REGISTER_NAME
2012 fprintf_unfiltered (file
,
2013 "gdbarch_dump: %s # %s\n",
2014 "REGISTER_NAME(regnr)",
2015 XSTRING (REGISTER_NAME (regnr
)));
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2019 (long) current_gdbarch
->register_name
2020 /*REGISTER_NAME ()*/);
2022 #ifdef REGISTER_RAW_SIZE
2023 fprintf_unfiltered (file
,
2024 "gdbarch_dump: %s # %s\n",
2025 "REGISTER_RAW_SIZE(reg_nr)",
2026 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
2028 fprintf_unfiltered (file
,
2029 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2030 (long) current_gdbarch
->register_raw_size
2031 /*REGISTER_RAW_SIZE ()*/);
2033 #ifdef REGISTER_SIM_REGNO
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: %s # %s\n",
2036 "REGISTER_SIM_REGNO(reg_nr)",
2037 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2041 (long) current_gdbarch
->register_sim_regno
2042 /*REGISTER_SIM_REGNO ()*/);
2044 #ifdef REGISTER_SIZE
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: REGISTER_SIZE # %s\n",
2047 XSTRING (REGISTER_SIZE
));
2048 fprintf_unfiltered (file
,
2049 "gdbarch_dump: REGISTER_SIZE = %d\n",
2052 #ifdef REGISTER_TO_VALUE
2054 /* Macro might contain `[{}]' when not multi-arch */
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: %s # %s\n",
2057 "REGISTER_TO_VALUE(regnum, type, from, to)",
2058 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2063 (long) current_gdbarch
->register_to_value
2064 /*REGISTER_TO_VALUE ()*/);
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2069 gdbarch_register_type_p (current_gdbarch
));
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: register_type = 0x%08lx\n",
2073 (long) current_gdbarch
->register_type
);
2074 #ifdef REGISTER_VIRTUAL_SIZE
2075 fprintf_unfiltered (file
,
2076 "gdbarch_dump: %s # %s\n",
2077 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2078 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
2080 fprintf_unfiltered (file
,
2081 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2082 (long) current_gdbarch
->register_virtual_size
2083 /*REGISTER_VIRTUAL_SIZE ()*/);
2085 #ifdef REGISTER_VIRTUAL_TYPE_P
2086 fprintf_unfiltered (file
,
2087 "gdbarch_dump: %s # %s\n",
2088 "REGISTER_VIRTUAL_TYPE_P()",
2089 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2090 fprintf_unfiltered (file
,
2091 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2092 REGISTER_VIRTUAL_TYPE_P ());
2094 #ifdef REGISTER_VIRTUAL_TYPE
2095 fprintf_unfiltered (file
,
2096 "gdbarch_dump: %s # %s\n",
2097 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2098 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
2100 fprintf_unfiltered (file
,
2101 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2102 (long) current_gdbarch
->register_virtual_type
2103 /*REGISTER_VIRTUAL_TYPE ()*/);
2105 #ifdef REG_STRUCT_HAS_ADDR_P
2106 fprintf_unfiltered (file
,
2107 "gdbarch_dump: %s # %s\n",
2108 "REG_STRUCT_HAS_ADDR_P()",
2109 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2110 fprintf_unfiltered (file
,
2111 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2112 REG_STRUCT_HAS_ADDR_P ());
2114 #ifdef REG_STRUCT_HAS_ADDR
2115 fprintf_unfiltered (file
,
2116 "gdbarch_dump: %s # %s\n",
2117 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2118 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
2120 fprintf_unfiltered (file
,
2121 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2122 (long) current_gdbarch
->reg_struct_has_addr
2123 /*REG_STRUCT_HAS_ADDR ()*/);
2125 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2127 /* Macro might contain `[{}]' when not multi-arch */
2128 fprintf_unfiltered (file
,
2129 "gdbarch_dump: %s # %s\n",
2130 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2131 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
2134 fprintf_unfiltered (file
,
2135 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2136 (long) current_gdbarch
->remote_translate_xfer_address
2137 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2139 #ifdef RETURN_VALUE_ON_STACK
2140 fprintf_unfiltered (file
,
2141 "gdbarch_dump: %s # %s\n",
2142 "RETURN_VALUE_ON_STACK(type)",
2143 XSTRING (RETURN_VALUE_ON_STACK (type
)));
2145 fprintf_unfiltered (file
,
2146 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2147 (long) current_gdbarch
->return_value_on_stack
2148 /*RETURN_VALUE_ON_STACK ()*/);
2150 #ifdef SAVED_PC_AFTER_CALL
2151 fprintf_unfiltered (file
,
2152 "gdbarch_dump: %s # %s\n",
2153 "SAVED_PC_AFTER_CALL(frame)",
2154 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
2156 fprintf_unfiltered (file
,
2157 "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n",
2158 (long) current_gdbarch
->saved_pc_after_call
2159 /*SAVED_PC_AFTER_CALL ()*/);
2161 #ifdef SAVE_DUMMY_FRAME_TOS_P
2162 fprintf_unfiltered (file
,
2163 "gdbarch_dump: %s # %s\n",
2164 "SAVE_DUMMY_FRAME_TOS_P()",
2165 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2166 fprintf_unfiltered (file
,
2167 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2168 SAVE_DUMMY_FRAME_TOS_P ());
2170 #ifdef SAVE_DUMMY_FRAME_TOS
2172 /* Macro might contain `[{}]' when not multi-arch */
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: %s # %s\n",
2175 "SAVE_DUMMY_FRAME_TOS(sp)",
2176 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
2179 fprintf_unfiltered (file
,
2180 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2181 (long) current_gdbarch
->save_dummy_frame_tos
2182 /*SAVE_DUMMY_FRAME_TOS ()*/);
2184 #ifdef SDB_REG_TO_REGNUM
2185 fprintf_unfiltered (file
,
2186 "gdbarch_dump: %s # %s\n",
2187 "SDB_REG_TO_REGNUM(sdb_regnr)",
2188 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
2190 fprintf_unfiltered (file
,
2191 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2192 (long) current_gdbarch
->sdb_reg_to_regnum
2193 /*SDB_REG_TO_REGNUM ()*/);
2195 #ifdef SIGTRAMP_END_P
2196 fprintf_unfiltered (file
,
2197 "gdbarch_dump: %s # %s\n",
2199 XSTRING (SIGTRAMP_END_P ()));
2200 fprintf_unfiltered (file
,
2201 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2205 fprintf_unfiltered (file
,
2206 "gdbarch_dump: %s # %s\n",
2208 XSTRING (SIGTRAMP_END (pc
)));
2210 fprintf_unfiltered (file
,
2211 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2212 (long) current_gdbarch
->sigtramp_end
2213 /*SIGTRAMP_END ()*/);
2215 #ifdef SIGTRAMP_START_P
2216 fprintf_unfiltered (file
,
2217 "gdbarch_dump: %s # %s\n",
2218 "SIGTRAMP_START_P()",
2219 XSTRING (SIGTRAMP_START_P ()));
2220 fprintf_unfiltered (file
,
2221 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2222 SIGTRAMP_START_P ());
2224 #ifdef SIGTRAMP_START
2225 fprintf_unfiltered (file
,
2226 "gdbarch_dump: %s # %s\n",
2227 "SIGTRAMP_START(pc)",
2228 XSTRING (SIGTRAMP_START (pc
)));
2230 fprintf_unfiltered (file
,
2231 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2232 (long) current_gdbarch
->sigtramp_start
2233 /*SIGTRAMP_START ()*/);
2235 #ifdef SIZEOF_CALL_DUMMY_WORDS
2236 fprintf_unfiltered (file
,
2237 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2238 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
2239 fprintf_unfiltered (file
,
2240 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
2241 (long) SIZEOF_CALL_DUMMY_WORDS
);
2243 #ifdef SKIP_PROLOGUE
2244 fprintf_unfiltered (file
,
2245 "gdbarch_dump: %s # %s\n",
2246 "SKIP_PROLOGUE(ip)",
2247 XSTRING (SKIP_PROLOGUE (ip
)));
2249 fprintf_unfiltered (file
,
2250 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2251 (long) current_gdbarch
->skip_prologue
2252 /*SKIP_PROLOGUE ()*/);
2254 #ifdef SKIP_TRAMPOLINE_CODE
2255 fprintf_unfiltered (file
,
2256 "gdbarch_dump: %s # %s\n",
2257 "SKIP_TRAMPOLINE_CODE(pc)",
2258 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
2260 fprintf_unfiltered (file
,
2261 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2262 (long) current_gdbarch
->skip_trampoline_code
2263 /*SKIP_TRAMPOLINE_CODE ()*/);
2265 #ifdef SMASH_TEXT_ADDRESS
2266 fprintf_unfiltered (file
,
2267 "gdbarch_dump: %s # %s\n",
2268 "SMASH_TEXT_ADDRESS(addr)",
2269 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2271 fprintf_unfiltered (file
,
2272 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2273 (long) current_gdbarch
->smash_text_address
2274 /*SMASH_TEXT_ADDRESS ()*/);
2276 #ifdef SOFTWARE_SINGLE_STEP_P
2277 fprintf_unfiltered (file
,
2278 "gdbarch_dump: %s # %s\n",
2279 "SOFTWARE_SINGLE_STEP_P()",
2280 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2281 fprintf_unfiltered (file
,
2282 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2283 SOFTWARE_SINGLE_STEP_P ());
2285 #ifdef SOFTWARE_SINGLE_STEP
2287 /* Macro might contain `[{}]' when not multi-arch */
2288 fprintf_unfiltered (file
,
2289 "gdbarch_dump: %s # %s\n",
2290 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2291 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2294 fprintf_unfiltered (file
,
2295 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2296 (long) current_gdbarch
->software_single_step
2297 /*SOFTWARE_SINGLE_STEP ()*/);
2300 fprintf_unfiltered (file
,
2301 "gdbarch_dump: SP_REGNUM # %s\n",
2302 XSTRING (SP_REGNUM
));
2303 fprintf_unfiltered (file
,
2304 "gdbarch_dump: SP_REGNUM = %d\n",
2307 #ifdef STAB_REG_TO_REGNUM
2308 fprintf_unfiltered (file
,
2309 "gdbarch_dump: %s # %s\n",
2310 "STAB_REG_TO_REGNUM(stab_regnr)",
2311 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2313 fprintf_unfiltered (file
,
2314 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2315 (long) current_gdbarch
->stab_reg_to_regnum
2316 /*STAB_REG_TO_REGNUM ()*/);
2318 #ifdef STACK_ALIGN_P
2319 fprintf_unfiltered (file
,
2320 "gdbarch_dump: %s # %s\n",
2322 XSTRING (STACK_ALIGN_P ()));
2323 fprintf_unfiltered (file
,
2324 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2328 fprintf_unfiltered (file
,
2329 "gdbarch_dump: %s # %s\n",
2331 XSTRING (STACK_ALIGN (sp
)));
2333 fprintf_unfiltered (file
,
2334 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2335 (long) current_gdbarch
->stack_align
2336 /*STACK_ALIGN ()*/);
2338 #ifdef STORE_RETURN_VALUE
2340 /* Macro might contain `[{}]' when not multi-arch */
2341 fprintf_unfiltered (file
,
2342 "gdbarch_dump: %s # %s\n",
2343 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2344 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2347 fprintf_unfiltered (file
,
2348 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2349 (long) current_gdbarch
->store_return_value
2350 /*STORE_RETURN_VALUE ()*/);
2352 #ifdef TARGET_ADDR_BIT
2353 fprintf_unfiltered (file
,
2354 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2355 XSTRING (TARGET_ADDR_BIT
));
2356 fprintf_unfiltered (file
,
2357 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2360 #ifdef TARGET_ARCHITECTURE
2361 fprintf_unfiltered (file
,
2362 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2363 XSTRING (TARGET_ARCHITECTURE
));
2364 if (TARGET_ARCHITECTURE
!= NULL
)
2365 fprintf_unfiltered (file
,
2366 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2367 TARGET_ARCHITECTURE
->printable_name
);
2369 #ifdef TARGET_BFD_VMA_BIT
2370 fprintf_unfiltered (file
,
2371 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2372 XSTRING (TARGET_BFD_VMA_BIT
));
2373 fprintf_unfiltered (file
,
2374 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2375 TARGET_BFD_VMA_BIT
);
2377 #ifdef TARGET_BYTE_ORDER
2378 fprintf_unfiltered (file
,
2379 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2380 XSTRING (TARGET_BYTE_ORDER
));
2381 fprintf_unfiltered (file
,
2382 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2383 (long) TARGET_BYTE_ORDER
);
2385 #ifdef TARGET_CHAR_SIGNED
2386 fprintf_unfiltered (file
,
2387 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2388 XSTRING (TARGET_CHAR_SIGNED
));
2389 fprintf_unfiltered (file
,
2390 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2391 TARGET_CHAR_SIGNED
);
2393 #ifdef TARGET_DOUBLE_BIT
2394 fprintf_unfiltered (file
,
2395 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2396 XSTRING (TARGET_DOUBLE_BIT
));
2397 fprintf_unfiltered (file
,
2398 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2401 #ifdef TARGET_DOUBLE_FORMAT
2402 fprintf_unfiltered (file
,
2403 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2404 XSTRING (TARGET_DOUBLE_FORMAT
));
2405 fprintf_unfiltered (file
,
2406 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2407 (TARGET_DOUBLE_FORMAT
)->name
);
2409 #ifdef TARGET_FLOAT_BIT
2410 fprintf_unfiltered (file
,
2411 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2412 XSTRING (TARGET_FLOAT_BIT
));
2413 fprintf_unfiltered (file
,
2414 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2417 #ifdef TARGET_FLOAT_FORMAT
2418 fprintf_unfiltered (file
,
2419 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2420 XSTRING (TARGET_FLOAT_FORMAT
));
2421 fprintf_unfiltered (file
,
2422 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2423 (TARGET_FLOAT_FORMAT
)->name
);
2425 #ifdef TARGET_INT_BIT
2426 fprintf_unfiltered (file
,
2427 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2428 XSTRING (TARGET_INT_BIT
));
2429 fprintf_unfiltered (file
,
2430 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2433 #ifdef TARGET_LONG_BIT
2434 fprintf_unfiltered (file
,
2435 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2436 XSTRING (TARGET_LONG_BIT
));
2437 fprintf_unfiltered (file
,
2438 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2441 #ifdef TARGET_LONG_DOUBLE_BIT
2442 fprintf_unfiltered (file
,
2443 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2444 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2445 fprintf_unfiltered (file
,
2446 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2447 TARGET_LONG_DOUBLE_BIT
);
2449 #ifdef TARGET_LONG_DOUBLE_FORMAT
2450 fprintf_unfiltered (file
,
2451 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2452 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2453 fprintf_unfiltered (file
,
2454 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2455 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2457 #ifdef TARGET_LONG_LONG_BIT
2458 fprintf_unfiltered (file
,
2459 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2460 XSTRING (TARGET_LONG_LONG_BIT
));
2461 fprintf_unfiltered (file
,
2462 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2463 TARGET_LONG_LONG_BIT
);
2466 fprintf_unfiltered (file
,
2467 "gdbarch_dump: TARGET_OSABI # %s\n",
2468 XSTRING (TARGET_OSABI
));
2469 fprintf_unfiltered (file
,
2470 "gdbarch_dump: TARGET_OSABI = %ld\n",
2471 (long) TARGET_OSABI
);
2473 #ifdef TARGET_PRINT_INSN
2474 fprintf_unfiltered (file
,
2475 "gdbarch_dump: %s # %s\n",
2476 "TARGET_PRINT_INSN(vma, info)",
2477 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2479 fprintf_unfiltered (file
,
2480 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2481 (long) current_gdbarch
->print_insn
2482 /*TARGET_PRINT_INSN ()*/);
2484 #ifdef TARGET_PTR_BIT
2485 fprintf_unfiltered (file
,
2486 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2487 XSTRING (TARGET_PTR_BIT
));
2488 fprintf_unfiltered (file
,
2489 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2492 #ifdef TARGET_READ_FP
2493 fprintf_unfiltered (file
,
2494 "gdbarch_dump: %s # %s\n",
2496 XSTRING (TARGET_READ_FP ()));
2498 fprintf_unfiltered (file
,
2499 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2500 (long) current_gdbarch
->read_fp
2501 /*TARGET_READ_FP ()*/);
2503 #ifdef TARGET_READ_PC
2504 fprintf_unfiltered (file
,
2505 "gdbarch_dump: %s # %s\n",
2506 "TARGET_READ_PC(ptid)",
2507 XSTRING (TARGET_READ_PC (ptid
)));
2509 fprintf_unfiltered (file
,
2510 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2511 (long) current_gdbarch
->read_pc
2512 /*TARGET_READ_PC ()*/);
2514 #ifdef TARGET_READ_SP
2515 fprintf_unfiltered (file
,
2516 "gdbarch_dump: %s # %s\n",
2518 XSTRING (TARGET_READ_SP ()));
2520 fprintf_unfiltered (file
,
2521 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2522 (long) current_gdbarch
->read_sp
2523 /*TARGET_READ_SP ()*/);
2525 #ifdef TARGET_SHORT_BIT
2526 fprintf_unfiltered (file
,
2527 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2528 XSTRING (TARGET_SHORT_BIT
));
2529 fprintf_unfiltered (file
,
2530 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2533 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2535 /* Macro might contain `[{}]' when not multi-arch */
2536 fprintf_unfiltered (file
,
2537 "gdbarch_dump: %s # %s\n",
2538 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2539 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2542 fprintf_unfiltered (file
,
2543 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2544 (long) current_gdbarch
->virtual_frame_pointer
2545 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2547 #ifdef TARGET_WRITE_PC
2549 /* Macro might contain `[{}]' when not multi-arch */
2550 fprintf_unfiltered (file
,
2551 "gdbarch_dump: %s # %s\n",
2552 "TARGET_WRITE_PC(val, ptid)",
2553 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2556 fprintf_unfiltered (file
,
2557 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2558 (long) current_gdbarch
->write_pc
2559 /*TARGET_WRITE_PC ()*/);
2561 #ifdef TARGET_WRITE_SP
2563 /* Macro might contain `[{}]' when not multi-arch */
2564 fprintf_unfiltered (file
,
2565 "gdbarch_dump: %s # %s\n",
2566 "TARGET_WRITE_SP(val)",
2567 XSTRING (TARGET_WRITE_SP (val
)));
2570 fprintf_unfiltered (file
,
2571 "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
2572 (long) current_gdbarch
->write_sp
2573 /*TARGET_WRITE_SP ()*/);
2576 fprintf_unfiltered (file
,
2577 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2578 gdbarch_unwind_dummy_id_p (current_gdbarch
));
2580 fprintf_unfiltered (file
,
2581 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2582 (long) current_gdbarch
->unwind_dummy_id
);
2584 fprintf_unfiltered (file
,
2585 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2586 gdbarch_unwind_pc_p (current_gdbarch
));
2588 fprintf_unfiltered (file
,
2589 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2590 (long) current_gdbarch
->unwind_pc
);
2591 #ifdef USE_STRUCT_CONVENTION
2592 fprintf_unfiltered (file
,
2593 "gdbarch_dump: %s # %s\n",
2594 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2595 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2597 fprintf_unfiltered (file
,
2598 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2599 (long) current_gdbarch
->use_struct_convention
2600 /*USE_STRUCT_CONVENTION ()*/);
2602 #ifdef VALUE_TO_REGISTER
2604 /* Macro might contain `[{}]' when not multi-arch */
2605 fprintf_unfiltered (file
,
2606 "gdbarch_dump: %s # %s\n",
2607 "VALUE_TO_REGISTER(type, regnum, from, to)",
2608 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2611 fprintf_unfiltered (file
,
2612 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2613 (long) current_gdbarch
->value_to_register
2614 /*VALUE_TO_REGISTER ()*/);
2616 if (current_gdbarch
->dump_tdep
!= NULL
)
2617 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2620 struct gdbarch_tdep
*
2621 gdbarch_tdep (struct gdbarch
*gdbarch
)
2623 if (gdbarch_debug
>= 2)
2624 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2625 return gdbarch
->tdep
;
2629 const struct bfd_arch_info
*
2630 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2632 gdb_assert (gdbarch
!= NULL
);
2633 if (gdbarch_debug
>= 2)
2634 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2635 return gdbarch
->bfd_arch_info
;
2639 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2641 gdb_assert (gdbarch
!= NULL
);
2642 if (gdbarch_debug
>= 2)
2643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2644 return gdbarch
->byte_order
;
2648 gdbarch_osabi (struct gdbarch
*gdbarch
)
2650 gdb_assert (gdbarch
!= NULL
);
2651 if (gdbarch_debug
>= 2)
2652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2653 return gdbarch
->osabi
;
2657 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2659 gdb_assert (gdbarch
!= NULL
);
2660 /* Skip verify of short_bit, invalid_p == 0 */
2661 if (gdbarch_debug
>= 2)
2662 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2663 return gdbarch
->short_bit
;
2667 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2670 gdbarch
->short_bit
= short_bit
;
2674 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2676 gdb_assert (gdbarch
!= NULL
);
2677 /* Skip verify of int_bit, invalid_p == 0 */
2678 if (gdbarch_debug
>= 2)
2679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2680 return gdbarch
->int_bit
;
2684 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2687 gdbarch
->int_bit
= int_bit
;
2691 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2693 gdb_assert (gdbarch
!= NULL
);
2694 /* Skip verify of long_bit, invalid_p == 0 */
2695 if (gdbarch_debug
>= 2)
2696 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2697 return gdbarch
->long_bit
;
2701 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2704 gdbarch
->long_bit
= long_bit
;
2708 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2710 gdb_assert (gdbarch
!= NULL
);
2711 /* Skip verify of long_long_bit, invalid_p == 0 */
2712 if (gdbarch_debug
>= 2)
2713 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2714 return gdbarch
->long_long_bit
;
2718 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2721 gdbarch
->long_long_bit
= long_long_bit
;
2725 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2727 gdb_assert (gdbarch
!= NULL
);
2728 /* Skip verify of float_bit, invalid_p == 0 */
2729 if (gdbarch_debug
>= 2)
2730 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2731 return gdbarch
->float_bit
;
2735 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2738 gdbarch
->float_bit
= float_bit
;
2742 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2744 gdb_assert (gdbarch
!= NULL
);
2745 /* Skip verify of double_bit, invalid_p == 0 */
2746 if (gdbarch_debug
>= 2)
2747 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2748 return gdbarch
->double_bit
;
2752 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2755 gdbarch
->double_bit
= double_bit
;
2759 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2761 gdb_assert (gdbarch
!= NULL
);
2762 /* Skip verify of long_double_bit, invalid_p == 0 */
2763 if (gdbarch_debug
>= 2)
2764 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2765 return gdbarch
->long_double_bit
;
2769 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2770 int long_double_bit
)
2772 gdbarch
->long_double_bit
= long_double_bit
;
2776 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2778 gdb_assert (gdbarch
!= NULL
);
2779 /* Skip verify of ptr_bit, invalid_p == 0 */
2780 if (gdbarch_debug
>= 2)
2781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2782 return gdbarch
->ptr_bit
;
2786 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2789 gdbarch
->ptr_bit
= ptr_bit
;
2793 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2795 gdb_assert (gdbarch
!= NULL
);
2796 if (gdbarch
->addr_bit
== 0)
2797 internal_error (__FILE__
, __LINE__
,
2798 "gdbarch: gdbarch_addr_bit invalid");
2799 if (gdbarch_debug
>= 2)
2800 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2801 return gdbarch
->addr_bit
;
2805 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2808 gdbarch
->addr_bit
= addr_bit
;
2812 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2814 gdb_assert (gdbarch
!= NULL
);
2815 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2816 if (gdbarch_debug
>= 2)
2817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2818 return gdbarch
->bfd_vma_bit
;
2822 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2825 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2829 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2831 gdb_assert (gdbarch
!= NULL
);
2832 if (gdbarch
->char_signed
== -1)
2833 internal_error (__FILE__
, __LINE__
,
2834 "gdbarch: gdbarch_char_signed invalid");
2835 if (gdbarch_debug
>= 2)
2836 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2837 return gdbarch
->char_signed
;
2841 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2844 gdbarch
->char_signed
= char_signed
;
2848 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2850 gdb_assert (gdbarch
!= NULL
);
2851 if (gdbarch
->read_pc
== 0)
2852 internal_error (__FILE__
, __LINE__
,
2853 "gdbarch: gdbarch_read_pc invalid");
2854 if (gdbarch_debug
>= 2)
2855 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2856 return gdbarch
->read_pc (ptid
);
2860 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2861 gdbarch_read_pc_ftype read_pc
)
2863 gdbarch
->read_pc
= read_pc
;
2867 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2869 gdb_assert (gdbarch
!= NULL
);
2870 if (gdbarch
->write_pc
== 0)
2871 internal_error (__FILE__
, __LINE__
,
2872 "gdbarch: gdbarch_write_pc invalid");
2873 if (gdbarch_debug
>= 2)
2874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2875 gdbarch
->write_pc (val
, ptid
);
2879 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2880 gdbarch_write_pc_ftype write_pc
)
2882 gdbarch
->write_pc
= write_pc
;
2886 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2888 gdb_assert (gdbarch
!= NULL
);
2889 if (gdbarch
->read_fp
== 0)
2890 internal_error (__FILE__
, __LINE__
,
2891 "gdbarch: gdbarch_read_fp invalid");
2892 if (gdbarch_debug
>= 2)
2893 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2894 return gdbarch
->read_fp ();
2898 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2899 gdbarch_read_fp_ftype read_fp
)
2901 gdbarch
->read_fp
= read_fp
;
2905 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2907 gdb_assert (gdbarch
!= NULL
);
2908 if (gdbarch
->read_sp
== 0)
2909 internal_error (__FILE__
, __LINE__
,
2910 "gdbarch: gdbarch_read_sp invalid");
2911 if (gdbarch_debug
>= 2)
2912 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2913 return gdbarch
->read_sp ();
2917 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2918 gdbarch_read_sp_ftype read_sp
)
2920 gdbarch
->read_sp
= read_sp
;
2924 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2926 gdb_assert (gdbarch
!= NULL
);
2927 if (gdbarch
->write_sp
== 0)
2928 internal_error (__FILE__
, __LINE__
,
2929 "gdbarch: gdbarch_write_sp invalid");
2930 if (gdbarch_debug
>= 2)
2931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2932 gdbarch
->write_sp (val
);
2936 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2937 gdbarch_write_sp_ftype write_sp
)
2939 gdbarch
->write_sp
= write_sp
;
2943 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2945 gdb_assert (gdbarch
!= NULL
);
2946 if (gdbarch
->virtual_frame_pointer
== 0)
2947 internal_error (__FILE__
, __LINE__
,
2948 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2949 if (gdbarch_debug
>= 2)
2950 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2951 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2955 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2956 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2958 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2962 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2964 gdb_assert (gdbarch
!= NULL
);
2965 return gdbarch
->pseudo_register_read
!= 0;
2969 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2971 gdb_assert (gdbarch
!= NULL
);
2972 if (gdbarch
->pseudo_register_read
== 0)
2973 internal_error (__FILE__
, __LINE__
,
2974 "gdbarch: gdbarch_pseudo_register_read invalid");
2975 if (gdbarch_debug
>= 2)
2976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2977 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2981 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2982 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2984 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2988 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2990 gdb_assert (gdbarch
!= NULL
);
2991 return gdbarch
->pseudo_register_write
!= 0;
2995 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2997 gdb_assert (gdbarch
!= NULL
);
2998 if (gdbarch
->pseudo_register_write
== 0)
2999 internal_error (__FILE__
, __LINE__
,
3000 "gdbarch: gdbarch_pseudo_register_write invalid");
3001 if (gdbarch_debug
>= 2)
3002 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
3003 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
3007 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
3008 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
3010 gdbarch
->pseudo_register_write
= pseudo_register_write
;
3014 gdbarch_num_regs (struct gdbarch
*gdbarch
)
3016 gdb_assert (gdbarch
!= NULL
);
3017 if (gdbarch
->num_regs
== -1)
3018 internal_error (__FILE__
, __LINE__
,
3019 "gdbarch: gdbarch_num_regs invalid");
3020 if (gdbarch_debug
>= 2)
3021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
3022 return gdbarch
->num_regs
;
3026 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
3029 gdbarch
->num_regs
= num_regs
;
3033 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
3035 gdb_assert (gdbarch
!= NULL
);
3036 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3037 if (gdbarch_debug
>= 2)
3038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
3039 return gdbarch
->num_pseudo_regs
;
3043 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
3044 int num_pseudo_regs
)
3046 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
3050 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
3052 gdb_assert (gdbarch
!= NULL
);
3053 /* Skip verify of sp_regnum, invalid_p == 0 */
3054 if (gdbarch_debug
>= 2)
3055 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
3056 return gdbarch
->sp_regnum
;
3060 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
3063 gdbarch
->sp_regnum
= sp_regnum
;
3067 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
3069 gdb_assert (gdbarch
!= NULL
);
3070 /* Skip verify of fp_regnum, invalid_p == 0 */
3071 if (gdbarch_debug
>= 2)
3072 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
3073 return gdbarch
->fp_regnum
;
3077 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
3080 gdbarch
->fp_regnum
= fp_regnum
;
3084 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
3086 gdb_assert (gdbarch
!= NULL
);
3087 /* Skip verify of pc_regnum, invalid_p == 0 */
3088 if (gdbarch_debug
>= 2)
3089 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
3090 return gdbarch
->pc_regnum
;
3094 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
3097 gdbarch
->pc_regnum
= pc_regnum
;
3101 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
3103 gdb_assert (gdbarch
!= NULL
);
3104 /* Skip verify of ps_regnum, invalid_p == 0 */
3105 if (gdbarch_debug
>= 2)
3106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
3107 return gdbarch
->ps_regnum
;
3111 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
3114 gdbarch
->ps_regnum
= ps_regnum
;
3118 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
3120 gdb_assert (gdbarch
!= NULL
);
3121 /* Skip verify of fp0_regnum, invalid_p == 0 */
3122 if (gdbarch_debug
>= 2)
3123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
3124 return gdbarch
->fp0_regnum
;
3128 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
3131 gdbarch
->fp0_regnum
= fp0_regnum
;
3135 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
3137 gdb_assert (gdbarch
!= NULL
);
3138 /* Skip verify of npc_regnum, invalid_p == 0 */
3139 if (gdbarch_debug
>= 2)
3140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
3141 return gdbarch
->npc_regnum
;
3145 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
3148 gdbarch
->npc_regnum
= npc_regnum
;
3152 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
3154 gdb_assert (gdbarch
!= NULL
);
3155 if (gdbarch
->stab_reg_to_regnum
== 0)
3156 internal_error (__FILE__
, __LINE__
,
3157 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3158 if (gdbarch_debug
>= 2)
3159 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
3160 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
3164 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
3165 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
3167 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
3171 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
3173 gdb_assert (gdbarch
!= NULL
);
3174 if (gdbarch
->ecoff_reg_to_regnum
== 0)
3175 internal_error (__FILE__
, __LINE__
,
3176 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3177 if (gdbarch_debug
>= 2)
3178 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
3179 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
3183 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
3184 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
3186 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
3190 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
3192 gdb_assert (gdbarch
!= NULL
);
3193 if (gdbarch
->dwarf_reg_to_regnum
== 0)
3194 internal_error (__FILE__
, __LINE__
,
3195 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3196 if (gdbarch_debug
>= 2)
3197 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
3198 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
3202 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
3203 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
3205 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
3209 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
3211 gdb_assert (gdbarch
!= NULL
);
3212 if (gdbarch
->sdb_reg_to_regnum
== 0)
3213 internal_error (__FILE__
, __LINE__
,
3214 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3215 if (gdbarch_debug
>= 2)
3216 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
3217 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
3221 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
3222 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
3224 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
3228 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
3230 gdb_assert (gdbarch
!= NULL
);
3231 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
3232 internal_error (__FILE__
, __LINE__
,
3233 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3234 if (gdbarch_debug
>= 2)
3235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
3236 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
3240 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
3241 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
3243 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
3247 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
3249 gdb_assert (gdbarch
!= NULL
);
3250 if (gdbarch
->register_name
== 0)
3251 internal_error (__FILE__
, __LINE__
,
3252 "gdbarch: gdbarch_register_name invalid");
3253 if (gdbarch_debug
>= 2)
3254 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
3255 return gdbarch
->register_name (regnr
);
3259 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
3260 gdbarch_register_name_ftype register_name
)
3262 gdbarch
->register_name
= register_name
;
3266 gdbarch_register_size (struct gdbarch
*gdbarch
)
3268 gdb_assert (gdbarch
!= NULL
);
3269 if (gdbarch
->register_size
== -1)
3270 internal_error (__FILE__
, __LINE__
,
3271 "gdbarch: gdbarch_register_size invalid");
3272 if (gdbarch_debug
>= 2)
3273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
3274 return gdbarch
->register_size
;
3278 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
3281 gdbarch
->register_size
= register_size
;
3285 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
3287 gdb_assert (gdbarch
!= NULL
);
3288 if (gdbarch
->register_bytes
== -1)
3289 internal_error (__FILE__
, __LINE__
,
3290 "gdbarch: gdbarch_register_bytes invalid");
3291 if (gdbarch_debug
>= 2)
3292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
3293 return gdbarch
->register_bytes
;
3297 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
3300 gdbarch
->register_bytes
= register_bytes
;
3304 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3306 gdb_assert (gdbarch
!= NULL
);
3307 if (gdbarch
->register_byte
== 0)
3308 internal_error (__FILE__
, __LINE__
,
3309 "gdbarch: gdbarch_register_byte invalid");
3310 if (gdbarch_debug
>= 2)
3311 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
3312 return gdbarch
->register_byte (reg_nr
);
3316 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
3317 gdbarch_register_byte_ftype register_byte
)
3319 gdbarch
->register_byte
= register_byte
;
3323 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3325 gdb_assert (gdbarch
!= NULL
);
3326 if (gdbarch
->register_raw_size
== 0)
3327 internal_error (__FILE__
, __LINE__
,
3328 "gdbarch: gdbarch_register_raw_size invalid");
3329 if (gdbarch_debug
>= 2)
3330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
3331 return gdbarch
->register_raw_size (reg_nr
);
3335 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
3336 gdbarch_register_raw_size_ftype register_raw_size
)
3338 gdbarch
->register_raw_size
= register_raw_size
;
3342 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
3344 gdb_assert (gdbarch
!= NULL
);
3345 return gdbarch
->deprecated_max_register_raw_size
!= 0;
3349 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
3351 gdb_assert (gdbarch
!= NULL
);
3352 if (gdbarch_debug
>= 2)
3353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
3354 return gdbarch
->deprecated_max_register_raw_size
;
3358 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
3359 int deprecated_max_register_raw_size
)
3361 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
3365 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3367 gdb_assert (gdbarch
!= NULL
);
3368 if (gdbarch
->register_virtual_size
== 0)
3369 internal_error (__FILE__
, __LINE__
,
3370 "gdbarch: gdbarch_register_virtual_size invalid");
3371 if (gdbarch_debug
>= 2)
3372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3373 return gdbarch
->register_virtual_size (reg_nr
);
3377 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3378 gdbarch_register_virtual_size_ftype register_virtual_size
)
3380 gdbarch
->register_virtual_size
= register_virtual_size
;
3384 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
3386 gdb_assert (gdbarch
!= NULL
);
3387 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
3391 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
3393 gdb_assert (gdbarch
!= NULL
);
3394 if (gdbarch_debug
>= 2)
3395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
3396 return gdbarch
->deprecated_max_register_virtual_size
;
3400 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
3401 int deprecated_max_register_virtual_size
)
3403 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
3407 gdbarch_register_virtual_type_p (struct gdbarch
*gdbarch
)
3409 gdb_assert (gdbarch
!= NULL
);
3410 return gdbarch
->register_virtual_type
!= 0;
3414 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3416 gdb_assert (gdbarch
!= NULL
);
3417 if (gdbarch
->register_virtual_type
== 0)
3418 internal_error (__FILE__
, __LINE__
,
3419 "gdbarch: gdbarch_register_virtual_type invalid");
3420 if (gdbarch_debug
>= 2)
3421 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3422 return gdbarch
->register_virtual_type (reg_nr
);
3426 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3427 gdbarch_register_virtual_type_ftype register_virtual_type
)
3429 gdbarch
->register_virtual_type
= register_virtual_type
;
3433 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
3435 gdb_assert (gdbarch
!= NULL
);
3436 return gdbarch
->register_type
!= 0;
3440 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
3442 gdb_assert (gdbarch
!= NULL
);
3443 if (gdbarch
->register_type
== 0)
3444 internal_error (__FILE__
, __LINE__
,
3445 "gdbarch: gdbarch_register_type invalid");
3446 if (gdbarch_debug
>= 2)
3447 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
3448 return gdbarch
->register_type (gdbarch
, reg_nr
);
3452 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
3453 gdbarch_register_type_ftype register_type
)
3455 gdbarch
->register_type
= register_type
;
3459 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3461 gdb_assert (gdbarch
!= NULL
);
3462 return gdbarch
->deprecated_do_registers_info
!= 0;
3466 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3468 gdb_assert (gdbarch
!= NULL
);
3469 if (gdbarch
->deprecated_do_registers_info
== 0)
3470 internal_error (__FILE__
, __LINE__
,
3471 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3472 if (gdbarch_debug
>= 2)
3473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3474 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3478 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3479 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3481 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3485 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3487 gdb_assert (gdbarch
!= NULL
);
3488 if (gdbarch
->print_registers_info
== 0)
3489 internal_error (__FILE__
, __LINE__
,
3490 "gdbarch: gdbarch_print_registers_info invalid");
3491 if (gdbarch_debug
>= 2)
3492 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3493 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3497 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3498 gdbarch_print_registers_info_ftype print_registers_info
)
3500 gdbarch
->print_registers_info
= print_registers_info
;
3504 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3506 gdb_assert (gdbarch
!= NULL
);
3507 return gdbarch
->print_float_info
!= 0;
3511 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3513 gdb_assert (gdbarch
!= NULL
);
3514 if (gdbarch
->print_float_info
== 0)
3515 internal_error (__FILE__
, __LINE__
,
3516 "gdbarch: gdbarch_print_float_info invalid");
3517 if (gdbarch_debug
>= 2)
3518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3519 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3523 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3524 gdbarch_print_float_info_ftype print_float_info
)
3526 gdbarch
->print_float_info
= print_float_info
;
3530 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3532 gdb_assert (gdbarch
!= NULL
);
3533 return gdbarch
->print_vector_info
!= 0;
3537 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3539 gdb_assert (gdbarch
!= NULL
);
3540 if (gdbarch
->print_vector_info
== 0)
3541 internal_error (__FILE__
, __LINE__
,
3542 "gdbarch: gdbarch_print_vector_info invalid");
3543 if (gdbarch_debug
>= 2)
3544 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3545 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3549 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3550 gdbarch_print_vector_info_ftype print_vector_info
)
3552 gdbarch
->print_vector_info
= print_vector_info
;
3556 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3558 gdb_assert (gdbarch
!= NULL
);
3559 if (gdbarch
->register_sim_regno
== 0)
3560 internal_error (__FILE__
, __LINE__
,
3561 "gdbarch: gdbarch_register_sim_regno invalid");
3562 if (gdbarch_debug
>= 2)
3563 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3564 return gdbarch
->register_sim_regno (reg_nr
);
3568 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3569 gdbarch_register_sim_regno_ftype register_sim_regno
)
3571 gdbarch
->register_sim_regno
= register_sim_regno
;
3575 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3577 gdb_assert (gdbarch
!= NULL
);
3578 return gdbarch
->register_bytes_ok
!= 0;
3582 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3584 gdb_assert (gdbarch
!= NULL
);
3585 if (gdbarch
->register_bytes_ok
== 0)
3586 internal_error (__FILE__
, __LINE__
,
3587 "gdbarch: gdbarch_register_bytes_ok invalid");
3588 if (gdbarch_debug
>= 2)
3589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3590 return gdbarch
->register_bytes_ok (nr_bytes
);
3594 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3595 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3597 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3601 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3603 gdb_assert (gdbarch
!= NULL
);
3604 if (gdbarch
->cannot_fetch_register
== 0)
3605 internal_error (__FILE__
, __LINE__
,
3606 "gdbarch: gdbarch_cannot_fetch_register invalid");
3607 if (gdbarch_debug
>= 2)
3608 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3609 return gdbarch
->cannot_fetch_register (regnum
);
3613 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3614 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3616 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3620 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3622 gdb_assert (gdbarch
!= NULL
);
3623 if (gdbarch
->cannot_store_register
== 0)
3624 internal_error (__FILE__
, __LINE__
,
3625 "gdbarch: gdbarch_cannot_store_register invalid");
3626 if (gdbarch_debug
>= 2)
3627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3628 return gdbarch
->cannot_store_register (regnum
);
3632 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3633 gdbarch_cannot_store_register_ftype cannot_store_register
)
3635 gdbarch
->cannot_store_register
= cannot_store_register
;
3639 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3641 gdb_assert (gdbarch
!= NULL
);
3642 return gdbarch
->get_longjmp_target
!= 0;
3646 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3648 gdb_assert (gdbarch
!= NULL
);
3649 if (gdbarch
->get_longjmp_target
== 0)
3650 internal_error (__FILE__
, __LINE__
,
3651 "gdbarch: gdbarch_get_longjmp_target invalid");
3652 if (gdbarch_debug
>= 2)
3653 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3654 return gdbarch
->get_longjmp_target (pc
);
3658 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3659 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3661 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3665 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3667 gdb_assert (gdbarch
!= NULL
);
3668 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3669 if (gdbarch_debug
>= 2)
3670 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3671 return gdbarch
->deprecated_use_generic_dummy_frames
;
3675 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3676 int deprecated_use_generic_dummy_frames
)
3678 gdbarch
->deprecated_use_generic_dummy_frames
= deprecated_use_generic_dummy_frames
;
3682 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3684 gdb_assert (gdbarch
!= NULL
);
3685 /* Skip verify of call_dummy_location, invalid_p == 0 */
3686 if (gdbarch_debug
>= 2)
3687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3688 return gdbarch
->call_dummy_location
;
3692 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3693 int call_dummy_location
)
3695 gdbarch
->call_dummy_location
= call_dummy_location
;
3699 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3701 gdb_assert (gdbarch
!= NULL
);
3702 if (gdbarch
->call_dummy_address
== 0)
3703 internal_error (__FILE__
, __LINE__
,
3704 "gdbarch: gdbarch_call_dummy_address invalid");
3705 if (gdbarch_debug
>= 2)
3706 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3707 return gdbarch
->call_dummy_address ();
3711 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3712 gdbarch_call_dummy_address_ftype call_dummy_address
)
3714 gdbarch
->call_dummy_address
= call_dummy_address
;
3718 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3720 gdb_assert (gdbarch
!= NULL
);
3721 if (gdbarch
->call_dummy_start_offset
== -1)
3722 internal_error (__FILE__
, __LINE__
,
3723 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3724 if (gdbarch_debug
>= 2)
3725 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3726 return gdbarch
->call_dummy_start_offset
;
3730 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3731 CORE_ADDR call_dummy_start_offset
)
3733 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3737 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3739 gdb_assert (gdbarch
!= NULL
);
3740 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3741 internal_error (__FILE__
, __LINE__
,
3742 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3743 if (gdbarch_debug
>= 2)
3744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3745 return gdbarch
->call_dummy_breakpoint_offset
;
3749 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3750 CORE_ADDR call_dummy_breakpoint_offset
)
3752 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3756 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3758 gdb_assert (gdbarch
!= NULL
);
3759 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3760 internal_error (__FILE__
, __LINE__
,
3761 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3762 if (gdbarch_debug
>= 2)
3763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3764 return gdbarch
->call_dummy_breakpoint_offset_p
;
3768 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3769 int call_dummy_breakpoint_offset_p
)
3771 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3775 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3777 gdb_assert (gdbarch
!= NULL
);
3778 if (gdbarch
->call_dummy_length
== -1)
3779 internal_error (__FILE__
, __LINE__
,
3780 "gdbarch: gdbarch_call_dummy_length invalid");
3781 if (gdbarch_debug
>= 2)
3782 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3783 return gdbarch
->call_dummy_length
;
3787 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3788 int call_dummy_length
)
3790 gdbarch
->call_dummy_length
= call_dummy_length
;
3794 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3796 gdb_assert (gdbarch
!= NULL
);
3797 return gdbarch
->deprecated_pc_in_call_dummy
!= generic_pc_in_call_dummy
;
3801 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3803 gdb_assert (gdbarch
!= NULL
);
3804 if (gdbarch
->deprecated_pc_in_call_dummy
== 0)
3805 internal_error (__FILE__
, __LINE__
,
3806 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3807 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3808 if (gdbarch_debug
>= 2)
3809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3810 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3814 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3815 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3817 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3821 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3823 gdb_assert (gdbarch
!= NULL
);
3824 if (gdbarch
->call_dummy_p
== -1)
3825 internal_error (__FILE__
, __LINE__
,
3826 "gdbarch: gdbarch_call_dummy_p invalid");
3827 if (gdbarch_debug
>= 2)
3828 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3829 return gdbarch
->call_dummy_p
;
3833 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3836 gdbarch
->call_dummy_p
= call_dummy_p
;
3840 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3842 gdb_assert (gdbarch
!= NULL
);
3843 /* Skip verify of call_dummy_words, invalid_p == 0 */
3844 if (gdbarch_debug
>= 2)
3845 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3846 return gdbarch
->call_dummy_words
;
3850 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3851 LONGEST
* call_dummy_words
)
3853 gdbarch
->call_dummy_words
= call_dummy_words
;
3857 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3859 gdb_assert (gdbarch
!= NULL
);
3860 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3861 if (gdbarch_debug
>= 2)
3862 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3863 return gdbarch
->sizeof_call_dummy_words
;
3867 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3868 int sizeof_call_dummy_words
)
3870 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3874 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3876 gdb_assert (gdbarch
!= NULL
);
3877 return gdbarch
->deprecated_call_dummy_stack_adjust
!= 0;
3881 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3883 gdb_assert (gdbarch
!= NULL
);
3884 if (gdbarch_debug
>= 2)
3885 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3886 return gdbarch
->deprecated_call_dummy_stack_adjust
;
3890 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3891 int deprecated_call_dummy_stack_adjust
)
3893 gdbarch
->deprecated_call_dummy_stack_adjust
= deprecated_call_dummy_stack_adjust
;
3897 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
)
3899 gdb_assert (gdbarch
!= NULL
);
3900 if (gdbarch
->fix_call_dummy
== 0)
3901 internal_error (__FILE__
, __LINE__
,
3902 "gdbarch: gdbarch_fix_call_dummy invalid");
3903 if (gdbarch_debug
>= 2)
3904 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3905 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3909 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3910 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3912 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3916 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch
*gdbarch
)
3918 gdb_assert (gdbarch
!= NULL
);
3919 return gdbarch
->deprecated_init_frame_pc_first
!= 0;
3923 gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3925 gdb_assert (gdbarch
!= NULL
);
3926 if (gdbarch
->deprecated_init_frame_pc_first
== 0)
3927 internal_error (__FILE__
, __LINE__
,
3928 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3929 if (gdbarch_debug
>= 2)
3930 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc_first called\n");
3931 return gdbarch
->deprecated_init_frame_pc_first (fromleaf
, prev
);
3935 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
,
3936 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first
)
3938 gdbarch
->deprecated_init_frame_pc_first
= deprecated_init_frame_pc_first
;
3942 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3944 gdb_assert (gdbarch
!= NULL
);
3945 return gdbarch
->deprecated_init_frame_pc
!= 0;
3949 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3951 gdb_assert (gdbarch
!= NULL
);
3952 if (gdbarch
->deprecated_init_frame_pc
== 0)
3953 internal_error (__FILE__
, __LINE__
,
3954 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3955 if (gdbarch_debug
>= 2)
3956 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3957 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3961 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3962 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3964 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3968 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3970 gdb_assert (gdbarch
!= NULL
);
3971 if (gdbarch_debug
>= 2)
3972 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3973 return gdbarch
->believe_pcc_promotion
;
3977 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3978 int believe_pcc_promotion
)
3980 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3984 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3986 gdb_assert (gdbarch
!= NULL
);
3987 if (gdbarch_debug
>= 2)
3988 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3989 return gdbarch
->believe_pcc_promotion_type
;
3993 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3994 int believe_pcc_promotion_type
)
3996 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
4000 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
4002 gdb_assert (gdbarch
!= NULL
);
4003 return gdbarch
->deprecated_get_saved_register
!= 0;
4007 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
)
4009 gdb_assert (gdbarch
!= NULL
);
4010 if (gdbarch
->deprecated_get_saved_register
== 0)
4011 internal_error (__FILE__
, __LINE__
,
4012 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
4013 if (gdbarch_debug
>= 2)
4014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
4015 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
4019 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
4020 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
4022 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
4026 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
4028 gdb_assert (gdbarch
!= NULL
);
4029 if (gdbarch
->register_convertible
== 0)
4030 internal_error (__FILE__
, __LINE__
,
4031 "gdbarch: gdbarch_register_convertible invalid");
4032 if (gdbarch_debug
>= 2)
4033 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
4034 return gdbarch
->register_convertible (nr
);
4038 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
4039 gdbarch_register_convertible_ftype register_convertible
)
4041 gdbarch
->register_convertible
= register_convertible
;
4045 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4047 gdb_assert (gdbarch
!= NULL
);
4048 if (gdbarch
->register_convert_to_virtual
== 0)
4049 internal_error (__FILE__
, __LINE__
,
4050 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4051 if (gdbarch_debug
>= 2)
4052 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
4053 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
4057 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
4058 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
4060 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
4064 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4066 gdb_assert (gdbarch
!= NULL
);
4067 if (gdbarch
->register_convert_to_raw
== 0)
4068 internal_error (__FILE__
, __LINE__
,
4069 "gdbarch: gdbarch_register_convert_to_raw invalid");
4070 if (gdbarch_debug
>= 2)
4071 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
4072 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
4076 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
4077 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
4079 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
4083 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
4085 gdb_assert (gdbarch
!= NULL
);
4086 if (gdbarch
->convert_register_p
== 0)
4087 internal_error (__FILE__
, __LINE__
,
4088 "gdbarch: gdbarch_convert_register_p invalid");
4089 if (gdbarch_debug
>= 2)
4090 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
4091 return gdbarch
->convert_register_p (regnum
);
4095 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
4096 gdbarch_convert_register_p_ftype convert_register_p
)
4098 gdbarch
->convert_register_p
= convert_register_p
;
4102 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
4104 gdb_assert (gdbarch
!= NULL
);
4105 if (gdbarch
->register_to_value
== 0)
4106 internal_error (__FILE__
, __LINE__
,
4107 "gdbarch: gdbarch_register_to_value invalid");
4108 if (gdbarch_debug
>= 2)
4109 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
4110 gdbarch
->register_to_value (regnum
, type
, from
, to
);
4114 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
4115 gdbarch_register_to_value_ftype register_to_value
)
4117 gdbarch
->register_to_value
= register_to_value
;
4121 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
4123 gdb_assert (gdbarch
!= NULL
);
4124 if (gdbarch
->value_to_register
== 0)
4125 internal_error (__FILE__
, __LINE__
,
4126 "gdbarch: gdbarch_value_to_register invalid");
4127 if (gdbarch_debug
>= 2)
4128 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
4129 gdbarch
->value_to_register (type
, regnum
, from
, to
);
4133 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
4134 gdbarch_value_to_register_ftype value_to_register
)
4136 gdbarch
->value_to_register
= value_to_register
;
4140 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
4142 gdb_assert (gdbarch
!= NULL
);
4143 if (gdbarch
->pointer_to_address
== 0)
4144 internal_error (__FILE__
, __LINE__
,
4145 "gdbarch: gdbarch_pointer_to_address invalid");
4146 if (gdbarch_debug
>= 2)
4147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
4148 return gdbarch
->pointer_to_address (type
, buf
);
4152 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
4153 gdbarch_pointer_to_address_ftype pointer_to_address
)
4155 gdbarch
->pointer_to_address
= pointer_to_address
;
4159 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
4161 gdb_assert (gdbarch
!= NULL
);
4162 if (gdbarch
->address_to_pointer
== 0)
4163 internal_error (__FILE__
, __LINE__
,
4164 "gdbarch: gdbarch_address_to_pointer invalid");
4165 if (gdbarch_debug
>= 2)
4166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
4167 gdbarch
->address_to_pointer (type
, buf
, addr
);
4171 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
4172 gdbarch_address_to_pointer_ftype address_to_pointer
)
4174 gdbarch
->address_to_pointer
= address_to_pointer
;
4178 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
4180 gdb_assert (gdbarch
!= NULL
);
4181 return gdbarch
->integer_to_address
!= 0;
4185 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
4187 gdb_assert (gdbarch
!= NULL
);
4188 if (gdbarch
->integer_to_address
== 0)
4189 internal_error (__FILE__
, __LINE__
,
4190 "gdbarch: gdbarch_integer_to_address invalid");
4191 if (gdbarch_debug
>= 2)
4192 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
4193 return gdbarch
->integer_to_address (type
, buf
);
4197 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
4198 gdbarch_integer_to_address_ftype integer_to_address
)
4200 gdbarch
->integer_to_address
= integer_to_address
;
4204 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
4206 gdb_assert (gdbarch
!= NULL
);
4207 if (gdbarch
->return_value_on_stack
== 0)
4208 internal_error (__FILE__
, __LINE__
,
4209 "gdbarch: gdbarch_return_value_on_stack invalid");
4210 if (gdbarch_debug
>= 2)
4211 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
4212 return gdbarch
->return_value_on_stack (type
);
4216 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
4217 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
4219 gdbarch
->return_value_on_stack
= return_value_on_stack
;
4223 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
4225 gdb_assert (gdbarch
!= NULL
);
4226 if (gdbarch
->push_arguments
== 0)
4227 internal_error (__FILE__
, __LINE__
,
4228 "gdbarch: gdbarch_push_arguments invalid");
4229 if (gdbarch_debug
>= 2)
4230 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
4231 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
4235 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
4236 gdbarch_push_arguments_ftype push_arguments
)
4238 gdbarch
->push_arguments
= push_arguments
;
4242 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch
*gdbarch
)
4244 gdb_assert (gdbarch
!= NULL
);
4245 return gdbarch
->deprecated_push_dummy_frame
!= 0;
4249 gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
)
4251 gdb_assert (gdbarch
!= NULL
);
4252 if (gdbarch
->deprecated_push_dummy_frame
== 0)
4253 internal_error (__FILE__
, __LINE__
,
4254 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4255 if (gdbarch_debug
>= 2)
4256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_dummy_frame called\n");
4257 gdbarch
->deprecated_push_dummy_frame ();
4261 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
,
4262 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame
)
4264 gdbarch
->deprecated_push_dummy_frame
= deprecated_push_dummy_frame
;
4268 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
4270 gdb_assert (gdbarch
!= NULL
);
4271 return gdbarch
->push_return_address
!= 0;
4275 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
4277 gdb_assert (gdbarch
!= NULL
);
4278 if (gdbarch
->push_return_address
== 0)
4279 internal_error (__FILE__
, __LINE__
,
4280 "gdbarch: gdbarch_push_return_address invalid");
4281 if (gdbarch_debug
>= 2)
4282 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
4283 return gdbarch
->push_return_address (pc
, sp
);
4287 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
4288 gdbarch_push_return_address_ftype push_return_address
)
4290 gdbarch
->push_return_address
= push_return_address
;
4294 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
4296 gdb_assert (gdbarch
!= NULL
);
4297 return gdbarch
->deprecated_pop_frame
!= 0;
4301 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
4303 gdb_assert (gdbarch
!= NULL
);
4304 if (gdbarch
->deprecated_pop_frame
== 0)
4305 internal_error (__FILE__
, __LINE__
,
4306 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4307 if (gdbarch_debug
>= 2)
4308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
4309 gdbarch
->deprecated_pop_frame ();
4313 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
4314 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
4316 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
4320 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
4322 gdb_assert (gdbarch
!= NULL
);
4323 return gdbarch
->deprecated_store_struct_return
!= 0;
4327 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
4329 gdb_assert (gdbarch
!= NULL
);
4330 if (gdbarch
->deprecated_store_struct_return
== 0)
4331 internal_error (__FILE__
, __LINE__
,
4332 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4333 if (gdbarch_debug
>= 2)
4334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
4335 gdbarch
->deprecated_store_struct_return (addr
, sp
);
4339 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
4340 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
4342 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
4346 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4348 gdb_assert (gdbarch
!= NULL
);
4349 if (gdbarch
->extract_return_value
== 0)
4350 internal_error (__FILE__
, __LINE__
,
4351 "gdbarch: gdbarch_extract_return_value invalid");
4352 if (gdbarch_debug
>= 2)
4353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4354 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4358 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4359 gdbarch_extract_return_value_ftype extract_return_value
)
4361 gdbarch
->extract_return_value
= extract_return_value
;
4365 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4367 gdb_assert (gdbarch
!= NULL
);
4368 if (gdbarch
->store_return_value
== 0)
4369 internal_error (__FILE__
, __LINE__
,
4370 "gdbarch: gdbarch_store_return_value invalid");
4371 if (gdbarch_debug
>= 2)
4372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4373 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4377 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4378 gdbarch_store_return_value_ftype store_return_value
)
4380 gdbarch
->store_return_value
= store_return_value
;
4384 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4386 gdb_assert (gdbarch
!= NULL
);
4387 if (gdbarch
->deprecated_extract_return_value
== 0)
4388 internal_error (__FILE__
, __LINE__
,
4389 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4390 if (gdbarch_debug
>= 2)
4391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4392 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4396 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4397 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4399 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4403 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4405 gdb_assert (gdbarch
!= NULL
);
4406 if (gdbarch
->deprecated_store_return_value
== 0)
4407 internal_error (__FILE__
, __LINE__
,
4408 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4409 if (gdbarch_debug
>= 2)
4410 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4411 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4415 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4416 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4418 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4422 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4424 gdb_assert (gdbarch
!= NULL
);
4425 return gdbarch
->extract_struct_value_address
!= 0;
4429 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4431 gdb_assert (gdbarch
!= NULL
);
4432 if (gdbarch
->extract_struct_value_address
== 0)
4433 internal_error (__FILE__
, __LINE__
,
4434 "gdbarch: gdbarch_extract_struct_value_address invalid");
4435 if (gdbarch_debug
>= 2)
4436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4437 return gdbarch
->extract_struct_value_address (regcache
);
4441 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4442 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4444 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4448 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4450 gdb_assert (gdbarch
!= NULL
);
4451 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4455 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4457 gdb_assert (gdbarch
!= NULL
);
4458 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4459 internal_error (__FILE__
, __LINE__
,
4460 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4461 if (gdbarch_debug
>= 2)
4462 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4463 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4467 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4468 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4470 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4474 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4476 gdb_assert (gdbarch
!= NULL
);
4477 if (gdbarch
->use_struct_convention
== 0)
4478 internal_error (__FILE__
, __LINE__
,
4479 "gdbarch: gdbarch_use_struct_convention invalid");
4480 if (gdbarch_debug
>= 2)
4481 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4482 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4486 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4487 gdbarch_use_struct_convention_ftype use_struct_convention
)
4489 gdbarch
->use_struct_convention
= use_struct_convention
;
4493 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
4495 gdb_assert (gdbarch
!= NULL
);
4496 return gdbarch
->deprecated_frame_init_saved_regs
!= 0;
4500 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4502 gdb_assert (gdbarch
!= NULL
);
4503 if (gdbarch
->deprecated_frame_init_saved_regs
== 0)
4504 internal_error (__FILE__
, __LINE__
,
4505 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4506 if (gdbarch_debug
>= 2)
4507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
4508 gdbarch
->deprecated_frame_init_saved_regs (frame
);
4512 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4513 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
4515 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
4519 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4521 gdb_assert (gdbarch
!= NULL
);
4522 return gdbarch
->deprecated_init_extra_frame_info
!= 0;
4526 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4528 gdb_assert (gdbarch
!= NULL
);
4529 if (gdbarch
->deprecated_init_extra_frame_info
== 0)
4530 internal_error (__FILE__
, __LINE__
,
4531 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4532 if (gdbarch_debug
>= 2)
4533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
4534 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
4538 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
4539 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
4541 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
4545 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4547 gdb_assert (gdbarch
!= NULL
);
4548 if (gdbarch
->skip_prologue
== 0)
4549 internal_error (__FILE__
, __LINE__
,
4550 "gdbarch: gdbarch_skip_prologue invalid");
4551 if (gdbarch_debug
>= 2)
4552 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4553 return gdbarch
->skip_prologue (ip
);
4557 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4558 gdbarch_skip_prologue_ftype skip_prologue
)
4560 gdbarch
->skip_prologue
= skip_prologue
;
4564 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4566 gdb_assert (gdbarch
!= NULL
);
4567 if (gdbarch
->prologue_frameless_p
== 0)
4568 internal_error (__FILE__
, __LINE__
,
4569 "gdbarch: gdbarch_prologue_frameless_p invalid");
4570 if (gdbarch_debug
>= 2)
4571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4572 return gdbarch
->prologue_frameless_p (ip
);
4576 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4577 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4579 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4583 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4585 gdb_assert (gdbarch
!= NULL
);
4586 if (gdbarch
->inner_than
== 0)
4587 internal_error (__FILE__
, __LINE__
,
4588 "gdbarch: gdbarch_inner_than invalid");
4589 if (gdbarch_debug
>= 2)
4590 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4591 return gdbarch
->inner_than (lhs
, rhs
);
4595 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4596 gdbarch_inner_than_ftype inner_than
)
4598 gdbarch
->inner_than
= inner_than
;
4601 const unsigned char *
4602 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4604 gdb_assert (gdbarch
!= NULL
);
4605 if (gdbarch
->breakpoint_from_pc
== 0)
4606 internal_error (__FILE__
, __LINE__
,
4607 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4608 if (gdbarch_debug
>= 2)
4609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4610 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4614 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4615 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4617 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4621 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4623 gdb_assert (gdbarch
!= NULL
);
4624 if (gdbarch
->memory_insert_breakpoint
== 0)
4625 internal_error (__FILE__
, __LINE__
,
4626 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4627 if (gdbarch_debug
>= 2)
4628 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4629 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4633 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4634 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4636 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4640 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4642 gdb_assert (gdbarch
!= NULL
);
4643 if (gdbarch
->memory_remove_breakpoint
== 0)
4644 internal_error (__FILE__
, __LINE__
,
4645 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4646 if (gdbarch_debug
>= 2)
4647 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4648 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4652 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4653 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4655 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4659 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4661 gdb_assert (gdbarch
!= NULL
);
4662 if (gdbarch
->decr_pc_after_break
== -1)
4663 internal_error (__FILE__
, __LINE__
,
4664 "gdbarch: gdbarch_decr_pc_after_break invalid");
4665 if (gdbarch_debug
>= 2)
4666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4667 return gdbarch
->decr_pc_after_break
;
4671 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4672 CORE_ADDR decr_pc_after_break
)
4674 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4678 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4680 gdb_assert (gdbarch
!= NULL
);
4681 if (gdbarch
->prepare_to_proceed
== 0)
4682 internal_error (__FILE__
, __LINE__
,
4683 "gdbarch: gdbarch_prepare_to_proceed invalid");
4684 if (gdbarch_debug
>= 2)
4685 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4686 return gdbarch
->prepare_to_proceed (select_it
);
4690 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4691 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4693 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4697 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4699 gdb_assert (gdbarch
!= NULL
);
4700 if (gdbarch
->function_start_offset
== -1)
4701 internal_error (__FILE__
, __LINE__
,
4702 "gdbarch: gdbarch_function_start_offset invalid");
4703 if (gdbarch_debug
>= 2)
4704 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4705 return gdbarch
->function_start_offset
;
4709 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4710 CORE_ADDR function_start_offset
)
4712 gdbarch
->function_start_offset
= function_start_offset
;
4716 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4718 gdb_assert (gdbarch
!= NULL
);
4719 if (gdbarch
->remote_translate_xfer_address
== 0)
4720 internal_error (__FILE__
, __LINE__
,
4721 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4722 if (gdbarch_debug
>= 2)
4723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4724 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4728 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4729 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4731 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4735 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4737 gdb_assert (gdbarch
!= NULL
);
4738 if (gdbarch
->frame_args_skip
== -1)
4739 internal_error (__FILE__
, __LINE__
,
4740 "gdbarch: gdbarch_frame_args_skip invalid");
4741 if (gdbarch_debug
>= 2)
4742 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4743 return gdbarch
->frame_args_skip
;
4747 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4748 CORE_ADDR frame_args_skip
)
4750 gdbarch
->frame_args_skip
= frame_args_skip
;
4754 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4756 gdb_assert (gdbarch
!= NULL
);
4757 if (gdbarch
->frameless_function_invocation
== 0)
4758 internal_error (__FILE__
, __LINE__
,
4759 "gdbarch: gdbarch_frameless_function_invocation invalid");
4760 if (gdbarch_debug
>= 2)
4761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4762 return gdbarch
->frameless_function_invocation (fi
);
4766 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4767 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4769 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4773 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
4775 gdb_assert (gdbarch
!= NULL
);
4776 return gdbarch
->deprecated_frame_chain
!= 0;
4780 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4782 gdb_assert (gdbarch
!= NULL
);
4783 if (gdbarch
->deprecated_frame_chain
== 0)
4784 internal_error (__FILE__
, __LINE__
,
4785 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4786 if (gdbarch_debug
>= 2)
4787 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
4788 return gdbarch
->deprecated_frame_chain (frame
);
4792 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
4793 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
4795 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
4799 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4801 gdb_assert (gdbarch
!= NULL
);
4802 return gdbarch
->deprecated_frame_chain_valid
!= 0;
4806 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4808 gdb_assert (gdbarch
!= NULL
);
4809 if (gdbarch
->deprecated_frame_chain_valid
== 0)
4810 internal_error (__FILE__
, __LINE__
,
4811 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4812 if (gdbarch_debug
>= 2)
4813 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
4814 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
4818 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
4819 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
4821 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
4825 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4827 gdb_assert (gdbarch
!= NULL
);
4828 return gdbarch
->deprecated_frame_saved_pc
!= 0;
4832 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4834 gdb_assert (gdbarch
!= NULL
);
4835 if (gdbarch
->deprecated_frame_saved_pc
== 0)
4836 internal_error (__FILE__
, __LINE__
,
4837 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4838 if (gdbarch_debug
>= 2)
4839 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
4840 return gdbarch
->deprecated_frame_saved_pc (fi
);
4844 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
4845 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
4847 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
4851 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
4853 gdb_assert (gdbarch
!= NULL
);
4854 return gdbarch
->unwind_pc
!= 0;
4858 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4860 gdb_assert (gdbarch
!= NULL
);
4861 if (gdbarch
->unwind_pc
== 0)
4862 internal_error (__FILE__
, __LINE__
,
4863 "gdbarch: gdbarch_unwind_pc invalid");
4864 if (gdbarch_debug
>= 2)
4865 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
4866 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
4870 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
4871 gdbarch_unwind_pc_ftype unwind_pc
)
4873 gdbarch
->unwind_pc
= unwind_pc
;
4877 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4879 gdb_assert (gdbarch
!= NULL
);
4880 if (gdbarch
->frame_args_address
== 0)
4881 internal_error (__FILE__
, __LINE__
,
4882 "gdbarch: gdbarch_frame_args_address invalid");
4883 if (gdbarch_debug
>= 2)
4884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4885 return gdbarch
->frame_args_address (fi
);
4889 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4890 gdbarch_frame_args_address_ftype frame_args_address
)
4892 gdbarch
->frame_args_address
= frame_args_address
;
4896 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4898 gdb_assert (gdbarch
!= NULL
);
4899 if (gdbarch
->frame_locals_address
== 0)
4900 internal_error (__FILE__
, __LINE__
,
4901 "gdbarch: gdbarch_frame_locals_address invalid");
4902 if (gdbarch_debug
>= 2)
4903 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4904 return gdbarch
->frame_locals_address (fi
);
4908 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4909 gdbarch_frame_locals_address_ftype frame_locals_address
)
4911 gdbarch
->frame_locals_address
= frame_locals_address
;
4915 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4917 gdb_assert (gdbarch
!= NULL
);
4918 if (gdbarch
->saved_pc_after_call
== 0)
4919 internal_error (__FILE__
, __LINE__
,
4920 "gdbarch: gdbarch_saved_pc_after_call invalid");
4921 if (gdbarch_debug
>= 2)
4922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4923 return gdbarch
->saved_pc_after_call (frame
);
4927 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4928 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4930 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4934 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4936 gdb_assert (gdbarch
!= NULL
);
4937 if (gdbarch
->frame_num_args
== 0)
4938 internal_error (__FILE__
, __LINE__
,
4939 "gdbarch: gdbarch_frame_num_args invalid");
4940 if (gdbarch_debug
>= 2)
4941 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4942 return gdbarch
->frame_num_args (frame
);
4946 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4947 gdbarch_frame_num_args_ftype frame_num_args
)
4949 gdbarch
->frame_num_args
= frame_num_args
;
4953 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4955 gdb_assert (gdbarch
!= NULL
);
4956 return gdbarch
->stack_align
!= 0;
4960 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4962 gdb_assert (gdbarch
!= NULL
);
4963 if (gdbarch
->stack_align
== 0)
4964 internal_error (__FILE__
, __LINE__
,
4965 "gdbarch: gdbarch_stack_align invalid");
4966 if (gdbarch_debug
>= 2)
4967 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4968 return gdbarch
->stack_align (sp
);
4972 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4973 gdbarch_stack_align_ftype stack_align
)
4975 gdbarch
->stack_align
= stack_align
;
4979 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4981 gdb_assert (gdbarch
!= NULL
);
4982 return gdbarch
->frame_align
!= 0;
4986 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4988 gdb_assert (gdbarch
!= NULL
);
4989 if (gdbarch
->frame_align
== 0)
4990 internal_error (__FILE__
, __LINE__
,
4991 "gdbarch: gdbarch_frame_align invalid");
4992 if (gdbarch_debug
>= 2)
4993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4994 return gdbarch
->frame_align (gdbarch
, address
);
4998 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4999 gdbarch_frame_align_ftype frame_align
)
5001 gdbarch
->frame_align
= frame_align
;
5005 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
5007 gdb_assert (gdbarch
!= NULL
);
5008 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
5009 if (gdbarch_debug
>= 2)
5010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
5011 return gdbarch
->extra_stack_alignment_needed
;
5015 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
5016 int extra_stack_alignment_needed
)
5018 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
5022 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
5024 gdb_assert (gdbarch
!= NULL
);
5025 return gdbarch
->reg_struct_has_addr
!= 0;
5029 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
5031 gdb_assert (gdbarch
!= NULL
);
5032 if (gdbarch
->reg_struct_has_addr
== 0)
5033 internal_error (__FILE__
, __LINE__
,
5034 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5035 if (gdbarch_debug
>= 2)
5036 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
5037 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
5041 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
5042 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
5044 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
5048 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
5050 gdb_assert (gdbarch
!= NULL
);
5051 return gdbarch
->save_dummy_frame_tos
!= 0;
5055 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
5057 gdb_assert (gdbarch
!= NULL
);
5058 if (gdbarch
->save_dummy_frame_tos
== 0)
5059 internal_error (__FILE__
, __LINE__
,
5060 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5061 if (gdbarch_debug
>= 2)
5062 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
5063 gdbarch
->save_dummy_frame_tos (sp
);
5067 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
5068 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
5070 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
5074 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
5076 gdb_assert (gdbarch
!= NULL
);
5077 return gdbarch
->unwind_dummy_id
!= 0;
5081 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
5083 gdb_assert (gdbarch
!= NULL
);
5084 if (gdbarch
->unwind_dummy_id
== 0)
5085 internal_error (__FILE__
, __LINE__
,
5086 "gdbarch: gdbarch_unwind_dummy_id invalid");
5087 if (gdbarch_debug
>= 2)
5088 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
5089 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
5093 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
5094 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
5096 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
5100 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
5102 gdb_assert (gdbarch
!= NULL
);
5103 if (gdbarch_debug
>= 2)
5104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
5105 return gdbarch
->parm_boundary
;
5109 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
5112 gdbarch
->parm_boundary
= parm_boundary
;
5115 const struct floatformat
*
5116 gdbarch_float_format (struct gdbarch
*gdbarch
)
5118 gdb_assert (gdbarch
!= NULL
);
5119 if (gdbarch_debug
>= 2)
5120 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
5121 return gdbarch
->float_format
;
5125 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
5126 const struct floatformat
* float_format
)
5128 gdbarch
->float_format
= float_format
;
5131 const struct floatformat
*
5132 gdbarch_double_format (struct gdbarch
*gdbarch
)
5134 gdb_assert (gdbarch
!= NULL
);
5135 if (gdbarch_debug
>= 2)
5136 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
5137 return gdbarch
->double_format
;
5141 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
5142 const struct floatformat
* double_format
)
5144 gdbarch
->double_format
= double_format
;
5147 const struct floatformat
*
5148 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
5150 gdb_assert (gdbarch
!= NULL
);
5151 if (gdbarch_debug
>= 2)
5152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
5153 return gdbarch
->long_double_format
;
5157 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
5158 const struct floatformat
* long_double_format
)
5160 gdbarch
->long_double_format
= long_double_format
;
5164 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5166 gdb_assert (gdbarch
!= NULL
);
5167 if (gdbarch
->convert_from_func_ptr_addr
== 0)
5168 internal_error (__FILE__
, __LINE__
,
5169 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5170 if (gdbarch_debug
>= 2)
5171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
5172 return gdbarch
->convert_from_func_ptr_addr (addr
);
5176 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
5177 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
5179 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
5183 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5185 gdb_assert (gdbarch
!= NULL
);
5186 if (gdbarch
->addr_bits_remove
== 0)
5187 internal_error (__FILE__
, __LINE__
,
5188 "gdbarch: gdbarch_addr_bits_remove invalid");
5189 if (gdbarch_debug
>= 2)
5190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
5191 return gdbarch
->addr_bits_remove (addr
);
5195 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
5196 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
5198 gdbarch
->addr_bits_remove
= addr_bits_remove
;
5202 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5204 gdb_assert (gdbarch
!= NULL
);
5205 if (gdbarch
->smash_text_address
== 0)
5206 internal_error (__FILE__
, __LINE__
,
5207 "gdbarch: gdbarch_smash_text_address invalid");
5208 if (gdbarch_debug
>= 2)
5209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
5210 return gdbarch
->smash_text_address (addr
);
5214 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
5215 gdbarch_smash_text_address_ftype smash_text_address
)
5217 gdbarch
->smash_text_address
= smash_text_address
;
5221 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
5223 gdb_assert (gdbarch
!= NULL
);
5224 return gdbarch
->software_single_step
!= 0;
5228 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
5230 gdb_assert (gdbarch
!= NULL
);
5231 if (gdbarch
->software_single_step
== 0)
5232 internal_error (__FILE__
, __LINE__
,
5233 "gdbarch: gdbarch_software_single_step invalid");
5234 if (gdbarch_debug
>= 2)
5235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
5236 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
5240 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
5241 gdbarch_software_single_step_ftype software_single_step
)
5243 gdbarch
->software_single_step
= software_single_step
;
5247 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
5249 gdb_assert (gdbarch
!= NULL
);
5250 if (gdbarch
->print_insn
== 0)
5251 internal_error (__FILE__
, __LINE__
,
5252 "gdbarch: gdbarch_print_insn invalid");
5253 if (gdbarch_debug
>= 2)
5254 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
5255 return gdbarch
->print_insn (vma
, info
);
5259 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
5260 gdbarch_print_insn_ftype print_insn
)
5262 gdbarch
->print_insn
= print_insn
;
5266 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5268 gdb_assert (gdbarch
!= NULL
);
5269 if (gdbarch
->skip_trampoline_code
== 0)
5270 internal_error (__FILE__
, __LINE__
,
5271 "gdbarch: gdbarch_skip_trampoline_code invalid");
5272 if (gdbarch_debug
>= 2)
5273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
5274 return gdbarch
->skip_trampoline_code (pc
);
5278 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
5279 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
5281 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
5285 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5287 gdb_assert (gdbarch
!= NULL
);
5288 if (gdbarch
->in_solib_call_trampoline
== 0)
5289 internal_error (__FILE__
, __LINE__
,
5290 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5291 if (gdbarch_debug
>= 2)
5292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
5293 return gdbarch
->in_solib_call_trampoline (pc
, name
);
5297 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
5298 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
5300 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
5304 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5306 gdb_assert (gdbarch
!= NULL
);
5307 if (gdbarch
->in_solib_return_trampoline
== 0)
5308 internal_error (__FILE__
, __LINE__
,
5309 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5310 if (gdbarch_debug
>= 2)
5311 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
5312 return gdbarch
->in_solib_return_trampoline (pc
, name
);
5316 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
5317 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
5319 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
5323 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5325 gdb_assert (gdbarch
!= NULL
);
5326 if (gdbarch
->pc_in_sigtramp
== 0)
5327 internal_error (__FILE__
, __LINE__
,
5328 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5329 if (gdbarch_debug
>= 2)
5330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
5331 return gdbarch
->pc_in_sigtramp (pc
, name
);
5335 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
5336 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
5338 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
5342 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
5344 gdb_assert (gdbarch
!= NULL
);
5345 return gdbarch
->sigtramp_start
!= 0;
5349 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5351 gdb_assert (gdbarch
!= NULL
);
5352 if (gdbarch
->sigtramp_start
== 0)
5353 internal_error (__FILE__
, __LINE__
,
5354 "gdbarch: gdbarch_sigtramp_start invalid");
5355 if (gdbarch_debug
>= 2)
5356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
5357 return gdbarch
->sigtramp_start (pc
);
5361 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
5362 gdbarch_sigtramp_start_ftype sigtramp_start
)
5364 gdbarch
->sigtramp_start
= sigtramp_start
;
5368 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
5370 gdb_assert (gdbarch
!= NULL
);
5371 return gdbarch
->sigtramp_end
!= 0;
5375 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5377 gdb_assert (gdbarch
!= NULL
);
5378 if (gdbarch
->sigtramp_end
== 0)
5379 internal_error (__FILE__
, __LINE__
,
5380 "gdbarch: gdbarch_sigtramp_end invalid");
5381 if (gdbarch_debug
>= 2)
5382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
5383 return gdbarch
->sigtramp_end (pc
);
5387 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
5388 gdbarch_sigtramp_end_ftype sigtramp_end
)
5390 gdbarch
->sigtramp_end
= sigtramp_end
;
5394 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5396 gdb_assert (gdbarch
!= NULL
);
5397 if (gdbarch
->in_function_epilogue_p
== 0)
5398 internal_error (__FILE__
, __LINE__
,
5399 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5400 if (gdbarch_debug
>= 2)
5401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
5402 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
5406 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
5407 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
5409 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
5413 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
5415 gdb_assert (gdbarch
!= NULL
);
5416 if (gdbarch
->construct_inferior_arguments
== 0)
5417 internal_error (__FILE__
, __LINE__
,
5418 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5419 if (gdbarch_debug
>= 2)
5420 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5421 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5425 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5426 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5428 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5432 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
5434 gdb_assert (gdbarch
!= NULL
);
5435 return gdbarch
->dwarf2_build_frame_info
!= 0;
5439 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
5441 gdb_assert (gdbarch
!= NULL
);
5442 if (gdbarch
->dwarf2_build_frame_info
== 0)
5443 internal_error (__FILE__
, __LINE__
,
5444 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5445 if (gdbarch_debug
>= 2)
5446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
5447 gdbarch
->dwarf2_build_frame_info (objfile
);
5451 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
5452 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
5454 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
5458 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5460 gdb_assert (gdbarch
!= NULL
);
5461 if (gdbarch
->elf_make_msymbol_special
== 0)
5462 internal_error (__FILE__
, __LINE__
,
5463 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5464 if (gdbarch_debug
>= 2)
5465 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5466 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5470 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5471 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5473 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5477 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5479 gdb_assert (gdbarch
!= NULL
);
5480 if (gdbarch
->coff_make_msymbol_special
== 0)
5481 internal_error (__FILE__
, __LINE__
,
5482 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5483 if (gdbarch_debug
>= 2)
5484 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5485 gdbarch
->coff_make_msymbol_special (val
, msym
);
5489 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5490 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5492 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5496 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5498 gdb_assert (gdbarch
!= NULL
);
5499 /* Skip verify of name_of_malloc, invalid_p == 0 */
5500 if (gdbarch_debug
>= 2)
5501 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5502 return gdbarch
->name_of_malloc
;
5506 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5507 const char * name_of_malloc
)
5509 gdbarch
->name_of_malloc
= name_of_malloc
;
5513 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5515 gdb_assert (gdbarch
!= NULL
);
5516 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5517 if (gdbarch_debug
>= 2)
5518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5519 return gdbarch
->cannot_step_breakpoint
;
5523 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5524 int cannot_step_breakpoint
)
5526 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5530 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5532 gdb_assert (gdbarch
!= NULL
);
5533 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5534 if (gdbarch_debug
>= 2)
5535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5536 return gdbarch
->have_nonsteppable_watchpoint
;
5540 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5541 int have_nonsteppable_watchpoint
)
5543 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5547 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5549 gdb_assert (gdbarch
!= NULL
);
5550 return gdbarch
->address_class_type_flags
!= 0;
5554 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5556 gdb_assert (gdbarch
!= NULL
);
5557 if (gdbarch
->address_class_type_flags
== 0)
5558 internal_error (__FILE__
, __LINE__
,
5559 "gdbarch: gdbarch_address_class_type_flags invalid");
5560 if (gdbarch_debug
>= 2)
5561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5562 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5566 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5567 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5569 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5573 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5575 gdb_assert (gdbarch
!= NULL
);
5576 return gdbarch
->address_class_type_flags_to_name
!= 0;
5580 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5582 gdb_assert (gdbarch
!= NULL
);
5583 if (gdbarch
->address_class_type_flags_to_name
== 0)
5584 internal_error (__FILE__
, __LINE__
,
5585 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5586 if (gdbarch_debug
>= 2)
5587 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5588 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5592 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5593 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5595 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5599 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5601 gdb_assert (gdbarch
!= NULL
);
5602 return gdbarch
->address_class_name_to_type_flags
!= 0;
5606 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
5608 gdb_assert (gdbarch
!= NULL
);
5609 if (gdbarch
->address_class_name_to_type_flags
== 0)
5610 internal_error (__FILE__
, __LINE__
,
5611 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5612 if (gdbarch_debug
>= 2)
5613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5614 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5618 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5619 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5621 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5625 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5627 gdb_assert (gdbarch
!= NULL
);
5628 if (gdbarch
->register_reggroup_p
== 0)
5629 internal_error (__FILE__
, __LINE__
,
5630 "gdbarch: gdbarch_register_reggroup_p invalid");
5631 if (gdbarch_debug
>= 2)
5632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5633 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5637 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5638 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5640 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5644 /* Keep a registry of per-architecture data-pointers required by GDB
5651 gdbarch_data_init_ftype
*init
;
5652 gdbarch_data_free_ftype
*free
;
5655 struct gdbarch_data_registration
5657 struct gdbarch_data
*data
;
5658 struct gdbarch_data_registration
*next
;
5661 struct gdbarch_data_registry
5664 struct gdbarch_data_registration
*registrations
;
5667 struct gdbarch_data_registry gdbarch_data_registry
=
5672 struct gdbarch_data
*
5673 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5674 gdbarch_data_free_ftype
*free
)
5676 struct gdbarch_data_registration
**curr
;
5677 /* Append the new registraration. */
5678 for (curr
= &gdbarch_data_registry
.registrations
;
5680 curr
= &(*curr
)->next
);
5681 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5682 (*curr
)->next
= NULL
;
5683 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5684 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5685 (*curr
)->data
->init
= init
;
5686 (*curr
)->data
->init_p
= 1;
5687 (*curr
)->data
->free
= free
;
5688 return (*curr
)->data
;
5692 /* Create/delete the gdbarch data vector. */
5695 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5697 gdb_assert (gdbarch
->data
== NULL
);
5698 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5699 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5703 free_gdbarch_data (struct gdbarch
*gdbarch
)
5705 struct gdbarch_data_registration
*rego
;
5706 gdb_assert (gdbarch
->data
!= NULL
);
5707 for (rego
= gdbarch_data_registry
.registrations
;
5711 struct gdbarch_data
*data
= rego
->data
;
5712 gdb_assert (data
->index
< gdbarch
->nr_data
);
5713 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5715 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5716 gdbarch
->data
[data
->index
] = NULL
;
5719 xfree (gdbarch
->data
);
5720 gdbarch
->data
= NULL
;
5724 /* Initialize the current value of the specified per-architecture
5728 set_gdbarch_data (struct gdbarch
*gdbarch
,
5729 struct gdbarch_data
*data
,
5732 gdb_assert (data
->index
< gdbarch
->nr_data
);
5733 if (gdbarch
->data
[data
->index
] != NULL
)
5735 gdb_assert (data
->free
!= NULL
);
5736 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5738 gdbarch
->data
[data
->index
] = pointer
;
5741 /* Return the current value of the specified per-architecture
5745 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5747 gdb_assert (data
->index
< gdbarch
->nr_data
);
5748 /* The data-pointer isn't initialized, call init() to get a value but
5749 only if the architecture initializaiton has completed. Otherwise
5750 punt - hope that the caller knows what they are doing. */
5751 if (gdbarch
->data
[data
->index
] == NULL
5752 && gdbarch
->initialized_p
)
5754 /* Be careful to detect an initialization cycle. */
5755 gdb_assert (data
->init_p
);
5757 gdb_assert (data
->init
!= NULL
);
5758 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5760 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5762 return gdbarch
->data
[data
->index
];
5767 /* Keep a registry of swapped data required by GDB modules. */
5772 struct gdbarch_swap_registration
*source
;
5773 struct gdbarch_swap
*next
;
5776 struct gdbarch_swap_registration
5779 unsigned long sizeof_data
;
5780 gdbarch_swap_ftype
*init
;
5781 struct gdbarch_swap_registration
*next
;
5784 struct gdbarch_swap_registry
5787 struct gdbarch_swap_registration
*registrations
;
5790 struct gdbarch_swap_registry gdbarch_swap_registry
=
5796 register_gdbarch_swap (void *data
,
5797 unsigned long sizeof_data
,
5798 gdbarch_swap_ftype
*init
)
5800 struct gdbarch_swap_registration
**rego
;
5801 for (rego
= &gdbarch_swap_registry
.registrations
;
5803 rego
= &(*rego
)->next
);
5804 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5805 (*rego
)->next
= NULL
;
5806 (*rego
)->init
= init
;
5807 (*rego
)->data
= data
;
5808 (*rego
)->sizeof_data
= sizeof_data
;
5812 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5814 struct gdbarch_swap
*curr
;
5815 for (curr
= gdbarch
->swap
;
5819 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5824 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5826 struct gdbarch_swap_registration
*rego
;
5827 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5828 for (rego
= gdbarch_swap_registry
.registrations
;
5832 if (rego
->data
!= NULL
)
5834 (*curr
) = XMALLOC (struct gdbarch_swap
);
5835 (*curr
)->source
= rego
;
5836 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5837 (*curr
)->next
= NULL
;
5838 curr
= &(*curr
)->next
;
5840 if (rego
->init
!= NULL
)
5846 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5848 struct gdbarch_swap
*curr
;
5849 for (curr
= gdbarch
->swap
;
5852 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5856 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5858 struct gdbarch_swap
*curr
;
5859 for (curr
= gdbarch
->swap
;
5862 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5866 /* Keep a registry of the architectures known by GDB. */
5868 struct gdbarch_registration
5870 enum bfd_architecture bfd_architecture
;
5871 gdbarch_init_ftype
*init
;
5872 gdbarch_dump_tdep_ftype
*dump_tdep
;
5873 struct gdbarch_list
*arches
;
5874 struct gdbarch_registration
*next
;
5877 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5880 append_name (const char ***buf
, int *nr
, const char *name
)
5882 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5888 gdbarch_printable_names (void)
5892 /* Accumulate a list of names based on the registed list of
5894 enum bfd_architecture a
;
5896 const char **arches
= NULL
;
5897 struct gdbarch_registration
*rego
;
5898 for (rego
= gdbarch_registry
;
5902 const struct bfd_arch_info
*ap
;
5903 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5905 internal_error (__FILE__
, __LINE__
,
5906 "gdbarch_architecture_names: multi-arch unknown");
5909 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5914 append_name (&arches
, &nr_arches
, NULL
);
5918 /* Just return all the architectures that BFD knows. Assume that
5919 the legacy architecture framework supports them. */
5920 return bfd_arch_list ();
5925 gdbarch_register (enum bfd_architecture bfd_architecture
,
5926 gdbarch_init_ftype
*init
,
5927 gdbarch_dump_tdep_ftype
*dump_tdep
)
5929 struct gdbarch_registration
**curr
;
5930 const struct bfd_arch_info
*bfd_arch_info
;
5931 /* Check that BFD recognizes this architecture */
5932 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5933 if (bfd_arch_info
== NULL
)
5935 internal_error (__FILE__
, __LINE__
,
5936 "gdbarch: Attempt to register unknown architecture (%d)",
5939 /* Check that we haven't seen this architecture before */
5940 for (curr
= &gdbarch_registry
;
5942 curr
= &(*curr
)->next
)
5944 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5945 internal_error (__FILE__
, __LINE__
,
5946 "gdbarch: Duplicate registraration of architecture (%s)",
5947 bfd_arch_info
->printable_name
);
5951 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5952 bfd_arch_info
->printable_name
,
5955 (*curr
) = XMALLOC (struct gdbarch_registration
);
5956 (*curr
)->bfd_architecture
= bfd_architecture
;
5957 (*curr
)->init
= init
;
5958 (*curr
)->dump_tdep
= dump_tdep
;
5959 (*curr
)->arches
= NULL
;
5960 (*curr
)->next
= NULL
;
5961 /* When non- multi-arch, install whatever target dump routine we've
5962 been provided - hopefully that routine has been written correctly
5963 and works regardless of multi-arch. */
5964 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5965 && startup_gdbarch
.dump_tdep
== NULL
)
5966 startup_gdbarch
.dump_tdep
= dump_tdep
;
5970 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5971 gdbarch_init_ftype
*init
)
5973 gdbarch_register (bfd_architecture
, init
, NULL
);
5977 /* Look for an architecture using gdbarch_info. Base search on only
5978 BFD_ARCH_INFO and BYTE_ORDER. */
5980 struct gdbarch_list
*
5981 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5982 const struct gdbarch_info
*info
)
5984 for (; arches
!= NULL
; arches
= arches
->next
)
5986 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5988 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5990 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5998 /* Update the current architecture. Return ZERO if the update request
6002 gdbarch_update_p (struct gdbarch_info info
)
6004 struct gdbarch
*new_gdbarch
;
6005 struct gdbarch
*old_gdbarch
;
6006 struct gdbarch_registration
*rego
;
6008 /* Fill in missing parts of the INFO struct using a number of
6009 sources: ``set ...''; INFOabfd supplied; existing target. */
6011 /* ``(gdb) set architecture ...'' */
6012 if (info
.bfd_arch_info
== NULL
6013 && !TARGET_ARCHITECTURE_AUTO
)
6014 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6015 if (info
.bfd_arch_info
== NULL
6016 && info
.abfd
!= NULL
6017 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
6018 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
6019 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
6020 if (info
.bfd_arch_info
== NULL
)
6021 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
6023 /* ``(gdb) set byte-order ...'' */
6024 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6025 && !TARGET_BYTE_ORDER_AUTO
)
6026 info
.byte_order
= TARGET_BYTE_ORDER
;
6027 /* From the INFO struct. */
6028 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
6029 && info
.abfd
!= NULL
)
6030 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
6031 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
6032 : BFD_ENDIAN_UNKNOWN
);
6033 /* From the current target. */
6034 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
6035 info
.byte_order
= TARGET_BYTE_ORDER
;
6037 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6038 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6039 info
.osabi
= gdbarch_lookup_osabi (info
.abfd
);
6040 if (info
.osabi
== GDB_OSABI_UNINITIALIZED
)
6041 info
.osabi
= current_gdbarch
->osabi
;
6043 /* Must have found some sort of architecture. */
6044 gdb_assert (info
.bfd_arch_info
!= NULL
);
6048 fprintf_unfiltered (gdb_stdlog
,
6049 "gdbarch_update: info.bfd_arch_info %s\n",
6050 (info
.bfd_arch_info
!= NULL
6051 ? info
.bfd_arch_info
->printable_name
6053 fprintf_unfiltered (gdb_stdlog
,
6054 "gdbarch_update: info.byte_order %d (%s)\n",
6056 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
6057 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
6059 fprintf_unfiltered (gdb_stdlog
,
6060 "gdbarch_update: info.osabi %d (%s)\n",
6061 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
6062 fprintf_unfiltered (gdb_stdlog
,
6063 "gdbarch_update: info.abfd 0x%lx\n",
6065 fprintf_unfiltered (gdb_stdlog
,
6066 "gdbarch_update: info.tdep_info 0x%lx\n",
6067 (long) info
.tdep_info
);
6070 /* Find the target that knows about this architecture. */
6071 for (rego
= gdbarch_registry
;
6074 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
6079 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
6083 /* Swap the data belonging to the old target out setting the
6084 installed data to zero. This stops the ->init() function trying
6085 to refer to the previous architecture's global data structures. */
6086 swapout_gdbarch_swap (current_gdbarch
);
6087 clear_gdbarch_swap (current_gdbarch
);
6089 /* Save the previously selected architecture, setting the global to
6090 NULL. This stops ->init() trying to use the previous
6091 architecture's configuration. The previous architecture may not
6092 even be of the same architecture family. The most recent
6093 architecture of the same family is found at the head of the
6094 rego->arches list. */
6095 old_gdbarch
= current_gdbarch
;
6096 current_gdbarch
= NULL
;
6098 /* Ask the target for a replacement architecture. */
6099 new_gdbarch
= rego
->init (info
, rego
->arches
);
6101 /* Did the target like it? No. Reject the change and revert to the
6102 old architecture. */
6103 if (new_gdbarch
== NULL
)
6106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
6107 swapin_gdbarch_swap (old_gdbarch
);
6108 current_gdbarch
= old_gdbarch
;
6112 /* Did the architecture change? No. Oops, put the old architecture
6114 if (old_gdbarch
== new_gdbarch
)
6117 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6119 new_gdbarch
->bfd_arch_info
->printable_name
);
6120 swapin_gdbarch_swap (old_gdbarch
);
6121 current_gdbarch
= old_gdbarch
;
6125 /* Is this a pre-existing architecture? Yes. Move it to the front
6126 of the list of architectures (keeping the list sorted Most
6127 Recently Used) and then copy it in. */
6129 struct gdbarch_list
**list
;
6130 for (list
= ®o
->arches
;
6132 list
= &(*list
)->next
)
6134 if ((*list
)->gdbarch
== new_gdbarch
)
6136 struct gdbarch_list
*this;
6138 fprintf_unfiltered (gdb_stdlog
,
6139 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6141 new_gdbarch
->bfd_arch_info
->printable_name
);
6144 (*list
) = this->next
;
6145 /* Insert in the front. */
6146 this->next
= rego
->arches
;
6147 rego
->arches
= this;
6148 /* Copy the new architecture in. */
6149 current_gdbarch
= new_gdbarch
;
6150 swapin_gdbarch_swap (new_gdbarch
);
6151 architecture_changed_event ();
6157 /* Prepend this new architecture to the architecture list (keep the
6158 list sorted Most Recently Used). */
6160 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
6161 this->next
= rego
->arches
;
6162 this->gdbarch
= new_gdbarch
;
6163 rego
->arches
= this;
6166 /* Switch to this new architecture marking it initialized. */
6167 current_gdbarch
= new_gdbarch
;
6168 current_gdbarch
->initialized_p
= 1;
6171 fprintf_unfiltered (gdb_stdlog
,
6172 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6174 new_gdbarch
->bfd_arch_info
->printable_name
);
6177 /* Check that the newly installed architecture is valid. Plug in
6178 any post init values. */
6179 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
6180 verify_gdbarch (new_gdbarch
);
6182 /* Initialize the per-architecture memory (swap) areas.
6183 CURRENT_GDBARCH must be update before these modules are
6185 init_gdbarch_swap (new_gdbarch
);
6187 /* Initialize the per-architecture data. CURRENT_GDBARCH
6188 must be updated before these modules are called. */
6189 architecture_changed_event ();
6192 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
6200 /* Pointer to the target-dependent disassembly function. */
6201 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
6202 disassemble_info tm_print_insn_info
;
6205 extern void _initialize_gdbarch (void);
6208 _initialize_gdbarch (void)
6210 struct cmd_list_element
*c
;
6212 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
6213 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
6214 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
6215 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
6216 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
6218 add_show_from_set (add_set_cmd ("arch",
6221 (char *)&gdbarch_debug
,
6222 "Set architecture debugging.\n\
6223 When non-zero, architecture debugging is enabled.", &setdebuglist
),
6225 c
= add_set_cmd ("archdebug",
6228 (char *)&gdbarch_debug
,
6229 "Set architecture debugging.\n\
6230 When non-zero, architecture debugging is enabled.", &setlist
);
6232 deprecate_cmd (c
, "set debug arch");
6233 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");