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"
68 /* Static function declarations */
70 static void verify_gdbarch (struct gdbarch
*gdbarch
);
71 static void alloc_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void clear_gdbarch_swap (struct gdbarch
*);
75 static void swapout_gdbarch_swap (struct gdbarch
*);
76 static void swapin_gdbarch_swap (struct gdbarch
*);
78 /* Non-zero if we want to trace architecture code. */
81 #define GDBARCH_DEBUG 0
83 int gdbarch_debug
= GDBARCH_DEBUG
;
86 /* Maintain the struct gdbarch object */
90 /* Has this architecture been fully initialized? */
92 /* basic architectural information */
93 const struct bfd_arch_info
* bfd_arch_info
;
96 /* target specific vector. */
97 struct gdbarch_tdep
*tdep
;
98 gdbarch_dump_tdep_ftype
*dump_tdep
;
100 /* per-architecture data-pointers */
104 /* per-architecture swap-regions */
105 struct gdbarch_swap
*swap
;
107 /* Multi-arch values.
109 When extending this structure you must:
113 Declare set/get functions and define the corresponding
116 gdbarch_alloc(): If zero/NULL is not a suitable default,
117 initialize the new field.
119 verify_gdbarch(): Confirm that the target updated the field
122 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
125 ``startup_gdbarch()'': Append an initial value to the static
126 variable (base values on the host's c-type system).
128 get_gdbarch(): Implement the set/get functions (probably using
129 the macro's as shortcuts).
144 gdbarch_read_pc_ftype
*read_pc
;
145 gdbarch_write_pc_ftype
*write_pc
;
146 gdbarch_read_fp_ftype
*read_fp
;
147 gdbarch_read_sp_ftype
*read_sp
;
148 gdbarch_write_sp_ftype
*write_sp
;
149 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
150 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
151 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
160 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
161 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
162 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
163 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
164 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
165 gdbarch_register_name_ftype
*register_name
;
168 gdbarch_register_byte_ftype
*register_byte
;
169 gdbarch_register_raw_size_ftype
*register_raw_size
;
170 int max_register_raw_size
;
171 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
172 int max_register_virtual_size
;
173 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
174 gdbarch_do_registers_info_ftype
*do_registers_info
;
175 gdbarch_print_float_info_ftype
*print_float_info
;
176 gdbarch_print_vector_info_ftype
*print_vector_info
;
177 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
178 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
179 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
180 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
181 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
182 int use_generic_dummy_frames
;
183 int call_dummy_location
;
184 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
185 CORE_ADDR call_dummy_start_offset
;
186 CORE_ADDR call_dummy_breakpoint_offset
;
187 int call_dummy_breakpoint_offset_p
;
188 int call_dummy_length
;
189 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
191 LONGEST
* call_dummy_words
;
192 int sizeof_call_dummy_words
;
193 int call_dummy_stack_adjust_p
;
194 int call_dummy_stack_adjust
;
195 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
196 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
197 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
198 int believe_pcc_promotion
;
199 int believe_pcc_promotion_type
;
200 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
201 gdbarch_get_saved_register_ftype
*get_saved_register
;
202 gdbarch_register_convertible_ftype
*register_convertible
;
203 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
204 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
205 gdbarch_convert_register_p_ftype
*convert_register_p
;
206 gdbarch_register_to_value_ftype
*register_to_value
;
207 gdbarch_value_to_register_ftype
*value_to_register
;
208 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
209 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
210 gdbarch_integer_to_address_ftype
*integer_to_address
;
211 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
212 gdbarch_extract_return_value_ftype
*extract_return_value
;
213 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
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_store_return_value_ftype
*store_return_value
;
220 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
221 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
222 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
223 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
224 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
225 gdbarch_skip_prologue_ftype
*skip_prologue
;
226 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
227 gdbarch_inner_than_ftype
*inner_than
;
228 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
229 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
230 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
231 CORE_ADDR decr_pc_after_break
;
232 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
233 CORE_ADDR function_start_offset
;
234 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
235 CORE_ADDR frame_args_skip
;
236 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
237 gdbarch_frame_chain_ftype
*frame_chain
;
238 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
239 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
240 gdbarch_frame_args_address_ftype
*frame_args_address
;
241 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
242 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
243 gdbarch_frame_num_args_ftype
*frame_num_args
;
244 gdbarch_stack_align_ftype
*stack_align
;
245 int extra_stack_alignment_needed
;
246 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
247 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
249 const struct floatformat
* float_format
;
250 const struct floatformat
* double_format
;
251 const struct floatformat
* long_double_format
;
252 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
253 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
254 gdbarch_smash_text_address_ftype
*smash_text_address
;
255 gdbarch_software_single_step_ftype
*software_single_step
;
256 gdbarch_print_insn_ftype
*print_insn
;
257 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
258 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
259 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
260 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
261 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
262 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
263 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
264 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
265 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
269 /* The default architecture uses host values (for want of a better
272 extern const struct bfd_arch_info bfd_default_arch_struct
;
274 struct gdbarch startup_gdbarch
=
276 1, /* Always initialized. */
277 /* basic architecture information */
278 &bfd_default_arch_struct
,
280 /* target specific vector and its dump routine */
282 /*per-architecture data-pointers and swap regions */
284 /* Multi-arch values */
288 8 * sizeof (LONGEST
),
291 8 * sizeof (long double),
320 generic_register_byte
,
321 generic_register_size
,
323 generic_register_size
,
413 generic_in_function_epilogue_p
,
414 construct_inferior_arguments
,
418 /* startup_gdbarch() */
421 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
423 /* Do any initialization needed for a non-multiarch configuration
424 after the _initialize_MODULE functions have been run. */
426 initialize_non_multiarch (void)
428 alloc_gdbarch_data (&startup_gdbarch
);
429 /* Ensure that all swap areas are zeroed so that they again think
430 they are starting from scratch. */
431 clear_gdbarch_swap (&startup_gdbarch
);
432 init_gdbarch_swap (&startup_gdbarch
);
436 /* Create a new ``struct gdbarch'' based on information provided by
437 ``struct gdbarch_info''. */
440 gdbarch_alloc (const struct gdbarch_info
*info
,
441 struct gdbarch_tdep
*tdep
)
443 /* NOTE: The new architecture variable is named ``current_gdbarch''
444 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
445 the current local architecture and not the previous global
446 architecture. This ensures that the new architectures initial
447 values are not influenced by the previous architecture. Once
448 everything is parameterised with gdbarch, this will go away. */
449 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
450 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
452 alloc_gdbarch_data (current_gdbarch
);
454 current_gdbarch
->tdep
= tdep
;
456 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
457 current_gdbarch
->byte_order
= info
->byte_order
;
459 /* Force the explicit initialization of these. */
460 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
461 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
462 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
463 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
464 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
465 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
466 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
467 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
468 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
469 current_gdbarch
->char_signed
= -1;
470 current_gdbarch
->read_pc
= generic_target_read_pc
;
471 current_gdbarch
->write_pc
= generic_target_write_pc
;
472 current_gdbarch
->read_fp
= generic_target_read_fp
;
473 current_gdbarch
->read_sp
= generic_target_read_sp
;
474 current_gdbarch
->write_sp
= generic_target_write_sp
;
475 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
476 current_gdbarch
->num_regs
= -1;
477 current_gdbarch
->sp_regnum
= -1;
478 current_gdbarch
->fp_regnum
= -1;
479 current_gdbarch
->pc_regnum
= -1;
480 current_gdbarch
->ps_regnum
= -1;
481 current_gdbarch
->fp0_regnum
= -1;
482 current_gdbarch
->npc_regnum
= -1;
483 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
484 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
485 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
486 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
487 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
488 current_gdbarch
->register_name
= legacy_register_name
;
489 current_gdbarch
->register_size
= -1;
490 current_gdbarch
->register_bytes
= -1;
491 current_gdbarch
->register_byte
= generic_register_byte
;
492 current_gdbarch
->register_raw_size
= generic_register_size
;
493 current_gdbarch
->max_register_raw_size
= -1;
494 current_gdbarch
->register_virtual_size
= generic_register_size
;
495 current_gdbarch
->max_register_virtual_size
= -1;
496 current_gdbarch
->do_registers_info
= do_registers_info
;
497 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
498 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
499 current_gdbarch
->cannot_store_register
= cannot_register_not
;
500 current_gdbarch
->use_generic_dummy_frames
= -1;
501 current_gdbarch
->call_dummy_start_offset
= -1;
502 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
503 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
504 current_gdbarch
->call_dummy_length
= -1;
505 current_gdbarch
->call_dummy_p
= -1;
506 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
507 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
508 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
509 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
510 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
511 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
512 current_gdbarch
->get_saved_register
= generic_unwind_get_saved_register
;
513 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
514 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
515 current_gdbarch
->register_to_value
= legacy_register_to_value
;
516 current_gdbarch
->value_to_register
= legacy_value_to_register
;
517 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
518 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
519 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
520 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
521 current_gdbarch
->push_arguments
= default_push_arguments
;
522 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
523 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
524 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
525 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
526 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
527 current_gdbarch
->decr_pc_after_break
= -1;
528 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
529 current_gdbarch
->function_start_offset
= -1;
530 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
531 current_gdbarch
->frame_args_skip
= -1;
532 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
533 current_gdbarch
->frame_chain_valid
= generic_func_frame_chain_valid
;
534 current_gdbarch
->extra_stack_alignment_needed
= 1;
535 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
536 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
537 current_gdbarch
->smash_text_address
= core_addr_identity
;
538 current_gdbarch
->print_insn
= legacy_print_insn
;
539 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
540 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
541 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
542 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
543 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
544 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
545 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
546 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
547 /* gdbarch_alloc() */
549 return current_gdbarch
;
553 /* Free a gdbarch struct. This should never happen in normal
554 operation --- once you've created a gdbarch, you keep it around.
555 However, if an architecture's init function encounters an error
556 building the structure, it may need to clean up a partially
557 constructed gdbarch. */
560 gdbarch_free (struct gdbarch
*arch
)
562 gdb_assert (arch
!= NULL
);
563 free_gdbarch_data (arch
);
568 /* Ensure that all values in a GDBARCH are reasonable. */
571 verify_gdbarch (struct gdbarch
*gdbarch
)
574 struct cleanup
*cleanups
;
577 /* Only perform sanity checks on a multi-arch target. */
580 log
= mem_fileopen ();
581 cleanups
= make_cleanup_ui_file_delete (log
);
583 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
584 fprintf_unfiltered (log
, "\n\tbyte-order");
585 if (gdbarch
->bfd_arch_info
== NULL
)
586 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
587 /* Check those that need to be defined for the given multi-arch level. */
588 /* Skip verify of short_bit, invalid_p == 0 */
589 /* Skip verify of int_bit, invalid_p == 0 */
590 /* Skip verify of long_bit, invalid_p == 0 */
591 /* Skip verify of long_long_bit, invalid_p == 0 */
592 /* Skip verify of float_bit, invalid_p == 0 */
593 /* Skip verify of double_bit, invalid_p == 0 */
594 /* Skip verify of long_double_bit, invalid_p == 0 */
595 /* Skip verify of ptr_bit, invalid_p == 0 */
596 if (gdbarch
->addr_bit
== 0)
597 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
598 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
599 if (gdbarch
->char_signed
== -1)
600 gdbarch
->char_signed
= 1;
601 /* Skip verify of read_pc, invalid_p == 0 */
602 /* Skip verify of write_pc, invalid_p == 0 */
603 /* Skip verify of read_fp, invalid_p == 0 */
604 /* Skip verify of read_sp, invalid_p == 0 */
605 /* Skip verify of write_sp, invalid_p == 0 */
606 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
607 /* Skip verify of pseudo_register_read, has predicate */
608 /* Skip verify of pseudo_register_write, has predicate */
609 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
610 && (gdbarch
->num_regs
== -1))
611 fprintf_unfiltered (log
, "\n\tnum_regs");
612 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
613 /* Skip verify of sp_regnum, invalid_p == 0 */
614 /* Skip verify of fp_regnum, invalid_p == 0 */
615 /* Skip verify of pc_regnum, invalid_p == 0 */
616 /* Skip verify of ps_regnum, invalid_p == 0 */
617 /* Skip verify of fp0_regnum, invalid_p == 0 */
618 /* Skip verify of npc_regnum, invalid_p == 0 */
619 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
620 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
621 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
622 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
623 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
624 /* Skip verify of register_name, invalid_p == 0 */
625 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
626 && (gdbarch
->register_size
== -1))
627 fprintf_unfiltered (log
, "\n\tregister_size");
628 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
629 && (gdbarch
->register_bytes
== -1))
630 fprintf_unfiltered (log
, "\n\tregister_bytes");
631 /* Skip verify of register_byte, invalid_p == 0 */
632 /* Skip verify of register_raw_size, invalid_p == 0 */
633 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
634 && (gdbarch
->max_register_raw_size
== -1))
635 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
636 /* Skip verify of register_virtual_size, invalid_p == 0 */
637 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
638 && (gdbarch
->max_register_virtual_size
== -1))
639 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
640 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
641 && (gdbarch
->register_virtual_type
== 0))
642 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
643 /* Skip verify of do_registers_info, invalid_p == 0 */
644 /* Skip verify of print_float_info, has predicate */
645 /* Skip verify of print_vector_info, has predicate */
646 /* Skip verify of register_sim_regno, invalid_p == 0 */
647 /* Skip verify of register_bytes_ok, has predicate */
648 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
649 /* Skip verify of cannot_store_register, invalid_p == 0 */
650 /* Skip verify of get_longjmp_target, has predicate */
651 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
652 && (gdbarch
->use_generic_dummy_frames
== -1))
653 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
654 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
655 && (gdbarch
->call_dummy_location
== 0))
656 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
657 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
658 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
659 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
660 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
661 && (gdbarch
->call_dummy_start_offset
== -1))
662 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
663 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
664 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
665 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
666 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
667 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
668 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
669 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
670 && (gdbarch
->call_dummy_length
== -1))
671 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
672 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
673 && (gdbarch
->pc_in_call_dummy
== 0))
674 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
675 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
676 && (gdbarch
->call_dummy_p
== -1))
677 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
678 /* Skip verify of call_dummy_words, invalid_p == 0 */
679 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
680 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
681 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
682 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
683 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
684 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
685 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
686 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
687 && (gdbarch
->fix_call_dummy
== 0))
688 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
689 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
690 /* Skip verify of init_frame_pc, invalid_p == 0 */
691 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
692 /* Skip verify of get_saved_register, invalid_p == 0 */
693 /* Skip verify of register_convertible, invalid_p == 0 */
694 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
695 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
696 /* Skip verify of convert_register_p, invalid_p == 0 */
697 /* Skip verify of register_to_value, invalid_p == 0 */
698 /* Skip verify of value_to_register, invalid_p == 0 */
699 /* Skip verify of pointer_to_address, invalid_p == 0 */
700 /* Skip verify of address_to_pointer, invalid_p == 0 */
701 /* Skip verify of integer_to_address, has predicate */
702 /* Skip verify of return_value_on_stack, invalid_p == 0 */
703 /* Skip verify of extract_return_value, invalid_p == 0 */
704 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
705 && (gdbarch
->deprecated_extract_return_value
== 0))
706 fprintf_unfiltered (log
, "\n\tdeprecated_extract_return_value");
707 /* Skip verify of push_arguments, invalid_p == 0 */
708 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
709 && (gdbarch
->push_dummy_frame
== 0))
710 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
711 /* Skip verify of push_return_address, has predicate */
712 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
713 && (gdbarch
->pop_frame
== 0))
714 fprintf_unfiltered (log
, "\n\tpop_frame");
715 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
716 && (gdbarch
->store_struct_return
== 0))
717 fprintf_unfiltered (log
, "\n\tstore_struct_return");
718 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
719 && (gdbarch
->store_return_value
== 0))
720 fprintf_unfiltered (log
, "\n\tstore_return_value");
721 /* Skip verify of extract_struct_value_address, has predicate */
722 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
723 /* Skip verify of use_struct_convention, invalid_p == 0 */
724 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
725 && (gdbarch
->frame_init_saved_regs
== 0))
726 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
727 /* Skip verify of init_extra_frame_info, has predicate */
728 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
729 && (gdbarch
->skip_prologue
== 0))
730 fprintf_unfiltered (log
, "\n\tskip_prologue");
731 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
733 && (gdbarch
->inner_than
== 0))
734 fprintf_unfiltered (log
, "\n\tinner_than");
735 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
736 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
737 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
738 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
739 && (gdbarch
->decr_pc_after_break
== -1))
740 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
741 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
742 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
743 && (gdbarch
->function_start_offset
== -1))
744 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
745 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
746 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
747 && (gdbarch
->frame_args_skip
== -1))
748 fprintf_unfiltered (log
, "\n\tframe_args_skip");
749 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
750 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
751 && (gdbarch
->frame_chain
== 0))
752 fprintf_unfiltered (log
, "\n\tframe_chain");
753 /* Skip verify of frame_chain_valid, invalid_p == 0 */
754 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
755 && (gdbarch
->frame_saved_pc
== 0))
756 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
757 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
758 && (gdbarch
->frame_args_address
== 0))
759 fprintf_unfiltered (log
, "\n\tframe_args_address");
760 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
761 && (gdbarch
->frame_locals_address
== 0))
762 fprintf_unfiltered (log
, "\n\tframe_locals_address");
763 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
764 && (gdbarch
->saved_pc_after_call
== 0))
765 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
766 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
767 && (gdbarch
->frame_num_args
== 0))
768 fprintf_unfiltered (log
, "\n\tframe_num_args");
769 /* Skip verify of stack_align, has predicate */
770 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
771 /* Skip verify of reg_struct_has_addr, has predicate */
772 /* Skip verify of save_dummy_frame_tos, has predicate */
773 if (gdbarch
->float_format
== 0)
774 gdbarch
->float_format
= default_float_format (gdbarch
);
775 if (gdbarch
->double_format
== 0)
776 gdbarch
->double_format
= default_double_format (gdbarch
);
777 if (gdbarch
->long_double_format
== 0)
778 gdbarch
->long_double_format
= default_double_format (gdbarch
);
779 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
780 /* Skip verify of addr_bits_remove, invalid_p == 0 */
781 /* Skip verify of smash_text_address, invalid_p == 0 */
782 /* Skip verify of software_single_step, has predicate */
783 /* Skip verify of print_insn, invalid_p == 0 */
784 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
785 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
786 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
787 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
788 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
789 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
790 /* Skip verify of dwarf2_build_frame_info, has predicate */
791 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
792 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
793 buf
= ui_file_xstrdup (log
, &dummy
);
794 make_cleanup (xfree
, buf
);
795 if (strlen (buf
) > 0)
796 internal_error (__FILE__
, __LINE__
,
797 "verify_gdbarch: the following are invalid ...%s",
799 do_cleanups (cleanups
);
803 /* Print out the details of the current architecture. */
805 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
806 just happens to match the global variable ``current_gdbarch''. That
807 way macros refering to that variable get the local and not the global
808 version - ulgh. Once everything is parameterised with gdbarch, this
812 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
820 (long) current_gdbarch
->in_function_epilogue_p
);
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
824 (long) current_gdbarch
->pseudo_register_read
);
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
828 (long) current_gdbarch
->pseudo_register_write
);
829 #ifdef ADDRESS_TO_POINTER
831 /* Macro might contain `[{}]' when not multi-arch */
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: %s # %s\n",
834 "ADDRESS_TO_POINTER(type, buf, addr)",
835 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
840 (long) current_gdbarch
->address_to_pointer
841 /*ADDRESS_TO_POINTER ()*/);
843 #ifdef ADDR_BITS_REMOVE
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: %s # %s\n",
846 "ADDR_BITS_REMOVE(addr)",
847 XSTRING (ADDR_BITS_REMOVE (addr
)));
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
851 (long) current_gdbarch
->addr_bits_remove
852 /*ADDR_BITS_REMOVE ()*/);
854 #ifdef BELIEVE_PCC_PROMOTION
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
857 XSTRING (BELIEVE_PCC_PROMOTION
));
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
860 BELIEVE_PCC_PROMOTION
);
862 #ifdef BELIEVE_PCC_PROMOTION_TYPE
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
865 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
868 BELIEVE_PCC_PROMOTION_TYPE
);
870 #ifdef BREAKPOINT_FROM_PC
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: %s # %s\n",
873 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
874 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
878 (long) current_gdbarch
->breakpoint_from_pc
879 /*BREAKPOINT_FROM_PC ()*/);
881 #ifdef CALL_DUMMY_ADDRESS
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: %s # %s\n",
884 "CALL_DUMMY_ADDRESS()",
885 XSTRING (CALL_DUMMY_ADDRESS ()));
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
889 (long) current_gdbarch
->call_dummy_address
890 /*CALL_DUMMY_ADDRESS ()*/);
892 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
895 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
896 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
899 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
901 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
904 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
907 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
909 #ifdef CALL_DUMMY_LENGTH
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
912 XSTRING (CALL_DUMMY_LENGTH
));
913 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
918 #ifdef CALL_DUMMY_LOCATION
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
921 XSTRING (CALL_DUMMY_LOCATION
));
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
924 CALL_DUMMY_LOCATION
);
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: CALL_DUMMY_P # %s\n",
929 XSTRING (CALL_DUMMY_P
));
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: CALL_DUMMY_P = %d\n",
934 #ifdef CALL_DUMMY_STACK_ADJUST
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
937 XSTRING (CALL_DUMMY_STACK_ADJUST
));
938 if (CALL_DUMMY_STACK_ADJUST_P
)
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
941 (long) CALL_DUMMY_STACK_ADJUST
);
943 #ifdef CALL_DUMMY_STACK_ADJUST_P
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
946 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
949 (long) CALL_DUMMY_STACK_ADJUST_P
);
951 #ifdef CALL_DUMMY_START_OFFSET
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
954 XSTRING (CALL_DUMMY_START_OFFSET
));
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
957 (long) CALL_DUMMY_START_OFFSET
);
959 #ifdef CALL_DUMMY_WORDS
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
962 XSTRING (CALL_DUMMY_WORDS
));
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
965 (long) CALL_DUMMY_WORDS
);
967 #ifdef CANNOT_FETCH_REGISTER
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: %s # %s\n",
970 "CANNOT_FETCH_REGISTER(regnum)",
971 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
975 (long) current_gdbarch
->cannot_fetch_register
976 /*CANNOT_FETCH_REGISTER ()*/);
978 #ifdef CANNOT_STORE_REGISTER
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: %s # %s\n",
981 "CANNOT_STORE_REGISTER(regnum)",
982 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
986 (long) current_gdbarch
->cannot_store_register
987 /*CANNOT_STORE_REGISTER ()*/);
989 #ifdef COERCE_FLOAT_TO_DOUBLE
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: %s # %s\n",
992 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
993 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
997 (long) current_gdbarch
->coerce_float_to_double
998 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1000 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1002 /* Macro might contain `[{}]' when not multi-arch */
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: %s # %s\n",
1005 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1006 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1011 (long) current_gdbarch
->coff_make_msymbol_special
1012 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1017 (long) current_gdbarch
->construct_inferior_arguments
);
1018 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1019 fprintf_unfiltered (file
,
1020 "gdbarch_dump: %s # %s\n",
1021 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1022 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1026 (long) current_gdbarch
->convert_from_func_ptr_addr
1027 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1029 #ifdef CONVERT_REGISTER_P
1030 fprintf_unfiltered (file
,
1031 "gdbarch_dump: %s # %s\n",
1032 "CONVERT_REGISTER_P(regnum)",
1033 XSTRING (CONVERT_REGISTER_P (regnum
)));
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1037 (long) current_gdbarch
->convert_register_p
1038 /*CONVERT_REGISTER_P ()*/);
1040 #ifdef DECR_PC_AFTER_BREAK
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1043 XSTRING (DECR_PC_AFTER_BREAK
));
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1046 (long) DECR_PC_AFTER_BREAK
);
1048 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1050 /* Macro might contain `[{}]' when not multi-arch */
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: %s # %s\n",
1053 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1054 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1057 fprintf_unfiltered (file
,
1058 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1059 (long) current_gdbarch
->deprecated_extract_return_value
1060 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1062 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: %s # %s\n",
1065 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1066 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1070 (long) current_gdbarch
->deprecated_extract_struct_value_address
1071 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1073 #ifdef DO_REGISTERS_INFO
1075 /* Macro might contain `[{}]' when not multi-arch */
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: %s # %s\n",
1078 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1079 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1084 (long) current_gdbarch
->do_registers_info
1085 /*DO_REGISTERS_INFO ()*/);
1087 #ifdef DWARF2_BUILD_FRAME_INFO
1089 /* Macro might contain `[{}]' when not multi-arch */
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: %s # %s\n",
1092 "DWARF2_BUILD_FRAME_INFO(objfile)",
1093 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1098 (long) current_gdbarch
->dwarf2_build_frame_info
1099 /*DWARF2_BUILD_FRAME_INFO ()*/);
1101 #ifdef DWARF2_REG_TO_REGNUM
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: %s # %s\n",
1104 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1105 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1109 (long) current_gdbarch
->dwarf2_reg_to_regnum
1110 /*DWARF2_REG_TO_REGNUM ()*/);
1112 #ifdef DWARF_REG_TO_REGNUM
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: %s # %s\n",
1115 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1116 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1120 (long) current_gdbarch
->dwarf_reg_to_regnum
1121 /*DWARF_REG_TO_REGNUM ()*/);
1123 #ifdef ECOFF_REG_TO_REGNUM
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: %s # %s\n",
1126 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1127 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1131 (long) current_gdbarch
->ecoff_reg_to_regnum
1132 /*ECOFF_REG_TO_REGNUM ()*/);
1134 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1136 /* Macro might contain `[{}]' when not multi-arch */
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: %s # %s\n",
1139 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1140 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1145 (long) current_gdbarch
->elf_make_msymbol_special
1146 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1148 #ifdef EXTRACT_RETURN_VALUE
1150 /* Macro might contain `[{}]' when not multi-arch */
1151 fprintf_unfiltered (file
,
1152 "gdbarch_dump: %s # %s\n",
1153 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1154 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1159 (long) current_gdbarch
->extract_return_value
1160 /*EXTRACT_RETURN_VALUE ()*/);
1162 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: %s # %s\n",
1165 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1166 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1170 (long) current_gdbarch
->extract_struct_value_address
1171 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1173 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1176 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1179 EXTRA_STACK_ALIGNMENT_NEEDED
);
1181 #ifdef FIX_CALL_DUMMY
1183 /* Macro might contain `[{}]' when not multi-arch */
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: %s # %s\n",
1186 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1187 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1192 (long) current_gdbarch
->fix_call_dummy
1193 /*FIX_CALL_DUMMY ()*/);
1196 fprintf_unfiltered (file
,
1197 "gdbarch_dump: FP0_REGNUM # %s\n",
1198 XSTRING (FP0_REGNUM
));
1199 fprintf_unfiltered (file
,
1200 "gdbarch_dump: FP0_REGNUM = %d\n",
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: FP_REGNUM # %s\n",
1206 XSTRING (FP_REGNUM
));
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: FP_REGNUM = %d\n",
1211 #ifdef FRAMELESS_FUNCTION_INVOCATION
1212 fprintf_unfiltered (file
,
1213 "gdbarch_dump: %s # %s\n",
1214 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1215 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1219 (long) current_gdbarch
->frameless_function_invocation
1220 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1222 #ifdef FRAME_ARGS_ADDRESS
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: %s # %s\n",
1225 "FRAME_ARGS_ADDRESS(fi)",
1226 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1230 (long) current_gdbarch
->frame_args_address
1231 /*FRAME_ARGS_ADDRESS ()*/);
1233 #ifdef FRAME_ARGS_SKIP
1234 fprintf_unfiltered (file
,
1235 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1236 XSTRING (FRAME_ARGS_SKIP
));
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1239 (long) FRAME_ARGS_SKIP
);
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: %s # %s\n",
1244 "FRAME_CHAIN(frame)",
1245 XSTRING (FRAME_CHAIN (frame
)));
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1249 (long) current_gdbarch
->frame_chain
1250 /*FRAME_CHAIN ()*/);
1252 #ifdef FRAME_CHAIN_VALID
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: %s # %s\n",
1255 "FRAME_CHAIN_VALID(chain, thisframe)",
1256 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1260 (long) current_gdbarch
->frame_chain_valid
1261 /*FRAME_CHAIN_VALID ()*/);
1263 #ifdef FRAME_INIT_SAVED_REGS
1265 /* Macro might contain `[{}]' when not multi-arch */
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: %s # %s\n",
1268 "FRAME_INIT_SAVED_REGS(frame)",
1269 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1274 (long) current_gdbarch
->frame_init_saved_regs
1275 /*FRAME_INIT_SAVED_REGS ()*/);
1277 #ifdef FRAME_LOCALS_ADDRESS
1278 fprintf_unfiltered (file
,
1279 "gdbarch_dump: %s # %s\n",
1280 "FRAME_LOCALS_ADDRESS(fi)",
1281 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1285 (long) current_gdbarch
->frame_locals_address
1286 /*FRAME_LOCALS_ADDRESS ()*/);
1288 #ifdef FRAME_NUM_ARGS
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: %s # %s\n",
1291 "FRAME_NUM_ARGS(frame)",
1292 XSTRING (FRAME_NUM_ARGS (frame
)));
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1296 (long) current_gdbarch
->frame_num_args
1297 /*FRAME_NUM_ARGS ()*/);
1299 #ifdef FRAME_SAVED_PC
1300 fprintf_unfiltered (file
,
1301 "gdbarch_dump: %s # %s\n",
1302 "FRAME_SAVED_PC(fi)",
1303 XSTRING (FRAME_SAVED_PC (fi
)));
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1307 (long) current_gdbarch
->frame_saved_pc
1308 /*FRAME_SAVED_PC ()*/);
1310 #ifdef FUNCTION_START_OFFSET
1311 fprintf_unfiltered (file
,
1312 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1313 XSTRING (FUNCTION_START_OFFSET
));
1314 fprintf_unfiltered (file
,
1315 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1316 (long) FUNCTION_START_OFFSET
);
1318 #ifdef GET_LONGJMP_TARGET
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: %s # %s\n",
1321 "GET_LONGJMP_TARGET(pc)",
1322 XSTRING (GET_LONGJMP_TARGET (pc
)));
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1326 (long) current_gdbarch
->get_longjmp_target
1327 /*GET_LONGJMP_TARGET ()*/);
1329 #ifdef GET_SAVED_REGISTER
1331 /* Macro might contain `[{}]' when not multi-arch */
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: %s # %s\n",
1334 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1335 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1340 (long) current_gdbarch
->get_saved_register
1341 /*GET_SAVED_REGISTER ()*/);
1343 #ifdef INIT_EXTRA_FRAME_INFO
1345 /* Macro might contain `[{}]' when not multi-arch */
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: %s # %s\n",
1348 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1349 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1354 (long) current_gdbarch
->init_extra_frame_info
1355 /*INIT_EXTRA_FRAME_INFO ()*/);
1357 #ifdef INIT_FRAME_PC
1359 /* Macro might contain `[{}]' when not multi-arch */
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: %s # %s\n",
1362 "INIT_FRAME_PC(fromleaf, prev)",
1363 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1366 fprintf_unfiltered (file
,
1367 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1368 (long) current_gdbarch
->init_frame_pc
1369 /*INIT_FRAME_PC ()*/);
1371 #ifdef INIT_FRAME_PC_FIRST
1373 /* Macro might contain `[{}]' when not multi-arch */
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: %s # %s\n",
1376 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1377 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1382 (long) current_gdbarch
->init_frame_pc_first
1383 /*INIT_FRAME_PC_FIRST ()*/);
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: %s # %s\n",
1388 "INNER_THAN(lhs, rhs)",
1389 XSTRING (INNER_THAN (lhs
, rhs
)));
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1393 (long) current_gdbarch
->inner_than
1396 #ifdef INTEGER_TO_ADDRESS
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: %s # %s\n",
1399 "INTEGER_TO_ADDRESS(type, buf)",
1400 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1402 fprintf_unfiltered (file
,
1403 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1404 (long) current_gdbarch
->integer_to_address
1405 /*INTEGER_TO_ADDRESS ()*/);
1407 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: %s # %s\n",
1410 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1411 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1415 (long) current_gdbarch
->in_solib_call_trampoline
1416 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1418 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1419 fprintf_unfiltered (file
,
1420 "gdbarch_dump: %s # %s\n",
1421 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1422 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
1426 (long) current_gdbarch
->in_solib_return_trampoline
1427 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1429 #ifdef MAX_REGISTER_RAW_SIZE
1430 fprintf_unfiltered (file
,
1431 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1432 XSTRING (MAX_REGISTER_RAW_SIZE
));
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1435 MAX_REGISTER_RAW_SIZE
);
1437 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1440 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1443 MAX_REGISTER_VIRTUAL_SIZE
);
1445 #ifdef MEMORY_INSERT_BREAKPOINT
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: %s # %s\n",
1448 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1449 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1453 (long) current_gdbarch
->memory_insert_breakpoint
1454 /*MEMORY_INSERT_BREAKPOINT ()*/);
1456 #ifdef MEMORY_REMOVE_BREAKPOINT
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: %s # %s\n",
1459 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1460 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1464 (long) current_gdbarch
->memory_remove_breakpoint
1465 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1468 fprintf_unfiltered (file
,
1469 "gdbarch_dump: NPC_REGNUM # %s\n",
1470 XSTRING (NPC_REGNUM
));
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: NPC_REGNUM = %d\n",
1475 #ifdef NUM_PSEUDO_REGS
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1478 XSTRING (NUM_PSEUDO_REGS
));
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1484 fprintf_unfiltered (file
,
1485 "gdbarch_dump: NUM_REGS # %s\n",
1486 XSTRING (NUM_REGS
));
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: NUM_REGS = %d\n",
1491 #ifdef PARM_BOUNDARY
1492 fprintf_unfiltered (file
,
1493 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1494 XSTRING (PARM_BOUNDARY
));
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1499 #ifdef PC_IN_CALL_DUMMY
1500 fprintf_unfiltered (file
,
1501 "gdbarch_dump: %s # %s\n",
1502 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1503 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1507 (long) current_gdbarch
->pc_in_call_dummy
1508 /*PC_IN_CALL_DUMMY ()*/);
1510 #ifdef PC_IN_SIGTRAMP
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: %s # %s\n",
1513 "PC_IN_SIGTRAMP(pc, name)",
1514 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1518 (long) current_gdbarch
->pc_in_sigtramp
1519 /*PC_IN_SIGTRAMP ()*/);
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: PC_REGNUM # %s\n",
1524 XSTRING (PC_REGNUM
));
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: PC_REGNUM = %d\n",
1529 #ifdef POINTER_TO_ADDRESS
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: %s # %s\n",
1532 "POINTER_TO_ADDRESS(type, buf)",
1533 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1535 fprintf_unfiltered (file
,
1536 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1537 (long) current_gdbarch
->pointer_to_address
1538 /*POINTER_TO_ADDRESS ()*/);
1542 /* Macro might contain `[{}]' when not multi-arch */
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: %s # %s\n",
1546 XSTRING (POP_FRAME (-)));
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1551 (long) current_gdbarch
->pop_frame
1554 #ifdef PREPARE_TO_PROCEED
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: %s # %s\n",
1557 "PREPARE_TO_PROCEED(select_it)",
1558 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1562 (long) current_gdbarch
->prepare_to_proceed
1563 /*PREPARE_TO_PROCEED ()*/);
1566 fprintf_unfiltered (file
,
1567 "gdbarch_dump: print_float_info = 0x%08lx\n",
1568 (long) current_gdbarch
->print_float_info
);
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1572 (long) current_gdbarch
->print_vector_info
);
1573 #ifdef PROLOGUE_FRAMELESS_P
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: %s # %s\n",
1576 "PROLOGUE_FRAMELESS_P(ip)",
1577 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1579 fprintf_unfiltered (file
,
1580 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1581 (long) current_gdbarch
->prologue_frameless_p
1582 /*PROLOGUE_FRAMELESS_P ()*/);
1585 fprintf_unfiltered (file
,
1586 "gdbarch_dump: PS_REGNUM # %s\n",
1587 XSTRING (PS_REGNUM
));
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: PS_REGNUM = %d\n",
1592 #ifdef PUSH_ARGUMENTS
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: %s # %s\n",
1595 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1596 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1600 (long) current_gdbarch
->push_arguments
1601 /*PUSH_ARGUMENTS ()*/);
1603 #ifdef PUSH_DUMMY_FRAME
1605 /* Macro might contain `[{}]' when not multi-arch */
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: %s # %s\n",
1608 "PUSH_DUMMY_FRAME(-)",
1609 XSTRING (PUSH_DUMMY_FRAME (-)));
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1614 (long) current_gdbarch
->push_dummy_frame
1615 /*PUSH_DUMMY_FRAME ()*/);
1617 #ifdef PUSH_RETURN_ADDRESS
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: %s # %s\n",
1620 "PUSH_RETURN_ADDRESS(pc, sp)",
1621 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1625 (long) current_gdbarch
->push_return_address
1626 /*PUSH_RETURN_ADDRESS ()*/);
1628 #ifdef REGISTER_BYTE
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: %s # %s\n",
1631 "REGISTER_BYTE(reg_nr)",
1632 XSTRING (REGISTER_BYTE (reg_nr
)));
1634 fprintf_unfiltered (file
,
1635 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1636 (long) current_gdbarch
->register_byte
1637 /*REGISTER_BYTE ()*/);
1639 #ifdef REGISTER_BYTES
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: REGISTER_BYTES # %s\n",
1642 XSTRING (REGISTER_BYTES
));
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: REGISTER_BYTES = %d\n",
1647 #ifdef REGISTER_BYTES_OK
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: %s # %s\n",
1650 "REGISTER_BYTES_OK(nr_bytes)",
1651 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1655 (long) current_gdbarch
->register_bytes_ok
1656 /*REGISTER_BYTES_OK ()*/);
1658 #ifdef REGISTER_CONVERTIBLE
1659 fprintf_unfiltered (file
,
1660 "gdbarch_dump: %s # %s\n",
1661 "REGISTER_CONVERTIBLE(nr)",
1662 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1666 (long) current_gdbarch
->register_convertible
1667 /*REGISTER_CONVERTIBLE ()*/);
1669 #ifdef REGISTER_CONVERT_TO_RAW
1671 /* Macro might contain `[{}]' when not multi-arch */
1672 fprintf_unfiltered (file
,
1673 "gdbarch_dump: %s # %s\n",
1674 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1675 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1680 (long) current_gdbarch
->register_convert_to_raw
1681 /*REGISTER_CONVERT_TO_RAW ()*/);
1683 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1685 /* Macro might contain `[{}]' when not multi-arch */
1686 fprintf_unfiltered (file
,
1687 "gdbarch_dump: %s # %s\n",
1688 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1689 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1694 (long) current_gdbarch
->register_convert_to_virtual
1695 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1697 #ifdef REGISTER_NAME
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: %s # %s\n",
1700 "REGISTER_NAME(regnr)",
1701 XSTRING (REGISTER_NAME (regnr
)));
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1705 (long) current_gdbarch
->register_name
1706 /*REGISTER_NAME ()*/);
1708 #ifdef REGISTER_RAW_SIZE
1709 fprintf_unfiltered (file
,
1710 "gdbarch_dump: %s # %s\n",
1711 "REGISTER_RAW_SIZE(reg_nr)",
1712 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1716 (long) current_gdbarch
->register_raw_size
1717 /*REGISTER_RAW_SIZE ()*/);
1719 #ifdef REGISTER_SIM_REGNO
1720 fprintf_unfiltered (file
,
1721 "gdbarch_dump: %s # %s\n",
1722 "REGISTER_SIM_REGNO(reg_nr)",
1723 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1725 fprintf_unfiltered (file
,
1726 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1727 (long) current_gdbarch
->register_sim_regno
1728 /*REGISTER_SIM_REGNO ()*/);
1730 #ifdef REGISTER_SIZE
1731 fprintf_unfiltered (file
,
1732 "gdbarch_dump: REGISTER_SIZE # %s\n",
1733 XSTRING (REGISTER_SIZE
));
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: REGISTER_SIZE = %d\n",
1738 #ifdef REGISTER_TO_VALUE
1740 /* Macro might contain `[{}]' when not multi-arch */
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: %s # %s\n",
1743 "REGISTER_TO_VALUE(regnum, type, from, to)",
1744 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1749 (long) current_gdbarch
->register_to_value
1750 /*REGISTER_TO_VALUE ()*/);
1752 #ifdef REGISTER_VIRTUAL_SIZE
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: %s # %s\n",
1755 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1756 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1758 fprintf_unfiltered (file
,
1759 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1760 (long) current_gdbarch
->register_virtual_size
1761 /*REGISTER_VIRTUAL_SIZE ()*/);
1763 #ifdef REGISTER_VIRTUAL_TYPE
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: %s # %s\n",
1766 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1767 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1771 (long) current_gdbarch
->register_virtual_type
1772 /*REGISTER_VIRTUAL_TYPE ()*/);
1774 #ifdef REG_STRUCT_HAS_ADDR
1775 fprintf_unfiltered (file
,
1776 "gdbarch_dump: %s # %s\n",
1777 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1778 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1780 fprintf_unfiltered (file
,
1781 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1782 (long) current_gdbarch
->reg_struct_has_addr
1783 /*REG_STRUCT_HAS_ADDR ()*/);
1785 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1787 /* Macro might contain `[{}]' when not multi-arch */
1788 fprintf_unfiltered (file
,
1789 "gdbarch_dump: %s # %s\n",
1790 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1791 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1796 (long) current_gdbarch
->remote_translate_xfer_address
1797 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1799 #ifdef RETURN_VALUE_ON_STACK
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: %s # %s\n",
1802 "RETURN_VALUE_ON_STACK(type)",
1803 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1805 fprintf_unfiltered (file
,
1806 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1807 (long) current_gdbarch
->return_value_on_stack
1808 /*RETURN_VALUE_ON_STACK ()*/);
1810 #ifdef SAVED_PC_AFTER_CALL
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: %s # %s\n",
1813 "SAVED_PC_AFTER_CALL(frame)",
1814 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1818 (long) current_gdbarch
->saved_pc_after_call
1819 /*SAVED_PC_AFTER_CALL ()*/);
1821 #ifdef SAVE_DUMMY_FRAME_TOS
1823 /* Macro might contain `[{}]' when not multi-arch */
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: %s # %s\n",
1826 "SAVE_DUMMY_FRAME_TOS(sp)",
1827 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1832 (long) current_gdbarch
->save_dummy_frame_tos
1833 /*SAVE_DUMMY_FRAME_TOS ()*/);
1835 #ifdef SDB_REG_TO_REGNUM
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: %s # %s\n",
1838 "SDB_REG_TO_REGNUM(sdb_regnr)",
1839 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1843 (long) current_gdbarch
->sdb_reg_to_regnum
1844 /*SDB_REG_TO_REGNUM ()*/);
1846 #ifdef SIZEOF_CALL_DUMMY_WORDS
1847 fprintf_unfiltered (file
,
1848 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1849 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1852 (long) SIZEOF_CALL_DUMMY_WORDS
);
1854 #ifdef SKIP_PROLOGUE
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: %s # %s\n",
1857 "SKIP_PROLOGUE(ip)",
1858 XSTRING (SKIP_PROLOGUE (ip
)));
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1862 (long) current_gdbarch
->skip_prologue
1863 /*SKIP_PROLOGUE ()*/);
1865 #ifdef SKIP_TRAMPOLINE_CODE
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: %s # %s\n",
1868 "SKIP_TRAMPOLINE_CODE(pc)",
1869 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1873 (long) current_gdbarch
->skip_trampoline_code
1874 /*SKIP_TRAMPOLINE_CODE ()*/);
1876 #ifdef SMASH_TEXT_ADDRESS
1877 fprintf_unfiltered (file
,
1878 "gdbarch_dump: %s # %s\n",
1879 "SMASH_TEXT_ADDRESS(addr)",
1880 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1882 fprintf_unfiltered (file
,
1883 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1884 (long) current_gdbarch
->smash_text_address
1885 /*SMASH_TEXT_ADDRESS ()*/);
1887 #ifdef SOFTWARE_SINGLE_STEP
1889 /* Macro might contain `[{}]' when not multi-arch */
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: %s # %s\n",
1892 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1893 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1896 fprintf_unfiltered (file
,
1897 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1898 (long) current_gdbarch
->software_single_step
1899 /*SOFTWARE_SINGLE_STEP ()*/);
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: SP_REGNUM # %s\n",
1904 XSTRING (SP_REGNUM
));
1905 fprintf_unfiltered (file
,
1906 "gdbarch_dump: SP_REGNUM = %d\n",
1909 #ifdef STAB_REG_TO_REGNUM
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: %s # %s\n",
1912 "STAB_REG_TO_REGNUM(stab_regnr)",
1913 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1917 (long) current_gdbarch
->stab_reg_to_regnum
1918 /*STAB_REG_TO_REGNUM ()*/);
1921 fprintf_unfiltered (file
,
1922 "gdbarch_dump: %s # %s\n",
1924 XSTRING (STACK_ALIGN (sp
)));
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1928 (long) current_gdbarch
->stack_align
1929 /*STACK_ALIGN ()*/);
1931 #ifdef STORE_RETURN_VALUE
1933 /* Macro might contain `[{}]' when not multi-arch */
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: %s # %s\n",
1936 "STORE_RETURN_VALUE(type, valbuf)",
1937 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1942 (long) current_gdbarch
->store_return_value
1943 /*STORE_RETURN_VALUE ()*/);
1945 #ifdef STORE_STRUCT_RETURN
1947 /* Macro might contain `[{}]' when not multi-arch */
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: %s # %s\n",
1950 "STORE_STRUCT_RETURN(addr, sp)",
1951 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1956 (long) current_gdbarch
->store_struct_return
1957 /*STORE_STRUCT_RETURN ()*/);
1959 #ifdef TARGET_ADDR_BIT
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1962 XSTRING (TARGET_ADDR_BIT
));
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1967 #ifdef TARGET_ARCHITECTURE
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1970 XSTRING (TARGET_ARCHITECTURE
));
1971 if (TARGET_ARCHITECTURE
!= NULL
)
1972 fprintf_unfiltered (file
,
1973 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1974 TARGET_ARCHITECTURE
->printable_name
);
1976 #ifdef TARGET_BFD_VMA_BIT
1977 fprintf_unfiltered (file
,
1978 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1979 XSTRING (TARGET_BFD_VMA_BIT
));
1980 fprintf_unfiltered (file
,
1981 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1982 TARGET_BFD_VMA_BIT
);
1984 #ifdef TARGET_BYTE_ORDER
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1987 XSTRING (TARGET_BYTE_ORDER
));
1988 fprintf_unfiltered (file
,
1989 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1990 (long) TARGET_BYTE_ORDER
);
1992 #ifdef TARGET_CHAR_SIGNED
1993 fprintf_unfiltered (file
,
1994 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1995 XSTRING (TARGET_CHAR_SIGNED
));
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1998 TARGET_CHAR_SIGNED
);
2000 #ifdef TARGET_DOUBLE_BIT
2001 fprintf_unfiltered (file
,
2002 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2003 XSTRING (TARGET_DOUBLE_BIT
));
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2008 #ifdef TARGET_DOUBLE_FORMAT
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2011 XSTRING (TARGET_DOUBLE_FORMAT
));
2012 fprintf_unfiltered (file
,
2013 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2014 (long) TARGET_DOUBLE_FORMAT
);
2016 #ifdef TARGET_FLOAT_BIT
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2019 XSTRING (TARGET_FLOAT_BIT
));
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2024 #ifdef TARGET_FLOAT_FORMAT
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2027 XSTRING (TARGET_FLOAT_FORMAT
));
2028 fprintf_unfiltered (file
,
2029 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2030 (long) TARGET_FLOAT_FORMAT
);
2032 #ifdef TARGET_INT_BIT
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2035 XSTRING (TARGET_INT_BIT
));
2036 fprintf_unfiltered (file
,
2037 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2040 #ifdef TARGET_LONG_BIT
2041 fprintf_unfiltered (file
,
2042 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2043 XSTRING (TARGET_LONG_BIT
));
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2048 #ifdef TARGET_LONG_DOUBLE_BIT
2049 fprintf_unfiltered (file
,
2050 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2051 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2054 TARGET_LONG_DOUBLE_BIT
);
2056 #ifdef TARGET_LONG_DOUBLE_FORMAT
2057 fprintf_unfiltered (file
,
2058 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2059 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2062 (long) TARGET_LONG_DOUBLE_FORMAT
);
2064 #ifdef TARGET_LONG_LONG_BIT
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2067 XSTRING (TARGET_LONG_LONG_BIT
));
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2070 TARGET_LONG_LONG_BIT
);
2072 #ifdef TARGET_PRINT_INSN
2073 fprintf_unfiltered (file
,
2074 "gdbarch_dump: %s # %s\n",
2075 "TARGET_PRINT_INSN(vma, info)",
2076 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2080 (long) current_gdbarch
->print_insn
2081 /*TARGET_PRINT_INSN ()*/);
2083 #ifdef TARGET_PTR_BIT
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2086 XSTRING (TARGET_PTR_BIT
));
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2091 #ifdef TARGET_READ_FP
2092 fprintf_unfiltered (file
,
2093 "gdbarch_dump: %s # %s\n",
2095 XSTRING (TARGET_READ_FP ()));
2097 fprintf_unfiltered (file
,
2098 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2099 (long) current_gdbarch
->read_fp
2100 /*TARGET_READ_FP ()*/);
2102 #ifdef TARGET_READ_PC
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: %s # %s\n",
2105 "TARGET_READ_PC(ptid)",
2106 XSTRING (TARGET_READ_PC (ptid
)));
2108 fprintf_unfiltered (file
,
2109 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2110 (long) current_gdbarch
->read_pc
2111 /*TARGET_READ_PC ()*/);
2113 #ifdef TARGET_READ_SP
2114 fprintf_unfiltered (file
,
2115 "gdbarch_dump: %s # %s\n",
2117 XSTRING (TARGET_READ_SP ()));
2119 fprintf_unfiltered (file
,
2120 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2121 (long) current_gdbarch
->read_sp
2122 /*TARGET_READ_SP ()*/);
2124 #ifdef TARGET_SHORT_BIT
2125 fprintf_unfiltered (file
,
2126 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2127 XSTRING (TARGET_SHORT_BIT
));
2128 fprintf_unfiltered (file
,
2129 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2132 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2134 /* Macro might contain `[{}]' when not multi-arch */
2135 fprintf_unfiltered (file
,
2136 "gdbarch_dump: %s # %s\n",
2137 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2138 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2143 (long) current_gdbarch
->virtual_frame_pointer
2144 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2146 #ifdef TARGET_WRITE_PC
2148 /* Macro might contain `[{}]' when not multi-arch */
2149 fprintf_unfiltered (file
,
2150 "gdbarch_dump: %s # %s\n",
2151 "TARGET_WRITE_PC(val, ptid)",
2152 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2155 fprintf_unfiltered (file
,
2156 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2157 (long) current_gdbarch
->write_pc
2158 /*TARGET_WRITE_PC ()*/);
2160 #ifdef TARGET_WRITE_SP
2162 /* Macro might contain `[{}]' when not multi-arch */
2163 fprintf_unfiltered (file
,
2164 "gdbarch_dump: %s # %s\n",
2165 "TARGET_WRITE_SP(val)",
2166 XSTRING (TARGET_WRITE_SP (val
)));
2169 fprintf_unfiltered (file
,
2170 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2171 (long) current_gdbarch
->write_sp
2172 /*TARGET_WRITE_SP ()*/);
2174 #ifdef USE_GENERIC_DUMMY_FRAMES
2175 fprintf_unfiltered (file
,
2176 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2177 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2178 fprintf_unfiltered (file
,
2179 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2180 USE_GENERIC_DUMMY_FRAMES
);
2182 #ifdef USE_STRUCT_CONVENTION
2183 fprintf_unfiltered (file
,
2184 "gdbarch_dump: %s # %s\n",
2185 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2186 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2188 fprintf_unfiltered (file
,
2189 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2190 (long) current_gdbarch
->use_struct_convention
2191 /*USE_STRUCT_CONVENTION ()*/);
2193 #ifdef VALUE_TO_REGISTER
2195 /* Macro might contain `[{}]' when not multi-arch */
2196 fprintf_unfiltered (file
,
2197 "gdbarch_dump: %s # %s\n",
2198 "VALUE_TO_REGISTER(type, regnum, from, to)",
2199 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2202 fprintf_unfiltered (file
,
2203 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2204 (long) current_gdbarch
->value_to_register
2205 /*VALUE_TO_REGISTER ()*/);
2207 if (current_gdbarch
->dump_tdep
!= NULL
)
2208 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2211 struct gdbarch_tdep
*
2212 gdbarch_tdep (struct gdbarch
*gdbarch
)
2214 if (gdbarch_debug
>= 2)
2215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2216 return gdbarch
->tdep
;
2220 const struct bfd_arch_info
*
2221 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2223 gdb_assert (gdbarch
!= NULL
);
2224 if (gdbarch_debug
>= 2)
2225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2226 return gdbarch
->bfd_arch_info
;
2230 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2232 gdb_assert (gdbarch
!= NULL
);
2233 if (gdbarch_debug
>= 2)
2234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2235 return gdbarch
->byte_order
;
2239 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2241 gdb_assert (gdbarch
!= NULL
);
2242 /* Skip verify of short_bit, invalid_p == 0 */
2243 if (gdbarch_debug
>= 2)
2244 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2245 return gdbarch
->short_bit
;
2249 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2252 gdbarch
->short_bit
= short_bit
;
2256 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2258 gdb_assert (gdbarch
!= NULL
);
2259 /* Skip verify of int_bit, invalid_p == 0 */
2260 if (gdbarch_debug
>= 2)
2261 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2262 return gdbarch
->int_bit
;
2266 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2269 gdbarch
->int_bit
= int_bit
;
2273 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2275 gdb_assert (gdbarch
!= NULL
);
2276 /* Skip verify of long_bit, invalid_p == 0 */
2277 if (gdbarch_debug
>= 2)
2278 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2279 return gdbarch
->long_bit
;
2283 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2286 gdbarch
->long_bit
= long_bit
;
2290 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2292 gdb_assert (gdbarch
!= NULL
);
2293 /* Skip verify of long_long_bit, invalid_p == 0 */
2294 if (gdbarch_debug
>= 2)
2295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2296 return gdbarch
->long_long_bit
;
2300 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2303 gdbarch
->long_long_bit
= long_long_bit
;
2307 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2309 gdb_assert (gdbarch
!= NULL
);
2310 /* Skip verify of float_bit, invalid_p == 0 */
2311 if (gdbarch_debug
>= 2)
2312 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2313 return gdbarch
->float_bit
;
2317 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2320 gdbarch
->float_bit
= float_bit
;
2324 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2326 gdb_assert (gdbarch
!= NULL
);
2327 /* Skip verify of double_bit, invalid_p == 0 */
2328 if (gdbarch_debug
>= 2)
2329 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2330 return gdbarch
->double_bit
;
2334 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2337 gdbarch
->double_bit
= double_bit
;
2341 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2343 gdb_assert (gdbarch
!= NULL
);
2344 /* Skip verify of long_double_bit, invalid_p == 0 */
2345 if (gdbarch_debug
>= 2)
2346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2347 return gdbarch
->long_double_bit
;
2351 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2352 int long_double_bit
)
2354 gdbarch
->long_double_bit
= long_double_bit
;
2358 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2360 gdb_assert (gdbarch
!= NULL
);
2361 /* Skip verify of ptr_bit, invalid_p == 0 */
2362 if (gdbarch_debug
>= 2)
2363 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2364 return gdbarch
->ptr_bit
;
2368 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2371 gdbarch
->ptr_bit
= ptr_bit
;
2375 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2377 gdb_assert (gdbarch
!= NULL
);
2378 if (gdbarch
->addr_bit
== 0)
2379 internal_error (__FILE__
, __LINE__
,
2380 "gdbarch: gdbarch_addr_bit invalid");
2381 if (gdbarch_debug
>= 2)
2382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2383 return gdbarch
->addr_bit
;
2387 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2390 gdbarch
->addr_bit
= addr_bit
;
2394 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2396 gdb_assert (gdbarch
!= NULL
);
2397 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2398 if (gdbarch_debug
>= 2)
2399 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2400 return gdbarch
->bfd_vma_bit
;
2404 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2407 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2411 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2413 gdb_assert (gdbarch
!= NULL
);
2414 if (gdbarch
->char_signed
== -1)
2415 internal_error (__FILE__
, __LINE__
,
2416 "gdbarch: gdbarch_char_signed invalid");
2417 if (gdbarch_debug
>= 2)
2418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2419 return gdbarch
->char_signed
;
2423 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2426 gdbarch
->char_signed
= char_signed
;
2430 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2432 gdb_assert (gdbarch
!= NULL
);
2433 if (gdbarch
->read_pc
== 0)
2434 internal_error (__FILE__
, __LINE__
,
2435 "gdbarch: gdbarch_read_pc invalid");
2436 if (gdbarch_debug
>= 2)
2437 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2438 return gdbarch
->read_pc (ptid
);
2442 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2443 gdbarch_read_pc_ftype read_pc
)
2445 gdbarch
->read_pc
= read_pc
;
2449 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2451 gdb_assert (gdbarch
!= NULL
);
2452 if (gdbarch
->write_pc
== 0)
2453 internal_error (__FILE__
, __LINE__
,
2454 "gdbarch: gdbarch_write_pc invalid");
2455 if (gdbarch_debug
>= 2)
2456 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2457 gdbarch
->write_pc (val
, ptid
);
2461 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2462 gdbarch_write_pc_ftype write_pc
)
2464 gdbarch
->write_pc
= write_pc
;
2468 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2470 gdb_assert (gdbarch
!= NULL
);
2471 if (gdbarch
->read_fp
== 0)
2472 internal_error (__FILE__
, __LINE__
,
2473 "gdbarch: gdbarch_read_fp invalid");
2474 if (gdbarch_debug
>= 2)
2475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2476 return gdbarch
->read_fp ();
2480 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2481 gdbarch_read_fp_ftype read_fp
)
2483 gdbarch
->read_fp
= read_fp
;
2487 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2489 gdb_assert (gdbarch
!= NULL
);
2490 if (gdbarch
->read_sp
== 0)
2491 internal_error (__FILE__
, __LINE__
,
2492 "gdbarch: gdbarch_read_sp invalid");
2493 if (gdbarch_debug
>= 2)
2494 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2495 return gdbarch
->read_sp ();
2499 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2500 gdbarch_read_sp_ftype read_sp
)
2502 gdbarch
->read_sp
= read_sp
;
2506 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2508 gdb_assert (gdbarch
!= NULL
);
2509 if (gdbarch
->write_sp
== 0)
2510 internal_error (__FILE__
, __LINE__
,
2511 "gdbarch: gdbarch_write_sp invalid");
2512 if (gdbarch_debug
>= 2)
2513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2514 gdbarch
->write_sp (val
);
2518 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2519 gdbarch_write_sp_ftype write_sp
)
2521 gdbarch
->write_sp
= write_sp
;
2525 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2527 gdb_assert (gdbarch
!= NULL
);
2528 if (gdbarch
->virtual_frame_pointer
== 0)
2529 internal_error (__FILE__
, __LINE__
,
2530 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2531 if (gdbarch_debug
>= 2)
2532 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2533 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2537 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2538 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2540 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2544 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2546 gdb_assert (gdbarch
!= NULL
);
2547 return gdbarch
->pseudo_register_read
!= 0;
2551 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2553 gdb_assert (gdbarch
!= NULL
);
2554 if (gdbarch
->pseudo_register_read
== 0)
2555 internal_error (__FILE__
, __LINE__
,
2556 "gdbarch: gdbarch_pseudo_register_read invalid");
2557 if (gdbarch_debug
>= 2)
2558 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2559 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2563 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2564 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2566 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2570 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2572 gdb_assert (gdbarch
!= NULL
);
2573 return gdbarch
->pseudo_register_write
!= 0;
2577 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2579 gdb_assert (gdbarch
!= NULL
);
2580 if (gdbarch
->pseudo_register_write
== 0)
2581 internal_error (__FILE__
, __LINE__
,
2582 "gdbarch: gdbarch_pseudo_register_write invalid");
2583 if (gdbarch_debug
>= 2)
2584 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2585 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2589 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2590 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2592 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2596 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2598 gdb_assert (gdbarch
!= NULL
);
2599 if (gdbarch
->num_regs
== -1)
2600 internal_error (__FILE__
, __LINE__
,
2601 "gdbarch: gdbarch_num_regs invalid");
2602 if (gdbarch_debug
>= 2)
2603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2604 return gdbarch
->num_regs
;
2608 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2611 gdbarch
->num_regs
= num_regs
;
2615 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2617 gdb_assert (gdbarch
!= NULL
);
2618 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2619 if (gdbarch_debug
>= 2)
2620 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2621 return gdbarch
->num_pseudo_regs
;
2625 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2626 int num_pseudo_regs
)
2628 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2632 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2634 gdb_assert (gdbarch
!= NULL
);
2635 /* Skip verify of sp_regnum, invalid_p == 0 */
2636 if (gdbarch_debug
>= 2)
2637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2638 return gdbarch
->sp_regnum
;
2642 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2645 gdbarch
->sp_regnum
= sp_regnum
;
2649 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2651 gdb_assert (gdbarch
!= NULL
);
2652 /* Skip verify of fp_regnum, invalid_p == 0 */
2653 if (gdbarch_debug
>= 2)
2654 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2655 return gdbarch
->fp_regnum
;
2659 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2662 gdbarch
->fp_regnum
= fp_regnum
;
2666 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2668 gdb_assert (gdbarch
!= NULL
);
2669 /* Skip verify of pc_regnum, invalid_p == 0 */
2670 if (gdbarch_debug
>= 2)
2671 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2672 return gdbarch
->pc_regnum
;
2676 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2679 gdbarch
->pc_regnum
= pc_regnum
;
2683 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2685 gdb_assert (gdbarch
!= NULL
);
2686 /* Skip verify of ps_regnum, invalid_p == 0 */
2687 if (gdbarch_debug
>= 2)
2688 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2689 return gdbarch
->ps_regnum
;
2693 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2696 gdbarch
->ps_regnum
= ps_regnum
;
2700 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2702 gdb_assert (gdbarch
!= NULL
);
2703 /* Skip verify of fp0_regnum, invalid_p == 0 */
2704 if (gdbarch_debug
>= 2)
2705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2706 return gdbarch
->fp0_regnum
;
2710 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2713 gdbarch
->fp0_regnum
= fp0_regnum
;
2717 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2719 gdb_assert (gdbarch
!= NULL
);
2720 /* Skip verify of npc_regnum, invalid_p == 0 */
2721 if (gdbarch_debug
>= 2)
2722 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2723 return gdbarch
->npc_regnum
;
2727 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2730 gdbarch
->npc_regnum
= npc_regnum
;
2734 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2736 gdb_assert (gdbarch
!= NULL
);
2737 if (gdbarch
->stab_reg_to_regnum
== 0)
2738 internal_error (__FILE__
, __LINE__
,
2739 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2740 if (gdbarch_debug
>= 2)
2741 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2742 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2746 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2747 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2749 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2753 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2755 gdb_assert (gdbarch
!= NULL
);
2756 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2757 internal_error (__FILE__
, __LINE__
,
2758 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2759 if (gdbarch_debug
>= 2)
2760 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2761 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2765 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2766 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2768 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2772 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2774 gdb_assert (gdbarch
!= NULL
);
2775 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2776 internal_error (__FILE__
, __LINE__
,
2777 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2778 if (gdbarch_debug
>= 2)
2779 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2780 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2784 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2785 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2787 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2791 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2793 gdb_assert (gdbarch
!= NULL
);
2794 if (gdbarch
->sdb_reg_to_regnum
== 0)
2795 internal_error (__FILE__
, __LINE__
,
2796 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2797 if (gdbarch_debug
>= 2)
2798 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2799 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2803 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2804 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2806 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2810 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2812 gdb_assert (gdbarch
!= NULL
);
2813 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2814 internal_error (__FILE__
, __LINE__
,
2815 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2816 if (gdbarch_debug
>= 2)
2817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2818 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2822 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2823 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2825 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2829 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2831 gdb_assert (gdbarch
!= NULL
);
2832 if (gdbarch
->register_name
== 0)
2833 internal_error (__FILE__
, __LINE__
,
2834 "gdbarch: gdbarch_register_name invalid");
2835 if (gdbarch_debug
>= 2)
2836 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2837 return gdbarch
->register_name (regnr
);
2841 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2842 gdbarch_register_name_ftype register_name
)
2844 gdbarch
->register_name
= register_name
;
2848 gdbarch_register_size (struct gdbarch
*gdbarch
)
2850 gdb_assert (gdbarch
!= NULL
);
2851 if (gdbarch
->register_size
== -1)
2852 internal_error (__FILE__
, __LINE__
,
2853 "gdbarch: gdbarch_register_size invalid");
2854 if (gdbarch_debug
>= 2)
2855 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2856 return gdbarch
->register_size
;
2860 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2863 gdbarch
->register_size
= register_size
;
2867 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2869 gdb_assert (gdbarch
!= NULL
);
2870 if (gdbarch
->register_bytes
== -1)
2871 internal_error (__FILE__
, __LINE__
,
2872 "gdbarch: gdbarch_register_bytes invalid");
2873 if (gdbarch_debug
>= 2)
2874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2875 return gdbarch
->register_bytes
;
2879 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2882 gdbarch
->register_bytes
= register_bytes
;
2886 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2888 gdb_assert (gdbarch
!= NULL
);
2889 if (gdbarch
->register_byte
== 0)
2890 internal_error (__FILE__
, __LINE__
,
2891 "gdbarch: gdbarch_register_byte invalid");
2892 if (gdbarch_debug
>= 2)
2893 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2894 return gdbarch
->register_byte (reg_nr
);
2898 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2899 gdbarch_register_byte_ftype register_byte
)
2901 gdbarch
->register_byte
= register_byte
;
2905 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2907 gdb_assert (gdbarch
!= NULL
);
2908 if (gdbarch
->register_raw_size
== 0)
2909 internal_error (__FILE__
, __LINE__
,
2910 "gdbarch: gdbarch_register_raw_size invalid");
2911 if (gdbarch_debug
>= 2)
2912 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2913 return gdbarch
->register_raw_size (reg_nr
);
2917 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2918 gdbarch_register_raw_size_ftype register_raw_size
)
2920 gdbarch
->register_raw_size
= register_raw_size
;
2924 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2926 gdb_assert (gdbarch
!= NULL
);
2927 if (gdbarch
->max_register_raw_size
== -1)
2928 internal_error (__FILE__
, __LINE__
,
2929 "gdbarch: gdbarch_max_register_raw_size invalid");
2930 if (gdbarch_debug
>= 2)
2931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2932 return gdbarch
->max_register_raw_size
;
2936 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2937 int max_register_raw_size
)
2939 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2943 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2945 gdb_assert (gdbarch
!= NULL
);
2946 if (gdbarch
->register_virtual_size
== 0)
2947 internal_error (__FILE__
, __LINE__
,
2948 "gdbarch: gdbarch_register_virtual_size invalid");
2949 if (gdbarch_debug
>= 2)
2950 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2951 return gdbarch
->register_virtual_size (reg_nr
);
2955 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2956 gdbarch_register_virtual_size_ftype register_virtual_size
)
2958 gdbarch
->register_virtual_size
= register_virtual_size
;
2962 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2964 gdb_assert (gdbarch
!= NULL
);
2965 if (gdbarch
->max_register_virtual_size
== -1)
2966 internal_error (__FILE__
, __LINE__
,
2967 "gdbarch: gdbarch_max_register_virtual_size invalid");
2968 if (gdbarch_debug
>= 2)
2969 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2970 return gdbarch
->max_register_virtual_size
;
2974 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2975 int max_register_virtual_size
)
2977 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2981 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2983 gdb_assert (gdbarch
!= NULL
);
2984 if (gdbarch
->register_virtual_type
== 0)
2985 internal_error (__FILE__
, __LINE__
,
2986 "gdbarch: gdbarch_register_virtual_type invalid");
2987 if (gdbarch_debug
>= 2)
2988 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2989 return gdbarch
->register_virtual_type (reg_nr
);
2993 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2994 gdbarch_register_virtual_type_ftype register_virtual_type
)
2996 gdbarch
->register_virtual_type
= register_virtual_type
;
3000 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3002 gdb_assert (gdbarch
!= NULL
);
3003 if (gdbarch
->do_registers_info
== 0)
3004 internal_error (__FILE__
, __LINE__
,
3005 "gdbarch: gdbarch_do_registers_info invalid");
3006 if (gdbarch_debug
>= 2)
3007 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
3008 gdbarch
->do_registers_info (reg_nr
, fpregs
);
3012 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
3013 gdbarch_do_registers_info_ftype do_registers_info
)
3015 gdbarch
->do_registers_info
= do_registers_info
;
3019 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3021 gdb_assert (gdbarch
!= NULL
);
3022 return gdbarch
->print_float_info
!= 0;
3026 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3028 gdb_assert (gdbarch
!= NULL
);
3029 if (gdbarch
->print_float_info
== 0)
3030 internal_error (__FILE__
, __LINE__
,
3031 "gdbarch: gdbarch_print_float_info invalid");
3032 if (gdbarch_debug
>= 2)
3033 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3034 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3038 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3039 gdbarch_print_float_info_ftype print_float_info
)
3041 gdbarch
->print_float_info
= print_float_info
;
3045 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3047 gdb_assert (gdbarch
!= NULL
);
3048 return gdbarch
->print_vector_info
!= 0;
3052 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3054 gdb_assert (gdbarch
!= NULL
);
3055 if (gdbarch
->print_vector_info
== 0)
3056 internal_error (__FILE__
, __LINE__
,
3057 "gdbarch: gdbarch_print_vector_info invalid");
3058 if (gdbarch_debug
>= 2)
3059 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3060 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3064 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3065 gdbarch_print_vector_info_ftype print_vector_info
)
3067 gdbarch
->print_vector_info
= print_vector_info
;
3071 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3073 gdb_assert (gdbarch
!= NULL
);
3074 if (gdbarch
->register_sim_regno
== 0)
3075 internal_error (__FILE__
, __LINE__
,
3076 "gdbarch: gdbarch_register_sim_regno invalid");
3077 if (gdbarch_debug
>= 2)
3078 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3079 return gdbarch
->register_sim_regno (reg_nr
);
3083 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3084 gdbarch_register_sim_regno_ftype register_sim_regno
)
3086 gdbarch
->register_sim_regno
= register_sim_regno
;
3090 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3092 gdb_assert (gdbarch
!= NULL
);
3093 return gdbarch
->register_bytes_ok
!= 0;
3097 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3099 gdb_assert (gdbarch
!= NULL
);
3100 if (gdbarch
->register_bytes_ok
== 0)
3101 internal_error (__FILE__
, __LINE__
,
3102 "gdbarch: gdbarch_register_bytes_ok invalid");
3103 if (gdbarch_debug
>= 2)
3104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3105 return gdbarch
->register_bytes_ok (nr_bytes
);
3109 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3110 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3112 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3116 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3118 gdb_assert (gdbarch
!= NULL
);
3119 if (gdbarch
->cannot_fetch_register
== 0)
3120 internal_error (__FILE__
, __LINE__
,
3121 "gdbarch: gdbarch_cannot_fetch_register invalid");
3122 if (gdbarch_debug
>= 2)
3123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3124 return gdbarch
->cannot_fetch_register (regnum
);
3128 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3129 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3131 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3135 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3137 gdb_assert (gdbarch
!= NULL
);
3138 if (gdbarch
->cannot_store_register
== 0)
3139 internal_error (__FILE__
, __LINE__
,
3140 "gdbarch: gdbarch_cannot_store_register invalid");
3141 if (gdbarch_debug
>= 2)
3142 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3143 return gdbarch
->cannot_store_register (regnum
);
3147 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3148 gdbarch_cannot_store_register_ftype cannot_store_register
)
3150 gdbarch
->cannot_store_register
= cannot_store_register
;
3154 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3156 gdb_assert (gdbarch
!= NULL
);
3157 return gdbarch
->get_longjmp_target
!= 0;
3161 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3163 gdb_assert (gdbarch
!= NULL
);
3164 if (gdbarch
->get_longjmp_target
== 0)
3165 internal_error (__FILE__
, __LINE__
,
3166 "gdbarch: gdbarch_get_longjmp_target invalid");
3167 if (gdbarch_debug
>= 2)
3168 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3169 return gdbarch
->get_longjmp_target (pc
);
3173 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3174 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3176 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3180 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3182 gdb_assert (gdbarch
!= NULL
);
3183 if (gdbarch
->use_generic_dummy_frames
== -1)
3184 internal_error (__FILE__
, __LINE__
,
3185 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3186 if (gdbarch_debug
>= 2)
3187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3188 return gdbarch
->use_generic_dummy_frames
;
3192 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3193 int use_generic_dummy_frames
)
3195 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3199 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3201 gdb_assert (gdbarch
!= NULL
);
3202 if (gdbarch
->call_dummy_location
== 0)
3203 internal_error (__FILE__
, __LINE__
,
3204 "gdbarch: gdbarch_call_dummy_location invalid");
3205 if (gdbarch_debug
>= 2)
3206 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3207 return gdbarch
->call_dummy_location
;
3211 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3212 int call_dummy_location
)
3214 gdbarch
->call_dummy_location
= call_dummy_location
;
3218 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3220 gdb_assert (gdbarch
!= NULL
);
3221 if (gdbarch
->call_dummy_address
== 0)
3222 internal_error (__FILE__
, __LINE__
,
3223 "gdbarch: gdbarch_call_dummy_address invalid");
3224 if (gdbarch_debug
>= 2)
3225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3226 return gdbarch
->call_dummy_address ();
3230 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3231 gdbarch_call_dummy_address_ftype call_dummy_address
)
3233 gdbarch
->call_dummy_address
= call_dummy_address
;
3237 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3239 gdb_assert (gdbarch
!= NULL
);
3240 if (gdbarch
->call_dummy_start_offset
== -1)
3241 internal_error (__FILE__
, __LINE__
,
3242 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3243 if (gdbarch_debug
>= 2)
3244 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3245 return gdbarch
->call_dummy_start_offset
;
3249 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3250 CORE_ADDR call_dummy_start_offset
)
3252 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3256 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3258 gdb_assert (gdbarch
!= NULL
);
3259 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3260 internal_error (__FILE__
, __LINE__
,
3261 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3262 if (gdbarch_debug
>= 2)
3263 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3264 return gdbarch
->call_dummy_breakpoint_offset
;
3268 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3269 CORE_ADDR call_dummy_breakpoint_offset
)
3271 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3275 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3277 gdb_assert (gdbarch
!= NULL
);
3278 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3279 internal_error (__FILE__
, __LINE__
,
3280 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3281 if (gdbarch_debug
>= 2)
3282 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3283 return gdbarch
->call_dummy_breakpoint_offset_p
;
3287 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3288 int call_dummy_breakpoint_offset_p
)
3290 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3294 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3296 gdb_assert (gdbarch
!= NULL
);
3297 if (gdbarch
->call_dummy_length
== -1)
3298 internal_error (__FILE__
, __LINE__
,
3299 "gdbarch: gdbarch_call_dummy_length invalid");
3300 if (gdbarch_debug
>= 2)
3301 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3302 return gdbarch
->call_dummy_length
;
3306 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3307 int call_dummy_length
)
3309 gdbarch
->call_dummy_length
= call_dummy_length
;
3313 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3315 gdb_assert (gdbarch
!= NULL
);
3316 if (gdbarch
->pc_in_call_dummy
== 0)
3317 internal_error (__FILE__
, __LINE__
,
3318 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3319 if (gdbarch_debug
>= 2)
3320 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3321 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3325 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3326 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3328 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3332 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3334 gdb_assert (gdbarch
!= NULL
);
3335 if (gdbarch
->call_dummy_p
== -1)
3336 internal_error (__FILE__
, __LINE__
,
3337 "gdbarch: gdbarch_call_dummy_p invalid");
3338 if (gdbarch_debug
>= 2)
3339 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3340 return gdbarch
->call_dummy_p
;
3344 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3347 gdbarch
->call_dummy_p
= call_dummy_p
;
3351 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3353 gdb_assert (gdbarch
!= NULL
);
3354 /* Skip verify of call_dummy_words, invalid_p == 0 */
3355 if (gdbarch_debug
>= 2)
3356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3357 return gdbarch
->call_dummy_words
;
3361 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3362 LONGEST
* call_dummy_words
)
3364 gdbarch
->call_dummy_words
= call_dummy_words
;
3368 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3370 gdb_assert (gdbarch
!= NULL
);
3371 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3372 if (gdbarch_debug
>= 2)
3373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3374 return gdbarch
->sizeof_call_dummy_words
;
3378 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3379 int sizeof_call_dummy_words
)
3381 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3385 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3387 gdb_assert (gdbarch
!= NULL
);
3388 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3389 internal_error (__FILE__
, __LINE__
,
3390 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3391 if (gdbarch_debug
>= 2)
3392 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3393 return gdbarch
->call_dummy_stack_adjust_p
;
3397 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3398 int call_dummy_stack_adjust_p
)
3400 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3404 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3406 gdb_assert (gdbarch
!= NULL
);
3407 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3408 internal_error (__FILE__
, __LINE__
,
3409 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3410 if (gdbarch_debug
>= 2)
3411 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3412 return gdbarch
->call_dummy_stack_adjust
;
3416 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3417 int call_dummy_stack_adjust
)
3419 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3423 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
)
3425 gdb_assert (gdbarch
!= NULL
);
3426 if (gdbarch
->fix_call_dummy
== 0)
3427 internal_error (__FILE__
, __LINE__
,
3428 "gdbarch: gdbarch_fix_call_dummy invalid");
3429 if (gdbarch_debug
>= 2)
3430 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3431 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3435 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3436 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3438 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3442 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3444 gdb_assert (gdbarch
!= NULL
);
3445 if (gdbarch
->init_frame_pc_first
== 0)
3446 internal_error (__FILE__
, __LINE__
,
3447 "gdbarch: gdbarch_init_frame_pc_first invalid");
3448 if (gdbarch_debug
>= 2)
3449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3450 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3454 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3455 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3457 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3461 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3463 gdb_assert (gdbarch
!= NULL
);
3464 if (gdbarch
->init_frame_pc
== 0)
3465 internal_error (__FILE__
, __LINE__
,
3466 "gdbarch: gdbarch_init_frame_pc invalid");
3467 if (gdbarch_debug
>= 2)
3468 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3469 gdbarch
->init_frame_pc (fromleaf
, prev
);
3473 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3474 gdbarch_init_frame_pc_ftype init_frame_pc
)
3476 gdbarch
->init_frame_pc
= init_frame_pc
;
3480 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3482 gdb_assert (gdbarch
!= NULL
);
3483 if (gdbarch_debug
>= 2)
3484 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3485 return gdbarch
->believe_pcc_promotion
;
3489 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3490 int believe_pcc_promotion
)
3492 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3496 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3498 gdb_assert (gdbarch
!= NULL
);
3499 if (gdbarch_debug
>= 2)
3500 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3501 return gdbarch
->believe_pcc_promotion_type
;
3505 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3506 int believe_pcc_promotion_type
)
3508 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3512 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3514 gdb_assert (gdbarch
!= NULL
);
3515 if (gdbarch
->coerce_float_to_double
== 0)
3516 internal_error (__FILE__
, __LINE__
,
3517 "gdbarch: gdbarch_coerce_float_to_double invalid");
3518 if (gdbarch_debug
>= 2)
3519 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3520 return gdbarch
->coerce_float_to_double (formal
, actual
);
3524 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3525 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3527 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3531 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
)
3533 gdb_assert (gdbarch
!= NULL
);
3534 if (gdbarch
->get_saved_register
== 0)
3535 internal_error (__FILE__
, __LINE__
,
3536 "gdbarch: gdbarch_get_saved_register invalid");
3537 if (gdbarch_debug
>= 2)
3538 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3539 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3543 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3544 gdbarch_get_saved_register_ftype get_saved_register
)
3546 gdbarch
->get_saved_register
= get_saved_register
;
3550 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3552 gdb_assert (gdbarch
!= NULL
);
3553 if (gdbarch
->register_convertible
== 0)
3554 internal_error (__FILE__
, __LINE__
,
3555 "gdbarch: gdbarch_register_convertible invalid");
3556 if (gdbarch_debug
>= 2)
3557 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3558 return gdbarch
->register_convertible (nr
);
3562 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3563 gdbarch_register_convertible_ftype register_convertible
)
3565 gdbarch
->register_convertible
= register_convertible
;
3569 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3571 gdb_assert (gdbarch
!= NULL
);
3572 if (gdbarch
->register_convert_to_virtual
== 0)
3573 internal_error (__FILE__
, __LINE__
,
3574 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3575 if (gdbarch_debug
>= 2)
3576 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3577 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3581 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3582 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3584 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3588 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3590 gdb_assert (gdbarch
!= NULL
);
3591 if (gdbarch
->register_convert_to_raw
== 0)
3592 internal_error (__FILE__
, __LINE__
,
3593 "gdbarch: gdbarch_register_convert_to_raw invalid");
3594 if (gdbarch_debug
>= 2)
3595 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3596 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3600 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3601 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3603 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3607 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3609 gdb_assert (gdbarch
!= NULL
);
3610 if (gdbarch
->convert_register_p
== 0)
3611 internal_error (__FILE__
, __LINE__
,
3612 "gdbarch: gdbarch_convert_register_p invalid");
3613 if (gdbarch_debug
>= 2)
3614 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3615 return gdbarch
->convert_register_p (regnum
);
3619 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3620 gdbarch_convert_register_p_ftype convert_register_p
)
3622 gdbarch
->convert_register_p
= convert_register_p
;
3626 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3628 gdb_assert (gdbarch
!= NULL
);
3629 if (gdbarch
->register_to_value
== 0)
3630 internal_error (__FILE__
, __LINE__
,
3631 "gdbarch: gdbarch_register_to_value invalid");
3632 if (gdbarch_debug
>= 2)
3633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3634 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3638 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3639 gdbarch_register_to_value_ftype register_to_value
)
3641 gdbarch
->register_to_value
= register_to_value
;
3645 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3647 gdb_assert (gdbarch
!= NULL
);
3648 if (gdbarch
->value_to_register
== 0)
3649 internal_error (__FILE__
, __LINE__
,
3650 "gdbarch: gdbarch_value_to_register invalid");
3651 if (gdbarch_debug
>= 2)
3652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3653 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3657 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3658 gdbarch_value_to_register_ftype value_to_register
)
3660 gdbarch
->value_to_register
= value_to_register
;
3664 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3666 gdb_assert (gdbarch
!= NULL
);
3667 if (gdbarch
->pointer_to_address
== 0)
3668 internal_error (__FILE__
, __LINE__
,
3669 "gdbarch: gdbarch_pointer_to_address invalid");
3670 if (gdbarch_debug
>= 2)
3671 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3672 return gdbarch
->pointer_to_address (type
, buf
);
3676 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3677 gdbarch_pointer_to_address_ftype pointer_to_address
)
3679 gdbarch
->pointer_to_address
= pointer_to_address
;
3683 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3685 gdb_assert (gdbarch
!= NULL
);
3686 if (gdbarch
->address_to_pointer
== 0)
3687 internal_error (__FILE__
, __LINE__
,
3688 "gdbarch: gdbarch_address_to_pointer invalid");
3689 if (gdbarch_debug
>= 2)
3690 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3691 gdbarch
->address_to_pointer (type
, buf
, addr
);
3695 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3696 gdbarch_address_to_pointer_ftype address_to_pointer
)
3698 gdbarch
->address_to_pointer
= address_to_pointer
;
3702 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3704 gdb_assert (gdbarch
!= NULL
);
3705 return gdbarch
->integer_to_address
!= 0;
3709 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3711 gdb_assert (gdbarch
!= NULL
);
3712 if (gdbarch
->integer_to_address
== 0)
3713 internal_error (__FILE__
, __LINE__
,
3714 "gdbarch: gdbarch_integer_to_address invalid");
3715 if (gdbarch_debug
>= 2)
3716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3717 return gdbarch
->integer_to_address (type
, buf
);
3721 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3722 gdbarch_integer_to_address_ftype integer_to_address
)
3724 gdbarch
->integer_to_address
= integer_to_address
;
3728 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3730 gdb_assert (gdbarch
!= NULL
);
3731 if (gdbarch
->return_value_on_stack
== 0)
3732 internal_error (__FILE__
, __LINE__
,
3733 "gdbarch: gdbarch_return_value_on_stack invalid");
3734 if (gdbarch_debug
>= 2)
3735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3736 return gdbarch
->return_value_on_stack (type
);
3740 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3741 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3743 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3747 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, char *valbuf
)
3749 gdb_assert (gdbarch
!= NULL
);
3750 if (gdbarch
->extract_return_value
== 0)
3751 internal_error (__FILE__
, __LINE__
,
3752 "gdbarch: gdbarch_extract_return_value invalid");
3753 if (gdbarch_debug
>= 2)
3754 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3755 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3759 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3760 gdbarch_extract_return_value_ftype extract_return_value
)
3762 gdbarch
->extract_return_value
= extract_return_value
;
3766 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3768 gdb_assert (gdbarch
!= NULL
);
3769 if (gdbarch
->deprecated_extract_return_value
== 0)
3770 internal_error (__FILE__
, __LINE__
,
3771 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
3772 if (gdbarch_debug
>= 2)
3773 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3774 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
3778 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
3779 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
3781 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
3785 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3787 gdb_assert (gdbarch
!= NULL
);
3788 if (gdbarch
->push_arguments
== 0)
3789 internal_error (__FILE__
, __LINE__
,
3790 "gdbarch: gdbarch_push_arguments invalid");
3791 if (gdbarch_debug
>= 2)
3792 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3793 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3797 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3798 gdbarch_push_arguments_ftype push_arguments
)
3800 gdbarch
->push_arguments
= push_arguments
;
3804 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3806 gdb_assert (gdbarch
!= NULL
);
3807 if (gdbarch
->push_dummy_frame
== 0)
3808 internal_error (__FILE__
, __LINE__
,
3809 "gdbarch: gdbarch_push_dummy_frame invalid");
3810 if (gdbarch_debug
>= 2)
3811 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3812 gdbarch
->push_dummy_frame ();
3816 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3817 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3819 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3823 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3825 gdb_assert (gdbarch
!= NULL
);
3826 return gdbarch
->push_return_address
!= 0;
3830 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3832 gdb_assert (gdbarch
!= NULL
);
3833 if (gdbarch
->push_return_address
== 0)
3834 internal_error (__FILE__
, __LINE__
,
3835 "gdbarch: gdbarch_push_return_address invalid");
3836 if (gdbarch_debug
>= 2)
3837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3838 return gdbarch
->push_return_address (pc
, sp
);
3842 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3843 gdbarch_push_return_address_ftype push_return_address
)
3845 gdbarch
->push_return_address
= push_return_address
;
3849 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3851 gdb_assert (gdbarch
!= NULL
);
3852 if (gdbarch
->pop_frame
== 0)
3853 internal_error (__FILE__
, __LINE__
,
3854 "gdbarch: gdbarch_pop_frame invalid");
3855 if (gdbarch_debug
>= 2)
3856 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3857 gdbarch
->pop_frame ();
3861 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3862 gdbarch_pop_frame_ftype pop_frame
)
3864 gdbarch
->pop_frame
= pop_frame
;
3868 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3870 gdb_assert (gdbarch
!= NULL
);
3871 if (gdbarch
->store_struct_return
== 0)
3872 internal_error (__FILE__
, __LINE__
,
3873 "gdbarch: gdbarch_store_struct_return invalid");
3874 if (gdbarch_debug
>= 2)
3875 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3876 gdbarch
->store_struct_return (addr
, sp
);
3880 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3881 gdbarch_store_struct_return_ftype store_struct_return
)
3883 gdbarch
->store_struct_return
= store_struct_return
;
3887 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3889 gdb_assert (gdbarch
!= NULL
);
3890 if (gdbarch
->store_return_value
== 0)
3891 internal_error (__FILE__
, __LINE__
,
3892 "gdbarch: gdbarch_store_return_value invalid");
3893 if (gdbarch_debug
>= 2)
3894 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3895 gdbarch
->store_return_value (type
, valbuf
);
3899 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3900 gdbarch_store_return_value_ftype store_return_value
)
3902 gdbarch
->store_return_value
= store_return_value
;
3906 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3908 gdb_assert (gdbarch
!= NULL
);
3909 return gdbarch
->extract_struct_value_address
!= 0;
3913 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3915 gdb_assert (gdbarch
!= NULL
);
3916 if (gdbarch
->extract_struct_value_address
== 0)
3917 internal_error (__FILE__
, __LINE__
,
3918 "gdbarch: gdbarch_extract_struct_value_address invalid");
3919 if (gdbarch_debug
>= 2)
3920 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3921 return gdbarch
->extract_struct_value_address (regcache
);
3925 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3926 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3928 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3932 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3934 gdb_assert (gdbarch
!= NULL
);
3935 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
3939 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3941 gdb_assert (gdbarch
!= NULL
);
3942 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
3943 internal_error (__FILE__
, __LINE__
,
3944 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
3945 if (gdbarch_debug
>= 2)
3946 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
3947 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
3951 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
3952 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
3954 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
3958 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3960 gdb_assert (gdbarch
!= NULL
);
3961 if (gdbarch
->use_struct_convention
== 0)
3962 internal_error (__FILE__
, __LINE__
,
3963 "gdbarch: gdbarch_use_struct_convention invalid");
3964 if (gdbarch_debug
>= 2)
3965 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3966 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3970 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3971 gdbarch_use_struct_convention_ftype use_struct_convention
)
3973 gdbarch
->use_struct_convention
= use_struct_convention
;
3977 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3979 gdb_assert (gdbarch
!= NULL
);
3980 if (gdbarch
->frame_init_saved_regs
== 0)
3981 internal_error (__FILE__
, __LINE__
,
3982 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3983 if (gdbarch_debug
>= 2)
3984 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3985 gdbarch
->frame_init_saved_regs (frame
);
3989 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3990 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3992 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3996 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3998 gdb_assert (gdbarch
!= NULL
);
3999 return gdbarch
->init_extra_frame_info
!= 0;
4003 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4005 gdb_assert (gdbarch
!= NULL
);
4006 if (gdbarch
->init_extra_frame_info
== 0)
4007 internal_error (__FILE__
, __LINE__
,
4008 "gdbarch: gdbarch_init_extra_frame_info invalid");
4009 if (gdbarch_debug
>= 2)
4010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
4011 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4015 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4016 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4018 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4022 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4024 gdb_assert (gdbarch
!= NULL
);
4025 if (gdbarch
->skip_prologue
== 0)
4026 internal_error (__FILE__
, __LINE__
,
4027 "gdbarch: gdbarch_skip_prologue invalid");
4028 if (gdbarch_debug
>= 2)
4029 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4030 return gdbarch
->skip_prologue (ip
);
4034 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4035 gdbarch_skip_prologue_ftype skip_prologue
)
4037 gdbarch
->skip_prologue
= skip_prologue
;
4041 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4043 gdb_assert (gdbarch
!= NULL
);
4044 if (gdbarch
->prologue_frameless_p
== 0)
4045 internal_error (__FILE__
, __LINE__
,
4046 "gdbarch: gdbarch_prologue_frameless_p invalid");
4047 if (gdbarch_debug
>= 2)
4048 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4049 return gdbarch
->prologue_frameless_p (ip
);
4053 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4054 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4056 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4060 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4062 gdb_assert (gdbarch
!= NULL
);
4063 if (gdbarch
->inner_than
== 0)
4064 internal_error (__FILE__
, __LINE__
,
4065 "gdbarch: gdbarch_inner_than invalid");
4066 if (gdbarch_debug
>= 2)
4067 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4068 return gdbarch
->inner_than (lhs
, rhs
);
4072 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4073 gdbarch_inner_than_ftype inner_than
)
4075 gdbarch
->inner_than
= inner_than
;
4078 const unsigned char *
4079 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4081 gdb_assert (gdbarch
!= NULL
);
4082 if (gdbarch
->breakpoint_from_pc
== 0)
4083 internal_error (__FILE__
, __LINE__
,
4084 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4085 if (gdbarch_debug
>= 2)
4086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4087 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4091 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4092 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4094 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4098 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4100 gdb_assert (gdbarch
!= NULL
);
4101 if (gdbarch
->memory_insert_breakpoint
== 0)
4102 internal_error (__FILE__
, __LINE__
,
4103 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4104 if (gdbarch_debug
>= 2)
4105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4106 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4110 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4111 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4113 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4117 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4119 gdb_assert (gdbarch
!= NULL
);
4120 if (gdbarch
->memory_remove_breakpoint
== 0)
4121 internal_error (__FILE__
, __LINE__
,
4122 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4123 if (gdbarch_debug
>= 2)
4124 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4125 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4129 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4130 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4132 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4136 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4138 gdb_assert (gdbarch
!= NULL
);
4139 if (gdbarch
->decr_pc_after_break
== -1)
4140 internal_error (__FILE__
, __LINE__
,
4141 "gdbarch: gdbarch_decr_pc_after_break invalid");
4142 if (gdbarch_debug
>= 2)
4143 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4144 return gdbarch
->decr_pc_after_break
;
4148 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4149 CORE_ADDR decr_pc_after_break
)
4151 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4155 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4157 gdb_assert (gdbarch
!= NULL
);
4158 if (gdbarch
->prepare_to_proceed
== 0)
4159 internal_error (__FILE__
, __LINE__
,
4160 "gdbarch: gdbarch_prepare_to_proceed invalid");
4161 if (gdbarch_debug
>= 2)
4162 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4163 return gdbarch
->prepare_to_proceed (select_it
);
4167 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4168 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4170 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4174 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4176 gdb_assert (gdbarch
!= NULL
);
4177 if (gdbarch
->function_start_offset
== -1)
4178 internal_error (__FILE__
, __LINE__
,
4179 "gdbarch: gdbarch_function_start_offset invalid");
4180 if (gdbarch_debug
>= 2)
4181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4182 return gdbarch
->function_start_offset
;
4186 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4187 CORE_ADDR function_start_offset
)
4189 gdbarch
->function_start_offset
= function_start_offset
;
4193 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4195 gdb_assert (gdbarch
!= NULL
);
4196 if (gdbarch
->remote_translate_xfer_address
== 0)
4197 internal_error (__FILE__
, __LINE__
,
4198 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4199 if (gdbarch_debug
>= 2)
4200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4201 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4205 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4206 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4208 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4212 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4214 gdb_assert (gdbarch
!= NULL
);
4215 if (gdbarch
->frame_args_skip
== -1)
4216 internal_error (__FILE__
, __LINE__
,
4217 "gdbarch: gdbarch_frame_args_skip invalid");
4218 if (gdbarch_debug
>= 2)
4219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4220 return gdbarch
->frame_args_skip
;
4224 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4225 CORE_ADDR frame_args_skip
)
4227 gdbarch
->frame_args_skip
= frame_args_skip
;
4231 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4233 gdb_assert (gdbarch
!= NULL
);
4234 if (gdbarch
->frameless_function_invocation
== 0)
4235 internal_error (__FILE__
, __LINE__
,
4236 "gdbarch: gdbarch_frameless_function_invocation invalid");
4237 if (gdbarch_debug
>= 2)
4238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4239 return gdbarch
->frameless_function_invocation (fi
);
4243 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4244 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4246 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4250 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4252 gdb_assert (gdbarch
!= NULL
);
4253 if (gdbarch
->frame_chain
== 0)
4254 internal_error (__FILE__
, __LINE__
,
4255 "gdbarch: gdbarch_frame_chain invalid");
4256 if (gdbarch_debug
>= 2)
4257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4258 return gdbarch
->frame_chain (frame
);
4262 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4263 gdbarch_frame_chain_ftype frame_chain
)
4265 gdbarch
->frame_chain
= frame_chain
;
4269 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4271 gdb_assert (gdbarch
!= NULL
);
4272 if (gdbarch
->frame_chain_valid
== 0)
4273 internal_error (__FILE__
, __LINE__
,
4274 "gdbarch: gdbarch_frame_chain_valid invalid");
4275 if (gdbarch_debug
>= 2)
4276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4277 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4281 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4282 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4284 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4288 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4290 gdb_assert (gdbarch
!= NULL
);
4291 if (gdbarch
->frame_saved_pc
== 0)
4292 internal_error (__FILE__
, __LINE__
,
4293 "gdbarch: gdbarch_frame_saved_pc invalid");
4294 if (gdbarch_debug
>= 2)
4295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4296 return gdbarch
->frame_saved_pc (fi
);
4300 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4301 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4303 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4307 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4309 gdb_assert (gdbarch
!= NULL
);
4310 if (gdbarch
->frame_args_address
== 0)
4311 internal_error (__FILE__
, __LINE__
,
4312 "gdbarch: gdbarch_frame_args_address invalid");
4313 if (gdbarch_debug
>= 2)
4314 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4315 return gdbarch
->frame_args_address (fi
);
4319 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4320 gdbarch_frame_args_address_ftype frame_args_address
)
4322 gdbarch
->frame_args_address
= frame_args_address
;
4326 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4328 gdb_assert (gdbarch
!= NULL
);
4329 if (gdbarch
->frame_locals_address
== 0)
4330 internal_error (__FILE__
, __LINE__
,
4331 "gdbarch: gdbarch_frame_locals_address invalid");
4332 if (gdbarch_debug
>= 2)
4333 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4334 return gdbarch
->frame_locals_address (fi
);
4338 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4339 gdbarch_frame_locals_address_ftype frame_locals_address
)
4341 gdbarch
->frame_locals_address
= frame_locals_address
;
4345 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4347 gdb_assert (gdbarch
!= NULL
);
4348 if (gdbarch
->saved_pc_after_call
== 0)
4349 internal_error (__FILE__
, __LINE__
,
4350 "gdbarch: gdbarch_saved_pc_after_call invalid");
4351 if (gdbarch_debug
>= 2)
4352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4353 return gdbarch
->saved_pc_after_call (frame
);
4357 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4358 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4360 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4364 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4366 gdb_assert (gdbarch
!= NULL
);
4367 if (gdbarch
->frame_num_args
== 0)
4368 internal_error (__FILE__
, __LINE__
,
4369 "gdbarch: gdbarch_frame_num_args invalid");
4370 if (gdbarch_debug
>= 2)
4371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4372 return gdbarch
->frame_num_args (frame
);
4376 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4377 gdbarch_frame_num_args_ftype frame_num_args
)
4379 gdbarch
->frame_num_args
= frame_num_args
;
4383 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4385 gdb_assert (gdbarch
!= NULL
);
4386 return gdbarch
->stack_align
!= 0;
4390 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4392 gdb_assert (gdbarch
!= NULL
);
4393 if (gdbarch
->stack_align
== 0)
4394 internal_error (__FILE__
, __LINE__
,
4395 "gdbarch: gdbarch_stack_align invalid");
4396 if (gdbarch_debug
>= 2)
4397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4398 return gdbarch
->stack_align (sp
);
4402 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4403 gdbarch_stack_align_ftype stack_align
)
4405 gdbarch
->stack_align
= stack_align
;
4409 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4411 gdb_assert (gdbarch
!= NULL
);
4412 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4413 if (gdbarch_debug
>= 2)
4414 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4415 return gdbarch
->extra_stack_alignment_needed
;
4419 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4420 int extra_stack_alignment_needed
)
4422 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4426 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4428 gdb_assert (gdbarch
!= NULL
);
4429 return gdbarch
->reg_struct_has_addr
!= 0;
4433 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4435 gdb_assert (gdbarch
!= NULL
);
4436 if (gdbarch
->reg_struct_has_addr
== 0)
4437 internal_error (__FILE__
, __LINE__
,
4438 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4439 if (gdbarch_debug
>= 2)
4440 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4441 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4445 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4446 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4448 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4452 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4454 gdb_assert (gdbarch
!= NULL
);
4455 return gdbarch
->save_dummy_frame_tos
!= 0;
4459 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4461 gdb_assert (gdbarch
!= NULL
);
4462 if (gdbarch
->save_dummy_frame_tos
== 0)
4463 internal_error (__FILE__
, __LINE__
,
4464 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4465 if (gdbarch_debug
>= 2)
4466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4467 gdbarch
->save_dummy_frame_tos (sp
);
4471 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4472 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4474 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4478 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4480 gdb_assert (gdbarch
!= NULL
);
4481 if (gdbarch_debug
>= 2)
4482 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4483 return gdbarch
->parm_boundary
;
4487 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4490 gdbarch
->parm_boundary
= parm_boundary
;
4493 const struct floatformat
*
4494 gdbarch_float_format (struct gdbarch
*gdbarch
)
4496 gdb_assert (gdbarch
!= NULL
);
4497 if (gdbarch_debug
>= 2)
4498 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4499 return gdbarch
->float_format
;
4503 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4504 const struct floatformat
* float_format
)
4506 gdbarch
->float_format
= float_format
;
4509 const struct floatformat
*
4510 gdbarch_double_format (struct gdbarch
*gdbarch
)
4512 gdb_assert (gdbarch
!= NULL
);
4513 if (gdbarch_debug
>= 2)
4514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4515 return gdbarch
->double_format
;
4519 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4520 const struct floatformat
* double_format
)
4522 gdbarch
->double_format
= double_format
;
4525 const struct floatformat
*
4526 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4528 gdb_assert (gdbarch
!= NULL
);
4529 if (gdbarch_debug
>= 2)
4530 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4531 return gdbarch
->long_double_format
;
4535 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4536 const struct floatformat
* long_double_format
)
4538 gdbarch
->long_double_format
= long_double_format
;
4542 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4544 gdb_assert (gdbarch
!= NULL
);
4545 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4546 internal_error (__FILE__
, __LINE__
,
4547 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4548 if (gdbarch_debug
>= 2)
4549 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4550 return gdbarch
->convert_from_func_ptr_addr (addr
);
4554 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4555 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4557 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4561 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4563 gdb_assert (gdbarch
!= NULL
);
4564 if (gdbarch
->addr_bits_remove
== 0)
4565 internal_error (__FILE__
, __LINE__
,
4566 "gdbarch: gdbarch_addr_bits_remove invalid");
4567 if (gdbarch_debug
>= 2)
4568 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4569 return gdbarch
->addr_bits_remove (addr
);
4573 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4574 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4576 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4580 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4582 gdb_assert (gdbarch
!= NULL
);
4583 if (gdbarch
->smash_text_address
== 0)
4584 internal_error (__FILE__
, __LINE__
,
4585 "gdbarch: gdbarch_smash_text_address invalid");
4586 if (gdbarch_debug
>= 2)
4587 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4588 return gdbarch
->smash_text_address (addr
);
4592 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4593 gdbarch_smash_text_address_ftype smash_text_address
)
4595 gdbarch
->smash_text_address
= smash_text_address
;
4599 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4601 gdb_assert (gdbarch
!= NULL
);
4602 return gdbarch
->software_single_step
!= 0;
4606 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4608 gdb_assert (gdbarch
!= NULL
);
4609 if (gdbarch
->software_single_step
== 0)
4610 internal_error (__FILE__
, __LINE__
,
4611 "gdbarch: gdbarch_software_single_step invalid");
4612 if (gdbarch_debug
>= 2)
4613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4614 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4618 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4619 gdbarch_software_single_step_ftype software_single_step
)
4621 gdbarch
->software_single_step
= software_single_step
;
4625 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4627 gdb_assert (gdbarch
!= NULL
);
4628 if (gdbarch
->print_insn
== 0)
4629 internal_error (__FILE__
, __LINE__
,
4630 "gdbarch: gdbarch_print_insn invalid");
4631 if (gdbarch_debug
>= 2)
4632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4633 return gdbarch
->print_insn (vma
, info
);
4637 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4638 gdbarch_print_insn_ftype print_insn
)
4640 gdbarch
->print_insn
= print_insn
;
4644 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4646 gdb_assert (gdbarch
!= NULL
);
4647 if (gdbarch
->skip_trampoline_code
== 0)
4648 internal_error (__FILE__
, __LINE__
,
4649 "gdbarch: gdbarch_skip_trampoline_code invalid");
4650 if (gdbarch_debug
>= 2)
4651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4652 return gdbarch
->skip_trampoline_code (pc
);
4656 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4657 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4659 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4663 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4665 gdb_assert (gdbarch
!= NULL
);
4666 if (gdbarch
->in_solib_call_trampoline
== 0)
4667 internal_error (__FILE__
, __LINE__
,
4668 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4669 if (gdbarch_debug
>= 2)
4670 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4671 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4675 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4676 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4678 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4682 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4684 gdb_assert (gdbarch
!= NULL
);
4685 if (gdbarch
->in_solib_return_trampoline
== 0)
4686 internal_error (__FILE__
, __LINE__
,
4687 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
4688 if (gdbarch_debug
>= 2)
4689 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
4690 return gdbarch
->in_solib_return_trampoline (pc
, name
);
4694 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
4695 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
4697 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
4701 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4703 gdb_assert (gdbarch
!= NULL
);
4704 if (gdbarch
->pc_in_sigtramp
== 0)
4705 internal_error (__FILE__
, __LINE__
,
4706 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4707 if (gdbarch_debug
>= 2)
4708 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4709 return gdbarch
->pc_in_sigtramp (pc
, name
);
4713 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4714 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4716 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4720 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4722 gdb_assert (gdbarch
!= NULL
);
4723 if (gdbarch
->in_function_epilogue_p
== 0)
4724 internal_error (__FILE__
, __LINE__
,
4725 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4726 if (gdbarch_debug
>= 2)
4727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4728 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4732 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4733 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4735 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4739 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4741 gdb_assert (gdbarch
!= NULL
);
4742 if (gdbarch
->construct_inferior_arguments
== 0)
4743 internal_error (__FILE__
, __LINE__
,
4744 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4745 if (gdbarch_debug
>= 2)
4746 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4747 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4751 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4752 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4754 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4758 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4760 gdb_assert (gdbarch
!= NULL
);
4761 return gdbarch
->dwarf2_build_frame_info
!= 0;
4765 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4767 gdb_assert (gdbarch
!= NULL
);
4768 if (gdbarch
->dwarf2_build_frame_info
== 0)
4769 internal_error (__FILE__
, __LINE__
,
4770 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4771 if (gdbarch_debug
>= 2)
4772 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4773 gdbarch
->dwarf2_build_frame_info (objfile
);
4777 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4778 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4780 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4784 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4786 gdb_assert (gdbarch
!= NULL
);
4787 if (gdbarch
->elf_make_msymbol_special
== 0)
4788 internal_error (__FILE__
, __LINE__
,
4789 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4790 if (gdbarch_debug
>= 2)
4791 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4792 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4796 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4797 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4799 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4803 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4805 gdb_assert (gdbarch
!= NULL
);
4806 if (gdbarch
->coff_make_msymbol_special
== 0)
4807 internal_error (__FILE__
, __LINE__
,
4808 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4809 if (gdbarch_debug
>= 2)
4810 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4811 gdbarch
->coff_make_msymbol_special (val
, msym
);
4815 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4816 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4818 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4822 /* Keep a registry of per-architecture data-pointers required by GDB
4829 gdbarch_data_init_ftype
*init
;
4830 gdbarch_data_free_ftype
*free
;
4833 struct gdbarch_data_registration
4835 struct gdbarch_data
*data
;
4836 struct gdbarch_data_registration
*next
;
4839 struct gdbarch_data_registry
4842 struct gdbarch_data_registration
*registrations
;
4845 struct gdbarch_data_registry gdbarch_data_registry
=
4850 struct gdbarch_data
*
4851 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4852 gdbarch_data_free_ftype
*free
)
4854 struct gdbarch_data_registration
**curr
;
4855 /* Append the new registraration. */
4856 for (curr
= &gdbarch_data_registry
.registrations
;
4858 curr
= &(*curr
)->next
);
4859 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4860 (*curr
)->next
= NULL
;
4861 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4862 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4863 (*curr
)->data
->init
= init
;
4864 (*curr
)->data
->init_p
= 1;
4865 (*curr
)->data
->free
= free
;
4866 return (*curr
)->data
;
4870 /* Create/delete the gdbarch data vector. */
4873 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4875 gdb_assert (gdbarch
->data
== NULL
);
4876 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4877 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4881 free_gdbarch_data (struct gdbarch
*gdbarch
)
4883 struct gdbarch_data_registration
*rego
;
4884 gdb_assert (gdbarch
->data
!= NULL
);
4885 for (rego
= gdbarch_data_registry
.registrations
;
4889 struct gdbarch_data
*data
= rego
->data
;
4890 gdb_assert (data
->index
< gdbarch
->nr_data
);
4891 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4893 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4894 gdbarch
->data
[data
->index
] = NULL
;
4897 xfree (gdbarch
->data
);
4898 gdbarch
->data
= NULL
;
4902 /* Initialize the current value of the specified per-architecture
4906 set_gdbarch_data (struct gdbarch
*gdbarch
,
4907 struct gdbarch_data
*data
,
4910 gdb_assert (data
->index
< gdbarch
->nr_data
);
4911 if (gdbarch
->data
[data
->index
] != NULL
)
4913 gdb_assert (data
->free
!= NULL
);
4914 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4916 gdbarch
->data
[data
->index
] = pointer
;
4919 /* Return the current value of the specified per-architecture
4923 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4925 gdb_assert (data
->index
< gdbarch
->nr_data
);
4926 /* The data-pointer isn't initialized, call init() to get a value but
4927 only if the architecture initializaiton has completed. Otherwise
4928 punt - hope that the caller knows what they are doing. */
4929 if (gdbarch
->data
[data
->index
] == NULL
4930 && gdbarch
->initialized_p
)
4932 /* Be careful to detect an initialization cycle. */
4933 gdb_assert (data
->init_p
);
4935 gdb_assert (data
->init
!= NULL
);
4936 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
4938 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
4940 return gdbarch
->data
[data
->index
];
4945 /* Keep a registry of swapped data required by GDB modules. */
4950 struct gdbarch_swap_registration
*source
;
4951 struct gdbarch_swap
*next
;
4954 struct gdbarch_swap_registration
4957 unsigned long sizeof_data
;
4958 gdbarch_swap_ftype
*init
;
4959 struct gdbarch_swap_registration
*next
;
4962 struct gdbarch_swap_registry
4965 struct gdbarch_swap_registration
*registrations
;
4968 struct gdbarch_swap_registry gdbarch_swap_registry
=
4974 register_gdbarch_swap (void *data
,
4975 unsigned long sizeof_data
,
4976 gdbarch_swap_ftype
*init
)
4978 struct gdbarch_swap_registration
**rego
;
4979 for (rego
= &gdbarch_swap_registry
.registrations
;
4981 rego
= &(*rego
)->next
);
4982 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4983 (*rego
)->next
= NULL
;
4984 (*rego
)->init
= init
;
4985 (*rego
)->data
= data
;
4986 (*rego
)->sizeof_data
= sizeof_data
;
4990 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
4992 struct gdbarch_swap
*curr
;
4993 for (curr
= gdbarch
->swap
;
4997 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5002 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5004 struct gdbarch_swap_registration
*rego
;
5005 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5006 for (rego
= gdbarch_swap_registry
.registrations
;
5010 if (rego
->data
!= NULL
)
5012 (*curr
) = XMALLOC (struct gdbarch_swap
);
5013 (*curr
)->source
= rego
;
5014 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5015 (*curr
)->next
= NULL
;
5016 curr
= &(*curr
)->next
;
5018 if (rego
->init
!= NULL
)
5024 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5026 struct gdbarch_swap
*curr
;
5027 for (curr
= gdbarch
->swap
;
5030 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5034 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5036 struct gdbarch_swap
*curr
;
5037 for (curr
= gdbarch
->swap
;
5040 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5044 /* Keep a registry of the architectures known by GDB. */
5046 struct gdbarch_registration
5048 enum bfd_architecture bfd_architecture
;
5049 gdbarch_init_ftype
*init
;
5050 gdbarch_dump_tdep_ftype
*dump_tdep
;
5051 struct gdbarch_list
*arches
;
5052 struct gdbarch_registration
*next
;
5055 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5058 append_name (const char ***buf
, int *nr
, const char *name
)
5060 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5066 gdbarch_printable_names (void)
5070 /* Accumulate a list of names based on the registed list of
5072 enum bfd_architecture a
;
5074 const char **arches
= NULL
;
5075 struct gdbarch_registration
*rego
;
5076 for (rego
= gdbarch_registry
;
5080 const struct bfd_arch_info
*ap
;
5081 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5083 internal_error (__FILE__
, __LINE__
,
5084 "gdbarch_architecture_names: multi-arch unknown");
5087 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5092 append_name (&arches
, &nr_arches
, NULL
);
5096 /* Just return all the architectures that BFD knows. Assume that
5097 the legacy architecture framework supports them. */
5098 return bfd_arch_list ();
5103 gdbarch_register (enum bfd_architecture bfd_architecture
,
5104 gdbarch_init_ftype
*init
,
5105 gdbarch_dump_tdep_ftype
*dump_tdep
)
5107 struct gdbarch_registration
**curr
;
5108 const struct bfd_arch_info
*bfd_arch_info
;
5109 /* Check that BFD recognizes this architecture */
5110 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5111 if (bfd_arch_info
== NULL
)
5113 internal_error (__FILE__
, __LINE__
,
5114 "gdbarch: Attempt to register unknown architecture (%d)",
5117 /* Check that we haven't seen this architecture before */
5118 for (curr
= &gdbarch_registry
;
5120 curr
= &(*curr
)->next
)
5122 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5123 internal_error (__FILE__
, __LINE__
,
5124 "gdbarch: Duplicate registraration of architecture (%s)",
5125 bfd_arch_info
->printable_name
);
5129 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5130 bfd_arch_info
->printable_name
,
5133 (*curr
) = XMALLOC (struct gdbarch_registration
);
5134 (*curr
)->bfd_architecture
= bfd_architecture
;
5135 (*curr
)->init
= init
;
5136 (*curr
)->dump_tdep
= dump_tdep
;
5137 (*curr
)->arches
= NULL
;
5138 (*curr
)->next
= NULL
;
5139 /* When non- multi-arch, install whatever target dump routine we've
5140 been provided - hopefully that routine has been written correctly
5141 and works regardless of multi-arch. */
5142 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5143 && startup_gdbarch
.dump_tdep
== NULL
)
5144 startup_gdbarch
.dump_tdep
= dump_tdep
;
5148 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5149 gdbarch_init_ftype
*init
)
5151 gdbarch_register (bfd_architecture
, init
, NULL
);
5155 /* Look for an architecture using gdbarch_info. Base search on only
5156 BFD_ARCH_INFO and BYTE_ORDER. */
5158 struct gdbarch_list
*
5159 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5160 const struct gdbarch_info
*info
)
5162 for (; arches
!= NULL
; arches
= arches
->next
)
5164 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5166 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5174 /* Update the current architecture. Return ZERO if the update request
5178 gdbarch_update_p (struct gdbarch_info info
)
5180 struct gdbarch
*new_gdbarch
;
5181 struct gdbarch
*old_gdbarch
;
5182 struct gdbarch_registration
*rego
;
5184 /* Fill in missing parts of the INFO struct using a number of
5185 sources: ``set ...''; INFOabfd supplied; existing target. */
5187 /* ``(gdb) set architecture ...'' */
5188 if (info
.bfd_arch_info
== NULL
5189 && !TARGET_ARCHITECTURE_AUTO
)
5190 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5191 if (info
.bfd_arch_info
== NULL
5192 && info
.abfd
!= NULL
5193 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5194 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5195 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5196 if (info
.bfd_arch_info
== NULL
)
5197 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5199 /* ``(gdb) set byte-order ...'' */
5200 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5201 && !TARGET_BYTE_ORDER_AUTO
)
5202 info
.byte_order
= TARGET_BYTE_ORDER
;
5203 /* From the INFO struct. */
5204 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5205 && info
.abfd
!= NULL
)
5206 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5207 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5208 : BFD_ENDIAN_UNKNOWN
);
5209 /* From the current target. */
5210 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5211 info
.byte_order
= TARGET_BYTE_ORDER
;
5213 /* Must have found some sort of architecture. */
5214 gdb_assert (info
.bfd_arch_info
!= NULL
);
5218 fprintf_unfiltered (gdb_stdlog
,
5219 "gdbarch_update: info.bfd_arch_info %s\n",
5220 (info
.bfd_arch_info
!= NULL
5221 ? info
.bfd_arch_info
->printable_name
5223 fprintf_unfiltered (gdb_stdlog
,
5224 "gdbarch_update: info.byte_order %d (%s)\n",
5226 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5227 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5229 fprintf_unfiltered (gdb_stdlog
,
5230 "gdbarch_update: info.abfd 0x%lx\n",
5232 fprintf_unfiltered (gdb_stdlog
,
5233 "gdbarch_update: info.tdep_info 0x%lx\n",
5234 (long) info
.tdep_info
);
5237 /* Find the target that knows about this architecture. */
5238 for (rego
= gdbarch_registry
;
5241 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5250 /* Swap the data belonging to the old target out setting the
5251 installed data to zero. This stops the ->init() function trying
5252 to refer to the previous architecture's global data structures. */
5253 swapout_gdbarch_swap (current_gdbarch
);
5254 clear_gdbarch_swap (current_gdbarch
);
5256 /* Save the previously selected architecture, setting the global to
5257 NULL. This stops ->init() trying to use the previous
5258 architecture's configuration. The previous architecture may not
5259 even be of the same architecture family. The most recent
5260 architecture of the same family is found at the head of the
5261 rego->arches list. */
5262 old_gdbarch
= current_gdbarch
;
5263 current_gdbarch
= NULL
;
5265 /* Ask the target for a replacement architecture. */
5266 new_gdbarch
= rego
->init (info
, rego
->arches
);
5268 /* Did the target like it? No. Reject the change and revert to the
5269 old architecture. */
5270 if (new_gdbarch
== NULL
)
5273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5274 swapin_gdbarch_swap (old_gdbarch
);
5275 current_gdbarch
= old_gdbarch
;
5279 /* Did the architecture change? No. Oops, put the old architecture
5281 if (old_gdbarch
== new_gdbarch
)
5284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5286 new_gdbarch
->bfd_arch_info
->printable_name
);
5287 swapin_gdbarch_swap (old_gdbarch
);
5288 current_gdbarch
= old_gdbarch
;
5292 /* Is this a pre-existing architecture? Yes. Move it to the front
5293 of the list of architectures (keeping the list sorted Most
5294 Recently Used) and then copy it in. */
5296 struct gdbarch_list
**list
;
5297 for (list
= ®o
->arches
;
5299 list
= &(*list
)->next
)
5301 if ((*list
)->gdbarch
== new_gdbarch
)
5303 struct gdbarch_list
*this;
5305 fprintf_unfiltered (gdb_stdlog
,
5306 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5308 new_gdbarch
->bfd_arch_info
->printable_name
);
5311 (*list
) = this->next
;
5312 /* Insert in the front. */
5313 this->next
= rego
->arches
;
5314 rego
->arches
= this;
5315 /* Copy the new architecture in. */
5316 current_gdbarch
= new_gdbarch
;
5317 swapin_gdbarch_swap (new_gdbarch
);
5318 architecture_changed_event ();
5324 /* Prepend this new architecture to the architecture list (keep the
5325 list sorted Most Recently Used). */
5327 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5328 this->next
= rego
->arches
;
5329 this->gdbarch
= new_gdbarch
;
5330 rego
->arches
= this;
5333 /* Switch to this new architecture marking it initialized. */
5334 current_gdbarch
= new_gdbarch
;
5335 current_gdbarch
->initialized_p
= 1;
5338 fprintf_unfiltered (gdb_stdlog
,
5339 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5341 new_gdbarch
->bfd_arch_info
->printable_name
);
5344 /* Check that the newly installed architecture is valid. Plug in
5345 any post init values. */
5346 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5347 verify_gdbarch (new_gdbarch
);
5349 /* Initialize the per-architecture memory (swap) areas.
5350 CURRENT_GDBARCH must be update before these modules are
5352 init_gdbarch_swap (new_gdbarch
);
5354 /* Initialize the per-architecture data. CURRENT_GDBARCH
5355 must be updated before these modules are called. */
5356 architecture_changed_event ();
5359 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5367 /* Pointer to the target-dependent disassembly function. */
5368 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5369 disassemble_info tm_print_insn_info
;
5372 extern void _initialize_gdbarch (void);
5375 _initialize_gdbarch (void)
5377 struct cmd_list_element
*c
;
5379 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5380 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5381 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5382 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5383 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5385 add_show_from_set (add_set_cmd ("arch",
5388 (char *)&gdbarch_debug
,
5389 "Set architecture debugging.\n\
5390 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5392 c
= add_set_cmd ("archdebug",
5395 (char *)&gdbarch_debug
,
5396 "Set architecture debugging.\n\
5397 When non-zero, architecture debugging is enabled.", &setlist
);
5399 deprecate_cmd (c
, "set debug arch");
5400 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");