1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
67 #include "reggroups.h"
69 /* Static function declarations */
71 static void verify_gdbarch (struct gdbarch
*gdbarch
);
72 static void alloc_gdbarch_data (struct gdbarch
*);
73 static void free_gdbarch_data (struct gdbarch
*);
74 static void init_gdbarch_swap (struct gdbarch
*);
75 static void clear_gdbarch_swap (struct gdbarch
*);
76 static void swapout_gdbarch_swap (struct gdbarch
*);
77 static void swapin_gdbarch_swap (struct gdbarch
*);
79 /* Non-zero if we want to trace architecture code. */
82 #define GDBARCH_DEBUG 0
84 int gdbarch_debug
= GDBARCH_DEBUG
;
87 /* Maintain the struct gdbarch object */
91 /* Has this architecture been fully initialized? */
93 /* basic architectural information */
94 const struct bfd_arch_info
* bfd_arch_info
;
97 /* target specific vector. */
98 struct gdbarch_tdep
*tdep
;
99 gdbarch_dump_tdep_ftype
*dump_tdep
;
101 /* per-architecture data-pointers */
105 /* per-architecture swap-regions */
106 struct gdbarch_swap
*swap
;
108 /* Multi-arch values.
110 When extending this structure you must:
114 Declare set/get functions and define the corresponding
117 gdbarch_alloc(): If zero/NULL is not a suitable default,
118 initialize the new field.
120 verify_gdbarch(): Confirm that the target updated the field
123 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
126 ``startup_gdbarch()'': Append an initial value to the static
127 variable (base values on the host's c-type system).
129 get_gdbarch(): Implement the set/get functions (probably using
130 the macro's as shortcuts).
145 gdbarch_read_pc_ftype
*read_pc
;
146 gdbarch_write_pc_ftype
*write_pc
;
147 gdbarch_read_fp_ftype
*read_fp
;
148 gdbarch_read_sp_ftype
*read_sp
;
149 gdbarch_write_sp_ftype
*write_sp
;
150 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
151 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
152 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
161 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
162 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
163 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
164 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
165 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
166 gdbarch_register_name_ftype
*register_name
;
169 gdbarch_register_byte_ftype
*register_byte
;
170 gdbarch_register_raw_size_ftype
*register_raw_size
;
171 int max_register_raw_size
;
172 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
173 int max_register_virtual_size
;
174 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
175 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
176 gdbarch_print_registers_info_ftype
*print_registers_info
;
177 gdbarch_print_float_info_ftype
*print_float_info
;
178 gdbarch_print_vector_info_ftype
*print_vector_info
;
179 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
180 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
181 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
182 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
183 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
184 int use_generic_dummy_frames
;
185 int call_dummy_location
;
186 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
187 CORE_ADDR call_dummy_start_offset
;
188 CORE_ADDR call_dummy_breakpoint_offset
;
189 int call_dummy_breakpoint_offset_p
;
190 int call_dummy_length
;
191 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
193 LONGEST
* call_dummy_words
;
194 int sizeof_call_dummy_words
;
195 int call_dummy_stack_adjust_p
;
196 int call_dummy_stack_adjust
;
197 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
198 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
199 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
200 int believe_pcc_promotion
;
201 int believe_pcc_promotion_type
;
202 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
203 gdbarch_get_saved_register_ftype
*get_saved_register
;
204 gdbarch_register_convertible_ftype
*register_convertible
;
205 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
206 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
207 gdbarch_convert_register_p_ftype
*convert_register_p
;
208 gdbarch_register_to_value_ftype
*register_to_value
;
209 gdbarch_value_to_register_ftype
*value_to_register
;
210 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
211 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
212 gdbarch_integer_to_address_ftype
*integer_to_address
;
213 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
214 gdbarch_push_arguments_ftype
*push_arguments
;
215 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
216 gdbarch_push_return_address_ftype
*push_return_address
;
217 gdbarch_pop_frame_ftype
*pop_frame
;
218 gdbarch_store_struct_return_ftype
*store_struct_return
;
219 gdbarch_extract_return_value_ftype
*extract_return_value
;
220 gdbarch_store_return_value_ftype
*store_return_value
;
221 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
222 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
223 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
224 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
225 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
226 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
227 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
228 gdbarch_skip_prologue_ftype
*skip_prologue
;
229 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
230 gdbarch_inner_than_ftype
*inner_than
;
231 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
232 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
233 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
234 CORE_ADDR decr_pc_after_break
;
235 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
236 CORE_ADDR function_start_offset
;
237 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
238 CORE_ADDR frame_args_skip
;
239 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
240 gdbarch_frame_chain_ftype
*frame_chain
;
241 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
242 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
243 gdbarch_frame_args_address_ftype
*frame_args_address
;
244 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
245 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
246 gdbarch_frame_num_args_ftype
*frame_num_args
;
247 gdbarch_stack_align_ftype
*stack_align
;
248 gdbarch_frame_align_ftype
*frame_align
;
249 int extra_stack_alignment_needed
;
250 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
251 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
253 const struct floatformat
* float_format
;
254 const struct floatformat
* double_format
;
255 const struct floatformat
* long_double_format
;
256 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
257 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
258 gdbarch_smash_text_address_ftype
*smash_text_address
;
259 gdbarch_software_single_step_ftype
*software_single_step
;
260 gdbarch_print_insn_ftype
*print_insn
;
261 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
262 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
263 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
264 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
265 gdbarch_sigtramp_start_ftype
*sigtramp_start
;
266 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
267 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
268 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
269 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
270 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
271 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
272 const char * name_of_malloc
;
273 int cannot_step_breakpoint
;
274 int have_nonsteppable_watchpoint
;
275 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
276 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
277 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
278 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
282 /* The default architecture uses host values (for want of a better
285 extern const struct bfd_arch_info bfd_default_arch_struct
;
287 struct gdbarch startup_gdbarch
=
289 1, /* Always initialized. */
290 /* basic architecture information */
291 &bfd_default_arch_struct
,
293 /* target specific vector and its dump routine */
295 /*per-architecture data-pointers and swap regions */
297 /* Multi-arch values */
301 8 * sizeof (LONGEST
),
304 8 * sizeof (long double),
333 generic_register_byte
,
334 generic_register_size
,
336 generic_register_size
,
340 default_print_registers_info
,
431 generic_in_function_epilogue_p
,
432 construct_inferior_arguments
,
442 default_register_reggroup_p
,
443 /* startup_gdbarch() */
446 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
448 /* Do any initialization needed for a non-multiarch configuration
449 after the _initialize_MODULE functions have been run. */
451 initialize_non_multiarch (void)
453 alloc_gdbarch_data (&startup_gdbarch
);
454 /* Ensure that all swap areas are zeroed so that they again think
455 they are starting from scratch. */
456 clear_gdbarch_swap (&startup_gdbarch
);
457 init_gdbarch_swap (&startup_gdbarch
);
461 /* Create a new ``struct gdbarch'' based on information provided by
462 ``struct gdbarch_info''. */
465 gdbarch_alloc (const struct gdbarch_info
*info
,
466 struct gdbarch_tdep
*tdep
)
468 /* NOTE: The new architecture variable is named ``current_gdbarch''
469 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
470 the current local architecture and not the previous global
471 architecture. This ensures that the new architectures initial
472 values are not influenced by the previous architecture. Once
473 everything is parameterised with gdbarch, this will go away. */
474 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
475 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
477 alloc_gdbarch_data (current_gdbarch
);
479 current_gdbarch
->tdep
= tdep
;
481 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
482 current_gdbarch
->byte_order
= info
->byte_order
;
484 /* Force the explicit initialization of these. */
485 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
486 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
487 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
488 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
489 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
490 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
491 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
492 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
493 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
494 current_gdbarch
->char_signed
= -1;
495 current_gdbarch
->read_pc
= generic_target_read_pc
;
496 current_gdbarch
->write_pc
= generic_target_write_pc
;
497 current_gdbarch
->read_fp
= generic_target_read_fp
;
498 current_gdbarch
->read_sp
= generic_target_read_sp
;
499 current_gdbarch
->write_sp
= generic_target_write_sp
;
500 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
501 current_gdbarch
->num_regs
= -1;
502 current_gdbarch
->sp_regnum
= -1;
503 current_gdbarch
->fp_regnum
= -1;
504 current_gdbarch
->pc_regnum
= -1;
505 current_gdbarch
->ps_regnum
= -1;
506 current_gdbarch
->fp0_regnum
= -1;
507 current_gdbarch
->npc_regnum
= -1;
508 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
509 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
510 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
511 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
512 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
513 current_gdbarch
->register_name
= legacy_register_name
;
514 current_gdbarch
->register_size
= -1;
515 current_gdbarch
->register_bytes
= -1;
516 current_gdbarch
->register_byte
= generic_register_byte
;
517 current_gdbarch
->register_raw_size
= generic_register_size
;
518 current_gdbarch
->max_register_raw_size
= -1;
519 current_gdbarch
->register_virtual_size
= generic_register_size
;
520 current_gdbarch
->max_register_virtual_size
= -1;
521 current_gdbarch
->print_registers_info
= default_print_registers_info
;
522 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
523 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
524 current_gdbarch
->cannot_store_register
= cannot_register_not
;
525 current_gdbarch
->use_generic_dummy_frames
= -1;
526 current_gdbarch
->call_dummy_start_offset
= -1;
527 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
528 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
529 current_gdbarch
->call_dummy_length
= -1;
530 current_gdbarch
->call_dummy_p
= -1;
531 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
532 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
533 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
534 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
535 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
536 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
537 current_gdbarch
->get_saved_register
= generic_unwind_get_saved_register
;
538 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
539 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
540 current_gdbarch
->register_to_value
= legacy_register_to_value
;
541 current_gdbarch
->value_to_register
= legacy_value_to_register
;
542 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
543 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
544 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
545 current_gdbarch
->push_arguments
= default_push_arguments
;
546 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
547 current_gdbarch
->store_return_value
= legacy_store_return_value
;
548 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
549 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
550 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
551 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
552 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
553 current_gdbarch
->decr_pc_after_break
= -1;
554 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
555 current_gdbarch
->function_start_offset
= -1;
556 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
557 current_gdbarch
->frame_args_skip
= -1;
558 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
559 current_gdbarch
->frame_chain_valid
= generic_func_frame_chain_valid
;
560 current_gdbarch
->extra_stack_alignment_needed
= 1;
561 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
562 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
563 current_gdbarch
->smash_text_address
= core_addr_identity
;
564 current_gdbarch
->print_insn
= legacy_print_insn
;
565 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
566 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
567 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
568 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
569 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
570 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
571 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
572 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
573 current_gdbarch
->name_of_malloc
= "malloc";
574 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
575 /* gdbarch_alloc() */
577 return current_gdbarch
;
581 /* Free a gdbarch struct. This should never happen in normal
582 operation --- once you've created a gdbarch, you keep it around.
583 However, if an architecture's init function encounters an error
584 building the structure, it may need to clean up a partially
585 constructed gdbarch. */
588 gdbarch_free (struct gdbarch
*arch
)
590 gdb_assert (arch
!= NULL
);
591 free_gdbarch_data (arch
);
596 /* Ensure that all values in a GDBARCH are reasonable. */
599 verify_gdbarch (struct gdbarch
*gdbarch
)
602 struct cleanup
*cleanups
;
605 /* Only perform sanity checks on a multi-arch target. */
608 log
= mem_fileopen ();
609 cleanups
= make_cleanup_ui_file_delete (log
);
611 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
612 fprintf_unfiltered (log
, "\n\tbyte-order");
613 if (gdbarch
->bfd_arch_info
== NULL
)
614 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
615 /* Check those that need to be defined for the given multi-arch level. */
616 /* Skip verify of short_bit, invalid_p == 0 */
617 /* Skip verify of int_bit, invalid_p == 0 */
618 /* Skip verify of long_bit, invalid_p == 0 */
619 /* Skip verify of long_long_bit, invalid_p == 0 */
620 /* Skip verify of float_bit, invalid_p == 0 */
621 /* Skip verify of double_bit, invalid_p == 0 */
622 /* Skip verify of long_double_bit, invalid_p == 0 */
623 /* Skip verify of ptr_bit, invalid_p == 0 */
624 if (gdbarch
->addr_bit
== 0)
625 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
626 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
627 if (gdbarch
->char_signed
== -1)
628 gdbarch
->char_signed
= 1;
629 /* Skip verify of read_pc, invalid_p == 0 */
630 /* Skip verify of write_pc, invalid_p == 0 */
631 /* Skip verify of read_fp, invalid_p == 0 */
632 /* Skip verify of read_sp, invalid_p == 0 */
633 /* Skip verify of write_sp, invalid_p == 0 */
634 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
635 /* Skip verify of pseudo_register_read, has predicate */
636 /* Skip verify of pseudo_register_write, has predicate */
637 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
638 && (gdbarch
->num_regs
== -1))
639 fprintf_unfiltered (log
, "\n\tnum_regs");
640 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
641 /* Skip verify of sp_regnum, invalid_p == 0 */
642 /* Skip verify of fp_regnum, invalid_p == 0 */
643 /* Skip verify of pc_regnum, invalid_p == 0 */
644 /* Skip verify of ps_regnum, invalid_p == 0 */
645 /* Skip verify of fp0_regnum, invalid_p == 0 */
646 /* Skip verify of npc_regnum, invalid_p == 0 */
647 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
648 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
649 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
650 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
651 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
652 /* Skip verify of register_name, invalid_p == 0 */
653 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
654 && (gdbarch
->register_size
== -1))
655 fprintf_unfiltered (log
, "\n\tregister_size");
656 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
657 && (gdbarch
->register_bytes
== -1))
658 fprintf_unfiltered (log
, "\n\tregister_bytes");
659 /* Skip verify of register_byte, invalid_p == 0 */
660 /* Skip verify of register_raw_size, invalid_p == 0 */
661 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
662 && (gdbarch
->max_register_raw_size
== -1))
663 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
664 /* Skip verify of register_virtual_size, invalid_p == 0 */
665 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
666 && (gdbarch
->max_register_virtual_size
== -1))
667 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
668 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
669 && (gdbarch
->register_virtual_type
== 0))
670 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
671 /* Skip verify of deprecated_do_registers_info, has predicate */
672 /* Skip verify of print_registers_info, invalid_p == 0 */
673 /* Skip verify of print_float_info, has predicate */
674 /* Skip verify of print_vector_info, has predicate */
675 /* Skip verify of register_sim_regno, invalid_p == 0 */
676 /* Skip verify of register_bytes_ok, has predicate */
677 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
678 /* Skip verify of cannot_store_register, invalid_p == 0 */
679 /* Skip verify of get_longjmp_target, has predicate */
680 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
681 && (gdbarch
->use_generic_dummy_frames
== -1))
682 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
683 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
684 && (gdbarch
->call_dummy_location
== 0))
685 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
686 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
687 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
688 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
689 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
690 && (gdbarch
->call_dummy_start_offset
== -1))
691 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
692 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
693 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
694 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
695 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
696 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
697 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
698 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
699 && (gdbarch
->call_dummy_length
== -1))
700 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
701 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
702 && (gdbarch
->pc_in_call_dummy
== 0))
703 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
704 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
705 && (gdbarch
->call_dummy_p
== -1))
706 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
707 /* Skip verify of call_dummy_words, invalid_p == 0 */
708 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
709 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
710 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
711 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
712 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
713 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
714 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
715 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
716 && (gdbarch
->fix_call_dummy
== 0))
717 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
718 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
719 /* Skip verify of init_frame_pc, invalid_p == 0 */
720 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
721 /* Skip verify of get_saved_register, invalid_p == 0 */
722 /* Skip verify of register_convertible, invalid_p == 0 */
723 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
724 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
725 /* Skip verify of convert_register_p, invalid_p == 0 */
726 /* Skip verify of register_to_value, invalid_p == 0 */
727 /* Skip verify of value_to_register, invalid_p == 0 */
728 /* Skip verify of pointer_to_address, invalid_p == 0 */
729 /* Skip verify of address_to_pointer, invalid_p == 0 */
730 /* Skip verify of integer_to_address, has predicate */
731 /* Skip verify of return_value_on_stack, invalid_p == 0 */
732 /* Skip verify of push_arguments, invalid_p == 0 */
733 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
734 && (gdbarch
->push_dummy_frame
== 0))
735 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
736 /* Skip verify of push_return_address, has predicate */
737 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
738 && (gdbarch
->pop_frame
== 0))
739 fprintf_unfiltered (log
, "\n\tpop_frame");
740 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
741 && (gdbarch
->store_struct_return
== 0))
742 fprintf_unfiltered (log
, "\n\tstore_struct_return");
743 /* Skip verify of extract_return_value, invalid_p == 0 */
744 /* Skip verify of store_return_value, invalid_p == 0 */
745 /* Skip verify of extract_struct_value_address, has predicate */
746 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
747 /* Skip verify of use_struct_convention, invalid_p == 0 */
748 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
749 && (gdbarch
->frame_init_saved_regs
== 0))
750 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
751 /* Skip verify of init_extra_frame_info, has predicate */
752 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
753 && (gdbarch
->skip_prologue
== 0))
754 fprintf_unfiltered (log
, "\n\tskip_prologue");
755 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
756 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
757 && (gdbarch
->inner_than
== 0))
758 fprintf_unfiltered (log
, "\n\tinner_than");
759 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
760 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
761 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
762 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
763 && (gdbarch
->decr_pc_after_break
== -1))
764 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
765 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
766 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
767 && (gdbarch
->function_start_offset
== -1))
768 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
769 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
770 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
771 && (gdbarch
->frame_args_skip
== -1))
772 fprintf_unfiltered (log
, "\n\tframe_args_skip");
773 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
774 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
775 && (gdbarch
->frame_chain
== 0))
776 fprintf_unfiltered (log
, "\n\tframe_chain");
777 /* Skip verify of frame_chain_valid, invalid_p == 0 */
778 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
779 && (gdbarch
->frame_saved_pc
== 0))
780 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
781 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
782 && (gdbarch
->frame_args_address
== 0))
783 fprintf_unfiltered (log
, "\n\tframe_args_address");
784 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
785 && (gdbarch
->frame_locals_address
== 0))
786 fprintf_unfiltered (log
, "\n\tframe_locals_address");
787 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
788 && (gdbarch
->saved_pc_after_call
== 0))
789 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
790 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
791 && (gdbarch
->frame_num_args
== 0))
792 fprintf_unfiltered (log
, "\n\tframe_num_args");
793 /* Skip verify of stack_align, has predicate */
794 /* Skip verify of frame_align, has predicate */
795 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
796 /* Skip verify of reg_struct_has_addr, has predicate */
797 /* Skip verify of save_dummy_frame_tos, has predicate */
798 if (gdbarch
->float_format
== 0)
799 gdbarch
->float_format
= default_float_format (gdbarch
);
800 if (gdbarch
->double_format
== 0)
801 gdbarch
->double_format
= default_double_format (gdbarch
);
802 if (gdbarch
->long_double_format
== 0)
803 gdbarch
->long_double_format
= default_double_format (gdbarch
);
804 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
805 /* Skip verify of addr_bits_remove, invalid_p == 0 */
806 /* Skip verify of smash_text_address, invalid_p == 0 */
807 /* Skip verify of software_single_step, has predicate */
808 /* Skip verify of print_insn, invalid_p == 0 */
809 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
810 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
811 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
812 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
813 /* Skip verify of sigtramp_start, has predicate */
814 /* Skip verify of sigtramp_end, has predicate */
815 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
816 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
817 /* Skip verify of dwarf2_build_frame_info, has predicate */
818 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
819 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
820 /* Skip verify of name_of_malloc, invalid_p == 0 */
821 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
822 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
823 /* Skip verify of address_class_type_flags, has predicate */
824 /* Skip verify of address_class_type_flags_to_name, has predicate */
825 /* Skip verify of address_class_name_to_type_flags, has predicate */
826 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
827 && (gdbarch
->register_reggroup_p
== default_register_reggroup_p
))
828 fprintf_unfiltered (log
, "\n\tregister_reggroup_p");
829 buf
= ui_file_xstrdup (log
, &dummy
);
830 make_cleanup (xfree
, buf
);
831 if (strlen (buf
) > 0)
832 internal_error (__FILE__
, __LINE__
,
833 "verify_gdbarch: the following are invalid ...%s",
835 do_cleanups (cleanups
);
839 /* Print out the details of the current architecture. */
841 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
842 just happens to match the global variable ``current_gdbarch''. That
843 way macros refering to that variable get the local and not the global
844 version - ulgh. Once everything is parameterised with gdbarch, this
848 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: frame_align = 0x%08lx\n",
856 (long) current_gdbarch
->frame_align
);
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
860 (long) current_gdbarch
->in_function_epilogue_p
);
862 fprintf_unfiltered (file
,
863 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
864 (long) current_gdbarch
->register_reggroup_p
);
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
868 (long) current_gdbarch
->pseudo_register_read
);
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
872 (long) current_gdbarch
->pseudo_register_write
);
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
876 (long) current_gdbarch
->address_class_name_to_type_flags
);
877 #ifdef ADDRESS_CLASS_TYPE_FLAGS
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: %s # %s\n",
880 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
881 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = 0x%08lx\n",
885 (long) current_gdbarch
->address_class_type_flags
886 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
891 (long) current_gdbarch
->address_class_type_flags_to_name
);
892 #ifdef ADDRESS_TO_POINTER
894 /* Macro might contain `[{}]' when not multi-arch */
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: %s # %s\n",
897 "ADDRESS_TO_POINTER(type, buf, addr)",
898 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
903 (long) current_gdbarch
->address_to_pointer
904 /*ADDRESS_TO_POINTER ()*/);
906 #ifdef ADDR_BITS_REMOVE
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: %s # %s\n",
909 "ADDR_BITS_REMOVE(addr)",
910 XSTRING (ADDR_BITS_REMOVE (addr
)));
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
914 (long) current_gdbarch
->addr_bits_remove
915 /*ADDR_BITS_REMOVE ()*/);
917 #ifdef BELIEVE_PCC_PROMOTION
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
920 XSTRING (BELIEVE_PCC_PROMOTION
));
921 fprintf_unfiltered (file
,
922 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
923 BELIEVE_PCC_PROMOTION
);
925 #ifdef BELIEVE_PCC_PROMOTION_TYPE
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
928 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
931 BELIEVE_PCC_PROMOTION_TYPE
);
933 #ifdef BREAKPOINT_FROM_PC
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: %s # %s\n",
936 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
937 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
941 (long) current_gdbarch
->breakpoint_from_pc
942 /*BREAKPOINT_FROM_PC ()*/);
944 #ifdef CALL_DUMMY_ADDRESS
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: %s # %s\n",
947 "CALL_DUMMY_ADDRESS()",
948 XSTRING (CALL_DUMMY_ADDRESS ()));
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
952 (long) current_gdbarch
->call_dummy_address
953 /*CALL_DUMMY_ADDRESS ()*/);
955 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
958 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
959 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
962 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
964 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
967 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
970 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
972 #ifdef CALL_DUMMY_LENGTH
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
975 XSTRING (CALL_DUMMY_LENGTH
));
976 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
981 #ifdef CALL_DUMMY_LOCATION
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
984 XSTRING (CALL_DUMMY_LOCATION
));
985 fprintf_unfiltered (file
,
986 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
987 CALL_DUMMY_LOCATION
);
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: CALL_DUMMY_P # %s\n",
992 XSTRING (CALL_DUMMY_P
));
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: CALL_DUMMY_P = %d\n",
997 #ifdef CALL_DUMMY_STACK_ADJUST
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1000 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1001 if (CALL_DUMMY_STACK_ADJUST_P
)
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1004 (long) CALL_DUMMY_STACK_ADJUST
);
1006 #ifdef CALL_DUMMY_STACK_ADJUST_P
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1009 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1012 (long) CALL_DUMMY_STACK_ADJUST_P
);
1014 #ifdef CALL_DUMMY_START_OFFSET
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1017 XSTRING (CALL_DUMMY_START_OFFSET
));
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1020 (long) CALL_DUMMY_START_OFFSET
);
1022 #ifdef CALL_DUMMY_WORDS
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1025 XSTRING (CALL_DUMMY_WORDS
));
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1028 (long) CALL_DUMMY_WORDS
);
1030 #ifdef CANNOT_FETCH_REGISTER
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: %s # %s\n",
1033 "CANNOT_FETCH_REGISTER(regnum)",
1034 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
1038 (long) current_gdbarch
->cannot_fetch_register
1039 /*CANNOT_FETCH_REGISTER ()*/);
1041 #ifdef CANNOT_STEP_BREAKPOINT
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1044 XSTRING (CANNOT_STEP_BREAKPOINT
));
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1047 CANNOT_STEP_BREAKPOINT
);
1049 #ifdef CANNOT_STORE_REGISTER
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: %s # %s\n",
1052 "CANNOT_STORE_REGISTER(regnum)",
1053 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1057 (long) current_gdbarch
->cannot_store_register
1058 /*CANNOT_STORE_REGISTER ()*/);
1060 #ifdef COERCE_FLOAT_TO_DOUBLE
1061 fprintf_unfiltered (file
,
1062 "gdbarch_dump: %s # %s\n",
1063 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1064 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1066 fprintf_unfiltered (file
,
1067 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1068 (long) current_gdbarch
->coerce_float_to_double
1069 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1071 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1073 /* Macro might contain `[{}]' when not multi-arch */
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: %s # %s\n",
1076 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1077 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1082 (long) current_gdbarch
->coff_make_msymbol_special
1083 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1088 (long) current_gdbarch
->construct_inferior_arguments
);
1089 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: %s # %s\n",
1092 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1093 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1097 (long) current_gdbarch
->convert_from_func_ptr_addr
1098 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1100 #ifdef CONVERT_REGISTER_P
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: %s # %s\n",
1103 "CONVERT_REGISTER_P(regnum)",
1104 XSTRING (CONVERT_REGISTER_P (regnum
)));
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1108 (long) current_gdbarch
->convert_register_p
1109 /*CONVERT_REGISTER_P ()*/);
1111 #ifdef DECR_PC_AFTER_BREAK
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1114 XSTRING (DECR_PC_AFTER_BREAK
));
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1117 (long) DECR_PC_AFTER_BREAK
);
1119 #ifdef DEPRECATED_DO_REGISTERS_INFO
1121 /* Macro might contain `[{}]' when not multi-arch */
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: %s # %s\n",
1124 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1125 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = 0x%08lx\n",
1130 (long) current_gdbarch
->deprecated_do_registers_info
1131 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1133 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1135 /* Macro might contain `[{}]' when not multi-arch */
1136 fprintf_unfiltered (file
,
1137 "gdbarch_dump: %s # %s\n",
1138 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1139 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1144 (long) current_gdbarch
->deprecated_extract_return_value
1145 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1147 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: %s # %s\n",
1150 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1151 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1155 (long) current_gdbarch
->deprecated_extract_struct_value_address
1156 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1158 #ifdef DEPRECATED_STORE_RETURN_VALUE
1160 /* Macro might contain `[{}]' when not multi-arch */
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: %s # %s\n",
1163 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1164 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = 0x%08lx\n",
1169 (long) current_gdbarch
->deprecated_store_return_value
1170 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1172 #ifdef DWARF2_BUILD_FRAME_INFO
1174 /* Macro might contain `[{}]' when not multi-arch */
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: %s # %s\n",
1177 "DWARF2_BUILD_FRAME_INFO(objfile)",
1178 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1183 (long) current_gdbarch
->dwarf2_build_frame_info
1184 /*DWARF2_BUILD_FRAME_INFO ()*/);
1186 #ifdef DWARF2_REG_TO_REGNUM
1187 fprintf_unfiltered (file
,
1188 "gdbarch_dump: %s # %s\n",
1189 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1190 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1194 (long) current_gdbarch
->dwarf2_reg_to_regnum
1195 /*DWARF2_REG_TO_REGNUM ()*/);
1197 #ifdef DWARF_REG_TO_REGNUM
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: %s # %s\n",
1200 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1201 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1205 (long) current_gdbarch
->dwarf_reg_to_regnum
1206 /*DWARF_REG_TO_REGNUM ()*/);
1208 #ifdef ECOFF_REG_TO_REGNUM
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: %s # %s\n",
1211 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1212 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1216 (long) current_gdbarch
->ecoff_reg_to_regnum
1217 /*ECOFF_REG_TO_REGNUM ()*/);
1219 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1221 /* Macro might contain `[{}]' when not multi-arch */
1222 fprintf_unfiltered (file
,
1223 "gdbarch_dump: %s # %s\n",
1224 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1225 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1230 (long) current_gdbarch
->elf_make_msymbol_special
1231 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1233 #ifdef EXTRACT_RETURN_VALUE
1235 /* Macro might contain `[{}]' when not multi-arch */
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: %s # %s\n",
1238 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1239 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1244 (long) current_gdbarch
->extract_return_value
1245 /*EXTRACT_RETURN_VALUE ()*/);
1247 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: %s # %s\n",
1250 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1251 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1255 (long) current_gdbarch
->extract_struct_value_address
1256 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1258 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1261 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1264 EXTRA_STACK_ALIGNMENT_NEEDED
);
1266 #ifdef FIX_CALL_DUMMY
1268 /* Macro might contain `[{}]' when not multi-arch */
1269 fprintf_unfiltered (file
,
1270 "gdbarch_dump: %s # %s\n",
1271 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1272 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1277 (long) current_gdbarch
->fix_call_dummy
1278 /*FIX_CALL_DUMMY ()*/);
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: FP0_REGNUM # %s\n",
1283 XSTRING (FP0_REGNUM
));
1284 fprintf_unfiltered (file
,
1285 "gdbarch_dump: FP0_REGNUM = %d\n",
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: FP_REGNUM # %s\n",
1291 XSTRING (FP_REGNUM
));
1292 fprintf_unfiltered (file
,
1293 "gdbarch_dump: FP_REGNUM = %d\n",
1296 #ifdef FRAMELESS_FUNCTION_INVOCATION
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: %s # %s\n",
1299 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1300 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1304 (long) current_gdbarch
->frameless_function_invocation
1305 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1307 #ifdef FRAME_ARGS_ADDRESS
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: %s # %s\n",
1310 "FRAME_ARGS_ADDRESS(fi)",
1311 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1315 (long) current_gdbarch
->frame_args_address
1316 /*FRAME_ARGS_ADDRESS ()*/);
1318 #ifdef FRAME_ARGS_SKIP
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1321 XSTRING (FRAME_ARGS_SKIP
));
1322 fprintf_unfiltered (file
,
1323 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1324 (long) FRAME_ARGS_SKIP
);
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: %s # %s\n",
1329 "FRAME_CHAIN(frame)",
1330 XSTRING (FRAME_CHAIN (frame
)));
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1334 (long) current_gdbarch
->frame_chain
1335 /*FRAME_CHAIN ()*/);
1337 #ifdef FRAME_CHAIN_VALID
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: %s # %s\n",
1340 "FRAME_CHAIN_VALID(chain, thisframe)",
1341 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1345 (long) current_gdbarch
->frame_chain_valid
1346 /*FRAME_CHAIN_VALID ()*/);
1348 #ifdef FRAME_INIT_SAVED_REGS
1350 /* Macro might contain `[{}]' when not multi-arch */
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: %s # %s\n",
1353 "FRAME_INIT_SAVED_REGS(frame)",
1354 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1359 (long) current_gdbarch
->frame_init_saved_regs
1360 /*FRAME_INIT_SAVED_REGS ()*/);
1362 #ifdef FRAME_LOCALS_ADDRESS
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: %s # %s\n",
1365 "FRAME_LOCALS_ADDRESS(fi)",
1366 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1368 fprintf_unfiltered (file
,
1369 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1370 (long) current_gdbarch
->frame_locals_address
1371 /*FRAME_LOCALS_ADDRESS ()*/);
1373 #ifdef FRAME_NUM_ARGS
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: %s # %s\n",
1376 "FRAME_NUM_ARGS(frame)",
1377 XSTRING (FRAME_NUM_ARGS (frame
)));
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1381 (long) current_gdbarch
->frame_num_args
1382 /*FRAME_NUM_ARGS ()*/);
1384 #ifdef FRAME_SAVED_PC
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: %s # %s\n",
1387 "FRAME_SAVED_PC(fi)",
1388 XSTRING (FRAME_SAVED_PC (fi
)));
1390 fprintf_unfiltered (file
,
1391 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1392 (long) current_gdbarch
->frame_saved_pc
1393 /*FRAME_SAVED_PC ()*/);
1395 #ifdef FUNCTION_START_OFFSET
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1398 XSTRING (FUNCTION_START_OFFSET
));
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1401 (long) FUNCTION_START_OFFSET
);
1403 #ifdef GET_LONGJMP_TARGET
1404 fprintf_unfiltered (file
,
1405 "gdbarch_dump: %s # %s\n",
1406 "GET_LONGJMP_TARGET(pc)",
1407 XSTRING (GET_LONGJMP_TARGET (pc
)));
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1411 (long) current_gdbarch
->get_longjmp_target
1412 /*GET_LONGJMP_TARGET ()*/);
1414 #ifdef GET_SAVED_REGISTER
1416 /* Macro might contain `[{}]' when not multi-arch */
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: %s # %s\n",
1419 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1420 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1425 (long) current_gdbarch
->get_saved_register
1426 /*GET_SAVED_REGISTER ()*/);
1428 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1431 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1434 HAVE_NONSTEPPABLE_WATCHPOINT
);
1436 #ifdef INIT_EXTRA_FRAME_INFO
1438 /* Macro might contain `[{}]' when not multi-arch */
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: %s # %s\n",
1441 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1442 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1447 (long) current_gdbarch
->init_extra_frame_info
1448 /*INIT_EXTRA_FRAME_INFO ()*/);
1450 #ifdef INIT_FRAME_PC
1452 /* Macro might contain `[{}]' when not multi-arch */
1453 fprintf_unfiltered (file
,
1454 "gdbarch_dump: %s # %s\n",
1455 "INIT_FRAME_PC(fromleaf, prev)",
1456 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1461 (long) current_gdbarch
->init_frame_pc
1462 /*INIT_FRAME_PC ()*/);
1464 #ifdef INIT_FRAME_PC_FIRST
1466 /* Macro might contain `[{}]' when not multi-arch */
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: %s # %s\n",
1469 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1470 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1475 (long) current_gdbarch
->init_frame_pc_first
1476 /*INIT_FRAME_PC_FIRST ()*/);
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: %s # %s\n",
1481 "INNER_THAN(lhs, rhs)",
1482 XSTRING (INNER_THAN (lhs
, rhs
)));
1484 fprintf_unfiltered (file
,
1485 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1486 (long) current_gdbarch
->inner_than
1489 #ifdef INTEGER_TO_ADDRESS
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: %s # %s\n",
1492 "INTEGER_TO_ADDRESS(type, buf)",
1493 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1497 (long) current_gdbarch
->integer_to_address
1498 /*INTEGER_TO_ADDRESS ()*/);
1500 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: %s # %s\n",
1503 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1504 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1508 (long) current_gdbarch
->in_solib_call_trampoline
1509 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1511 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: %s # %s\n",
1514 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1515 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
1519 (long) current_gdbarch
->in_solib_return_trampoline
1520 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1522 #ifdef MAX_REGISTER_RAW_SIZE
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1525 XSTRING (MAX_REGISTER_RAW_SIZE
));
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1528 MAX_REGISTER_RAW_SIZE
);
1530 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1533 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1536 MAX_REGISTER_VIRTUAL_SIZE
);
1538 #ifdef MEMORY_INSERT_BREAKPOINT
1539 fprintf_unfiltered (file
,
1540 "gdbarch_dump: %s # %s\n",
1541 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1542 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1544 fprintf_unfiltered (file
,
1545 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1546 (long) current_gdbarch
->memory_insert_breakpoint
1547 /*MEMORY_INSERT_BREAKPOINT ()*/);
1549 #ifdef MEMORY_REMOVE_BREAKPOINT
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: %s # %s\n",
1552 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1553 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1557 (long) current_gdbarch
->memory_remove_breakpoint
1558 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1560 #ifdef NAME_OF_MALLOC
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1563 XSTRING (NAME_OF_MALLOC
));
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: NAME_OF_MALLOC = %ld\n",
1566 (long) NAME_OF_MALLOC
);
1569 fprintf_unfiltered (file
,
1570 "gdbarch_dump: NPC_REGNUM # %s\n",
1571 XSTRING (NPC_REGNUM
));
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: NPC_REGNUM = %d\n",
1576 #ifdef NUM_PSEUDO_REGS
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1579 XSTRING (NUM_PSEUDO_REGS
));
1580 fprintf_unfiltered (file
,
1581 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1585 fprintf_unfiltered (file
,
1586 "gdbarch_dump: NUM_REGS # %s\n",
1587 XSTRING (NUM_REGS
));
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: NUM_REGS = %d\n",
1592 #ifdef PARM_BOUNDARY
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1595 XSTRING (PARM_BOUNDARY
));
1596 fprintf_unfiltered (file
,
1597 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1600 #ifdef PC_IN_CALL_DUMMY
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: %s # %s\n",
1603 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1604 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1608 (long) current_gdbarch
->pc_in_call_dummy
1609 /*PC_IN_CALL_DUMMY ()*/);
1611 #ifdef PC_IN_SIGTRAMP
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: %s # %s\n",
1614 "PC_IN_SIGTRAMP(pc, name)",
1615 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1619 (long) current_gdbarch
->pc_in_sigtramp
1620 /*PC_IN_SIGTRAMP ()*/);
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: PC_REGNUM # %s\n",
1625 XSTRING (PC_REGNUM
));
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: PC_REGNUM = %d\n",
1630 #ifdef POINTER_TO_ADDRESS
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: %s # %s\n",
1633 "POINTER_TO_ADDRESS(type, buf)",
1634 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1636 fprintf_unfiltered (file
,
1637 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1638 (long) current_gdbarch
->pointer_to_address
1639 /*POINTER_TO_ADDRESS ()*/);
1643 /* Macro might contain `[{}]' when not multi-arch */
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: %s # %s\n",
1647 XSTRING (POP_FRAME (-)));
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1652 (long) current_gdbarch
->pop_frame
1655 #ifdef PREPARE_TO_PROCEED
1656 fprintf_unfiltered (file
,
1657 "gdbarch_dump: %s # %s\n",
1658 "PREPARE_TO_PROCEED(select_it)",
1659 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1661 fprintf_unfiltered (file
,
1662 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1663 (long) current_gdbarch
->prepare_to_proceed
1664 /*PREPARE_TO_PROCEED ()*/);
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: print_float_info = 0x%08lx\n",
1669 (long) current_gdbarch
->print_float_info
);
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1673 (long) current_gdbarch
->print_registers_info
);
1675 fprintf_unfiltered (file
,
1676 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1677 (long) current_gdbarch
->print_vector_info
);
1678 #ifdef PROLOGUE_FRAMELESS_P
1679 fprintf_unfiltered (file
,
1680 "gdbarch_dump: %s # %s\n",
1681 "PROLOGUE_FRAMELESS_P(ip)",
1682 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1686 (long) current_gdbarch
->prologue_frameless_p
1687 /*PROLOGUE_FRAMELESS_P ()*/);
1690 fprintf_unfiltered (file
,
1691 "gdbarch_dump: PS_REGNUM # %s\n",
1692 XSTRING (PS_REGNUM
));
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: PS_REGNUM = %d\n",
1697 #ifdef PUSH_ARGUMENTS
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: %s # %s\n",
1700 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1701 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1705 (long) current_gdbarch
->push_arguments
1706 /*PUSH_ARGUMENTS ()*/);
1708 #ifdef PUSH_DUMMY_FRAME
1710 /* Macro might contain `[{}]' when not multi-arch */
1711 fprintf_unfiltered (file
,
1712 "gdbarch_dump: %s # %s\n",
1713 "PUSH_DUMMY_FRAME(-)",
1714 XSTRING (PUSH_DUMMY_FRAME (-)));
1717 fprintf_unfiltered (file
,
1718 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1719 (long) current_gdbarch
->push_dummy_frame
1720 /*PUSH_DUMMY_FRAME ()*/);
1722 #ifdef PUSH_RETURN_ADDRESS
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: %s # %s\n",
1725 "PUSH_RETURN_ADDRESS(pc, sp)",
1726 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1728 fprintf_unfiltered (file
,
1729 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1730 (long) current_gdbarch
->push_return_address
1731 /*PUSH_RETURN_ADDRESS ()*/);
1733 #ifdef REGISTER_BYTE
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: %s # %s\n",
1736 "REGISTER_BYTE(reg_nr)",
1737 XSTRING (REGISTER_BYTE (reg_nr
)));
1739 fprintf_unfiltered (file
,
1740 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1741 (long) current_gdbarch
->register_byte
1742 /*REGISTER_BYTE ()*/);
1744 #ifdef REGISTER_BYTES
1745 fprintf_unfiltered (file
,
1746 "gdbarch_dump: REGISTER_BYTES # %s\n",
1747 XSTRING (REGISTER_BYTES
));
1748 fprintf_unfiltered (file
,
1749 "gdbarch_dump: REGISTER_BYTES = %d\n",
1752 #ifdef REGISTER_BYTES_OK
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: %s # %s\n",
1755 "REGISTER_BYTES_OK(nr_bytes)",
1756 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1758 fprintf_unfiltered (file
,
1759 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1760 (long) current_gdbarch
->register_bytes_ok
1761 /*REGISTER_BYTES_OK ()*/);
1763 #ifdef REGISTER_CONVERTIBLE
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: %s # %s\n",
1766 "REGISTER_CONVERTIBLE(nr)",
1767 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1771 (long) current_gdbarch
->register_convertible
1772 /*REGISTER_CONVERTIBLE ()*/);
1774 #ifdef REGISTER_CONVERT_TO_RAW
1776 /* Macro might contain `[{}]' when not multi-arch */
1777 fprintf_unfiltered (file
,
1778 "gdbarch_dump: %s # %s\n",
1779 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1780 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1785 (long) current_gdbarch
->register_convert_to_raw
1786 /*REGISTER_CONVERT_TO_RAW ()*/);
1788 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1790 /* Macro might contain `[{}]' when not multi-arch */
1791 fprintf_unfiltered (file
,
1792 "gdbarch_dump: %s # %s\n",
1793 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1794 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1797 fprintf_unfiltered (file
,
1798 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1799 (long) current_gdbarch
->register_convert_to_virtual
1800 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1802 #ifdef REGISTER_NAME
1803 fprintf_unfiltered (file
,
1804 "gdbarch_dump: %s # %s\n",
1805 "REGISTER_NAME(regnr)",
1806 XSTRING (REGISTER_NAME (regnr
)));
1808 fprintf_unfiltered (file
,
1809 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1810 (long) current_gdbarch
->register_name
1811 /*REGISTER_NAME ()*/);
1813 #ifdef REGISTER_RAW_SIZE
1814 fprintf_unfiltered (file
,
1815 "gdbarch_dump: %s # %s\n",
1816 "REGISTER_RAW_SIZE(reg_nr)",
1817 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1821 (long) current_gdbarch
->register_raw_size
1822 /*REGISTER_RAW_SIZE ()*/);
1824 #ifdef REGISTER_SIM_REGNO
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: %s # %s\n",
1827 "REGISTER_SIM_REGNO(reg_nr)",
1828 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1832 (long) current_gdbarch
->register_sim_regno
1833 /*REGISTER_SIM_REGNO ()*/);
1835 #ifdef REGISTER_SIZE
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: REGISTER_SIZE # %s\n",
1838 XSTRING (REGISTER_SIZE
));
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: REGISTER_SIZE = %d\n",
1843 #ifdef REGISTER_TO_VALUE
1845 /* Macro might contain `[{}]' when not multi-arch */
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: %s # %s\n",
1848 "REGISTER_TO_VALUE(regnum, type, from, to)",
1849 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1854 (long) current_gdbarch
->register_to_value
1855 /*REGISTER_TO_VALUE ()*/);
1857 #ifdef REGISTER_VIRTUAL_SIZE
1858 fprintf_unfiltered (file
,
1859 "gdbarch_dump: %s # %s\n",
1860 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1861 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1865 (long) current_gdbarch
->register_virtual_size
1866 /*REGISTER_VIRTUAL_SIZE ()*/);
1868 #ifdef REGISTER_VIRTUAL_TYPE
1869 fprintf_unfiltered (file
,
1870 "gdbarch_dump: %s # %s\n",
1871 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1872 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1876 (long) current_gdbarch
->register_virtual_type
1877 /*REGISTER_VIRTUAL_TYPE ()*/);
1879 #ifdef REG_STRUCT_HAS_ADDR
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: %s # %s\n",
1882 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1883 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1885 fprintf_unfiltered (file
,
1886 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1887 (long) current_gdbarch
->reg_struct_has_addr
1888 /*REG_STRUCT_HAS_ADDR ()*/);
1890 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1892 /* Macro might contain `[{}]' when not multi-arch */
1893 fprintf_unfiltered (file
,
1894 "gdbarch_dump: %s # %s\n",
1895 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1896 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1901 (long) current_gdbarch
->remote_translate_xfer_address
1902 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1904 #ifdef RETURN_VALUE_ON_STACK
1905 fprintf_unfiltered (file
,
1906 "gdbarch_dump: %s # %s\n",
1907 "RETURN_VALUE_ON_STACK(type)",
1908 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1912 (long) current_gdbarch
->return_value_on_stack
1913 /*RETURN_VALUE_ON_STACK ()*/);
1915 #ifdef SAVED_PC_AFTER_CALL
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: %s # %s\n",
1918 "SAVED_PC_AFTER_CALL(frame)",
1919 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1921 fprintf_unfiltered (file
,
1922 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1923 (long) current_gdbarch
->saved_pc_after_call
1924 /*SAVED_PC_AFTER_CALL ()*/);
1926 #ifdef SAVE_DUMMY_FRAME_TOS
1928 /* Macro might contain `[{}]' when not multi-arch */
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: %s # %s\n",
1931 "SAVE_DUMMY_FRAME_TOS(sp)",
1932 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1937 (long) current_gdbarch
->save_dummy_frame_tos
1938 /*SAVE_DUMMY_FRAME_TOS ()*/);
1940 #ifdef SDB_REG_TO_REGNUM
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: %s # %s\n",
1943 "SDB_REG_TO_REGNUM(sdb_regnr)",
1944 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1948 (long) current_gdbarch
->sdb_reg_to_regnum
1949 /*SDB_REG_TO_REGNUM ()*/);
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: %s # %s\n",
1955 XSTRING (SIGTRAMP_END (pc
)));
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: SIGTRAMP_END = 0x%08lx\n",
1959 (long) current_gdbarch
->sigtramp_end
1960 /*SIGTRAMP_END ()*/);
1962 #ifdef SIGTRAMP_START
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: %s # %s\n",
1965 "SIGTRAMP_START(pc)",
1966 XSTRING (SIGTRAMP_START (pc
)));
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: SIGTRAMP_START = 0x%08lx\n",
1970 (long) current_gdbarch
->sigtramp_start
1971 /*SIGTRAMP_START ()*/);
1973 #ifdef SIZEOF_CALL_DUMMY_WORDS
1974 fprintf_unfiltered (file
,
1975 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1976 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1977 fprintf_unfiltered (file
,
1978 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1979 (long) SIZEOF_CALL_DUMMY_WORDS
);
1981 #ifdef SKIP_PROLOGUE
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: %s # %s\n",
1984 "SKIP_PROLOGUE(ip)",
1985 XSTRING (SKIP_PROLOGUE (ip
)));
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1989 (long) current_gdbarch
->skip_prologue
1990 /*SKIP_PROLOGUE ()*/);
1992 #ifdef SKIP_TRAMPOLINE_CODE
1993 fprintf_unfiltered (file
,
1994 "gdbarch_dump: %s # %s\n",
1995 "SKIP_TRAMPOLINE_CODE(pc)",
1996 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
2000 (long) current_gdbarch
->skip_trampoline_code
2001 /*SKIP_TRAMPOLINE_CODE ()*/);
2003 #ifdef SMASH_TEXT_ADDRESS
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: %s # %s\n",
2006 "SMASH_TEXT_ADDRESS(addr)",
2007 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
2011 (long) current_gdbarch
->smash_text_address
2012 /*SMASH_TEXT_ADDRESS ()*/);
2014 #ifdef SOFTWARE_SINGLE_STEP
2016 /* Macro might contain `[{}]' when not multi-arch */
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: %s # %s\n",
2019 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2020 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2023 fprintf_unfiltered (file
,
2024 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2025 (long) current_gdbarch
->software_single_step
2026 /*SOFTWARE_SINGLE_STEP ()*/);
2029 fprintf_unfiltered (file
,
2030 "gdbarch_dump: SP_REGNUM # %s\n",
2031 XSTRING (SP_REGNUM
));
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: SP_REGNUM = %d\n",
2036 #ifdef STAB_REG_TO_REGNUM
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: %s # %s\n",
2039 "STAB_REG_TO_REGNUM(stab_regnr)",
2040 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2042 fprintf_unfiltered (file
,
2043 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
2044 (long) current_gdbarch
->stab_reg_to_regnum
2045 /*STAB_REG_TO_REGNUM ()*/);
2048 fprintf_unfiltered (file
,
2049 "gdbarch_dump: %s # %s\n",
2051 XSTRING (STACK_ALIGN (sp
)));
2053 fprintf_unfiltered (file
,
2054 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2055 (long) current_gdbarch
->stack_align
2056 /*STACK_ALIGN ()*/);
2058 #ifdef STORE_RETURN_VALUE
2060 /* Macro might contain `[{}]' when not multi-arch */
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: %s # %s\n",
2063 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2064 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
2069 (long) current_gdbarch
->store_return_value
2070 /*STORE_RETURN_VALUE ()*/);
2072 #ifdef STORE_STRUCT_RETURN
2074 /* Macro might contain `[{}]' when not multi-arch */
2075 fprintf_unfiltered (file
,
2076 "gdbarch_dump: %s # %s\n",
2077 "STORE_STRUCT_RETURN(addr, sp)",
2078 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
2083 (long) current_gdbarch
->store_struct_return
2084 /*STORE_STRUCT_RETURN ()*/);
2086 #ifdef TARGET_ADDR_BIT
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2089 XSTRING (TARGET_ADDR_BIT
));
2090 fprintf_unfiltered (file
,
2091 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2094 #ifdef TARGET_ARCHITECTURE
2095 fprintf_unfiltered (file
,
2096 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2097 XSTRING (TARGET_ARCHITECTURE
));
2098 if (TARGET_ARCHITECTURE
!= NULL
)
2099 fprintf_unfiltered (file
,
2100 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2101 TARGET_ARCHITECTURE
->printable_name
);
2103 #ifdef TARGET_BFD_VMA_BIT
2104 fprintf_unfiltered (file
,
2105 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2106 XSTRING (TARGET_BFD_VMA_BIT
));
2107 fprintf_unfiltered (file
,
2108 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2109 TARGET_BFD_VMA_BIT
);
2111 #ifdef TARGET_BYTE_ORDER
2112 fprintf_unfiltered (file
,
2113 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2114 XSTRING (TARGET_BYTE_ORDER
));
2115 fprintf_unfiltered (file
,
2116 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2117 (long) TARGET_BYTE_ORDER
);
2119 #ifdef TARGET_CHAR_SIGNED
2120 fprintf_unfiltered (file
,
2121 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2122 XSTRING (TARGET_CHAR_SIGNED
));
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2125 TARGET_CHAR_SIGNED
);
2127 #ifdef TARGET_DOUBLE_BIT
2128 fprintf_unfiltered (file
,
2129 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2130 XSTRING (TARGET_DOUBLE_BIT
));
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2135 #ifdef TARGET_DOUBLE_FORMAT
2136 fprintf_unfiltered (file
,
2137 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2138 XSTRING (TARGET_DOUBLE_FORMAT
));
2139 fprintf_unfiltered (file
,
2140 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2141 (long) TARGET_DOUBLE_FORMAT
);
2143 #ifdef TARGET_FLOAT_BIT
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2146 XSTRING (TARGET_FLOAT_BIT
));
2147 fprintf_unfiltered (file
,
2148 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2151 #ifdef TARGET_FLOAT_FORMAT
2152 fprintf_unfiltered (file
,
2153 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2154 XSTRING (TARGET_FLOAT_FORMAT
));
2155 fprintf_unfiltered (file
,
2156 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2157 (long) TARGET_FLOAT_FORMAT
);
2159 #ifdef TARGET_INT_BIT
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2162 XSTRING (TARGET_INT_BIT
));
2163 fprintf_unfiltered (file
,
2164 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2167 #ifdef TARGET_LONG_BIT
2168 fprintf_unfiltered (file
,
2169 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2170 XSTRING (TARGET_LONG_BIT
));
2171 fprintf_unfiltered (file
,
2172 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2175 #ifdef TARGET_LONG_DOUBLE_BIT
2176 fprintf_unfiltered (file
,
2177 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2178 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2179 fprintf_unfiltered (file
,
2180 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2181 TARGET_LONG_DOUBLE_BIT
);
2183 #ifdef TARGET_LONG_DOUBLE_FORMAT
2184 fprintf_unfiltered (file
,
2185 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2186 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2187 fprintf_unfiltered (file
,
2188 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2189 (long) TARGET_LONG_DOUBLE_FORMAT
);
2191 #ifdef TARGET_LONG_LONG_BIT
2192 fprintf_unfiltered (file
,
2193 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2194 XSTRING (TARGET_LONG_LONG_BIT
));
2195 fprintf_unfiltered (file
,
2196 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2197 TARGET_LONG_LONG_BIT
);
2199 #ifdef TARGET_PRINT_INSN
2200 fprintf_unfiltered (file
,
2201 "gdbarch_dump: %s # %s\n",
2202 "TARGET_PRINT_INSN(vma, info)",
2203 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2205 fprintf_unfiltered (file
,
2206 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2207 (long) current_gdbarch
->print_insn
2208 /*TARGET_PRINT_INSN ()*/);
2210 #ifdef TARGET_PTR_BIT
2211 fprintf_unfiltered (file
,
2212 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2213 XSTRING (TARGET_PTR_BIT
));
2214 fprintf_unfiltered (file
,
2215 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2218 #ifdef TARGET_READ_FP
2219 fprintf_unfiltered (file
,
2220 "gdbarch_dump: %s # %s\n",
2222 XSTRING (TARGET_READ_FP ()));
2224 fprintf_unfiltered (file
,
2225 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2226 (long) current_gdbarch
->read_fp
2227 /*TARGET_READ_FP ()*/);
2229 #ifdef TARGET_READ_PC
2230 fprintf_unfiltered (file
,
2231 "gdbarch_dump: %s # %s\n",
2232 "TARGET_READ_PC(ptid)",
2233 XSTRING (TARGET_READ_PC (ptid
)));
2235 fprintf_unfiltered (file
,
2236 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2237 (long) current_gdbarch
->read_pc
2238 /*TARGET_READ_PC ()*/);
2240 #ifdef TARGET_READ_SP
2241 fprintf_unfiltered (file
,
2242 "gdbarch_dump: %s # %s\n",
2244 XSTRING (TARGET_READ_SP ()));
2246 fprintf_unfiltered (file
,
2247 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2248 (long) current_gdbarch
->read_sp
2249 /*TARGET_READ_SP ()*/);
2251 #ifdef TARGET_SHORT_BIT
2252 fprintf_unfiltered (file
,
2253 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2254 XSTRING (TARGET_SHORT_BIT
));
2255 fprintf_unfiltered (file
,
2256 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2259 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2261 /* Macro might contain `[{}]' when not multi-arch */
2262 fprintf_unfiltered (file
,
2263 "gdbarch_dump: %s # %s\n",
2264 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2265 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2268 fprintf_unfiltered (file
,
2269 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2270 (long) current_gdbarch
->virtual_frame_pointer
2271 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2273 #ifdef TARGET_WRITE_PC
2275 /* Macro might contain `[{}]' when not multi-arch */
2276 fprintf_unfiltered (file
,
2277 "gdbarch_dump: %s # %s\n",
2278 "TARGET_WRITE_PC(val, ptid)",
2279 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2282 fprintf_unfiltered (file
,
2283 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2284 (long) current_gdbarch
->write_pc
2285 /*TARGET_WRITE_PC ()*/);
2287 #ifdef TARGET_WRITE_SP
2289 /* Macro might contain `[{}]' when not multi-arch */
2290 fprintf_unfiltered (file
,
2291 "gdbarch_dump: %s # %s\n",
2292 "TARGET_WRITE_SP(val)",
2293 XSTRING (TARGET_WRITE_SP (val
)));
2296 fprintf_unfiltered (file
,
2297 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2298 (long) current_gdbarch
->write_sp
2299 /*TARGET_WRITE_SP ()*/);
2301 #ifdef USE_GENERIC_DUMMY_FRAMES
2302 fprintf_unfiltered (file
,
2303 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2304 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2305 fprintf_unfiltered (file
,
2306 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2307 USE_GENERIC_DUMMY_FRAMES
);
2309 #ifdef USE_STRUCT_CONVENTION
2310 fprintf_unfiltered (file
,
2311 "gdbarch_dump: %s # %s\n",
2312 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2313 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2315 fprintf_unfiltered (file
,
2316 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2317 (long) current_gdbarch
->use_struct_convention
2318 /*USE_STRUCT_CONVENTION ()*/);
2320 #ifdef VALUE_TO_REGISTER
2322 /* Macro might contain `[{}]' when not multi-arch */
2323 fprintf_unfiltered (file
,
2324 "gdbarch_dump: %s # %s\n",
2325 "VALUE_TO_REGISTER(type, regnum, from, to)",
2326 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2329 fprintf_unfiltered (file
,
2330 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2331 (long) current_gdbarch
->value_to_register
2332 /*VALUE_TO_REGISTER ()*/);
2334 if (current_gdbarch
->dump_tdep
!= NULL
)
2335 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2338 struct gdbarch_tdep
*
2339 gdbarch_tdep (struct gdbarch
*gdbarch
)
2341 if (gdbarch_debug
>= 2)
2342 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2343 return gdbarch
->tdep
;
2347 const struct bfd_arch_info
*
2348 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2350 gdb_assert (gdbarch
!= NULL
);
2351 if (gdbarch_debug
>= 2)
2352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2353 return gdbarch
->bfd_arch_info
;
2357 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2359 gdb_assert (gdbarch
!= NULL
);
2360 if (gdbarch_debug
>= 2)
2361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2362 return gdbarch
->byte_order
;
2366 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2368 gdb_assert (gdbarch
!= NULL
);
2369 /* Skip verify of short_bit, invalid_p == 0 */
2370 if (gdbarch_debug
>= 2)
2371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2372 return gdbarch
->short_bit
;
2376 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2379 gdbarch
->short_bit
= short_bit
;
2383 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2385 gdb_assert (gdbarch
!= NULL
);
2386 /* Skip verify of int_bit, invalid_p == 0 */
2387 if (gdbarch_debug
>= 2)
2388 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2389 return gdbarch
->int_bit
;
2393 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2396 gdbarch
->int_bit
= int_bit
;
2400 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2402 gdb_assert (gdbarch
!= NULL
);
2403 /* Skip verify of long_bit, invalid_p == 0 */
2404 if (gdbarch_debug
>= 2)
2405 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2406 return gdbarch
->long_bit
;
2410 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2413 gdbarch
->long_bit
= long_bit
;
2417 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2419 gdb_assert (gdbarch
!= NULL
);
2420 /* Skip verify of long_long_bit, invalid_p == 0 */
2421 if (gdbarch_debug
>= 2)
2422 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2423 return gdbarch
->long_long_bit
;
2427 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2430 gdbarch
->long_long_bit
= long_long_bit
;
2434 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2436 gdb_assert (gdbarch
!= NULL
);
2437 /* Skip verify of float_bit, invalid_p == 0 */
2438 if (gdbarch_debug
>= 2)
2439 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2440 return gdbarch
->float_bit
;
2444 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2447 gdbarch
->float_bit
= float_bit
;
2451 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2453 gdb_assert (gdbarch
!= NULL
);
2454 /* Skip verify of double_bit, invalid_p == 0 */
2455 if (gdbarch_debug
>= 2)
2456 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2457 return gdbarch
->double_bit
;
2461 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2464 gdbarch
->double_bit
= double_bit
;
2468 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2470 gdb_assert (gdbarch
!= NULL
);
2471 /* Skip verify of long_double_bit, invalid_p == 0 */
2472 if (gdbarch_debug
>= 2)
2473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2474 return gdbarch
->long_double_bit
;
2478 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2479 int long_double_bit
)
2481 gdbarch
->long_double_bit
= long_double_bit
;
2485 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2487 gdb_assert (gdbarch
!= NULL
);
2488 /* Skip verify of ptr_bit, invalid_p == 0 */
2489 if (gdbarch_debug
>= 2)
2490 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2491 return gdbarch
->ptr_bit
;
2495 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2498 gdbarch
->ptr_bit
= ptr_bit
;
2502 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2504 gdb_assert (gdbarch
!= NULL
);
2505 if (gdbarch
->addr_bit
== 0)
2506 internal_error (__FILE__
, __LINE__
,
2507 "gdbarch: gdbarch_addr_bit invalid");
2508 if (gdbarch_debug
>= 2)
2509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2510 return gdbarch
->addr_bit
;
2514 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2517 gdbarch
->addr_bit
= addr_bit
;
2521 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2523 gdb_assert (gdbarch
!= NULL
);
2524 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2525 if (gdbarch_debug
>= 2)
2526 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2527 return gdbarch
->bfd_vma_bit
;
2531 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2534 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2538 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2540 gdb_assert (gdbarch
!= NULL
);
2541 if (gdbarch
->char_signed
== -1)
2542 internal_error (__FILE__
, __LINE__
,
2543 "gdbarch: gdbarch_char_signed invalid");
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2546 return gdbarch
->char_signed
;
2550 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2553 gdbarch
->char_signed
= char_signed
;
2557 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2559 gdb_assert (gdbarch
!= NULL
);
2560 if (gdbarch
->read_pc
== 0)
2561 internal_error (__FILE__
, __LINE__
,
2562 "gdbarch: gdbarch_read_pc invalid");
2563 if (gdbarch_debug
>= 2)
2564 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2565 return gdbarch
->read_pc (ptid
);
2569 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2570 gdbarch_read_pc_ftype read_pc
)
2572 gdbarch
->read_pc
= read_pc
;
2576 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2578 gdb_assert (gdbarch
!= NULL
);
2579 if (gdbarch
->write_pc
== 0)
2580 internal_error (__FILE__
, __LINE__
,
2581 "gdbarch: gdbarch_write_pc invalid");
2582 if (gdbarch_debug
>= 2)
2583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2584 gdbarch
->write_pc (val
, ptid
);
2588 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2589 gdbarch_write_pc_ftype write_pc
)
2591 gdbarch
->write_pc
= write_pc
;
2595 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2597 gdb_assert (gdbarch
!= NULL
);
2598 if (gdbarch
->read_fp
== 0)
2599 internal_error (__FILE__
, __LINE__
,
2600 "gdbarch: gdbarch_read_fp invalid");
2601 if (gdbarch_debug
>= 2)
2602 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2603 return gdbarch
->read_fp ();
2607 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2608 gdbarch_read_fp_ftype read_fp
)
2610 gdbarch
->read_fp
= read_fp
;
2614 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2616 gdb_assert (gdbarch
!= NULL
);
2617 if (gdbarch
->read_sp
== 0)
2618 internal_error (__FILE__
, __LINE__
,
2619 "gdbarch: gdbarch_read_sp invalid");
2620 if (gdbarch_debug
>= 2)
2621 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2622 return gdbarch
->read_sp ();
2626 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2627 gdbarch_read_sp_ftype read_sp
)
2629 gdbarch
->read_sp
= read_sp
;
2633 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2635 gdb_assert (gdbarch
!= NULL
);
2636 if (gdbarch
->write_sp
== 0)
2637 internal_error (__FILE__
, __LINE__
,
2638 "gdbarch: gdbarch_write_sp invalid");
2639 if (gdbarch_debug
>= 2)
2640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2641 gdbarch
->write_sp (val
);
2645 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2646 gdbarch_write_sp_ftype write_sp
)
2648 gdbarch
->write_sp
= write_sp
;
2652 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2654 gdb_assert (gdbarch
!= NULL
);
2655 if (gdbarch
->virtual_frame_pointer
== 0)
2656 internal_error (__FILE__
, __LINE__
,
2657 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2658 if (gdbarch_debug
>= 2)
2659 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2660 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2664 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2665 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2667 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2671 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2673 gdb_assert (gdbarch
!= NULL
);
2674 return gdbarch
->pseudo_register_read
!= 0;
2678 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2680 gdb_assert (gdbarch
!= NULL
);
2681 if (gdbarch
->pseudo_register_read
== 0)
2682 internal_error (__FILE__
, __LINE__
,
2683 "gdbarch: gdbarch_pseudo_register_read invalid");
2684 if (gdbarch_debug
>= 2)
2685 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2686 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2690 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2691 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2693 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2697 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2699 gdb_assert (gdbarch
!= NULL
);
2700 return gdbarch
->pseudo_register_write
!= 0;
2704 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2706 gdb_assert (gdbarch
!= NULL
);
2707 if (gdbarch
->pseudo_register_write
== 0)
2708 internal_error (__FILE__
, __LINE__
,
2709 "gdbarch: gdbarch_pseudo_register_write invalid");
2710 if (gdbarch_debug
>= 2)
2711 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2712 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2716 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2717 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2719 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2723 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2725 gdb_assert (gdbarch
!= NULL
);
2726 if (gdbarch
->num_regs
== -1)
2727 internal_error (__FILE__
, __LINE__
,
2728 "gdbarch: gdbarch_num_regs invalid");
2729 if (gdbarch_debug
>= 2)
2730 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2731 return gdbarch
->num_regs
;
2735 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2738 gdbarch
->num_regs
= num_regs
;
2742 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2744 gdb_assert (gdbarch
!= NULL
);
2745 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2746 if (gdbarch_debug
>= 2)
2747 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2748 return gdbarch
->num_pseudo_regs
;
2752 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2753 int num_pseudo_regs
)
2755 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2759 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2761 gdb_assert (gdbarch
!= NULL
);
2762 /* Skip verify of sp_regnum, invalid_p == 0 */
2763 if (gdbarch_debug
>= 2)
2764 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2765 return gdbarch
->sp_regnum
;
2769 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2772 gdbarch
->sp_regnum
= sp_regnum
;
2776 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2778 gdb_assert (gdbarch
!= NULL
);
2779 /* Skip verify of fp_regnum, invalid_p == 0 */
2780 if (gdbarch_debug
>= 2)
2781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2782 return gdbarch
->fp_regnum
;
2786 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2789 gdbarch
->fp_regnum
= fp_regnum
;
2793 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2795 gdb_assert (gdbarch
!= NULL
);
2796 /* Skip verify of pc_regnum, invalid_p == 0 */
2797 if (gdbarch_debug
>= 2)
2798 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2799 return gdbarch
->pc_regnum
;
2803 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2806 gdbarch
->pc_regnum
= pc_regnum
;
2810 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2812 gdb_assert (gdbarch
!= NULL
);
2813 /* Skip verify of ps_regnum, invalid_p == 0 */
2814 if (gdbarch_debug
>= 2)
2815 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2816 return gdbarch
->ps_regnum
;
2820 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2823 gdbarch
->ps_regnum
= ps_regnum
;
2827 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2829 gdb_assert (gdbarch
!= NULL
);
2830 /* Skip verify of fp0_regnum, invalid_p == 0 */
2831 if (gdbarch_debug
>= 2)
2832 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2833 return gdbarch
->fp0_regnum
;
2837 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2840 gdbarch
->fp0_regnum
= fp0_regnum
;
2844 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2846 gdb_assert (gdbarch
!= NULL
);
2847 /* Skip verify of npc_regnum, invalid_p == 0 */
2848 if (gdbarch_debug
>= 2)
2849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2850 return gdbarch
->npc_regnum
;
2854 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2857 gdbarch
->npc_regnum
= npc_regnum
;
2861 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2863 gdb_assert (gdbarch
!= NULL
);
2864 if (gdbarch
->stab_reg_to_regnum
== 0)
2865 internal_error (__FILE__
, __LINE__
,
2866 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2867 if (gdbarch_debug
>= 2)
2868 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2869 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2873 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2874 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2876 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2880 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2882 gdb_assert (gdbarch
!= NULL
);
2883 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2884 internal_error (__FILE__
, __LINE__
,
2885 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2886 if (gdbarch_debug
>= 2)
2887 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2888 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2892 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2893 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2895 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2899 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2901 gdb_assert (gdbarch
!= NULL
);
2902 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2903 internal_error (__FILE__
, __LINE__
,
2904 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2905 if (gdbarch_debug
>= 2)
2906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2907 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2911 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2912 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2914 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2918 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2920 gdb_assert (gdbarch
!= NULL
);
2921 if (gdbarch
->sdb_reg_to_regnum
== 0)
2922 internal_error (__FILE__
, __LINE__
,
2923 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2924 if (gdbarch_debug
>= 2)
2925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2926 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2930 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2931 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2933 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2937 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2939 gdb_assert (gdbarch
!= NULL
);
2940 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2941 internal_error (__FILE__
, __LINE__
,
2942 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2943 if (gdbarch_debug
>= 2)
2944 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2945 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2949 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2950 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2952 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2956 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2958 gdb_assert (gdbarch
!= NULL
);
2959 if (gdbarch
->register_name
== 0)
2960 internal_error (__FILE__
, __LINE__
,
2961 "gdbarch: gdbarch_register_name invalid");
2962 if (gdbarch_debug
>= 2)
2963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2964 return gdbarch
->register_name (regnr
);
2968 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2969 gdbarch_register_name_ftype register_name
)
2971 gdbarch
->register_name
= register_name
;
2975 gdbarch_register_size (struct gdbarch
*gdbarch
)
2977 gdb_assert (gdbarch
!= NULL
);
2978 if (gdbarch
->register_size
== -1)
2979 internal_error (__FILE__
, __LINE__
,
2980 "gdbarch: gdbarch_register_size invalid");
2981 if (gdbarch_debug
>= 2)
2982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2983 return gdbarch
->register_size
;
2987 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2990 gdbarch
->register_size
= register_size
;
2994 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2996 gdb_assert (gdbarch
!= NULL
);
2997 if (gdbarch
->register_bytes
== -1)
2998 internal_error (__FILE__
, __LINE__
,
2999 "gdbarch: gdbarch_register_bytes invalid");
3000 if (gdbarch_debug
>= 2)
3001 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
3002 return gdbarch
->register_bytes
;
3006 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
3009 gdbarch
->register_bytes
= register_bytes
;
3013 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3015 gdb_assert (gdbarch
!= NULL
);
3016 if (gdbarch
->register_byte
== 0)
3017 internal_error (__FILE__
, __LINE__
,
3018 "gdbarch: gdbarch_register_byte invalid");
3019 if (gdbarch_debug
>= 2)
3020 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
3021 return gdbarch
->register_byte (reg_nr
);
3025 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
3026 gdbarch_register_byte_ftype register_byte
)
3028 gdbarch
->register_byte
= register_byte
;
3032 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3034 gdb_assert (gdbarch
!= NULL
);
3035 if (gdbarch
->register_raw_size
== 0)
3036 internal_error (__FILE__
, __LINE__
,
3037 "gdbarch: gdbarch_register_raw_size invalid");
3038 if (gdbarch_debug
>= 2)
3039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
3040 return gdbarch
->register_raw_size (reg_nr
);
3044 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
3045 gdbarch_register_raw_size_ftype register_raw_size
)
3047 gdbarch
->register_raw_size
= register_raw_size
;
3051 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
3053 gdb_assert (gdbarch
!= NULL
);
3054 if (gdbarch
->max_register_raw_size
== -1)
3055 internal_error (__FILE__
, __LINE__
,
3056 "gdbarch: gdbarch_max_register_raw_size invalid");
3057 if (gdbarch_debug
>= 2)
3058 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
3059 return gdbarch
->max_register_raw_size
;
3063 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
3064 int max_register_raw_size
)
3066 gdbarch
->max_register_raw_size
= max_register_raw_size
;
3070 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3072 gdb_assert (gdbarch
!= NULL
);
3073 if (gdbarch
->register_virtual_size
== 0)
3074 internal_error (__FILE__
, __LINE__
,
3075 "gdbarch: gdbarch_register_virtual_size invalid");
3076 if (gdbarch_debug
>= 2)
3077 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3078 return gdbarch
->register_virtual_size (reg_nr
);
3082 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3083 gdbarch_register_virtual_size_ftype register_virtual_size
)
3085 gdbarch
->register_virtual_size
= register_virtual_size
;
3089 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
3091 gdb_assert (gdbarch
!= NULL
);
3092 if (gdbarch
->max_register_virtual_size
== -1)
3093 internal_error (__FILE__
, __LINE__
,
3094 "gdbarch: gdbarch_max_register_virtual_size invalid");
3095 if (gdbarch_debug
>= 2)
3096 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
3097 return gdbarch
->max_register_virtual_size
;
3101 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
3102 int max_register_virtual_size
)
3104 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
3108 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3110 gdb_assert (gdbarch
!= NULL
);
3111 if (gdbarch
->register_virtual_type
== 0)
3112 internal_error (__FILE__
, __LINE__
,
3113 "gdbarch: gdbarch_register_virtual_type invalid");
3114 if (gdbarch_debug
>= 2)
3115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3116 return gdbarch
->register_virtual_type (reg_nr
);
3120 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3121 gdbarch_register_virtual_type_ftype register_virtual_type
)
3123 gdbarch
->register_virtual_type
= register_virtual_type
;
3127 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3129 gdb_assert (gdbarch
!= NULL
);
3130 return gdbarch
->deprecated_do_registers_info
!= 0;
3134 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3136 gdb_assert (gdbarch
!= NULL
);
3137 if (gdbarch
->deprecated_do_registers_info
== 0)
3138 internal_error (__FILE__
, __LINE__
,
3139 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3140 if (gdbarch_debug
>= 2)
3141 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3142 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3146 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3147 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3149 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3153 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3155 gdb_assert (gdbarch
!= NULL
);
3156 if (gdbarch
->print_registers_info
== 0)
3157 internal_error (__FILE__
, __LINE__
,
3158 "gdbarch: gdbarch_print_registers_info invalid");
3159 if (gdbarch_debug
>= 2)
3160 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3161 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3165 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3166 gdbarch_print_registers_info_ftype print_registers_info
)
3168 gdbarch
->print_registers_info
= print_registers_info
;
3172 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3174 gdb_assert (gdbarch
!= NULL
);
3175 return gdbarch
->print_float_info
!= 0;
3179 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3181 gdb_assert (gdbarch
!= NULL
);
3182 if (gdbarch
->print_float_info
== 0)
3183 internal_error (__FILE__
, __LINE__
,
3184 "gdbarch: gdbarch_print_float_info invalid");
3185 if (gdbarch_debug
>= 2)
3186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3187 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3191 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3192 gdbarch_print_float_info_ftype print_float_info
)
3194 gdbarch
->print_float_info
= print_float_info
;
3198 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3200 gdb_assert (gdbarch
!= NULL
);
3201 return gdbarch
->print_vector_info
!= 0;
3205 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3207 gdb_assert (gdbarch
!= NULL
);
3208 if (gdbarch
->print_vector_info
== 0)
3209 internal_error (__FILE__
, __LINE__
,
3210 "gdbarch: gdbarch_print_vector_info invalid");
3211 if (gdbarch_debug
>= 2)
3212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3213 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3217 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3218 gdbarch_print_vector_info_ftype print_vector_info
)
3220 gdbarch
->print_vector_info
= print_vector_info
;
3224 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3226 gdb_assert (gdbarch
!= NULL
);
3227 if (gdbarch
->register_sim_regno
== 0)
3228 internal_error (__FILE__
, __LINE__
,
3229 "gdbarch: gdbarch_register_sim_regno invalid");
3230 if (gdbarch_debug
>= 2)
3231 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3232 return gdbarch
->register_sim_regno (reg_nr
);
3236 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3237 gdbarch_register_sim_regno_ftype register_sim_regno
)
3239 gdbarch
->register_sim_regno
= register_sim_regno
;
3243 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3245 gdb_assert (gdbarch
!= NULL
);
3246 return gdbarch
->register_bytes_ok
!= 0;
3250 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3252 gdb_assert (gdbarch
!= NULL
);
3253 if (gdbarch
->register_bytes_ok
== 0)
3254 internal_error (__FILE__
, __LINE__
,
3255 "gdbarch: gdbarch_register_bytes_ok invalid");
3256 if (gdbarch_debug
>= 2)
3257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3258 return gdbarch
->register_bytes_ok (nr_bytes
);
3262 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3263 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3265 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3269 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3271 gdb_assert (gdbarch
!= NULL
);
3272 if (gdbarch
->cannot_fetch_register
== 0)
3273 internal_error (__FILE__
, __LINE__
,
3274 "gdbarch: gdbarch_cannot_fetch_register invalid");
3275 if (gdbarch_debug
>= 2)
3276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3277 return gdbarch
->cannot_fetch_register (regnum
);
3281 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3282 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3284 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3288 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3290 gdb_assert (gdbarch
!= NULL
);
3291 if (gdbarch
->cannot_store_register
== 0)
3292 internal_error (__FILE__
, __LINE__
,
3293 "gdbarch: gdbarch_cannot_store_register invalid");
3294 if (gdbarch_debug
>= 2)
3295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3296 return gdbarch
->cannot_store_register (regnum
);
3300 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3301 gdbarch_cannot_store_register_ftype cannot_store_register
)
3303 gdbarch
->cannot_store_register
= cannot_store_register
;
3307 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3309 gdb_assert (gdbarch
!= NULL
);
3310 return gdbarch
->get_longjmp_target
!= 0;
3314 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3316 gdb_assert (gdbarch
!= NULL
);
3317 if (gdbarch
->get_longjmp_target
== 0)
3318 internal_error (__FILE__
, __LINE__
,
3319 "gdbarch: gdbarch_get_longjmp_target invalid");
3320 if (gdbarch_debug
>= 2)
3321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3322 return gdbarch
->get_longjmp_target (pc
);
3326 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3327 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3329 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3333 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3335 gdb_assert (gdbarch
!= NULL
);
3336 if (gdbarch
->use_generic_dummy_frames
== -1)
3337 internal_error (__FILE__
, __LINE__
,
3338 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3339 if (gdbarch_debug
>= 2)
3340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3341 return gdbarch
->use_generic_dummy_frames
;
3345 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3346 int use_generic_dummy_frames
)
3348 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3352 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3354 gdb_assert (gdbarch
!= NULL
);
3355 if (gdbarch
->call_dummy_location
== 0)
3356 internal_error (__FILE__
, __LINE__
,
3357 "gdbarch: gdbarch_call_dummy_location invalid");
3358 if (gdbarch_debug
>= 2)
3359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3360 return gdbarch
->call_dummy_location
;
3364 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3365 int call_dummy_location
)
3367 gdbarch
->call_dummy_location
= call_dummy_location
;
3371 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3373 gdb_assert (gdbarch
!= NULL
);
3374 if (gdbarch
->call_dummy_address
== 0)
3375 internal_error (__FILE__
, __LINE__
,
3376 "gdbarch: gdbarch_call_dummy_address invalid");
3377 if (gdbarch_debug
>= 2)
3378 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3379 return gdbarch
->call_dummy_address ();
3383 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3384 gdbarch_call_dummy_address_ftype call_dummy_address
)
3386 gdbarch
->call_dummy_address
= call_dummy_address
;
3390 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3392 gdb_assert (gdbarch
!= NULL
);
3393 if (gdbarch
->call_dummy_start_offset
== -1)
3394 internal_error (__FILE__
, __LINE__
,
3395 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3396 if (gdbarch_debug
>= 2)
3397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3398 return gdbarch
->call_dummy_start_offset
;
3402 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3403 CORE_ADDR call_dummy_start_offset
)
3405 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3409 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3411 gdb_assert (gdbarch
!= NULL
);
3412 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3413 internal_error (__FILE__
, __LINE__
,
3414 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3415 if (gdbarch_debug
>= 2)
3416 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3417 return gdbarch
->call_dummy_breakpoint_offset
;
3421 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3422 CORE_ADDR call_dummy_breakpoint_offset
)
3424 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3428 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3430 gdb_assert (gdbarch
!= NULL
);
3431 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3432 internal_error (__FILE__
, __LINE__
,
3433 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3434 if (gdbarch_debug
>= 2)
3435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3436 return gdbarch
->call_dummy_breakpoint_offset_p
;
3440 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3441 int call_dummy_breakpoint_offset_p
)
3443 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3447 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3449 gdb_assert (gdbarch
!= NULL
);
3450 if (gdbarch
->call_dummy_length
== -1)
3451 internal_error (__FILE__
, __LINE__
,
3452 "gdbarch: gdbarch_call_dummy_length invalid");
3453 if (gdbarch_debug
>= 2)
3454 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3455 return gdbarch
->call_dummy_length
;
3459 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3460 int call_dummy_length
)
3462 gdbarch
->call_dummy_length
= call_dummy_length
;
3466 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3468 gdb_assert (gdbarch
!= NULL
);
3469 if (gdbarch
->pc_in_call_dummy
== 0)
3470 internal_error (__FILE__
, __LINE__
,
3471 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3472 if (gdbarch_debug
>= 2)
3473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3474 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3478 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3479 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3481 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3485 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3487 gdb_assert (gdbarch
!= NULL
);
3488 if (gdbarch
->call_dummy_p
== -1)
3489 internal_error (__FILE__
, __LINE__
,
3490 "gdbarch: gdbarch_call_dummy_p invalid");
3491 if (gdbarch_debug
>= 2)
3492 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3493 return gdbarch
->call_dummy_p
;
3497 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3500 gdbarch
->call_dummy_p
= call_dummy_p
;
3504 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3506 gdb_assert (gdbarch
!= NULL
);
3507 /* Skip verify of call_dummy_words, invalid_p == 0 */
3508 if (gdbarch_debug
>= 2)
3509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3510 return gdbarch
->call_dummy_words
;
3514 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3515 LONGEST
* call_dummy_words
)
3517 gdbarch
->call_dummy_words
= call_dummy_words
;
3521 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3523 gdb_assert (gdbarch
!= NULL
);
3524 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3525 if (gdbarch_debug
>= 2)
3526 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3527 return gdbarch
->sizeof_call_dummy_words
;
3531 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3532 int sizeof_call_dummy_words
)
3534 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3538 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3540 gdb_assert (gdbarch
!= NULL
);
3541 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3542 internal_error (__FILE__
, __LINE__
,
3543 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3544 if (gdbarch_debug
>= 2)
3545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3546 return gdbarch
->call_dummy_stack_adjust_p
;
3550 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3551 int call_dummy_stack_adjust_p
)
3553 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3557 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3559 gdb_assert (gdbarch
!= NULL
);
3560 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3561 internal_error (__FILE__
, __LINE__
,
3562 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3563 if (gdbarch_debug
>= 2)
3564 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3565 return gdbarch
->call_dummy_stack_adjust
;
3569 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3570 int call_dummy_stack_adjust
)
3572 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3576 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
)
3578 gdb_assert (gdbarch
!= NULL
);
3579 if (gdbarch
->fix_call_dummy
== 0)
3580 internal_error (__FILE__
, __LINE__
,
3581 "gdbarch: gdbarch_fix_call_dummy invalid");
3582 if (gdbarch_debug
>= 2)
3583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3584 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3588 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3589 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3591 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3595 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3597 gdb_assert (gdbarch
!= NULL
);
3598 if (gdbarch
->init_frame_pc_first
== 0)
3599 internal_error (__FILE__
, __LINE__
,
3600 "gdbarch: gdbarch_init_frame_pc_first invalid");
3601 if (gdbarch_debug
>= 2)
3602 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3603 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3607 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3608 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3610 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3614 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3616 gdb_assert (gdbarch
!= NULL
);
3617 if (gdbarch
->init_frame_pc
== 0)
3618 internal_error (__FILE__
, __LINE__
,
3619 "gdbarch: gdbarch_init_frame_pc invalid");
3620 if (gdbarch_debug
>= 2)
3621 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3622 gdbarch
->init_frame_pc (fromleaf
, prev
);
3626 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3627 gdbarch_init_frame_pc_ftype init_frame_pc
)
3629 gdbarch
->init_frame_pc
= init_frame_pc
;
3633 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3635 gdb_assert (gdbarch
!= NULL
);
3636 if (gdbarch_debug
>= 2)
3637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3638 return gdbarch
->believe_pcc_promotion
;
3642 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3643 int believe_pcc_promotion
)
3645 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3649 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3651 gdb_assert (gdbarch
!= NULL
);
3652 if (gdbarch_debug
>= 2)
3653 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3654 return gdbarch
->believe_pcc_promotion_type
;
3658 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3659 int believe_pcc_promotion_type
)
3661 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3665 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3667 gdb_assert (gdbarch
!= NULL
);
3668 if (gdbarch
->coerce_float_to_double
== 0)
3669 internal_error (__FILE__
, __LINE__
,
3670 "gdbarch: gdbarch_coerce_float_to_double invalid");
3671 if (gdbarch_debug
>= 2)
3672 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3673 return gdbarch
->coerce_float_to_double (formal
, actual
);
3677 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3678 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3680 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3684 gdbarch_get_saved_register (struct gdbarch
*gdbarch
, char *raw_buffer
, int *optimized
, CORE_ADDR
*addrp
, struct frame_info
*frame
, int regnum
, enum lval_type
*lval
)
3686 gdb_assert (gdbarch
!= NULL
);
3687 if (gdbarch
->get_saved_register
== 0)
3688 internal_error (__FILE__
, __LINE__
,
3689 "gdbarch: gdbarch_get_saved_register invalid");
3690 if (gdbarch_debug
>= 2)
3691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3692 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3696 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3697 gdbarch_get_saved_register_ftype get_saved_register
)
3699 gdbarch
->get_saved_register
= get_saved_register
;
3703 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3705 gdb_assert (gdbarch
!= NULL
);
3706 if (gdbarch
->register_convertible
== 0)
3707 internal_error (__FILE__
, __LINE__
,
3708 "gdbarch: gdbarch_register_convertible invalid");
3709 if (gdbarch_debug
>= 2)
3710 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3711 return gdbarch
->register_convertible (nr
);
3715 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3716 gdbarch_register_convertible_ftype register_convertible
)
3718 gdbarch
->register_convertible
= register_convertible
;
3722 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3724 gdb_assert (gdbarch
!= NULL
);
3725 if (gdbarch
->register_convert_to_virtual
== 0)
3726 internal_error (__FILE__
, __LINE__
,
3727 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3728 if (gdbarch_debug
>= 2)
3729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3730 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3734 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3735 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3737 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3741 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3743 gdb_assert (gdbarch
!= NULL
);
3744 if (gdbarch
->register_convert_to_raw
== 0)
3745 internal_error (__FILE__
, __LINE__
,
3746 "gdbarch: gdbarch_register_convert_to_raw invalid");
3747 if (gdbarch_debug
>= 2)
3748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3749 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3753 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3754 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3756 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3760 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3762 gdb_assert (gdbarch
!= NULL
);
3763 if (gdbarch
->convert_register_p
== 0)
3764 internal_error (__FILE__
, __LINE__
,
3765 "gdbarch: gdbarch_convert_register_p invalid");
3766 if (gdbarch_debug
>= 2)
3767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3768 return gdbarch
->convert_register_p (regnum
);
3772 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3773 gdbarch_convert_register_p_ftype convert_register_p
)
3775 gdbarch
->convert_register_p
= convert_register_p
;
3779 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3781 gdb_assert (gdbarch
!= NULL
);
3782 if (gdbarch
->register_to_value
== 0)
3783 internal_error (__FILE__
, __LINE__
,
3784 "gdbarch: gdbarch_register_to_value invalid");
3785 if (gdbarch_debug
>= 2)
3786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3787 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3791 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3792 gdbarch_register_to_value_ftype register_to_value
)
3794 gdbarch
->register_to_value
= register_to_value
;
3798 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3800 gdb_assert (gdbarch
!= NULL
);
3801 if (gdbarch
->value_to_register
== 0)
3802 internal_error (__FILE__
, __LINE__
,
3803 "gdbarch: gdbarch_value_to_register invalid");
3804 if (gdbarch_debug
>= 2)
3805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3806 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3810 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3811 gdbarch_value_to_register_ftype value_to_register
)
3813 gdbarch
->value_to_register
= value_to_register
;
3817 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3819 gdb_assert (gdbarch
!= NULL
);
3820 if (gdbarch
->pointer_to_address
== 0)
3821 internal_error (__FILE__
, __LINE__
,
3822 "gdbarch: gdbarch_pointer_to_address invalid");
3823 if (gdbarch_debug
>= 2)
3824 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3825 return gdbarch
->pointer_to_address (type
, buf
);
3829 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3830 gdbarch_pointer_to_address_ftype pointer_to_address
)
3832 gdbarch
->pointer_to_address
= pointer_to_address
;
3836 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3838 gdb_assert (gdbarch
!= NULL
);
3839 if (gdbarch
->address_to_pointer
== 0)
3840 internal_error (__FILE__
, __LINE__
,
3841 "gdbarch: gdbarch_address_to_pointer invalid");
3842 if (gdbarch_debug
>= 2)
3843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3844 gdbarch
->address_to_pointer (type
, buf
, addr
);
3848 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3849 gdbarch_address_to_pointer_ftype address_to_pointer
)
3851 gdbarch
->address_to_pointer
= address_to_pointer
;
3855 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3857 gdb_assert (gdbarch
!= NULL
);
3858 return gdbarch
->integer_to_address
!= 0;
3862 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3864 gdb_assert (gdbarch
!= NULL
);
3865 if (gdbarch
->integer_to_address
== 0)
3866 internal_error (__FILE__
, __LINE__
,
3867 "gdbarch: gdbarch_integer_to_address invalid");
3868 if (gdbarch_debug
>= 2)
3869 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3870 return gdbarch
->integer_to_address (type
, buf
);
3874 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3875 gdbarch_integer_to_address_ftype integer_to_address
)
3877 gdbarch
->integer_to_address
= integer_to_address
;
3881 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3883 gdb_assert (gdbarch
!= NULL
);
3884 if (gdbarch
->return_value_on_stack
== 0)
3885 internal_error (__FILE__
, __LINE__
,
3886 "gdbarch: gdbarch_return_value_on_stack invalid");
3887 if (gdbarch_debug
>= 2)
3888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3889 return gdbarch
->return_value_on_stack (type
);
3893 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3894 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3896 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3900 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3902 gdb_assert (gdbarch
!= NULL
);
3903 if (gdbarch
->push_arguments
== 0)
3904 internal_error (__FILE__
, __LINE__
,
3905 "gdbarch: gdbarch_push_arguments invalid");
3906 if (gdbarch_debug
>= 2)
3907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3908 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3912 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3913 gdbarch_push_arguments_ftype push_arguments
)
3915 gdbarch
->push_arguments
= push_arguments
;
3919 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3921 gdb_assert (gdbarch
!= NULL
);
3922 if (gdbarch
->push_dummy_frame
== 0)
3923 internal_error (__FILE__
, __LINE__
,
3924 "gdbarch: gdbarch_push_dummy_frame invalid");
3925 if (gdbarch_debug
>= 2)
3926 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3927 gdbarch
->push_dummy_frame ();
3931 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3932 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3934 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3938 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3940 gdb_assert (gdbarch
!= NULL
);
3941 return gdbarch
->push_return_address
!= 0;
3945 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3947 gdb_assert (gdbarch
!= NULL
);
3948 if (gdbarch
->push_return_address
== 0)
3949 internal_error (__FILE__
, __LINE__
,
3950 "gdbarch: gdbarch_push_return_address invalid");
3951 if (gdbarch_debug
>= 2)
3952 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3953 return gdbarch
->push_return_address (pc
, sp
);
3957 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3958 gdbarch_push_return_address_ftype push_return_address
)
3960 gdbarch
->push_return_address
= push_return_address
;
3964 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3966 gdb_assert (gdbarch
!= NULL
);
3967 if (gdbarch
->pop_frame
== 0)
3968 internal_error (__FILE__
, __LINE__
,
3969 "gdbarch: gdbarch_pop_frame invalid");
3970 if (gdbarch_debug
>= 2)
3971 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3972 gdbarch
->pop_frame ();
3976 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3977 gdbarch_pop_frame_ftype pop_frame
)
3979 gdbarch
->pop_frame
= pop_frame
;
3983 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3985 gdb_assert (gdbarch
!= NULL
);
3986 if (gdbarch
->store_struct_return
== 0)
3987 internal_error (__FILE__
, __LINE__
,
3988 "gdbarch: gdbarch_store_struct_return invalid");
3989 if (gdbarch_debug
>= 2)
3990 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3991 gdbarch
->store_struct_return (addr
, sp
);
3995 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3996 gdbarch_store_struct_return_ftype store_struct_return
)
3998 gdbarch
->store_struct_return
= store_struct_return
;
4002 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4004 gdb_assert (gdbarch
!= NULL
);
4005 if (gdbarch
->extract_return_value
== 0)
4006 internal_error (__FILE__
, __LINE__
,
4007 "gdbarch: gdbarch_extract_return_value invalid");
4008 if (gdbarch_debug
>= 2)
4009 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4010 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4014 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4015 gdbarch_extract_return_value_ftype extract_return_value
)
4017 gdbarch
->extract_return_value
= extract_return_value
;
4021 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4023 gdb_assert (gdbarch
!= NULL
);
4024 if (gdbarch
->store_return_value
== 0)
4025 internal_error (__FILE__
, __LINE__
,
4026 "gdbarch: gdbarch_store_return_value invalid");
4027 if (gdbarch_debug
>= 2)
4028 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4029 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4033 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4034 gdbarch_store_return_value_ftype store_return_value
)
4036 gdbarch
->store_return_value
= store_return_value
;
4040 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4042 gdb_assert (gdbarch
!= NULL
);
4043 if (gdbarch
->deprecated_extract_return_value
== 0)
4044 internal_error (__FILE__
, __LINE__
,
4045 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4046 if (gdbarch_debug
>= 2)
4047 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4048 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4052 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4053 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4055 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4059 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4061 gdb_assert (gdbarch
!= NULL
);
4062 if (gdbarch
->deprecated_store_return_value
== 0)
4063 internal_error (__FILE__
, __LINE__
,
4064 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4065 if (gdbarch_debug
>= 2)
4066 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4067 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4071 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4072 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4074 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4078 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4080 gdb_assert (gdbarch
!= NULL
);
4081 return gdbarch
->extract_struct_value_address
!= 0;
4085 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4087 gdb_assert (gdbarch
!= NULL
);
4088 if (gdbarch
->extract_struct_value_address
== 0)
4089 internal_error (__FILE__
, __LINE__
,
4090 "gdbarch: gdbarch_extract_struct_value_address invalid");
4091 if (gdbarch_debug
>= 2)
4092 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4093 return gdbarch
->extract_struct_value_address (regcache
);
4097 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4098 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4100 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4104 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4106 gdb_assert (gdbarch
!= NULL
);
4107 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4111 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4113 gdb_assert (gdbarch
!= NULL
);
4114 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4115 internal_error (__FILE__
, __LINE__
,
4116 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4117 if (gdbarch_debug
>= 2)
4118 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4119 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4123 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4124 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4126 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4130 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4132 gdb_assert (gdbarch
!= NULL
);
4133 if (gdbarch
->use_struct_convention
== 0)
4134 internal_error (__FILE__
, __LINE__
,
4135 "gdbarch: gdbarch_use_struct_convention invalid");
4136 if (gdbarch_debug
>= 2)
4137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4138 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4142 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4143 gdbarch_use_struct_convention_ftype use_struct_convention
)
4145 gdbarch
->use_struct_convention
= use_struct_convention
;
4149 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4151 gdb_assert (gdbarch
!= NULL
);
4152 if (gdbarch
->frame_init_saved_regs
== 0)
4153 internal_error (__FILE__
, __LINE__
,
4154 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4155 if (gdbarch_debug
>= 2)
4156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
4157 gdbarch
->frame_init_saved_regs (frame
);
4161 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4162 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
4164 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
4168 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4170 gdb_assert (gdbarch
!= NULL
);
4171 return gdbarch
->init_extra_frame_info
!= 0;
4175 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4177 gdb_assert (gdbarch
!= NULL
);
4178 if (gdbarch
->init_extra_frame_info
== 0)
4179 internal_error (__FILE__
, __LINE__
,
4180 "gdbarch: gdbarch_init_extra_frame_info invalid");
4181 if (gdbarch_debug
>= 2)
4182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
4183 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4187 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4188 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4190 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4194 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4196 gdb_assert (gdbarch
!= NULL
);
4197 if (gdbarch
->skip_prologue
== 0)
4198 internal_error (__FILE__
, __LINE__
,
4199 "gdbarch: gdbarch_skip_prologue invalid");
4200 if (gdbarch_debug
>= 2)
4201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4202 return gdbarch
->skip_prologue (ip
);
4206 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4207 gdbarch_skip_prologue_ftype skip_prologue
)
4209 gdbarch
->skip_prologue
= skip_prologue
;
4213 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4215 gdb_assert (gdbarch
!= NULL
);
4216 if (gdbarch
->prologue_frameless_p
== 0)
4217 internal_error (__FILE__
, __LINE__
,
4218 "gdbarch: gdbarch_prologue_frameless_p invalid");
4219 if (gdbarch_debug
>= 2)
4220 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4221 return gdbarch
->prologue_frameless_p (ip
);
4225 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4226 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4228 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4232 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4234 gdb_assert (gdbarch
!= NULL
);
4235 if (gdbarch
->inner_than
== 0)
4236 internal_error (__FILE__
, __LINE__
,
4237 "gdbarch: gdbarch_inner_than invalid");
4238 if (gdbarch_debug
>= 2)
4239 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4240 return gdbarch
->inner_than (lhs
, rhs
);
4244 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4245 gdbarch_inner_than_ftype inner_than
)
4247 gdbarch
->inner_than
= inner_than
;
4250 const unsigned char *
4251 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4253 gdb_assert (gdbarch
!= NULL
);
4254 if (gdbarch
->breakpoint_from_pc
== 0)
4255 internal_error (__FILE__
, __LINE__
,
4256 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4257 if (gdbarch_debug
>= 2)
4258 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4259 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4263 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4264 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4266 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4270 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4272 gdb_assert (gdbarch
!= NULL
);
4273 if (gdbarch
->memory_insert_breakpoint
== 0)
4274 internal_error (__FILE__
, __LINE__
,
4275 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4276 if (gdbarch_debug
>= 2)
4277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4278 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4282 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4283 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4285 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4289 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4291 gdb_assert (gdbarch
!= NULL
);
4292 if (gdbarch
->memory_remove_breakpoint
== 0)
4293 internal_error (__FILE__
, __LINE__
,
4294 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4295 if (gdbarch_debug
>= 2)
4296 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4297 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4301 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4302 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4304 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4308 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4310 gdb_assert (gdbarch
!= NULL
);
4311 if (gdbarch
->decr_pc_after_break
== -1)
4312 internal_error (__FILE__
, __LINE__
,
4313 "gdbarch: gdbarch_decr_pc_after_break invalid");
4314 if (gdbarch_debug
>= 2)
4315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4316 return gdbarch
->decr_pc_after_break
;
4320 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4321 CORE_ADDR decr_pc_after_break
)
4323 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4327 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4329 gdb_assert (gdbarch
!= NULL
);
4330 if (gdbarch
->prepare_to_proceed
== 0)
4331 internal_error (__FILE__
, __LINE__
,
4332 "gdbarch: gdbarch_prepare_to_proceed invalid");
4333 if (gdbarch_debug
>= 2)
4334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4335 return gdbarch
->prepare_to_proceed (select_it
);
4339 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4340 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4342 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4346 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4348 gdb_assert (gdbarch
!= NULL
);
4349 if (gdbarch
->function_start_offset
== -1)
4350 internal_error (__FILE__
, __LINE__
,
4351 "gdbarch: gdbarch_function_start_offset invalid");
4352 if (gdbarch_debug
>= 2)
4353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4354 return gdbarch
->function_start_offset
;
4358 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4359 CORE_ADDR function_start_offset
)
4361 gdbarch
->function_start_offset
= function_start_offset
;
4365 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4367 gdb_assert (gdbarch
!= NULL
);
4368 if (gdbarch
->remote_translate_xfer_address
== 0)
4369 internal_error (__FILE__
, __LINE__
,
4370 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4371 if (gdbarch_debug
>= 2)
4372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4373 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4377 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4378 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4380 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4384 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4386 gdb_assert (gdbarch
!= NULL
);
4387 if (gdbarch
->frame_args_skip
== -1)
4388 internal_error (__FILE__
, __LINE__
,
4389 "gdbarch: gdbarch_frame_args_skip invalid");
4390 if (gdbarch_debug
>= 2)
4391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4392 return gdbarch
->frame_args_skip
;
4396 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4397 CORE_ADDR frame_args_skip
)
4399 gdbarch
->frame_args_skip
= frame_args_skip
;
4403 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4405 gdb_assert (gdbarch
!= NULL
);
4406 if (gdbarch
->frameless_function_invocation
== 0)
4407 internal_error (__FILE__
, __LINE__
,
4408 "gdbarch: gdbarch_frameless_function_invocation invalid");
4409 if (gdbarch_debug
>= 2)
4410 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4411 return gdbarch
->frameless_function_invocation (fi
);
4415 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4416 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4418 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4422 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4424 gdb_assert (gdbarch
!= NULL
);
4425 if (gdbarch
->frame_chain
== 0)
4426 internal_error (__FILE__
, __LINE__
,
4427 "gdbarch: gdbarch_frame_chain invalid");
4428 if (gdbarch_debug
>= 2)
4429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4430 return gdbarch
->frame_chain (frame
);
4434 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4435 gdbarch_frame_chain_ftype frame_chain
)
4437 gdbarch
->frame_chain
= frame_chain
;
4441 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4443 gdb_assert (gdbarch
!= NULL
);
4444 if (gdbarch
->frame_chain_valid
== 0)
4445 internal_error (__FILE__
, __LINE__
,
4446 "gdbarch: gdbarch_frame_chain_valid invalid");
4447 if (gdbarch_debug
>= 2)
4448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4449 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4453 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4454 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4456 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4460 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4462 gdb_assert (gdbarch
!= NULL
);
4463 if (gdbarch
->frame_saved_pc
== 0)
4464 internal_error (__FILE__
, __LINE__
,
4465 "gdbarch: gdbarch_frame_saved_pc invalid");
4466 if (gdbarch_debug
>= 2)
4467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4468 return gdbarch
->frame_saved_pc (fi
);
4472 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4473 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4475 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4479 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4481 gdb_assert (gdbarch
!= NULL
);
4482 if (gdbarch
->frame_args_address
== 0)
4483 internal_error (__FILE__
, __LINE__
,
4484 "gdbarch: gdbarch_frame_args_address invalid");
4485 if (gdbarch_debug
>= 2)
4486 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4487 return gdbarch
->frame_args_address (fi
);
4491 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4492 gdbarch_frame_args_address_ftype frame_args_address
)
4494 gdbarch
->frame_args_address
= frame_args_address
;
4498 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4500 gdb_assert (gdbarch
!= NULL
);
4501 if (gdbarch
->frame_locals_address
== 0)
4502 internal_error (__FILE__
, __LINE__
,
4503 "gdbarch: gdbarch_frame_locals_address invalid");
4504 if (gdbarch_debug
>= 2)
4505 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4506 return gdbarch
->frame_locals_address (fi
);
4510 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4511 gdbarch_frame_locals_address_ftype frame_locals_address
)
4513 gdbarch
->frame_locals_address
= frame_locals_address
;
4517 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4519 gdb_assert (gdbarch
!= NULL
);
4520 if (gdbarch
->saved_pc_after_call
== 0)
4521 internal_error (__FILE__
, __LINE__
,
4522 "gdbarch: gdbarch_saved_pc_after_call invalid");
4523 if (gdbarch_debug
>= 2)
4524 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4525 return gdbarch
->saved_pc_after_call (frame
);
4529 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4530 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4532 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4536 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4538 gdb_assert (gdbarch
!= NULL
);
4539 if (gdbarch
->frame_num_args
== 0)
4540 internal_error (__FILE__
, __LINE__
,
4541 "gdbarch: gdbarch_frame_num_args invalid");
4542 if (gdbarch_debug
>= 2)
4543 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4544 return gdbarch
->frame_num_args (frame
);
4548 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4549 gdbarch_frame_num_args_ftype frame_num_args
)
4551 gdbarch
->frame_num_args
= frame_num_args
;
4555 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4557 gdb_assert (gdbarch
!= NULL
);
4558 return gdbarch
->stack_align
!= 0;
4562 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4564 gdb_assert (gdbarch
!= NULL
);
4565 if (gdbarch
->stack_align
== 0)
4566 internal_error (__FILE__
, __LINE__
,
4567 "gdbarch: gdbarch_stack_align invalid");
4568 if (gdbarch_debug
>= 2)
4569 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4570 return gdbarch
->stack_align (sp
);
4574 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4575 gdbarch_stack_align_ftype stack_align
)
4577 gdbarch
->stack_align
= stack_align
;
4581 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4583 gdb_assert (gdbarch
!= NULL
);
4584 return gdbarch
->frame_align
!= 0;
4588 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4590 gdb_assert (gdbarch
!= NULL
);
4591 if (gdbarch
->frame_align
== 0)
4592 internal_error (__FILE__
, __LINE__
,
4593 "gdbarch: gdbarch_frame_align invalid");
4594 if (gdbarch_debug
>= 2)
4595 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4596 return gdbarch
->frame_align (gdbarch
, address
);
4600 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4601 gdbarch_frame_align_ftype frame_align
)
4603 gdbarch
->frame_align
= frame_align
;
4607 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4609 gdb_assert (gdbarch
!= NULL
);
4610 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4611 if (gdbarch_debug
>= 2)
4612 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4613 return gdbarch
->extra_stack_alignment_needed
;
4617 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4618 int extra_stack_alignment_needed
)
4620 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4624 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4626 gdb_assert (gdbarch
!= NULL
);
4627 return gdbarch
->reg_struct_has_addr
!= 0;
4631 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4633 gdb_assert (gdbarch
!= NULL
);
4634 if (gdbarch
->reg_struct_has_addr
== 0)
4635 internal_error (__FILE__
, __LINE__
,
4636 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4637 if (gdbarch_debug
>= 2)
4638 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4639 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4643 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4644 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4646 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4650 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4652 gdb_assert (gdbarch
!= NULL
);
4653 return gdbarch
->save_dummy_frame_tos
!= 0;
4657 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4659 gdb_assert (gdbarch
!= NULL
);
4660 if (gdbarch
->save_dummy_frame_tos
== 0)
4661 internal_error (__FILE__
, __LINE__
,
4662 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4663 if (gdbarch_debug
>= 2)
4664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4665 gdbarch
->save_dummy_frame_tos (sp
);
4669 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4670 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4672 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4676 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4678 gdb_assert (gdbarch
!= NULL
);
4679 if (gdbarch_debug
>= 2)
4680 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4681 return gdbarch
->parm_boundary
;
4685 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4688 gdbarch
->parm_boundary
= parm_boundary
;
4691 const struct floatformat
*
4692 gdbarch_float_format (struct gdbarch
*gdbarch
)
4694 gdb_assert (gdbarch
!= NULL
);
4695 if (gdbarch_debug
>= 2)
4696 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4697 return gdbarch
->float_format
;
4701 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4702 const struct floatformat
* float_format
)
4704 gdbarch
->float_format
= float_format
;
4707 const struct floatformat
*
4708 gdbarch_double_format (struct gdbarch
*gdbarch
)
4710 gdb_assert (gdbarch
!= NULL
);
4711 if (gdbarch_debug
>= 2)
4712 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4713 return gdbarch
->double_format
;
4717 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4718 const struct floatformat
* double_format
)
4720 gdbarch
->double_format
= double_format
;
4723 const struct floatformat
*
4724 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4726 gdb_assert (gdbarch
!= NULL
);
4727 if (gdbarch_debug
>= 2)
4728 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4729 return gdbarch
->long_double_format
;
4733 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4734 const struct floatformat
* long_double_format
)
4736 gdbarch
->long_double_format
= long_double_format
;
4740 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4742 gdb_assert (gdbarch
!= NULL
);
4743 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4744 internal_error (__FILE__
, __LINE__
,
4745 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4746 if (gdbarch_debug
>= 2)
4747 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4748 return gdbarch
->convert_from_func_ptr_addr (addr
);
4752 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4753 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4755 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4759 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4761 gdb_assert (gdbarch
!= NULL
);
4762 if (gdbarch
->addr_bits_remove
== 0)
4763 internal_error (__FILE__
, __LINE__
,
4764 "gdbarch: gdbarch_addr_bits_remove invalid");
4765 if (gdbarch_debug
>= 2)
4766 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4767 return gdbarch
->addr_bits_remove (addr
);
4771 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4772 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4774 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4778 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4780 gdb_assert (gdbarch
!= NULL
);
4781 if (gdbarch
->smash_text_address
== 0)
4782 internal_error (__FILE__
, __LINE__
,
4783 "gdbarch: gdbarch_smash_text_address invalid");
4784 if (gdbarch_debug
>= 2)
4785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4786 return gdbarch
->smash_text_address (addr
);
4790 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4791 gdbarch_smash_text_address_ftype smash_text_address
)
4793 gdbarch
->smash_text_address
= smash_text_address
;
4797 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4799 gdb_assert (gdbarch
!= NULL
);
4800 return gdbarch
->software_single_step
!= 0;
4804 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4806 gdb_assert (gdbarch
!= NULL
);
4807 if (gdbarch
->software_single_step
== 0)
4808 internal_error (__FILE__
, __LINE__
,
4809 "gdbarch: gdbarch_software_single_step invalid");
4810 if (gdbarch_debug
>= 2)
4811 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4812 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4816 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4817 gdbarch_software_single_step_ftype software_single_step
)
4819 gdbarch
->software_single_step
= software_single_step
;
4823 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4825 gdb_assert (gdbarch
!= NULL
);
4826 if (gdbarch
->print_insn
== 0)
4827 internal_error (__FILE__
, __LINE__
,
4828 "gdbarch: gdbarch_print_insn invalid");
4829 if (gdbarch_debug
>= 2)
4830 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4831 return gdbarch
->print_insn (vma
, info
);
4835 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4836 gdbarch_print_insn_ftype print_insn
)
4838 gdbarch
->print_insn
= print_insn
;
4842 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4844 gdb_assert (gdbarch
!= NULL
);
4845 if (gdbarch
->skip_trampoline_code
== 0)
4846 internal_error (__FILE__
, __LINE__
,
4847 "gdbarch: gdbarch_skip_trampoline_code invalid");
4848 if (gdbarch_debug
>= 2)
4849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4850 return gdbarch
->skip_trampoline_code (pc
);
4854 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4855 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4857 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4861 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4863 gdb_assert (gdbarch
!= NULL
);
4864 if (gdbarch
->in_solib_call_trampoline
== 0)
4865 internal_error (__FILE__
, __LINE__
,
4866 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4867 if (gdbarch_debug
>= 2)
4868 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4869 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4873 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4874 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4876 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4880 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4882 gdb_assert (gdbarch
!= NULL
);
4883 if (gdbarch
->in_solib_return_trampoline
== 0)
4884 internal_error (__FILE__
, __LINE__
,
4885 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
4886 if (gdbarch_debug
>= 2)
4887 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
4888 return gdbarch
->in_solib_return_trampoline (pc
, name
);
4892 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
4893 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
4895 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
4899 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4901 gdb_assert (gdbarch
!= NULL
);
4902 if (gdbarch
->pc_in_sigtramp
== 0)
4903 internal_error (__FILE__
, __LINE__
,
4904 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4905 if (gdbarch_debug
>= 2)
4906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4907 return gdbarch
->pc_in_sigtramp (pc
, name
);
4911 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4912 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4914 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4918 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
4920 gdb_assert (gdbarch
!= NULL
);
4921 return gdbarch
->sigtramp_start
!= 0;
4925 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4927 gdb_assert (gdbarch
!= NULL
);
4928 if (gdbarch
->sigtramp_start
== 0)
4929 internal_error (__FILE__
, __LINE__
,
4930 "gdbarch: gdbarch_sigtramp_start invalid");
4931 if (gdbarch_debug
>= 2)
4932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
4933 return gdbarch
->sigtramp_start (pc
);
4937 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
4938 gdbarch_sigtramp_start_ftype sigtramp_start
)
4940 gdbarch
->sigtramp_start
= sigtramp_start
;
4944 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
4946 gdb_assert (gdbarch
!= NULL
);
4947 return gdbarch
->sigtramp_end
!= 0;
4951 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4953 gdb_assert (gdbarch
!= NULL
);
4954 if (gdbarch
->sigtramp_end
== 0)
4955 internal_error (__FILE__
, __LINE__
,
4956 "gdbarch: gdbarch_sigtramp_end invalid");
4957 if (gdbarch_debug
>= 2)
4958 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
4959 return gdbarch
->sigtramp_end (pc
);
4963 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
4964 gdbarch_sigtramp_end_ftype sigtramp_end
)
4966 gdbarch
->sigtramp_end
= sigtramp_end
;
4970 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4972 gdb_assert (gdbarch
!= NULL
);
4973 if (gdbarch
->in_function_epilogue_p
== 0)
4974 internal_error (__FILE__
, __LINE__
,
4975 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4976 if (gdbarch_debug
>= 2)
4977 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4978 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4982 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4983 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4985 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4989 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4991 gdb_assert (gdbarch
!= NULL
);
4992 if (gdbarch
->construct_inferior_arguments
== 0)
4993 internal_error (__FILE__
, __LINE__
,
4994 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4995 if (gdbarch_debug
>= 2)
4996 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4997 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5001 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5002 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5004 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5008 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
5010 gdb_assert (gdbarch
!= NULL
);
5011 return gdbarch
->dwarf2_build_frame_info
!= 0;
5015 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
5017 gdb_assert (gdbarch
!= NULL
);
5018 if (gdbarch
->dwarf2_build_frame_info
== 0)
5019 internal_error (__FILE__
, __LINE__
,
5020 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5021 if (gdbarch_debug
>= 2)
5022 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
5023 gdbarch
->dwarf2_build_frame_info (objfile
);
5027 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
5028 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
5030 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
5034 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5036 gdb_assert (gdbarch
!= NULL
);
5037 if (gdbarch
->elf_make_msymbol_special
== 0)
5038 internal_error (__FILE__
, __LINE__
,
5039 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5040 if (gdbarch_debug
>= 2)
5041 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5042 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5046 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5047 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5049 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5053 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5055 gdb_assert (gdbarch
!= NULL
);
5056 if (gdbarch
->coff_make_msymbol_special
== 0)
5057 internal_error (__FILE__
, __LINE__
,
5058 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5059 if (gdbarch_debug
>= 2)
5060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5061 gdbarch
->coff_make_msymbol_special (val
, msym
);
5065 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5066 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5068 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5072 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5074 gdb_assert (gdbarch
!= NULL
);
5075 /* Skip verify of name_of_malloc, invalid_p == 0 */
5076 if (gdbarch_debug
>= 2)
5077 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5078 return gdbarch
->name_of_malloc
;
5082 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5083 const char * name_of_malloc
)
5085 gdbarch
->name_of_malloc
= name_of_malloc
;
5089 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5091 gdb_assert (gdbarch
!= NULL
);
5092 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5093 if (gdbarch_debug
>= 2)
5094 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5095 return gdbarch
->cannot_step_breakpoint
;
5099 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5100 int cannot_step_breakpoint
)
5102 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5106 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5108 gdb_assert (gdbarch
!= NULL
);
5109 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5110 if (gdbarch_debug
>= 2)
5111 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5112 return gdbarch
->have_nonsteppable_watchpoint
;
5116 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5117 int have_nonsteppable_watchpoint
)
5119 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5123 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5125 gdb_assert (gdbarch
!= NULL
);
5126 return gdbarch
->address_class_type_flags
!= 0;
5130 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5132 gdb_assert (gdbarch
!= NULL
);
5133 if (gdbarch
->address_class_type_flags
== 0)
5134 internal_error (__FILE__
, __LINE__
,
5135 "gdbarch: gdbarch_address_class_type_flags invalid");
5136 if (gdbarch_debug
>= 2)
5137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5138 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5142 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5143 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5145 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5149 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5151 gdb_assert (gdbarch
!= NULL
);
5152 return gdbarch
->address_class_type_flags_to_name
!= 0;
5156 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5158 gdb_assert (gdbarch
!= NULL
);
5159 if (gdbarch
->address_class_type_flags_to_name
== 0)
5160 internal_error (__FILE__
, __LINE__
,
5161 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5162 if (gdbarch_debug
>= 2)
5163 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5164 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5168 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5169 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5171 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5175 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5177 gdb_assert (gdbarch
!= NULL
);
5178 return gdbarch
->address_class_name_to_type_flags
!= 0;
5182 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, char *name
, int *type_flags_ptr
)
5184 gdb_assert (gdbarch
!= NULL
);
5185 if (gdbarch
->address_class_name_to_type_flags
== 0)
5186 internal_error (__FILE__
, __LINE__
,
5187 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5188 if (gdbarch_debug
>= 2)
5189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5190 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5194 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5195 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5197 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5201 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5203 gdb_assert (gdbarch
!= NULL
);
5204 if (gdbarch
->register_reggroup_p
== 0)
5205 internal_error (__FILE__
, __LINE__
,
5206 "gdbarch: gdbarch_register_reggroup_p invalid");
5207 if (gdbarch_debug
>= 2)
5208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5209 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5213 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5214 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5216 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5220 /* Keep a registry of per-architecture data-pointers required by GDB
5227 gdbarch_data_init_ftype
*init
;
5228 gdbarch_data_free_ftype
*free
;
5231 struct gdbarch_data_registration
5233 struct gdbarch_data
*data
;
5234 struct gdbarch_data_registration
*next
;
5237 struct gdbarch_data_registry
5240 struct gdbarch_data_registration
*registrations
;
5243 struct gdbarch_data_registry gdbarch_data_registry
=
5248 struct gdbarch_data
*
5249 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5250 gdbarch_data_free_ftype
*free
)
5252 struct gdbarch_data_registration
**curr
;
5253 /* Append the new registraration. */
5254 for (curr
= &gdbarch_data_registry
.registrations
;
5256 curr
= &(*curr
)->next
);
5257 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5258 (*curr
)->next
= NULL
;
5259 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5260 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5261 (*curr
)->data
->init
= init
;
5262 (*curr
)->data
->init_p
= 1;
5263 (*curr
)->data
->free
= free
;
5264 return (*curr
)->data
;
5268 /* Create/delete the gdbarch data vector. */
5271 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5273 gdb_assert (gdbarch
->data
== NULL
);
5274 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5275 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5279 free_gdbarch_data (struct gdbarch
*gdbarch
)
5281 struct gdbarch_data_registration
*rego
;
5282 gdb_assert (gdbarch
->data
!= NULL
);
5283 for (rego
= gdbarch_data_registry
.registrations
;
5287 struct gdbarch_data
*data
= rego
->data
;
5288 gdb_assert (data
->index
< gdbarch
->nr_data
);
5289 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5291 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5292 gdbarch
->data
[data
->index
] = NULL
;
5295 xfree (gdbarch
->data
);
5296 gdbarch
->data
= NULL
;
5300 /* Initialize the current value of the specified per-architecture
5304 set_gdbarch_data (struct gdbarch
*gdbarch
,
5305 struct gdbarch_data
*data
,
5308 gdb_assert (data
->index
< gdbarch
->nr_data
);
5309 if (gdbarch
->data
[data
->index
] != NULL
)
5311 gdb_assert (data
->free
!= NULL
);
5312 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5314 gdbarch
->data
[data
->index
] = pointer
;
5317 /* Return the current value of the specified per-architecture
5321 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5323 gdb_assert (data
->index
< gdbarch
->nr_data
);
5324 /* The data-pointer isn't initialized, call init() to get a value but
5325 only if the architecture initializaiton has completed. Otherwise
5326 punt - hope that the caller knows what they are doing. */
5327 if (gdbarch
->data
[data
->index
] == NULL
5328 && gdbarch
->initialized_p
)
5330 /* Be careful to detect an initialization cycle. */
5331 gdb_assert (data
->init_p
);
5333 gdb_assert (data
->init
!= NULL
);
5334 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5336 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5338 return gdbarch
->data
[data
->index
];
5343 /* Keep a registry of swapped data required by GDB modules. */
5348 struct gdbarch_swap_registration
*source
;
5349 struct gdbarch_swap
*next
;
5352 struct gdbarch_swap_registration
5355 unsigned long sizeof_data
;
5356 gdbarch_swap_ftype
*init
;
5357 struct gdbarch_swap_registration
*next
;
5360 struct gdbarch_swap_registry
5363 struct gdbarch_swap_registration
*registrations
;
5366 struct gdbarch_swap_registry gdbarch_swap_registry
=
5372 register_gdbarch_swap (void *data
,
5373 unsigned long sizeof_data
,
5374 gdbarch_swap_ftype
*init
)
5376 struct gdbarch_swap_registration
**rego
;
5377 for (rego
= &gdbarch_swap_registry
.registrations
;
5379 rego
= &(*rego
)->next
);
5380 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5381 (*rego
)->next
= NULL
;
5382 (*rego
)->init
= init
;
5383 (*rego
)->data
= data
;
5384 (*rego
)->sizeof_data
= sizeof_data
;
5388 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5390 struct gdbarch_swap
*curr
;
5391 for (curr
= gdbarch
->swap
;
5395 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5400 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5402 struct gdbarch_swap_registration
*rego
;
5403 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5404 for (rego
= gdbarch_swap_registry
.registrations
;
5408 if (rego
->data
!= NULL
)
5410 (*curr
) = XMALLOC (struct gdbarch_swap
);
5411 (*curr
)->source
= rego
;
5412 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5413 (*curr
)->next
= NULL
;
5414 curr
= &(*curr
)->next
;
5416 if (rego
->init
!= NULL
)
5422 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5424 struct gdbarch_swap
*curr
;
5425 for (curr
= gdbarch
->swap
;
5428 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5432 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5434 struct gdbarch_swap
*curr
;
5435 for (curr
= gdbarch
->swap
;
5438 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5442 /* Keep a registry of the architectures known by GDB. */
5444 struct gdbarch_registration
5446 enum bfd_architecture bfd_architecture
;
5447 gdbarch_init_ftype
*init
;
5448 gdbarch_dump_tdep_ftype
*dump_tdep
;
5449 struct gdbarch_list
*arches
;
5450 struct gdbarch_registration
*next
;
5453 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5456 append_name (const char ***buf
, int *nr
, const char *name
)
5458 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5464 gdbarch_printable_names (void)
5468 /* Accumulate a list of names based on the registed list of
5470 enum bfd_architecture a
;
5472 const char **arches
= NULL
;
5473 struct gdbarch_registration
*rego
;
5474 for (rego
= gdbarch_registry
;
5478 const struct bfd_arch_info
*ap
;
5479 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5481 internal_error (__FILE__
, __LINE__
,
5482 "gdbarch_architecture_names: multi-arch unknown");
5485 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5490 append_name (&arches
, &nr_arches
, NULL
);
5494 /* Just return all the architectures that BFD knows. Assume that
5495 the legacy architecture framework supports them. */
5496 return bfd_arch_list ();
5501 gdbarch_register (enum bfd_architecture bfd_architecture
,
5502 gdbarch_init_ftype
*init
,
5503 gdbarch_dump_tdep_ftype
*dump_tdep
)
5505 struct gdbarch_registration
**curr
;
5506 const struct bfd_arch_info
*bfd_arch_info
;
5507 /* Check that BFD recognizes this architecture */
5508 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5509 if (bfd_arch_info
== NULL
)
5511 internal_error (__FILE__
, __LINE__
,
5512 "gdbarch: Attempt to register unknown architecture (%d)",
5515 /* Check that we haven't seen this architecture before */
5516 for (curr
= &gdbarch_registry
;
5518 curr
= &(*curr
)->next
)
5520 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5521 internal_error (__FILE__
, __LINE__
,
5522 "gdbarch: Duplicate registraration of architecture (%s)",
5523 bfd_arch_info
->printable_name
);
5527 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5528 bfd_arch_info
->printable_name
,
5531 (*curr
) = XMALLOC (struct gdbarch_registration
);
5532 (*curr
)->bfd_architecture
= bfd_architecture
;
5533 (*curr
)->init
= init
;
5534 (*curr
)->dump_tdep
= dump_tdep
;
5535 (*curr
)->arches
= NULL
;
5536 (*curr
)->next
= NULL
;
5537 /* When non- multi-arch, install whatever target dump routine we've
5538 been provided - hopefully that routine has been written correctly
5539 and works regardless of multi-arch. */
5540 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5541 && startup_gdbarch
.dump_tdep
== NULL
)
5542 startup_gdbarch
.dump_tdep
= dump_tdep
;
5546 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5547 gdbarch_init_ftype
*init
)
5549 gdbarch_register (bfd_architecture
, init
, NULL
);
5553 /* Look for an architecture using gdbarch_info. Base search on only
5554 BFD_ARCH_INFO and BYTE_ORDER. */
5556 struct gdbarch_list
*
5557 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5558 const struct gdbarch_info
*info
)
5560 for (; arches
!= NULL
; arches
= arches
->next
)
5562 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5564 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5572 /* Update the current architecture. Return ZERO if the update request
5576 gdbarch_update_p (struct gdbarch_info info
)
5578 struct gdbarch
*new_gdbarch
;
5579 struct gdbarch
*old_gdbarch
;
5580 struct gdbarch_registration
*rego
;
5582 /* Fill in missing parts of the INFO struct using a number of
5583 sources: ``set ...''; INFOabfd supplied; existing target. */
5585 /* ``(gdb) set architecture ...'' */
5586 if (info
.bfd_arch_info
== NULL
5587 && !TARGET_ARCHITECTURE_AUTO
)
5588 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5589 if (info
.bfd_arch_info
== NULL
5590 && info
.abfd
!= NULL
5591 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5592 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5593 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5594 if (info
.bfd_arch_info
== NULL
)
5595 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5597 /* ``(gdb) set byte-order ...'' */
5598 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5599 && !TARGET_BYTE_ORDER_AUTO
)
5600 info
.byte_order
= TARGET_BYTE_ORDER
;
5601 /* From the INFO struct. */
5602 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5603 && info
.abfd
!= NULL
)
5604 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5605 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5606 : BFD_ENDIAN_UNKNOWN
);
5607 /* From the current target. */
5608 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5609 info
.byte_order
= TARGET_BYTE_ORDER
;
5611 /* Must have found some sort of architecture. */
5612 gdb_assert (info
.bfd_arch_info
!= NULL
);
5616 fprintf_unfiltered (gdb_stdlog
,
5617 "gdbarch_update: info.bfd_arch_info %s\n",
5618 (info
.bfd_arch_info
!= NULL
5619 ? info
.bfd_arch_info
->printable_name
5621 fprintf_unfiltered (gdb_stdlog
,
5622 "gdbarch_update: info.byte_order %d (%s)\n",
5624 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5625 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5627 fprintf_unfiltered (gdb_stdlog
,
5628 "gdbarch_update: info.abfd 0x%lx\n",
5630 fprintf_unfiltered (gdb_stdlog
,
5631 "gdbarch_update: info.tdep_info 0x%lx\n",
5632 (long) info
.tdep_info
);
5635 /* Find the target that knows about this architecture. */
5636 for (rego
= gdbarch_registry
;
5639 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5644 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5648 /* Swap the data belonging to the old target out setting the
5649 installed data to zero. This stops the ->init() function trying
5650 to refer to the previous architecture's global data structures. */
5651 swapout_gdbarch_swap (current_gdbarch
);
5652 clear_gdbarch_swap (current_gdbarch
);
5654 /* Save the previously selected architecture, setting the global to
5655 NULL. This stops ->init() trying to use the previous
5656 architecture's configuration. The previous architecture may not
5657 even be of the same architecture family. The most recent
5658 architecture of the same family is found at the head of the
5659 rego->arches list. */
5660 old_gdbarch
= current_gdbarch
;
5661 current_gdbarch
= NULL
;
5663 /* Ask the target for a replacement architecture. */
5664 new_gdbarch
= rego
->init (info
, rego
->arches
);
5666 /* Did the target like it? No. Reject the change and revert to the
5667 old architecture. */
5668 if (new_gdbarch
== NULL
)
5671 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5672 swapin_gdbarch_swap (old_gdbarch
);
5673 current_gdbarch
= old_gdbarch
;
5677 /* Did the architecture change? No. Oops, put the old architecture
5679 if (old_gdbarch
== new_gdbarch
)
5682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5684 new_gdbarch
->bfd_arch_info
->printable_name
);
5685 swapin_gdbarch_swap (old_gdbarch
);
5686 current_gdbarch
= old_gdbarch
;
5690 /* Is this a pre-existing architecture? Yes. Move it to the front
5691 of the list of architectures (keeping the list sorted Most
5692 Recently Used) and then copy it in. */
5694 struct gdbarch_list
**list
;
5695 for (list
= ®o
->arches
;
5697 list
= &(*list
)->next
)
5699 if ((*list
)->gdbarch
== new_gdbarch
)
5701 struct gdbarch_list
*this;
5703 fprintf_unfiltered (gdb_stdlog
,
5704 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5706 new_gdbarch
->bfd_arch_info
->printable_name
);
5709 (*list
) = this->next
;
5710 /* Insert in the front. */
5711 this->next
= rego
->arches
;
5712 rego
->arches
= this;
5713 /* Copy the new architecture in. */
5714 current_gdbarch
= new_gdbarch
;
5715 swapin_gdbarch_swap (new_gdbarch
);
5716 architecture_changed_event ();
5722 /* Prepend this new architecture to the architecture list (keep the
5723 list sorted Most Recently Used). */
5725 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5726 this->next
= rego
->arches
;
5727 this->gdbarch
= new_gdbarch
;
5728 rego
->arches
= this;
5731 /* Switch to this new architecture marking it initialized. */
5732 current_gdbarch
= new_gdbarch
;
5733 current_gdbarch
->initialized_p
= 1;
5736 fprintf_unfiltered (gdb_stdlog
,
5737 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5739 new_gdbarch
->bfd_arch_info
->printable_name
);
5742 /* Check that the newly installed architecture is valid. Plug in
5743 any post init values. */
5744 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5745 verify_gdbarch (new_gdbarch
);
5747 /* Initialize the per-architecture memory (swap) areas.
5748 CURRENT_GDBARCH must be update before these modules are
5750 init_gdbarch_swap (new_gdbarch
);
5752 /* Initialize the per-architecture data. CURRENT_GDBARCH
5753 must be updated before these modules are called. */
5754 architecture_changed_event ();
5757 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5765 /* Pointer to the target-dependent disassembly function. */
5766 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5767 disassemble_info tm_print_insn_info
;
5770 extern void _initialize_gdbarch (void);
5773 _initialize_gdbarch (void)
5775 struct cmd_list_element
*c
;
5777 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5778 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5779 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5780 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5781 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5783 add_show_from_set (add_set_cmd ("arch",
5786 (char *)&gdbarch_debug
,
5787 "Set architecture debugging.\n\
5788 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5790 c
= add_set_cmd ("archdebug",
5793 (char *)&gdbarch_debug
,
5794 "Set architecture debugging.\n\
5795 When non-zero, architecture debugging is enabled.", &setlist
);
5797 deprecate_cmd (c
, "set debug arch");
5798 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");