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_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
260 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
261 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
262 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
263 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
264 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
268 /* The default architecture uses host values (for want of a better
271 extern const struct bfd_arch_info bfd_default_arch_struct
;
273 struct gdbarch startup_gdbarch
=
275 1, /* Always initialized. */
276 /* basic architecture information */
277 &bfd_default_arch_struct
,
279 /* target specific vector and its dump routine */
281 /*per-architecture data-pointers and swap regions */
283 /* Multi-arch values */
287 8 * sizeof (LONGEST
),
290 8 * sizeof (long double),
319 generic_register_byte
,
320 generic_register_size
,
322 generic_register_size
,
411 generic_in_function_epilogue_p
,
412 construct_inferior_arguments
,
416 /* startup_gdbarch() */
419 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
421 /* Do any initialization needed for a non-multiarch configuration
422 after the _initialize_MODULE functions have been run. */
424 initialize_non_multiarch (void)
426 alloc_gdbarch_data (&startup_gdbarch
);
427 /* Ensure that all swap areas are zeroed so that they again think
428 they are starting from scratch. */
429 clear_gdbarch_swap (&startup_gdbarch
);
430 init_gdbarch_swap (&startup_gdbarch
);
434 /* Create a new ``struct gdbarch'' based on information provided by
435 ``struct gdbarch_info''. */
438 gdbarch_alloc (const struct gdbarch_info
*info
,
439 struct gdbarch_tdep
*tdep
)
441 /* NOTE: The new architecture variable is named ``current_gdbarch''
442 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
443 the current local architecture and not the previous global
444 architecture. This ensures that the new architectures initial
445 values are not influenced by the previous architecture. Once
446 everything is parameterised with gdbarch, this will go away. */
447 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
448 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
450 alloc_gdbarch_data (current_gdbarch
);
452 current_gdbarch
->tdep
= tdep
;
454 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
455 current_gdbarch
->byte_order
= info
->byte_order
;
457 /* Force the explicit initialization of these. */
458 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
459 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
460 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
461 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
462 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
463 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
464 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
465 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
466 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
467 current_gdbarch
->char_signed
= -1;
468 current_gdbarch
->read_pc
= generic_target_read_pc
;
469 current_gdbarch
->write_pc
= generic_target_write_pc
;
470 current_gdbarch
->read_fp
= generic_target_read_fp
;
471 current_gdbarch
->read_sp
= generic_target_read_sp
;
472 current_gdbarch
->write_sp
= generic_target_write_sp
;
473 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
474 current_gdbarch
->num_regs
= -1;
475 current_gdbarch
->sp_regnum
= -1;
476 current_gdbarch
->fp_regnum
= -1;
477 current_gdbarch
->pc_regnum
= -1;
478 current_gdbarch
->ps_regnum
= -1;
479 current_gdbarch
->fp0_regnum
= -1;
480 current_gdbarch
->npc_regnum
= -1;
481 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
482 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
483 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
484 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
485 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
486 current_gdbarch
->register_name
= legacy_register_name
;
487 current_gdbarch
->register_size
= -1;
488 current_gdbarch
->register_bytes
= -1;
489 current_gdbarch
->register_byte
= generic_register_byte
;
490 current_gdbarch
->register_raw_size
= generic_register_size
;
491 current_gdbarch
->max_register_raw_size
= -1;
492 current_gdbarch
->register_virtual_size
= generic_register_size
;
493 current_gdbarch
->max_register_virtual_size
= -1;
494 current_gdbarch
->do_registers_info
= do_registers_info
;
495 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
496 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
497 current_gdbarch
->cannot_store_register
= cannot_register_not
;
498 current_gdbarch
->use_generic_dummy_frames
= -1;
499 current_gdbarch
->call_dummy_start_offset
= -1;
500 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
501 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
502 current_gdbarch
->call_dummy_length
= -1;
503 current_gdbarch
->call_dummy_p
= -1;
504 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
505 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
506 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
507 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
508 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
509 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
510 current_gdbarch
->get_saved_register
= generic_unwind_get_saved_register
;
511 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
512 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
513 current_gdbarch
->register_to_value
= legacy_register_to_value
;
514 current_gdbarch
->value_to_register
= legacy_value_to_register
;
515 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
516 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
517 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
518 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
519 current_gdbarch
->push_arguments
= default_push_arguments
;
520 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
521 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
522 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
523 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
524 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
525 current_gdbarch
->decr_pc_after_break
= -1;
526 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
527 current_gdbarch
->function_start_offset
= -1;
528 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
529 current_gdbarch
->frame_args_skip
= -1;
530 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
531 current_gdbarch
->frame_chain_valid
= generic_func_frame_chain_valid
;
532 current_gdbarch
->extra_stack_alignment_needed
= 1;
533 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
534 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
535 current_gdbarch
->smash_text_address
= core_addr_identity
;
536 current_gdbarch
->print_insn
= legacy_print_insn
;
537 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
538 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
539 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
540 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
541 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
542 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
543 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
544 /* gdbarch_alloc() */
546 return current_gdbarch
;
550 /* Free a gdbarch struct. This should never happen in normal
551 operation --- once you've created a gdbarch, you keep it around.
552 However, if an architecture's init function encounters an error
553 building the structure, it may need to clean up a partially
554 constructed gdbarch. */
557 gdbarch_free (struct gdbarch
*arch
)
559 gdb_assert (arch
!= NULL
);
560 free_gdbarch_data (arch
);
565 /* Ensure that all values in a GDBARCH are reasonable. */
568 verify_gdbarch (struct gdbarch
*gdbarch
)
571 struct cleanup
*cleanups
;
574 /* Only perform sanity checks on a multi-arch target. */
577 log
= mem_fileopen ();
578 cleanups
= make_cleanup_ui_file_delete (log
);
580 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
581 fprintf_unfiltered (log
, "\n\tbyte-order");
582 if (gdbarch
->bfd_arch_info
== NULL
)
583 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
584 /* Check those that need to be defined for the given multi-arch level. */
585 /* Skip verify of short_bit, invalid_p == 0 */
586 /* Skip verify of int_bit, invalid_p == 0 */
587 /* Skip verify of long_bit, invalid_p == 0 */
588 /* Skip verify of long_long_bit, invalid_p == 0 */
589 /* Skip verify of float_bit, invalid_p == 0 */
590 /* Skip verify of double_bit, invalid_p == 0 */
591 /* Skip verify of long_double_bit, invalid_p == 0 */
592 /* Skip verify of ptr_bit, invalid_p == 0 */
593 if (gdbarch
->addr_bit
== 0)
594 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
595 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
596 if (gdbarch
->char_signed
== -1)
597 gdbarch
->char_signed
= 1;
598 /* Skip verify of read_pc, invalid_p == 0 */
599 /* Skip verify of write_pc, invalid_p == 0 */
600 /* Skip verify of read_fp, invalid_p == 0 */
601 /* Skip verify of read_sp, invalid_p == 0 */
602 /* Skip verify of write_sp, invalid_p == 0 */
603 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
604 /* Skip verify of pseudo_register_read, has predicate */
605 /* Skip verify of pseudo_register_write, has predicate */
606 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
607 && (gdbarch
->num_regs
== -1))
608 fprintf_unfiltered (log
, "\n\tnum_regs");
609 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
610 /* Skip verify of sp_regnum, invalid_p == 0 */
611 /* Skip verify of fp_regnum, invalid_p == 0 */
612 /* Skip verify of pc_regnum, invalid_p == 0 */
613 /* Skip verify of ps_regnum, invalid_p == 0 */
614 /* Skip verify of fp0_regnum, invalid_p == 0 */
615 /* Skip verify of npc_regnum, invalid_p == 0 */
616 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
617 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
618 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
619 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
620 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
621 /* Skip verify of register_name, invalid_p == 0 */
622 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
623 && (gdbarch
->register_size
== -1))
624 fprintf_unfiltered (log
, "\n\tregister_size");
625 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
626 && (gdbarch
->register_bytes
== -1))
627 fprintf_unfiltered (log
, "\n\tregister_bytes");
628 /* Skip verify of register_byte, invalid_p == 0 */
629 /* Skip verify of register_raw_size, invalid_p == 0 */
630 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
631 && (gdbarch
->max_register_raw_size
== -1))
632 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
633 /* Skip verify of register_virtual_size, invalid_p == 0 */
634 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
635 && (gdbarch
->max_register_virtual_size
== -1))
636 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
637 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
638 && (gdbarch
->register_virtual_type
== 0))
639 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
640 /* Skip verify of do_registers_info, invalid_p == 0 */
641 /* Skip verify of print_float_info, has predicate */
642 /* Skip verify of print_vector_info, has predicate */
643 /* Skip verify of register_sim_regno, invalid_p == 0 */
644 /* Skip verify of register_bytes_ok, has predicate */
645 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
646 /* Skip verify of cannot_store_register, invalid_p == 0 */
647 /* Skip verify of get_longjmp_target, has predicate */
648 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
649 && (gdbarch
->use_generic_dummy_frames
== -1))
650 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
651 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
652 && (gdbarch
->call_dummy_location
== 0))
653 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
654 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
655 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
656 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
657 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
658 && (gdbarch
->call_dummy_start_offset
== -1))
659 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
660 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
661 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
662 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
663 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
664 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
665 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
666 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
667 && (gdbarch
->call_dummy_length
== -1))
668 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
669 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
670 && (gdbarch
->pc_in_call_dummy
== 0))
671 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
672 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
673 && (gdbarch
->call_dummy_p
== -1))
674 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
675 /* Skip verify of call_dummy_words, invalid_p == 0 */
676 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
677 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
678 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
679 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
680 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
681 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
682 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
683 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
684 && (gdbarch
->fix_call_dummy
== 0))
685 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
686 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
687 /* Skip verify of init_frame_pc, invalid_p == 0 */
688 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
689 /* Skip verify of get_saved_register, invalid_p == 0 */
690 /* Skip verify of register_convertible, invalid_p == 0 */
691 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
692 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
693 /* Skip verify of convert_register_p, invalid_p == 0 */
694 /* Skip verify of register_to_value, invalid_p == 0 */
695 /* Skip verify of value_to_register, invalid_p == 0 */
696 /* Skip verify of pointer_to_address, invalid_p == 0 */
697 /* Skip verify of address_to_pointer, invalid_p == 0 */
698 /* Skip verify of integer_to_address, has predicate */
699 /* Skip verify of return_value_on_stack, invalid_p == 0 */
700 /* Skip verify of extract_return_value, invalid_p == 0 */
701 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
702 && (gdbarch
->deprecated_extract_return_value
== 0))
703 fprintf_unfiltered (log
, "\n\tdeprecated_extract_return_value");
704 /* Skip verify of push_arguments, invalid_p == 0 */
705 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
706 && (gdbarch
->push_dummy_frame
== 0))
707 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
708 /* Skip verify of push_return_address, has predicate */
709 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
710 && (gdbarch
->pop_frame
== 0))
711 fprintf_unfiltered (log
, "\n\tpop_frame");
712 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
713 && (gdbarch
->store_struct_return
== 0))
714 fprintf_unfiltered (log
, "\n\tstore_struct_return");
715 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
716 && (gdbarch
->store_return_value
== 0))
717 fprintf_unfiltered (log
, "\n\tstore_return_value");
718 /* Skip verify of extract_struct_value_address, has predicate */
719 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
720 /* Skip verify of use_struct_convention, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
722 && (gdbarch
->frame_init_saved_regs
== 0))
723 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
724 /* Skip verify of init_extra_frame_info, has predicate */
725 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
726 && (gdbarch
->skip_prologue
== 0))
727 fprintf_unfiltered (log
, "\n\tskip_prologue");
728 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
729 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
730 && (gdbarch
->inner_than
== 0))
731 fprintf_unfiltered (log
, "\n\tinner_than");
732 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
733 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
734 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
735 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
736 && (gdbarch
->decr_pc_after_break
== -1))
737 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
738 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
740 && (gdbarch
->function_start_offset
== -1))
741 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
742 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
743 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
744 && (gdbarch
->frame_args_skip
== -1))
745 fprintf_unfiltered (log
, "\n\tframe_args_skip");
746 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
747 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
748 && (gdbarch
->frame_chain
== 0))
749 fprintf_unfiltered (log
, "\n\tframe_chain");
750 /* Skip verify of frame_chain_valid, invalid_p == 0 */
751 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
752 && (gdbarch
->frame_saved_pc
== 0))
753 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
754 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
755 && (gdbarch
->frame_args_address
== 0))
756 fprintf_unfiltered (log
, "\n\tframe_args_address");
757 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
758 && (gdbarch
->frame_locals_address
== 0))
759 fprintf_unfiltered (log
, "\n\tframe_locals_address");
760 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
761 && (gdbarch
->saved_pc_after_call
== 0))
762 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
763 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
764 && (gdbarch
->frame_num_args
== 0))
765 fprintf_unfiltered (log
, "\n\tframe_num_args");
766 /* Skip verify of stack_align, has predicate */
767 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
768 /* Skip verify of reg_struct_has_addr, has predicate */
769 /* Skip verify of save_dummy_frame_tos, has predicate */
770 if (gdbarch
->float_format
== 0)
771 gdbarch
->float_format
= default_float_format (gdbarch
);
772 if (gdbarch
->double_format
== 0)
773 gdbarch
->double_format
= default_double_format (gdbarch
);
774 if (gdbarch
->long_double_format
== 0)
775 gdbarch
->long_double_format
= default_double_format (gdbarch
);
776 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
777 /* Skip verify of addr_bits_remove, invalid_p == 0 */
778 /* Skip verify of smash_text_address, invalid_p == 0 */
779 /* Skip verify of software_single_step, has predicate */
780 /* Skip verify of print_insn, invalid_p == 0 */
781 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
782 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
783 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
784 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
785 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
786 /* Skip verify of dwarf2_build_frame_info, has predicate */
787 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
788 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
789 buf
= ui_file_xstrdup (log
, &dummy
);
790 make_cleanup (xfree
, buf
);
791 if (strlen (buf
) > 0)
792 internal_error (__FILE__
, __LINE__
,
793 "verify_gdbarch: the following are invalid ...%s",
795 do_cleanups (cleanups
);
799 /* Print out the details of the current architecture. */
801 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
802 just happens to match the global variable ``current_gdbarch''. That
803 way macros refering to that variable get the local and not the global
804 version - ulgh. Once everything is parameterised with gdbarch, this
808 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
816 (long) current_gdbarch
->in_function_epilogue_p
);
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
820 (long) current_gdbarch
->pseudo_register_read
);
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
824 (long) current_gdbarch
->pseudo_register_write
);
825 #ifdef ADDRESS_TO_POINTER
827 /* Macro might contain `[{}]' when not multi-arch */
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: %s # %s\n",
830 "ADDRESS_TO_POINTER(type, buf, addr)",
831 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
836 (long) current_gdbarch
->address_to_pointer
837 /*ADDRESS_TO_POINTER ()*/);
839 #ifdef ADDR_BITS_REMOVE
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: %s # %s\n",
842 "ADDR_BITS_REMOVE(addr)",
843 XSTRING (ADDR_BITS_REMOVE (addr
)));
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
847 (long) current_gdbarch
->addr_bits_remove
848 /*ADDR_BITS_REMOVE ()*/);
850 #ifdef BELIEVE_PCC_PROMOTION
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
853 XSTRING (BELIEVE_PCC_PROMOTION
));
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
856 BELIEVE_PCC_PROMOTION
);
858 #ifdef BELIEVE_PCC_PROMOTION_TYPE
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
861 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
862 fprintf_unfiltered (file
,
863 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
864 BELIEVE_PCC_PROMOTION_TYPE
);
866 #ifdef BREAKPOINT_FROM_PC
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: %s # %s\n",
869 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
870 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
874 (long) current_gdbarch
->breakpoint_from_pc
875 /*BREAKPOINT_FROM_PC ()*/);
877 #ifdef CALL_DUMMY_ADDRESS
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: %s # %s\n",
880 "CALL_DUMMY_ADDRESS()",
881 XSTRING (CALL_DUMMY_ADDRESS ()));
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
885 (long) current_gdbarch
->call_dummy_address
886 /*CALL_DUMMY_ADDRESS ()*/);
888 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
891 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
892 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
895 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
897 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
900 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
903 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
905 #ifdef CALL_DUMMY_LENGTH
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
908 XSTRING (CALL_DUMMY_LENGTH
));
909 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
914 #ifdef CALL_DUMMY_LOCATION
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
917 XSTRING (CALL_DUMMY_LOCATION
));
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
920 CALL_DUMMY_LOCATION
);
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_P # %s\n",
925 XSTRING (CALL_DUMMY_P
));
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: CALL_DUMMY_P = %d\n",
930 #ifdef CALL_DUMMY_STACK_ADJUST
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
933 XSTRING (CALL_DUMMY_STACK_ADJUST
));
934 if (CALL_DUMMY_STACK_ADJUST_P
)
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
937 (long) CALL_DUMMY_STACK_ADJUST
);
939 #ifdef CALL_DUMMY_STACK_ADJUST_P
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
942 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
945 (long) CALL_DUMMY_STACK_ADJUST_P
);
947 #ifdef CALL_DUMMY_START_OFFSET
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
950 XSTRING (CALL_DUMMY_START_OFFSET
));
951 fprintf_unfiltered (file
,
952 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
953 (long) CALL_DUMMY_START_OFFSET
);
955 #ifdef CALL_DUMMY_WORDS
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
958 XSTRING (CALL_DUMMY_WORDS
));
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
961 (long) CALL_DUMMY_WORDS
);
963 #ifdef CANNOT_FETCH_REGISTER
964 fprintf_unfiltered (file
,
965 "gdbarch_dump: %s # %s\n",
966 "CANNOT_FETCH_REGISTER(regnum)",
967 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
971 (long) current_gdbarch
->cannot_fetch_register
972 /*CANNOT_FETCH_REGISTER ()*/);
974 #ifdef CANNOT_STORE_REGISTER
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: %s # %s\n",
977 "CANNOT_STORE_REGISTER(regnum)",
978 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
982 (long) current_gdbarch
->cannot_store_register
983 /*CANNOT_STORE_REGISTER ()*/);
985 #ifdef COERCE_FLOAT_TO_DOUBLE
986 fprintf_unfiltered (file
,
987 "gdbarch_dump: %s # %s\n",
988 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
989 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
993 (long) current_gdbarch
->coerce_float_to_double
994 /*COERCE_FLOAT_TO_DOUBLE ()*/);
996 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
998 /* Macro might contain `[{}]' when not multi-arch */
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: %s # %s\n",
1001 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1002 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1007 (long) current_gdbarch
->coff_make_msymbol_special
1008 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1013 (long) current_gdbarch
->construct_inferior_arguments
);
1014 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: %s # %s\n",
1017 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1018 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1022 (long) current_gdbarch
->convert_from_func_ptr_addr
1023 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1025 #ifdef CONVERT_REGISTER_P
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: %s # %s\n",
1028 "CONVERT_REGISTER_P(regnum)",
1029 XSTRING (CONVERT_REGISTER_P (regnum
)));
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1033 (long) current_gdbarch
->convert_register_p
1034 /*CONVERT_REGISTER_P ()*/);
1036 #ifdef DECR_PC_AFTER_BREAK
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1039 XSTRING (DECR_PC_AFTER_BREAK
));
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1042 (long) DECR_PC_AFTER_BREAK
);
1044 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1046 /* Macro might contain `[{}]' when not multi-arch */
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: %s # %s\n",
1049 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1050 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1055 (long) current_gdbarch
->deprecated_extract_return_value
1056 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1058 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: %s # %s\n",
1061 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1062 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1066 (long) current_gdbarch
->deprecated_extract_struct_value_address
1067 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1069 #ifdef DO_REGISTERS_INFO
1071 /* Macro might contain `[{}]' when not multi-arch */
1072 fprintf_unfiltered (file
,
1073 "gdbarch_dump: %s # %s\n",
1074 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1075 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1078 fprintf_unfiltered (file
,
1079 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1080 (long) current_gdbarch
->do_registers_info
1081 /*DO_REGISTERS_INFO ()*/);
1083 #ifdef DWARF2_BUILD_FRAME_INFO
1085 /* Macro might contain `[{}]' when not multi-arch */
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: %s # %s\n",
1088 "DWARF2_BUILD_FRAME_INFO(objfile)",
1089 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1094 (long) current_gdbarch
->dwarf2_build_frame_info
1095 /*DWARF2_BUILD_FRAME_INFO ()*/);
1097 #ifdef DWARF2_REG_TO_REGNUM
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: %s # %s\n",
1100 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1101 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1105 (long) current_gdbarch
->dwarf2_reg_to_regnum
1106 /*DWARF2_REG_TO_REGNUM ()*/);
1108 #ifdef DWARF_REG_TO_REGNUM
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: %s # %s\n",
1111 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1112 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1114 fprintf_unfiltered (file
,
1115 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1116 (long) current_gdbarch
->dwarf_reg_to_regnum
1117 /*DWARF_REG_TO_REGNUM ()*/);
1119 #ifdef ECOFF_REG_TO_REGNUM
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: %s # %s\n",
1122 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1123 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1127 (long) current_gdbarch
->ecoff_reg_to_regnum
1128 /*ECOFF_REG_TO_REGNUM ()*/);
1130 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1132 /* Macro might contain `[{}]' when not multi-arch */
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: %s # %s\n",
1135 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1136 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1141 (long) current_gdbarch
->elf_make_msymbol_special
1142 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1144 #ifdef EXTRACT_RETURN_VALUE
1146 /* Macro might contain `[{}]' when not multi-arch */
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: %s # %s\n",
1149 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1150 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1155 (long) current_gdbarch
->extract_return_value
1156 /*EXTRACT_RETURN_VALUE ()*/);
1158 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: %s # %s\n",
1161 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1162 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1166 (long) current_gdbarch
->extract_struct_value_address
1167 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1169 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1172 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1173 fprintf_unfiltered (file
,
1174 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1175 EXTRA_STACK_ALIGNMENT_NEEDED
);
1177 #ifdef FIX_CALL_DUMMY
1179 /* Macro might contain `[{}]' when not multi-arch */
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: %s # %s\n",
1182 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1183 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1188 (long) current_gdbarch
->fix_call_dummy
1189 /*FIX_CALL_DUMMY ()*/);
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: FP0_REGNUM # %s\n",
1194 XSTRING (FP0_REGNUM
));
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: FP0_REGNUM = %d\n",
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: FP_REGNUM # %s\n",
1202 XSTRING (FP_REGNUM
));
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: FP_REGNUM = %d\n",
1207 #ifdef FRAMELESS_FUNCTION_INVOCATION
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: %s # %s\n",
1210 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1211 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1213 fprintf_unfiltered (file
,
1214 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1215 (long) current_gdbarch
->frameless_function_invocation
1216 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1218 #ifdef FRAME_ARGS_ADDRESS
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: %s # %s\n",
1221 "FRAME_ARGS_ADDRESS(fi)",
1222 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1226 (long) current_gdbarch
->frame_args_address
1227 /*FRAME_ARGS_ADDRESS ()*/);
1229 #ifdef FRAME_ARGS_SKIP
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1232 XSTRING (FRAME_ARGS_SKIP
));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1235 (long) FRAME_ARGS_SKIP
);
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: %s # %s\n",
1240 "FRAME_CHAIN(frame)",
1241 XSTRING (FRAME_CHAIN (frame
)));
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1245 (long) current_gdbarch
->frame_chain
1246 /*FRAME_CHAIN ()*/);
1248 #ifdef FRAME_CHAIN_VALID
1249 fprintf_unfiltered (file
,
1250 "gdbarch_dump: %s # %s\n",
1251 "FRAME_CHAIN_VALID(chain, thisframe)",
1252 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1256 (long) current_gdbarch
->frame_chain_valid
1257 /*FRAME_CHAIN_VALID ()*/);
1259 #ifdef FRAME_INIT_SAVED_REGS
1261 /* Macro might contain `[{}]' when not multi-arch */
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: %s # %s\n",
1264 "FRAME_INIT_SAVED_REGS(frame)",
1265 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1270 (long) current_gdbarch
->frame_init_saved_regs
1271 /*FRAME_INIT_SAVED_REGS ()*/);
1273 #ifdef FRAME_LOCALS_ADDRESS
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: %s # %s\n",
1276 "FRAME_LOCALS_ADDRESS(fi)",
1277 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1281 (long) current_gdbarch
->frame_locals_address
1282 /*FRAME_LOCALS_ADDRESS ()*/);
1284 #ifdef FRAME_NUM_ARGS
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: %s # %s\n",
1287 "FRAME_NUM_ARGS(frame)",
1288 XSTRING (FRAME_NUM_ARGS (frame
)));
1290 fprintf_unfiltered (file
,
1291 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1292 (long) current_gdbarch
->frame_num_args
1293 /*FRAME_NUM_ARGS ()*/);
1295 #ifdef FRAME_SAVED_PC
1296 fprintf_unfiltered (file
,
1297 "gdbarch_dump: %s # %s\n",
1298 "FRAME_SAVED_PC(fi)",
1299 XSTRING (FRAME_SAVED_PC (fi
)));
1301 fprintf_unfiltered (file
,
1302 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1303 (long) current_gdbarch
->frame_saved_pc
1304 /*FRAME_SAVED_PC ()*/);
1306 #ifdef FUNCTION_START_OFFSET
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1309 XSTRING (FUNCTION_START_OFFSET
));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1312 (long) FUNCTION_START_OFFSET
);
1314 #ifdef GET_LONGJMP_TARGET
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: %s # %s\n",
1317 "GET_LONGJMP_TARGET(pc)",
1318 XSTRING (GET_LONGJMP_TARGET (pc
)));
1320 fprintf_unfiltered (file
,
1321 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1322 (long) current_gdbarch
->get_longjmp_target
1323 /*GET_LONGJMP_TARGET ()*/);
1325 #ifdef GET_SAVED_REGISTER
1327 /* Macro might contain `[{}]' when not multi-arch */
1328 fprintf_unfiltered (file
,
1329 "gdbarch_dump: %s # %s\n",
1330 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1331 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1336 (long) current_gdbarch
->get_saved_register
1337 /*GET_SAVED_REGISTER ()*/);
1339 #ifdef INIT_EXTRA_FRAME_INFO
1341 /* Macro might contain `[{}]' when not multi-arch */
1342 fprintf_unfiltered (file
,
1343 "gdbarch_dump: %s # %s\n",
1344 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1345 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1350 (long) current_gdbarch
->init_extra_frame_info
1351 /*INIT_EXTRA_FRAME_INFO ()*/);
1353 #ifdef INIT_FRAME_PC
1355 /* Macro might contain `[{}]' when not multi-arch */
1356 fprintf_unfiltered (file
,
1357 "gdbarch_dump: %s # %s\n",
1358 "INIT_FRAME_PC(fromleaf, prev)",
1359 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1364 (long) current_gdbarch
->init_frame_pc
1365 /*INIT_FRAME_PC ()*/);
1367 #ifdef INIT_FRAME_PC_FIRST
1369 /* Macro might contain `[{}]' when not multi-arch */
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: %s # %s\n",
1372 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1373 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1378 (long) current_gdbarch
->init_frame_pc_first
1379 /*INIT_FRAME_PC_FIRST ()*/);
1382 fprintf_unfiltered (file
,
1383 "gdbarch_dump: %s # %s\n",
1384 "INNER_THAN(lhs, rhs)",
1385 XSTRING (INNER_THAN (lhs
, rhs
)));
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1389 (long) current_gdbarch
->inner_than
1392 #ifdef INTEGER_TO_ADDRESS
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: %s # %s\n",
1395 "INTEGER_TO_ADDRESS(type, buf)",
1396 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1400 (long) current_gdbarch
->integer_to_address
1401 /*INTEGER_TO_ADDRESS ()*/);
1403 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1404 fprintf_unfiltered (file
,
1405 "gdbarch_dump: %s # %s\n",
1406 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1407 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1411 (long) current_gdbarch
->in_solib_call_trampoline
1412 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1414 #ifdef MAX_REGISTER_RAW_SIZE
1415 fprintf_unfiltered (file
,
1416 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1417 XSTRING (MAX_REGISTER_RAW_SIZE
));
1418 fprintf_unfiltered (file
,
1419 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1420 MAX_REGISTER_RAW_SIZE
);
1422 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1425 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1428 MAX_REGISTER_VIRTUAL_SIZE
);
1430 #ifdef MEMORY_INSERT_BREAKPOINT
1431 fprintf_unfiltered (file
,
1432 "gdbarch_dump: %s # %s\n",
1433 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1434 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1436 fprintf_unfiltered (file
,
1437 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1438 (long) current_gdbarch
->memory_insert_breakpoint
1439 /*MEMORY_INSERT_BREAKPOINT ()*/);
1441 #ifdef MEMORY_REMOVE_BREAKPOINT
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: %s # %s\n",
1444 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1445 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1449 (long) current_gdbarch
->memory_remove_breakpoint
1450 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1453 fprintf_unfiltered (file
,
1454 "gdbarch_dump: NPC_REGNUM # %s\n",
1455 XSTRING (NPC_REGNUM
));
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: NPC_REGNUM = %d\n",
1460 #ifdef NUM_PSEUDO_REGS
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1463 XSTRING (NUM_PSEUDO_REGS
));
1464 fprintf_unfiltered (file
,
1465 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1469 fprintf_unfiltered (file
,
1470 "gdbarch_dump: NUM_REGS # %s\n",
1471 XSTRING (NUM_REGS
));
1472 fprintf_unfiltered (file
,
1473 "gdbarch_dump: NUM_REGS = %d\n",
1476 #ifdef PARM_BOUNDARY
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1479 XSTRING (PARM_BOUNDARY
));
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1484 #ifdef PC_IN_CALL_DUMMY
1485 fprintf_unfiltered (file
,
1486 "gdbarch_dump: %s # %s\n",
1487 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1488 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1492 (long) current_gdbarch
->pc_in_call_dummy
1493 /*PC_IN_CALL_DUMMY ()*/);
1495 #ifdef PC_IN_SIGTRAMP
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: %s # %s\n",
1498 "PC_IN_SIGTRAMP(pc, name)",
1499 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1503 (long) current_gdbarch
->pc_in_sigtramp
1504 /*PC_IN_SIGTRAMP ()*/);
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: PC_REGNUM # %s\n",
1509 XSTRING (PC_REGNUM
));
1510 fprintf_unfiltered (file
,
1511 "gdbarch_dump: PC_REGNUM = %d\n",
1514 #ifdef POINTER_TO_ADDRESS
1515 fprintf_unfiltered (file
,
1516 "gdbarch_dump: %s # %s\n",
1517 "POINTER_TO_ADDRESS(type, buf)",
1518 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1522 (long) current_gdbarch
->pointer_to_address
1523 /*POINTER_TO_ADDRESS ()*/);
1527 /* Macro might contain `[{}]' when not multi-arch */
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: %s # %s\n",
1531 XSTRING (POP_FRAME (-)));
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1536 (long) current_gdbarch
->pop_frame
1539 #ifdef PREPARE_TO_PROCEED
1540 fprintf_unfiltered (file
,
1541 "gdbarch_dump: %s # %s\n",
1542 "PREPARE_TO_PROCEED(select_it)",
1543 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1547 (long) current_gdbarch
->prepare_to_proceed
1548 /*PREPARE_TO_PROCEED ()*/);
1551 fprintf_unfiltered (file
,
1552 "gdbarch_dump: print_float_info = 0x%08lx\n",
1553 (long) current_gdbarch
->print_float_info
);
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1557 (long) current_gdbarch
->print_vector_info
);
1558 #ifdef PROLOGUE_FRAMELESS_P
1559 fprintf_unfiltered (file
,
1560 "gdbarch_dump: %s # %s\n",
1561 "PROLOGUE_FRAMELESS_P(ip)",
1562 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1566 (long) current_gdbarch
->prologue_frameless_p
1567 /*PROLOGUE_FRAMELESS_P ()*/);
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: PS_REGNUM # %s\n",
1572 XSTRING (PS_REGNUM
));
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: PS_REGNUM = %d\n",
1577 #ifdef PUSH_ARGUMENTS
1578 fprintf_unfiltered (file
,
1579 "gdbarch_dump: %s # %s\n",
1580 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1581 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1585 (long) current_gdbarch
->push_arguments
1586 /*PUSH_ARGUMENTS ()*/);
1588 #ifdef PUSH_DUMMY_FRAME
1590 /* Macro might contain `[{}]' when not multi-arch */
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: %s # %s\n",
1593 "PUSH_DUMMY_FRAME(-)",
1594 XSTRING (PUSH_DUMMY_FRAME (-)));
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1599 (long) current_gdbarch
->push_dummy_frame
1600 /*PUSH_DUMMY_FRAME ()*/);
1602 #ifdef PUSH_RETURN_ADDRESS
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: %s # %s\n",
1605 "PUSH_RETURN_ADDRESS(pc, sp)",
1606 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1610 (long) current_gdbarch
->push_return_address
1611 /*PUSH_RETURN_ADDRESS ()*/);
1613 #ifdef REGISTER_BYTE
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: %s # %s\n",
1616 "REGISTER_BYTE(reg_nr)",
1617 XSTRING (REGISTER_BYTE (reg_nr
)));
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1621 (long) current_gdbarch
->register_byte
1622 /*REGISTER_BYTE ()*/);
1624 #ifdef REGISTER_BYTES
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: REGISTER_BYTES # %s\n",
1627 XSTRING (REGISTER_BYTES
));
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: REGISTER_BYTES = %d\n",
1632 #ifdef REGISTER_BYTES_OK
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: %s # %s\n",
1635 "REGISTER_BYTES_OK(nr_bytes)",
1636 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1640 (long) current_gdbarch
->register_bytes_ok
1641 /*REGISTER_BYTES_OK ()*/);
1643 #ifdef REGISTER_CONVERTIBLE
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: %s # %s\n",
1646 "REGISTER_CONVERTIBLE(nr)",
1647 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1651 (long) current_gdbarch
->register_convertible
1652 /*REGISTER_CONVERTIBLE ()*/);
1654 #ifdef REGISTER_CONVERT_TO_RAW
1656 /* Macro might contain `[{}]' when not multi-arch */
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: %s # %s\n",
1659 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1660 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1665 (long) current_gdbarch
->register_convert_to_raw
1666 /*REGISTER_CONVERT_TO_RAW ()*/);
1668 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1670 /* Macro might contain `[{}]' when not multi-arch */
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: %s # %s\n",
1673 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1674 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1679 (long) current_gdbarch
->register_convert_to_virtual
1680 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1682 #ifdef REGISTER_NAME
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: %s # %s\n",
1685 "REGISTER_NAME(regnr)",
1686 XSTRING (REGISTER_NAME (regnr
)));
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1690 (long) current_gdbarch
->register_name
1691 /*REGISTER_NAME ()*/);
1693 #ifdef REGISTER_RAW_SIZE
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: %s # %s\n",
1696 "REGISTER_RAW_SIZE(reg_nr)",
1697 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1701 (long) current_gdbarch
->register_raw_size
1702 /*REGISTER_RAW_SIZE ()*/);
1704 #ifdef REGISTER_SIM_REGNO
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: %s # %s\n",
1707 "REGISTER_SIM_REGNO(reg_nr)",
1708 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1712 (long) current_gdbarch
->register_sim_regno
1713 /*REGISTER_SIM_REGNO ()*/);
1715 #ifdef REGISTER_SIZE
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: REGISTER_SIZE # %s\n",
1718 XSTRING (REGISTER_SIZE
));
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: REGISTER_SIZE = %d\n",
1723 #ifdef REGISTER_TO_VALUE
1725 /* Macro might contain `[{}]' when not multi-arch */
1726 fprintf_unfiltered (file
,
1727 "gdbarch_dump: %s # %s\n",
1728 "REGISTER_TO_VALUE(regnum, type, from, to)",
1729 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1732 fprintf_unfiltered (file
,
1733 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1734 (long) current_gdbarch
->register_to_value
1735 /*REGISTER_TO_VALUE ()*/);
1737 #ifdef REGISTER_VIRTUAL_SIZE
1738 fprintf_unfiltered (file
,
1739 "gdbarch_dump: %s # %s\n",
1740 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1741 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1743 fprintf_unfiltered (file
,
1744 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1745 (long) current_gdbarch
->register_virtual_size
1746 /*REGISTER_VIRTUAL_SIZE ()*/);
1748 #ifdef REGISTER_VIRTUAL_TYPE
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: %s # %s\n",
1751 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1752 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1756 (long) current_gdbarch
->register_virtual_type
1757 /*REGISTER_VIRTUAL_TYPE ()*/);
1759 #ifdef REG_STRUCT_HAS_ADDR
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: %s # %s\n",
1762 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1763 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1767 (long) current_gdbarch
->reg_struct_has_addr
1768 /*REG_STRUCT_HAS_ADDR ()*/);
1770 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1772 /* Macro might contain `[{}]' when not multi-arch */
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: %s # %s\n",
1775 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1776 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1781 (long) current_gdbarch
->remote_translate_xfer_address
1782 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1784 #ifdef RETURN_VALUE_ON_STACK
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: %s # %s\n",
1787 "RETURN_VALUE_ON_STACK(type)",
1788 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1792 (long) current_gdbarch
->return_value_on_stack
1793 /*RETURN_VALUE_ON_STACK ()*/);
1795 #ifdef SAVED_PC_AFTER_CALL
1796 fprintf_unfiltered (file
,
1797 "gdbarch_dump: %s # %s\n",
1798 "SAVED_PC_AFTER_CALL(frame)",
1799 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1801 fprintf_unfiltered (file
,
1802 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1803 (long) current_gdbarch
->saved_pc_after_call
1804 /*SAVED_PC_AFTER_CALL ()*/);
1806 #ifdef SAVE_DUMMY_FRAME_TOS
1808 /* Macro might contain `[{}]' when not multi-arch */
1809 fprintf_unfiltered (file
,
1810 "gdbarch_dump: %s # %s\n",
1811 "SAVE_DUMMY_FRAME_TOS(sp)",
1812 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1817 (long) current_gdbarch
->save_dummy_frame_tos
1818 /*SAVE_DUMMY_FRAME_TOS ()*/);
1820 #ifdef SDB_REG_TO_REGNUM
1821 fprintf_unfiltered (file
,
1822 "gdbarch_dump: %s # %s\n",
1823 "SDB_REG_TO_REGNUM(sdb_regnr)",
1824 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1828 (long) current_gdbarch
->sdb_reg_to_regnum
1829 /*SDB_REG_TO_REGNUM ()*/);
1831 #ifdef SIZEOF_CALL_DUMMY_WORDS
1832 fprintf_unfiltered (file
,
1833 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1834 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1837 (long) SIZEOF_CALL_DUMMY_WORDS
);
1839 #ifdef SKIP_PROLOGUE
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: %s # %s\n",
1842 "SKIP_PROLOGUE(ip)",
1843 XSTRING (SKIP_PROLOGUE (ip
)));
1845 fprintf_unfiltered (file
,
1846 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1847 (long) current_gdbarch
->skip_prologue
1848 /*SKIP_PROLOGUE ()*/);
1850 #ifdef SKIP_TRAMPOLINE_CODE
1851 fprintf_unfiltered (file
,
1852 "gdbarch_dump: %s # %s\n",
1853 "SKIP_TRAMPOLINE_CODE(pc)",
1854 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1856 fprintf_unfiltered (file
,
1857 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1858 (long) current_gdbarch
->skip_trampoline_code
1859 /*SKIP_TRAMPOLINE_CODE ()*/);
1861 #ifdef SMASH_TEXT_ADDRESS
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: %s # %s\n",
1864 "SMASH_TEXT_ADDRESS(addr)",
1865 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1869 (long) current_gdbarch
->smash_text_address
1870 /*SMASH_TEXT_ADDRESS ()*/);
1872 #ifdef SOFTWARE_SINGLE_STEP
1874 /* Macro might contain `[{}]' when not multi-arch */
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: %s # %s\n",
1877 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1878 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1883 (long) current_gdbarch
->software_single_step
1884 /*SOFTWARE_SINGLE_STEP ()*/);
1887 fprintf_unfiltered (file
,
1888 "gdbarch_dump: SP_REGNUM # %s\n",
1889 XSTRING (SP_REGNUM
));
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: SP_REGNUM = %d\n",
1894 #ifdef STAB_REG_TO_REGNUM
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: %s # %s\n",
1897 "STAB_REG_TO_REGNUM(stab_regnr)",
1898 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1902 (long) current_gdbarch
->stab_reg_to_regnum
1903 /*STAB_REG_TO_REGNUM ()*/);
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: %s # %s\n",
1909 XSTRING (STACK_ALIGN (sp
)));
1911 fprintf_unfiltered (file
,
1912 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1913 (long) current_gdbarch
->stack_align
1914 /*STACK_ALIGN ()*/);
1916 #ifdef STORE_RETURN_VALUE
1918 /* Macro might contain `[{}]' when not multi-arch */
1919 fprintf_unfiltered (file
,
1920 "gdbarch_dump: %s # %s\n",
1921 "STORE_RETURN_VALUE(type, valbuf)",
1922 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1925 fprintf_unfiltered (file
,
1926 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1927 (long) current_gdbarch
->store_return_value
1928 /*STORE_RETURN_VALUE ()*/);
1930 #ifdef STORE_STRUCT_RETURN
1932 /* Macro might contain `[{}]' when not multi-arch */
1933 fprintf_unfiltered (file
,
1934 "gdbarch_dump: %s # %s\n",
1935 "STORE_STRUCT_RETURN(addr, sp)",
1936 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1941 (long) current_gdbarch
->store_struct_return
1942 /*STORE_STRUCT_RETURN ()*/);
1944 #ifdef TARGET_ADDR_BIT
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1947 XSTRING (TARGET_ADDR_BIT
));
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1952 #ifdef TARGET_ARCHITECTURE
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1955 XSTRING (TARGET_ARCHITECTURE
));
1956 if (TARGET_ARCHITECTURE
!= NULL
)
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1959 TARGET_ARCHITECTURE
->printable_name
);
1961 #ifdef TARGET_BFD_VMA_BIT
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1964 XSTRING (TARGET_BFD_VMA_BIT
));
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1967 TARGET_BFD_VMA_BIT
);
1969 #ifdef TARGET_BYTE_ORDER
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1972 XSTRING (TARGET_BYTE_ORDER
));
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1975 (long) TARGET_BYTE_ORDER
);
1977 #ifdef TARGET_CHAR_SIGNED
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1980 XSTRING (TARGET_CHAR_SIGNED
));
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1983 TARGET_CHAR_SIGNED
);
1985 #ifdef TARGET_DOUBLE_BIT
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1988 XSTRING (TARGET_DOUBLE_BIT
));
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1993 #ifdef TARGET_DOUBLE_FORMAT
1994 fprintf_unfiltered (file
,
1995 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1996 XSTRING (TARGET_DOUBLE_FORMAT
));
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1999 (long) TARGET_DOUBLE_FORMAT
);
2001 #ifdef TARGET_FLOAT_BIT
2002 fprintf_unfiltered (file
,
2003 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2004 XSTRING (TARGET_FLOAT_BIT
));
2005 fprintf_unfiltered (file
,
2006 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2009 #ifdef TARGET_FLOAT_FORMAT
2010 fprintf_unfiltered (file
,
2011 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2012 XSTRING (TARGET_FLOAT_FORMAT
));
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2015 (long) TARGET_FLOAT_FORMAT
);
2017 #ifdef TARGET_INT_BIT
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2020 XSTRING (TARGET_INT_BIT
));
2021 fprintf_unfiltered (file
,
2022 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2025 #ifdef TARGET_LONG_BIT
2026 fprintf_unfiltered (file
,
2027 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2028 XSTRING (TARGET_LONG_BIT
));
2029 fprintf_unfiltered (file
,
2030 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2033 #ifdef TARGET_LONG_DOUBLE_BIT
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2036 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2039 TARGET_LONG_DOUBLE_BIT
);
2041 #ifdef TARGET_LONG_DOUBLE_FORMAT
2042 fprintf_unfiltered (file
,
2043 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2044 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2047 (long) TARGET_LONG_DOUBLE_FORMAT
);
2049 #ifdef TARGET_LONG_LONG_BIT
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2052 XSTRING (TARGET_LONG_LONG_BIT
));
2053 fprintf_unfiltered (file
,
2054 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2055 TARGET_LONG_LONG_BIT
);
2057 #ifdef TARGET_PRINT_INSN
2058 fprintf_unfiltered (file
,
2059 "gdbarch_dump: %s # %s\n",
2060 "TARGET_PRINT_INSN(vma, info)",
2061 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2065 (long) current_gdbarch
->print_insn
2066 /*TARGET_PRINT_INSN ()*/);
2068 #ifdef TARGET_PTR_BIT
2069 fprintf_unfiltered (file
,
2070 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2071 XSTRING (TARGET_PTR_BIT
));
2072 fprintf_unfiltered (file
,
2073 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2076 #ifdef TARGET_READ_FP
2077 fprintf_unfiltered (file
,
2078 "gdbarch_dump: %s # %s\n",
2080 XSTRING (TARGET_READ_FP ()));
2082 fprintf_unfiltered (file
,
2083 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2084 (long) current_gdbarch
->read_fp
2085 /*TARGET_READ_FP ()*/);
2087 #ifdef TARGET_READ_PC
2088 fprintf_unfiltered (file
,
2089 "gdbarch_dump: %s # %s\n",
2090 "TARGET_READ_PC(ptid)",
2091 XSTRING (TARGET_READ_PC (ptid
)));
2093 fprintf_unfiltered (file
,
2094 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2095 (long) current_gdbarch
->read_pc
2096 /*TARGET_READ_PC ()*/);
2098 #ifdef TARGET_READ_SP
2099 fprintf_unfiltered (file
,
2100 "gdbarch_dump: %s # %s\n",
2102 XSTRING (TARGET_READ_SP ()));
2104 fprintf_unfiltered (file
,
2105 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2106 (long) current_gdbarch
->read_sp
2107 /*TARGET_READ_SP ()*/);
2109 #ifdef TARGET_SHORT_BIT
2110 fprintf_unfiltered (file
,
2111 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2112 XSTRING (TARGET_SHORT_BIT
));
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2117 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2119 /* Macro might contain `[{}]' when not multi-arch */
2120 fprintf_unfiltered (file
,
2121 "gdbarch_dump: %s # %s\n",
2122 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2123 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2126 fprintf_unfiltered (file
,
2127 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2128 (long) current_gdbarch
->virtual_frame_pointer
2129 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2131 #ifdef TARGET_WRITE_PC
2133 /* Macro might contain `[{}]' when not multi-arch */
2134 fprintf_unfiltered (file
,
2135 "gdbarch_dump: %s # %s\n",
2136 "TARGET_WRITE_PC(val, ptid)",
2137 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2140 fprintf_unfiltered (file
,
2141 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2142 (long) current_gdbarch
->write_pc
2143 /*TARGET_WRITE_PC ()*/);
2145 #ifdef TARGET_WRITE_SP
2147 /* Macro might contain `[{}]' when not multi-arch */
2148 fprintf_unfiltered (file
,
2149 "gdbarch_dump: %s # %s\n",
2150 "TARGET_WRITE_SP(val)",
2151 XSTRING (TARGET_WRITE_SP (val
)));
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2156 (long) current_gdbarch
->write_sp
2157 /*TARGET_WRITE_SP ()*/);
2159 #ifdef USE_GENERIC_DUMMY_FRAMES
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2162 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2163 fprintf_unfiltered (file
,
2164 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2165 USE_GENERIC_DUMMY_FRAMES
);
2167 #ifdef USE_STRUCT_CONVENTION
2168 fprintf_unfiltered (file
,
2169 "gdbarch_dump: %s # %s\n",
2170 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2171 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2175 (long) current_gdbarch
->use_struct_convention
2176 /*USE_STRUCT_CONVENTION ()*/);
2178 #ifdef VALUE_TO_REGISTER
2180 /* Macro might contain `[{}]' when not multi-arch */
2181 fprintf_unfiltered (file
,
2182 "gdbarch_dump: %s # %s\n",
2183 "VALUE_TO_REGISTER(type, regnum, from, to)",
2184 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2187 fprintf_unfiltered (file
,
2188 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2189 (long) current_gdbarch
->value_to_register
2190 /*VALUE_TO_REGISTER ()*/);
2192 if (current_gdbarch
->dump_tdep
!= NULL
)
2193 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2196 struct gdbarch_tdep
*
2197 gdbarch_tdep (struct gdbarch
*gdbarch
)
2199 if (gdbarch_debug
>= 2)
2200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2201 return gdbarch
->tdep
;
2205 const struct bfd_arch_info
*
2206 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2208 gdb_assert (gdbarch
!= NULL
);
2209 if (gdbarch_debug
>= 2)
2210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2211 return gdbarch
->bfd_arch_info
;
2215 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2217 gdb_assert (gdbarch
!= NULL
);
2218 if (gdbarch_debug
>= 2)
2219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2220 return gdbarch
->byte_order
;
2224 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2226 gdb_assert (gdbarch
!= NULL
);
2227 /* Skip verify of short_bit, invalid_p == 0 */
2228 if (gdbarch_debug
>= 2)
2229 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2230 return gdbarch
->short_bit
;
2234 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2237 gdbarch
->short_bit
= short_bit
;
2241 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2243 gdb_assert (gdbarch
!= NULL
);
2244 /* Skip verify of int_bit, invalid_p == 0 */
2245 if (gdbarch_debug
>= 2)
2246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2247 return gdbarch
->int_bit
;
2251 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2254 gdbarch
->int_bit
= int_bit
;
2258 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2260 gdb_assert (gdbarch
!= NULL
);
2261 /* Skip verify of long_bit, invalid_p == 0 */
2262 if (gdbarch_debug
>= 2)
2263 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2264 return gdbarch
->long_bit
;
2268 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2271 gdbarch
->long_bit
= long_bit
;
2275 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2277 gdb_assert (gdbarch
!= NULL
);
2278 /* Skip verify of long_long_bit, invalid_p == 0 */
2279 if (gdbarch_debug
>= 2)
2280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2281 return gdbarch
->long_long_bit
;
2285 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2288 gdbarch
->long_long_bit
= long_long_bit
;
2292 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2294 gdb_assert (gdbarch
!= NULL
);
2295 /* Skip verify of float_bit, invalid_p == 0 */
2296 if (gdbarch_debug
>= 2)
2297 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2298 return gdbarch
->float_bit
;
2302 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2305 gdbarch
->float_bit
= float_bit
;
2309 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2311 gdb_assert (gdbarch
!= NULL
);
2312 /* Skip verify of double_bit, invalid_p == 0 */
2313 if (gdbarch_debug
>= 2)
2314 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2315 return gdbarch
->double_bit
;
2319 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2322 gdbarch
->double_bit
= double_bit
;
2326 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2328 gdb_assert (gdbarch
!= NULL
);
2329 /* Skip verify of long_double_bit, invalid_p == 0 */
2330 if (gdbarch_debug
>= 2)
2331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2332 return gdbarch
->long_double_bit
;
2336 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2337 int long_double_bit
)
2339 gdbarch
->long_double_bit
= long_double_bit
;
2343 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2345 gdb_assert (gdbarch
!= NULL
);
2346 /* Skip verify of ptr_bit, invalid_p == 0 */
2347 if (gdbarch_debug
>= 2)
2348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2349 return gdbarch
->ptr_bit
;
2353 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2356 gdbarch
->ptr_bit
= ptr_bit
;
2360 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2362 gdb_assert (gdbarch
!= NULL
);
2363 if (gdbarch
->addr_bit
== 0)
2364 internal_error (__FILE__
, __LINE__
,
2365 "gdbarch: gdbarch_addr_bit invalid");
2366 if (gdbarch_debug
>= 2)
2367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2368 return gdbarch
->addr_bit
;
2372 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2375 gdbarch
->addr_bit
= addr_bit
;
2379 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2381 gdb_assert (gdbarch
!= NULL
);
2382 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2383 if (gdbarch_debug
>= 2)
2384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2385 return gdbarch
->bfd_vma_bit
;
2389 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2392 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2396 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2398 gdb_assert (gdbarch
!= NULL
);
2399 if (gdbarch
->char_signed
== -1)
2400 internal_error (__FILE__
, __LINE__
,
2401 "gdbarch: gdbarch_char_signed invalid");
2402 if (gdbarch_debug
>= 2)
2403 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2404 return gdbarch
->char_signed
;
2408 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2411 gdbarch
->char_signed
= char_signed
;
2415 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2417 gdb_assert (gdbarch
!= NULL
);
2418 if (gdbarch
->read_pc
== 0)
2419 internal_error (__FILE__
, __LINE__
,
2420 "gdbarch: gdbarch_read_pc invalid");
2421 if (gdbarch_debug
>= 2)
2422 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2423 return gdbarch
->read_pc (ptid
);
2427 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2428 gdbarch_read_pc_ftype read_pc
)
2430 gdbarch
->read_pc
= read_pc
;
2434 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2436 gdb_assert (gdbarch
!= NULL
);
2437 if (gdbarch
->write_pc
== 0)
2438 internal_error (__FILE__
, __LINE__
,
2439 "gdbarch: gdbarch_write_pc invalid");
2440 if (gdbarch_debug
>= 2)
2441 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2442 gdbarch
->write_pc (val
, ptid
);
2446 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2447 gdbarch_write_pc_ftype write_pc
)
2449 gdbarch
->write_pc
= write_pc
;
2453 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2455 gdb_assert (gdbarch
!= NULL
);
2456 if (gdbarch
->read_fp
== 0)
2457 internal_error (__FILE__
, __LINE__
,
2458 "gdbarch: gdbarch_read_fp invalid");
2459 if (gdbarch_debug
>= 2)
2460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2461 return gdbarch
->read_fp ();
2465 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2466 gdbarch_read_fp_ftype read_fp
)
2468 gdbarch
->read_fp
= read_fp
;
2472 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2474 gdb_assert (gdbarch
!= NULL
);
2475 if (gdbarch
->read_sp
== 0)
2476 internal_error (__FILE__
, __LINE__
,
2477 "gdbarch: gdbarch_read_sp invalid");
2478 if (gdbarch_debug
>= 2)
2479 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2480 return gdbarch
->read_sp ();
2484 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2485 gdbarch_read_sp_ftype read_sp
)
2487 gdbarch
->read_sp
= read_sp
;
2491 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2493 gdb_assert (gdbarch
!= NULL
);
2494 if (gdbarch
->write_sp
== 0)
2495 internal_error (__FILE__
, __LINE__
,
2496 "gdbarch: gdbarch_write_sp invalid");
2497 if (gdbarch_debug
>= 2)
2498 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2499 gdbarch
->write_sp (val
);
2503 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2504 gdbarch_write_sp_ftype write_sp
)
2506 gdbarch
->write_sp
= write_sp
;
2510 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2512 gdb_assert (gdbarch
!= NULL
);
2513 if (gdbarch
->virtual_frame_pointer
== 0)
2514 internal_error (__FILE__
, __LINE__
,
2515 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2516 if (gdbarch_debug
>= 2)
2517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2518 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2522 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2523 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2525 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2529 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2531 gdb_assert (gdbarch
!= NULL
);
2532 return gdbarch
->pseudo_register_read
!= 0;
2536 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2538 gdb_assert (gdbarch
!= NULL
);
2539 if (gdbarch
->pseudo_register_read
== 0)
2540 internal_error (__FILE__
, __LINE__
,
2541 "gdbarch: gdbarch_pseudo_register_read invalid");
2542 if (gdbarch_debug
>= 2)
2543 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2544 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2548 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2549 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2551 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2555 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2557 gdb_assert (gdbarch
!= NULL
);
2558 return gdbarch
->pseudo_register_write
!= 0;
2562 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2564 gdb_assert (gdbarch
!= NULL
);
2565 if (gdbarch
->pseudo_register_write
== 0)
2566 internal_error (__FILE__
, __LINE__
,
2567 "gdbarch: gdbarch_pseudo_register_write invalid");
2568 if (gdbarch_debug
>= 2)
2569 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2570 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2574 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2575 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2577 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2581 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2583 gdb_assert (gdbarch
!= NULL
);
2584 if (gdbarch
->num_regs
== -1)
2585 internal_error (__FILE__
, __LINE__
,
2586 "gdbarch: gdbarch_num_regs invalid");
2587 if (gdbarch_debug
>= 2)
2588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2589 return gdbarch
->num_regs
;
2593 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2596 gdbarch
->num_regs
= num_regs
;
2600 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2602 gdb_assert (gdbarch
!= NULL
);
2603 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2604 if (gdbarch_debug
>= 2)
2605 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2606 return gdbarch
->num_pseudo_regs
;
2610 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2611 int num_pseudo_regs
)
2613 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2617 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2619 gdb_assert (gdbarch
!= NULL
);
2620 /* Skip verify of sp_regnum, invalid_p == 0 */
2621 if (gdbarch_debug
>= 2)
2622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2623 return gdbarch
->sp_regnum
;
2627 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2630 gdbarch
->sp_regnum
= sp_regnum
;
2634 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2636 gdb_assert (gdbarch
!= NULL
);
2637 /* Skip verify of fp_regnum, invalid_p == 0 */
2638 if (gdbarch_debug
>= 2)
2639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2640 return gdbarch
->fp_regnum
;
2644 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2647 gdbarch
->fp_regnum
= fp_regnum
;
2651 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2653 gdb_assert (gdbarch
!= NULL
);
2654 /* Skip verify of pc_regnum, invalid_p == 0 */
2655 if (gdbarch_debug
>= 2)
2656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2657 return gdbarch
->pc_regnum
;
2661 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2664 gdbarch
->pc_regnum
= pc_regnum
;
2668 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2670 gdb_assert (gdbarch
!= NULL
);
2671 /* Skip verify of ps_regnum, invalid_p == 0 */
2672 if (gdbarch_debug
>= 2)
2673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2674 return gdbarch
->ps_regnum
;
2678 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2681 gdbarch
->ps_regnum
= ps_regnum
;
2685 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2687 gdb_assert (gdbarch
!= NULL
);
2688 /* Skip verify of fp0_regnum, invalid_p == 0 */
2689 if (gdbarch_debug
>= 2)
2690 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2691 return gdbarch
->fp0_regnum
;
2695 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2698 gdbarch
->fp0_regnum
= fp0_regnum
;
2702 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2704 gdb_assert (gdbarch
!= NULL
);
2705 /* Skip verify of npc_regnum, invalid_p == 0 */
2706 if (gdbarch_debug
>= 2)
2707 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2708 return gdbarch
->npc_regnum
;
2712 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2715 gdbarch
->npc_regnum
= npc_regnum
;
2719 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2721 gdb_assert (gdbarch
!= NULL
);
2722 if (gdbarch
->stab_reg_to_regnum
== 0)
2723 internal_error (__FILE__
, __LINE__
,
2724 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2725 if (gdbarch_debug
>= 2)
2726 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2727 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2731 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2732 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2734 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2738 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2740 gdb_assert (gdbarch
!= NULL
);
2741 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2742 internal_error (__FILE__
, __LINE__
,
2743 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2744 if (gdbarch_debug
>= 2)
2745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2746 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2750 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2751 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2753 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2757 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2759 gdb_assert (gdbarch
!= NULL
);
2760 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2761 internal_error (__FILE__
, __LINE__
,
2762 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2763 if (gdbarch_debug
>= 2)
2764 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2765 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2769 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2770 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2772 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2776 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2778 gdb_assert (gdbarch
!= NULL
);
2779 if (gdbarch
->sdb_reg_to_regnum
== 0)
2780 internal_error (__FILE__
, __LINE__
,
2781 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2782 if (gdbarch_debug
>= 2)
2783 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2784 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2788 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2789 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2791 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2795 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2797 gdb_assert (gdbarch
!= NULL
);
2798 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2799 internal_error (__FILE__
, __LINE__
,
2800 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2801 if (gdbarch_debug
>= 2)
2802 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2803 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2807 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2808 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2810 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2814 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2816 gdb_assert (gdbarch
!= NULL
);
2817 if (gdbarch
->register_name
== 0)
2818 internal_error (__FILE__
, __LINE__
,
2819 "gdbarch: gdbarch_register_name invalid");
2820 if (gdbarch_debug
>= 2)
2821 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2822 return gdbarch
->register_name (regnr
);
2826 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2827 gdbarch_register_name_ftype register_name
)
2829 gdbarch
->register_name
= register_name
;
2833 gdbarch_register_size (struct gdbarch
*gdbarch
)
2835 gdb_assert (gdbarch
!= NULL
);
2836 if (gdbarch
->register_size
== -1)
2837 internal_error (__FILE__
, __LINE__
,
2838 "gdbarch: gdbarch_register_size invalid");
2839 if (gdbarch_debug
>= 2)
2840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2841 return gdbarch
->register_size
;
2845 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2848 gdbarch
->register_size
= register_size
;
2852 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2854 gdb_assert (gdbarch
!= NULL
);
2855 if (gdbarch
->register_bytes
== -1)
2856 internal_error (__FILE__
, __LINE__
,
2857 "gdbarch: gdbarch_register_bytes invalid");
2858 if (gdbarch_debug
>= 2)
2859 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2860 return gdbarch
->register_bytes
;
2864 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2867 gdbarch
->register_bytes
= register_bytes
;
2871 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2873 gdb_assert (gdbarch
!= NULL
);
2874 if (gdbarch
->register_byte
== 0)
2875 internal_error (__FILE__
, __LINE__
,
2876 "gdbarch: gdbarch_register_byte invalid");
2877 if (gdbarch_debug
>= 2)
2878 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2879 return gdbarch
->register_byte (reg_nr
);
2883 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2884 gdbarch_register_byte_ftype register_byte
)
2886 gdbarch
->register_byte
= register_byte
;
2890 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2892 gdb_assert (gdbarch
!= NULL
);
2893 if (gdbarch
->register_raw_size
== 0)
2894 internal_error (__FILE__
, __LINE__
,
2895 "gdbarch: gdbarch_register_raw_size invalid");
2896 if (gdbarch_debug
>= 2)
2897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2898 return gdbarch
->register_raw_size (reg_nr
);
2902 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2903 gdbarch_register_raw_size_ftype register_raw_size
)
2905 gdbarch
->register_raw_size
= register_raw_size
;
2909 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2911 gdb_assert (gdbarch
!= NULL
);
2912 if (gdbarch
->max_register_raw_size
== -1)
2913 internal_error (__FILE__
, __LINE__
,
2914 "gdbarch: gdbarch_max_register_raw_size invalid");
2915 if (gdbarch_debug
>= 2)
2916 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2917 return gdbarch
->max_register_raw_size
;
2921 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2922 int max_register_raw_size
)
2924 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2928 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2930 gdb_assert (gdbarch
!= NULL
);
2931 if (gdbarch
->register_virtual_size
== 0)
2932 internal_error (__FILE__
, __LINE__
,
2933 "gdbarch: gdbarch_register_virtual_size invalid");
2934 if (gdbarch_debug
>= 2)
2935 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2936 return gdbarch
->register_virtual_size (reg_nr
);
2940 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2941 gdbarch_register_virtual_size_ftype register_virtual_size
)
2943 gdbarch
->register_virtual_size
= register_virtual_size
;
2947 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2949 gdb_assert (gdbarch
!= NULL
);
2950 if (gdbarch
->max_register_virtual_size
== -1)
2951 internal_error (__FILE__
, __LINE__
,
2952 "gdbarch: gdbarch_max_register_virtual_size invalid");
2953 if (gdbarch_debug
>= 2)
2954 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2955 return gdbarch
->max_register_virtual_size
;
2959 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2960 int max_register_virtual_size
)
2962 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2966 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2968 gdb_assert (gdbarch
!= NULL
);
2969 if (gdbarch
->register_virtual_type
== 0)
2970 internal_error (__FILE__
, __LINE__
,
2971 "gdbarch: gdbarch_register_virtual_type invalid");
2972 if (gdbarch_debug
>= 2)
2973 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2974 return gdbarch
->register_virtual_type (reg_nr
);
2978 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2979 gdbarch_register_virtual_type_ftype register_virtual_type
)
2981 gdbarch
->register_virtual_type
= register_virtual_type
;
2985 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2987 gdb_assert (gdbarch
!= NULL
);
2988 if (gdbarch
->do_registers_info
== 0)
2989 internal_error (__FILE__
, __LINE__
,
2990 "gdbarch: gdbarch_do_registers_info invalid");
2991 if (gdbarch_debug
>= 2)
2992 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2993 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2997 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2998 gdbarch_do_registers_info_ftype do_registers_info
)
3000 gdbarch
->do_registers_info
= do_registers_info
;
3004 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3006 gdb_assert (gdbarch
!= NULL
);
3007 return gdbarch
->print_float_info
!= 0;
3011 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3013 gdb_assert (gdbarch
!= NULL
);
3014 if (gdbarch
->print_float_info
== 0)
3015 internal_error (__FILE__
, __LINE__
,
3016 "gdbarch: gdbarch_print_float_info invalid");
3017 if (gdbarch_debug
>= 2)
3018 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3019 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3023 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3024 gdbarch_print_float_info_ftype print_float_info
)
3026 gdbarch
->print_float_info
= print_float_info
;
3030 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3032 gdb_assert (gdbarch
!= NULL
);
3033 return gdbarch
->print_vector_info
!= 0;
3037 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3039 gdb_assert (gdbarch
!= NULL
);
3040 if (gdbarch
->print_vector_info
== 0)
3041 internal_error (__FILE__
, __LINE__
,
3042 "gdbarch: gdbarch_print_vector_info invalid");
3043 if (gdbarch_debug
>= 2)
3044 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3045 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3049 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3050 gdbarch_print_vector_info_ftype print_vector_info
)
3052 gdbarch
->print_vector_info
= print_vector_info
;
3056 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3058 gdb_assert (gdbarch
!= NULL
);
3059 if (gdbarch
->register_sim_regno
== 0)
3060 internal_error (__FILE__
, __LINE__
,
3061 "gdbarch: gdbarch_register_sim_regno invalid");
3062 if (gdbarch_debug
>= 2)
3063 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3064 return gdbarch
->register_sim_regno (reg_nr
);
3068 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3069 gdbarch_register_sim_regno_ftype register_sim_regno
)
3071 gdbarch
->register_sim_regno
= register_sim_regno
;
3075 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3077 gdb_assert (gdbarch
!= NULL
);
3078 return gdbarch
->register_bytes_ok
!= 0;
3082 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3084 gdb_assert (gdbarch
!= NULL
);
3085 if (gdbarch
->register_bytes_ok
== 0)
3086 internal_error (__FILE__
, __LINE__
,
3087 "gdbarch: gdbarch_register_bytes_ok invalid");
3088 if (gdbarch_debug
>= 2)
3089 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3090 return gdbarch
->register_bytes_ok (nr_bytes
);
3094 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3095 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3097 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3101 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3103 gdb_assert (gdbarch
!= NULL
);
3104 if (gdbarch
->cannot_fetch_register
== 0)
3105 internal_error (__FILE__
, __LINE__
,
3106 "gdbarch: gdbarch_cannot_fetch_register invalid");
3107 if (gdbarch_debug
>= 2)
3108 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3109 return gdbarch
->cannot_fetch_register (regnum
);
3113 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3114 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3116 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3120 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3122 gdb_assert (gdbarch
!= NULL
);
3123 if (gdbarch
->cannot_store_register
== 0)
3124 internal_error (__FILE__
, __LINE__
,
3125 "gdbarch: gdbarch_cannot_store_register invalid");
3126 if (gdbarch_debug
>= 2)
3127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3128 return gdbarch
->cannot_store_register (regnum
);
3132 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3133 gdbarch_cannot_store_register_ftype cannot_store_register
)
3135 gdbarch
->cannot_store_register
= cannot_store_register
;
3139 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3141 gdb_assert (gdbarch
!= NULL
);
3142 return gdbarch
->get_longjmp_target
!= 0;
3146 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3148 gdb_assert (gdbarch
!= NULL
);
3149 if (gdbarch
->get_longjmp_target
== 0)
3150 internal_error (__FILE__
, __LINE__
,
3151 "gdbarch: gdbarch_get_longjmp_target invalid");
3152 if (gdbarch_debug
>= 2)
3153 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3154 return gdbarch
->get_longjmp_target (pc
);
3158 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3159 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3161 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3165 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3167 gdb_assert (gdbarch
!= NULL
);
3168 if (gdbarch
->use_generic_dummy_frames
== -1)
3169 internal_error (__FILE__
, __LINE__
,
3170 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3171 if (gdbarch_debug
>= 2)
3172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3173 return gdbarch
->use_generic_dummy_frames
;
3177 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3178 int use_generic_dummy_frames
)
3180 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3184 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3186 gdb_assert (gdbarch
!= NULL
);
3187 if (gdbarch
->call_dummy_location
== 0)
3188 internal_error (__FILE__
, __LINE__
,
3189 "gdbarch: gdbarch_call_dummy_location invalid");
3190 if (gdbarch_debug
>= 2)
3191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3192 return gdbarch
->call_dummy_location
;
3196 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3197 int call_dummy_location
)
3199 gdbarch
->call_dummy_location
= call_dummy_location
;
3203 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3205 gdb_assert (gdbarch
!= NULL
);
3206 if (gdbarch
->call_dummy_address
== 0)
3207 internal_error (__FILE__
, __LINE__
,
3208 "gdbarch: gdbarch_call_dummy_address invalid");
3209 if (gdbarch_debug
>= 2)
3210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3211 return gdbarch
->call_dummy_address ();
3215 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3216 gdbarch_call_dummy_address_ftype call_dummy_address
)
3218 gdbarch
->call_dummy_address
= call_dummy_address
;
3222 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3224 gdb_assert (gdbarch
!= NULL
);
3225 if (gdbarch
->call_dummy_start_offset
== -1)
3226 internal_error (__FILE__
, __LINE__
,
3227 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3228 if (gdbarch_debug
>= 2)
3229 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3230 return gdbarch
->call_dummy_start_offset
;
3234 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3235 CORE_ADDR call_dummy_start_offset
)
3237 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3241 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3243 gdb_assert (gdbarch
!= NULL
);
3244 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3245 internal_error (__FILE__
, __LINE__
,
3246 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3247 if (gdbarch_debug
>= 2)
3248 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3249 return gdbarch
->call_dummy_breakpoint_offset
;
3253 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3254 CORE_ADDR call_dummy_breakpoint_offset
)
3256 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3260 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3262 gdb_assert (gdbarch
!= NULL
);
3263 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3264 internal_error (__FILE__
, __LINE__
,
3265 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3266 if (gdbarch_debug
>= 2)
3267 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3268 return gdbarch
->call_dummy_breakpoint_offset_p
;
3272 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3273 int call_dummy_breakpoint_offset_p
)
3275 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3279 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3281 gdb_assert (gdbarch
!= NULL
);
3282 if (gdbarch
->call_dummy_length
== -1)
3283 internal_error (__FILE__
, __LINE__
,
3284 "gdbarch: gdbarch_call_dummy_length invalid");
3285 if (gdbarch_debug
>= 2)
3286 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3287 return gdbarch
->call_dummy_length
;
3291 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3292 int call_dummy_length
)
3294 gdbarch
->call_dummy_length
= call_dummy_length
;
3298 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3300 gdb_assert (gdbarch
!= NULL
);
3301 if (gdbarch
->pc_in_call_dummy
== 0)
3302 internal_error (__FILE__
, __LINE__
,
3303 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3304 if (gdbarch_debug
>= 2)
3305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3306 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3310 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3311 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3313 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3317 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3319 gdb_assert (gdbarch
!= NULL
);
3320 if (gdbarch
->call_dummy_p
== -1)
3321 internal_error (__FILE__
, __LINE__
,
3322 "gdbarch: gdbarch_call_dummy_p invalid");
3323 if (gdbarch_debug
>= 2)
3324 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3325 return gdbarch
->call_dummy_p
;
3329 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3332 gdbarch
->call_dummy_p
= call_dummy_p
;
3336 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3338 gdb_assert (gdbarch
!= NULL
);
3339 /* Skip verify of call_dummy_words, invalid_p == 0 */
3340 if (gdbarch_debug
>= 2)
3341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3342 return gdbarch
->call_dummy_words
;
3346 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3347 LONGEST
* call_dummy_words
)
3349 gdbarch
->call_dummy_words
= call_dummy_words
;
3353 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3355 gdb_assert (gdbarch
!= NULL
);
3356 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3357 if (gdbarch_debug
>= 2)
3358 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3359 return gdbarch
->sizeof_call_dummy_words
;
3363 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3364 int sizeof_call_dummy_words
)
3366 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3370 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3372 gdb_assert (gdbarch
!= NULL
);
3373 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3374 internal_error (__FILE__
, __LINE__
,
3375 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3376 if (gdbarch_debug
>= 2)
3377 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3378 return gdbarch
->call_dummy_stack_adjust_p
;
3382 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3383 int call_dummy_stack_adjust_p
)
3385 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3389 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3391 gdb_assert (gdbarch
!= NULL
);
3392 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3393 internal_error (__FILE__
, __LINE__
,
3394 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3395 if (gdbarch_debug
>= 2)
3396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3397 return gdbarch
->call_dummy_stack_adjust
;
3401 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3402 int call_dummy_stack_adjust
)
3404 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3408 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
)
3410 gdb_assert (gdbarch
!= NULL
);
3411 if (gdbarch
->fix_call_dummy
== 0)
3412 internal_error (__FILE__
, __LINE__
,
3413 "gdbarch: gdbarch_fix_call_dummy invalid");
3414 if (gdbarch_debug
>= 2)
3415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3416 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3420 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3421 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3423 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3427 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3429 gdb_assert (gdbarch
!= NULL
);
3430 if (gdbarch
->init_frame_pc_first
== 0)
3431 internal_error (__FILE__
, __LINE__
,
3432 "gdbarch: gdbarch_init_frame_pc_first invalid");
3433 if (gdbarch_debug
>= 2)
3434 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3435 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3439 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3440 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3442 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3446 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3448 gdb_assert (gdbarch
!= NULL
);
3449 if (gdbarch
->init_frame_pc
== 0)
3450 internal_error (__FILE__
, __LINE__
,
3451 "gdbarch: gdbarch_init_frame_pc invalid");
3452 if (gdbarch_debug
>= 2)
3453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3454 gdbarch
->init_frame_pc (fromleaf
, prev
);
3458 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3459 gdbarch_init_frame_pc_ftype init_frame_pc
)
3461 gdbarch
->init_frame_pc
= init_frame_pc
;
3465 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3467 gdb_assert (gdbarch
!= NULL
);
3468 if (gdbarch_debug
>= 2)
3469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3470 return gdbarch
->believe_pcc_promotion
;
3474 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3475 int believe_pcc_promotion
)
3477 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3481 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3483 gdb_assert (gdbarch
!= NULL
);
3484 if (gdbarch_debug
>= 2)
3485 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3486 return gdbarch
->believe_pcc_promotion_type
;
3490 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3491 int believe_pcc_promotion_type
)
3493 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3497 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3499 gdb_assert (gdbarch
!= NULL
);
3500 if (gdbarch
->coerce_float_to_double
== 0)
3501 internal_error (__FILE__
, __LINE__
,
3502 "gdbarch: gdbarch_coerce_float_to_double invalid");
3503 if (gdbarch_debug
>= 2)
3504 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3505 return gdbarch
->coerce_float_to_double (formal
, actual
);
3509 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3510 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3512 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3516 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
)
3518 gdb_assert (gdbarch
!= NULL
);
3519 if (gdbarch
->get_saved_register
== 0)
3520 internal_error (__FILE__
, __LINE__
,
3521 "gdbarch: gdbarch_get_saved_register invalid");
3522 if (gdbarch_debug
>= 2)
3523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3524 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3528 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3529 gdbarch_get_saved_register_ftype get_saved_register
)
3531 gdbarch
->get_saved_register
= get_saved_register
;
3535 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3537 gdb_assert (gdbarch
!= NULL
);
3538 if (gdbarch
->register_convertible
== 0)
3539 internal_error (__FILE__
, __LINE__
,
3540 "gdbarch: gdbarch_register_convertible invalid");
3541 if (gdbarch_debug
>= 2)
3542 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3543 return gdbarch
->register_convertible (nr
);
3547 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3548 gdbarch_register_convertible_ftype register_convertible
)
3550 gdbarch
->register_convertible
= register_convertible
;
3554 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3556 gdb_assert (gdbarch
!= NULL
);
3557 if (gdbarch
->register_convert_to_virtual
== 0)
3558 internal_error (__FILE__
, __LINE__
,
3559 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3560 if (gdbarch_debug
>= 2)
3561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3562 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3566 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3567 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3569 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3573 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3575 gdb_assert (gdbarch
!= NULL
);
3576 if (gdbarch
->register_convert_to_raw
== 0)
3577 internal_error (__FILE__
, __LINE__
,
3578 "gdbarch: gdbarch_register_convert_to_raw invalid");
3579 if (gdbarch_debug
>= 2)
3580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3581 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3585 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3586 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3588 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3592 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3594 gdb_assert (gdbarch
!= NULL
);
3595 if (gdbarch
->convert_register_p
== 0)
3596 internal_error (__FILE__
, __LINE__
,
3597 "gdbarch: gdbarch_convert_register_p invalid");
3598 if (gdbarch_debug
>= 2)
3599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3600 return gdbarch
->convert_register_p (regnum
);
3604 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3605 gdbarch_convert_register_p_ftype convert_register_p
)
3607 gdbarch
->convert_register_p
= convert_register_p
;
3611 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3613 gdb_assert (gdbarch
!= NULL
);
3614 if (gdbarch
->register_to_value
== 0)
3615 internal_error (__FILE__
, __LINE__
,
3616 "gdbarch: gdbarch_register_to_value invalid");
3617 if (gdbarch_debug
>= 2)
3618 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3619 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3623 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3624 gdbarch_register_to_value_ftype register_to_value
)
3626 gdbarch
->register_to_value
= register_to_value
;
3630 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3632 gdb_assert (gdbarch
!= NULL
);
3633 if (gdbarch
->value_to_register
== 0)
3634 internal_error (__FILE__
, __LINE__
,
3635 "gdbarch: gdbarch_value_to_register invalid");
3636 if (gdbarch_debug
>= 2)
3637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3638 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3642 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3643 gdbarch_value_to_register_ftype value_to_register
)
3645 gdbarch
->value_to_register
= value_to_register
;
3649 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3651 gdb_assert (gdbarch
!= NULL
);
3652 if (gdbarch
->pointer_to_address
== 0)
3653 internal_error (__FILE__
, __LINE__
,
3654 "gdbarch: gdbarch_pointer_to_address invalid");
3655 if (gdbarch_debug
>= 2)
3656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3657 return gdbarch
->pointer_to_address (type
, buf
);
3661 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3662 gdbarch_pointer_to_address_ftype pointer_to_address
)
3664 gdbarch
->pointer_to_address
= pointer_to_address
;
3668 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3670 gdb_assert (gdbarch
!= NULL
);
3671 if (gdbarch
->address_to_pointer
== 0)
3672 internal_error (__FILE__
, __LINE__
,
3673 "gdbarch: gdbarch_address_to_pointer invalid");
3674 if (gdbarch_debug
>= 2)
3675 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3676 gdbarch
->address_to_pointer (type
, buf
, addr
);
3680 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3681 gdbarch_address_to_pointer_ftype address_to_pointer
)
3683 gdbarch
->address_to_pointer
= address_to_pointer
;
3687 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3689 gdb_assert (gdbarch
!= NULL
);
3690 return gdbarch
->integer_to_address
!= 0;
3694 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3696 gdb_assert (gdbarch
!= NULL
);
3697 if (gdbarch
->integer_to_address
== 0)
3698 internal_error (__FILE__
, __LINE__
,
3699 "gdbarch: gdbarch_integer_to_address invalid");
3700 if (gdbarch_debug
>= 2)
3701 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3702 return gdbarch
->integer_to_address (type
, buf
);
3706 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3707 gdbarch_integer_to_address_ftype integer_to_address
)
3709 gdbarch
->integer_to_address
= integer_to_address
;
3713 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3715 gdb_assert (gdbarch
!= NULL
);
3716 if (gdbarch
->return_value_on_stack
== 0)
3717 internal_error (__FILE__
, __LINE__
,
3718 "gdbarch: gdbarch_return_value_on_stack invalid");
3719 if (gdbarch_debug
>= 2)
3720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3721 return gdbarch
->return_value_on_stack (type
);
3725 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3726 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3728 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3732 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, char *valbuf
)
3734 gdb_assert (gdbarch
!= NULL
);
3735 if (gdbarch
->extract_return_value
== 0)
3736 internal_error (__FILE__
, __LINE__
,
3737 "gdbarch: gdbarch_extract_return_value invalid");
3738 if (gdbarch_debug
>= 2)
3739 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3740 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3744 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3745 gdbarch_extract_return_value_ftype extract_return_value
)
3747 gdbarch
->extract_return_value
= extract_return_value
;
3751 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3753 gdb_assert (gdbarch
!= NULL
);
3754 if (gdbarch
->deprecated_extract_return_value
== 0)
3755 internal_error (__FILE__
, __LINE__
,
3756 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
3757 if (gdbarch_debug
>= 2)
3758 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3759 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
3763 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
3764 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
3766 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
3770 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3772 gdb_assert (gdbarch
!= NULL
);
3773 if (gdbarch
->push_arguments
== 0)
3774 internal_error (__FILE__
, __LINE__
,
3775 "gdbarch: gdbarch_push_arguments invalid");
3776 if (gdbarch_debug
>= 2)
3777 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3778 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3782 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3783 gdbarch_push_arguments_ftype push_arguments
)
3785 gdbarch
->push_arguments
= push_arguments
;
3789 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3791 gdb_assert (gdbarch
!= NULL
);
3792 if (gdbarch
->push_dummy_frame
== 0)
3793 internal_error (__FILE__
, __LINE__
,
3794 "gdbarch: gdbarch_push_dummy_frame invalid");
3795 if (gdbarch_debug
>= 2)
3796 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3797 gdbarch
->push_dummy_frame ();
3801 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3802 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3804 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3808 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3810 gdb_assert (gdbarch
!= NULL
);
3811 return gdbarch
->push_return_address
!= 0;
3815 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3817 gdb_assert (gdbarch
!= NULL
);
3818 if (gdbarch
->push_return_address
== 0)
3819 internal_error (__FILE__
, __LINE__
,
3820 "gdbarch: gdbarch_push_return_address invalid");
3821 if (gdbarch_debug
>= 2)
3822 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3823 return gdbarch
->push_return_address (pc
, sp
);
3827 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3828 gdbarch_push_return_address_ftype push_return_address
)
3830 gdbarch
->push_return_address
= push_return_address
;
3834 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3836 gdb_assert (gdbarch
!= NULL
);
3837 if (gdbarch
->pop_frame
== 0)
3838 internal_error (__FILE__
, __LINE__
,
3839 "gdbarch: gdbarch_pop_frame invalid");
3840 if (gdbarch_debug
>= 2)
3841 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3842 gdbarch
->pop_frame ();
3846 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3847 gdbarch_pop_frame_ftype pop_frame
)
3849 gdbarch
->pop_frame
= pop_frame
;
3853 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3855 gdb_assert (gdbarch
!= NULL
);
3856 if (gdbarch
->store_struct_return
== 0)
3857 internal_error (__FILE__
, __LINE__
,
3858 "gdbarch: gdbarch_store_struct_return invalid");
3859 if (gdbarch_debug
>= 2)
3860 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3861 gdbarch
->store_struct_return (addr
, sp
);
3865 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3866 gdbarch_store_struct_return_ftype store_struct_return
)
3868 gdbarch
->store_struct_return
= store_struct_return
;
3872 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3874 gdb_assert (gdbarch
!= NULL
);
3875 if (gdbarch
->store_return_value
== 0)
3876 internal_error (__FILE__
, __LINE__
,
3877 "gdbarch: gdbarch_store_return_value invalid");
3878 if (gdbarch_debug
>= 2)
3879 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3880 gdbarch
->store_return_value (type
, valbuf
);
3884 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3885 gdbarch_store_return_value_ftype store_return_value
)
3887 gdbarch
->store_return_value
= store_return_value
;
3891 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3893 gdb_assert (gdbarch
!= NULL
);
3894 return gdbarch
->extract_struct_value_address
!= 0;
3898 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3900 gdb_assert (gdbarch
!= NULL
);
3901 if (gdbarch
->extract_struct_value_address
== 0)
3902 internal_error (__FILE__
, __LINE__
,
3903 "gdbarch: gdbarch_extract_struct_value_address invalid");
3904 if (gdbarch_debug
>= 2)
3905 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3906 return gdbarch
->extract_struct_value_address (regcache
);
3910 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3911 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3913 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3917 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3919 gdb_assert (gdbarch
!= NULL
);
3920 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
3924 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3926 gdb_assert (gdbarch
!= NULL
);
3927 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
3928 internal_error (__FILE__
, __LINE__
,
3929 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
3930 if (gdbarch_debug
>= 2)
3931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
3932 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
3936 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
3937 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
3939 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
3943 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3945 gdb_assert (gdbarch
!= NULL
);
3946 if (gdbarch
->use_struct_convention
== 0)
3947 internal_error (__FILE__
, __LINE__
,
3948 "gdbarch: gdbarch_use_struct_convention invalid");
3949 if (gdbarch_debug
>= 2)
3950 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3951 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3955 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3956 gdbarch_use_struct_convention_ftype use_struct_convention
)
3958 gdbarch
->use_struct_convention
= use_struct_convention
;
3962 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3964 gdb_assert (gdbarch
!= NULL
);
3965 if (gdbarch
->frame_init_saved_regs
== 0)
3966 internal_error (__FILE__
, __LINE__
,
3967 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3968 if (gdbarch_debug
>= 2)
3969 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3970 gdbarch
->frame_init_saved_regs (frame
);
3974 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3975 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3977 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3981 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3983 gdb_assert (gdbarch
!= NULL
);
3984 return gdbarch
->init_extra_frame_info
!= 0;
3988 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3990 gdb_assert (gdbarch
!= NULL
);
3991 if (gdbarch
->init_extra_frame_info
== 0)
3992 internal_error (__FILE__
, __LINE__
,
3993 "gdbarch: gdbarch_init_extra_frame_info invalid");
3994 if (gdbarch_debug
>= 2)
3995 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3996 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4000 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4001 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4003 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4007 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4009 gdb_assert (gdbarch
!= NULL
);
4010 if (gdbarch
->skip_prologue
== 0)
4011 internal_error (__FILE__
, __LINE__
,
4012 "gdbarch: gdbarch_skip_prologue invalid");
4013 if (gdbarch_debug
>= 2)
4014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4015 return gdbarch
->skip_prologue (ip
);
4019 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4020 gdbarch_skip_prologue_ftype skip_prologue
)
4022 gdbarch
->skip_prologue
= skip_prologue
;
4026 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4028 gdb_assert (gdbarch
!= NULL
);
4029 if (gdbarch
->prologue_frameless_p
== 0)
4030 internal_error (__FILE__
, __LINE__
,
4031 "gdbarch: gdbarch_prologue_frameless_p invalid");
4032 if (gdbarch_debug
>= 2)
4033 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4034 return gdbarch
->prologue_frameless_p (ip
);
4038 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4039 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4041 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4045 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4047 gdb_assert (gdbarch
!= NULL
);
4048 if (gdbarch
->inner_than
== 0)
4049 internal_error (__FILE__
, __LINE__
,
4050 "gdbarch: gdbarch_inner_than invalid");
4051 if (gdbarch_debug
>= 2)
4052 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4053 return gdbarch
->inner_than (lhs
, rhs
);
4057 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4058 gdbarch_inner_than_ftype inner_than
)
4060 gdbarch
->inner_than
= inner_than
;
4063 const unsigned char *
4064 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4066 gdb_assert (gdbarch
!= NULL
);
4067 if (gdbarch
->breakpoint_from_pc
== 0)
4068 internal_error (__FILE__
, __LINE__
,
4069 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4070 if (gdbarch_debug
>= 2)
4071 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4072 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4076 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4077 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4079 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4083 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4085 gdb_assert (gdbarch
!= NULL
);
4086 if (gdbarch
->memory_insert_breakpoint
== 0)
4087 internal_error (__FILE__
, __LINE__
,
4088 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4089 if (gdbarch_debug
>= 2)
4090 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4091 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4095 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4096 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4098 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4102 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4104 gdb_assert (gdbarch
!= NULL
);
4105 if (gdbarch
->memory_remove_breakpoint
== 0)
4106 internal_error (__FILE__
, __LINE__
,
4107 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4108 if (gdbarch_debug
>= 2)
4109 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4110 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4114 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4115 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4117 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4121 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4123 gdb_assert (gdbarch
!= NULL
);
4124 if (gdbarch
->decr_pc_after_break
== -1)
4125 internal_error (__FILE__
, __LINE__
,
4126 "gdbarch: gdbarch_decr_pc_after_break invalid");
4127 if (gdbarch_debug
>= 2)
4128 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4129 return gdbarch
->decr_pc_after_break
;
4133 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4134 CORE_ADDR decr_pc_after_break
)
4136 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4140 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4142 gdb_assert (gdbarch
!= NULL
);
4143 if (gdbarch
->prepare_to_proceed
== 0)
4144 internal_error (__FILE__
, __LINE__
,
4145 "gdbarch: gdbarch_prepare_to_proceed invalid");
4146 if (gdbarch_debug
>= 2)
4147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4148 return gdbarch
->prepare_to_proceed (select_it
);
4152 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4153 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4155 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4159 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4161 gdb_assert (gdbarch
!= NULL
);
4162 if (gdbarch
->function_start_offset
== -1)
4163 internal_error (__FILE__
, __LINE__
,
4164 "gdbarch: gdbarch_function_start_offset invalid");
4165 if (gdbarch_debug
>= 2)
4166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4167 return gdbarch
->function_start_offset
;
4171 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4172 CORE_ADDR function_start_offset
)
4174 gdbarch
->function_start_offset
= function_start_offset
;
4178 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4180 gdb_assert (gdbarch
!= NULL
);
4181 if (gdbarch
->remote_translate_xfer_address
== 0)
4182 internal_error (__FILE__
, __LINE__
,
4183 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4184 if (gdbarch_debug
>= 2)
4185 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4186 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4190 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4191 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4193 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4197 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4199 gdb_assert (gdbarch
!= NULL
);
4200 if (gdbarch
->frame_args_skip
== -1)
4201 internal_error (__FILE__
, __LINE__
,
4202 "gdbarch: gdbarch_frame_args_skip invalid");
4203 if (gdbarch_debug
>= 2)
4204 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4205 return gdbarch
->frame_args_skip
;
4209 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4210 CORE_ADDR frame_args_skip
)
4212 gdbarch
->frame_args_skip
= frame_args_skip
;
4216 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4218 gdb_assert (gdbarch
!= NULL
);
4219 if (gdbarch
->frameless_function_invocation
== 0)
4220 internal_error (__FILE__
, __LINE__
,
4221 "gdbarch: gdbarch_frameless_function_invocation invalid");
4222 if (gdbarch_debug
>= 2)
4223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4224 return gdbarch
->frameless_function_invocation (fi
);
4228 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4229 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4231 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4235 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4237 gdb_assert (gdbarch
!= NULL
);
4238 if (gdbarch
->frame_chain
== 0)
4239 internal_error (__FILE__
, __LINE__
,
4240 "gdbarch: gdbarch_frame_chain invalid");
4241 if (gdbarch_debug
>= 2)
4242 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4243 return gdbarch
->frame_chain (frame
);
4247 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4248 gdbarch_frame_chain_ftype frame_chain
)
4250 gdbarch
->frame_chain
= frame_chain
;
4254 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4256 gdb_assert (gdbarch
!= NULL
);
4257 if (gdbarch
->frame_chain_valid
== 0)
4258 internal_error (__FILE__
, __LINE__
,
4259 "gdbarch: gdbarch_frame_chain_valid invalid");
4260 if (gdbarch_debug
>= 2)
4261 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4262 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4266 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4267 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4269 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4273 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4275 gdb_assert (gdbarch
!= NULL
);
4276 if (gdbarch
->frame_saved_pc
== 0)
4277 internal_error (__FILE__
, __LINE__
,
4278 "gdbarch: gdbarch_frame_saved_pc invalid");
4279 if (gdbarch_debug
>= 2)
4280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4281 return gdbarch
->frame_saved_pc (fi
);
4285 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4286 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4288 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4292 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4294 gdb_assert (gdbarch
!= NULL
);
4295 if (gdbarch
->frame_args_address
== 0)
4296 internal_error (__FILE__
, __LINE__
,
4297 "gdbarch: gdbarch_frame_args_address invalid");
4298 if (gdbarch_debug
>= 2)
4299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4300 return gdbarch
->frame_args_address (fi
);
4304 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4305 gdbarch_frame_args_address_ftype frame_args_address
)
4307 gdbarch
->frame_args_address
= frame_args_address
;
4311 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4313 gdb_assert (gdbarch
!= NULL
);
4314 if (gdbarch
->frame_locals_address
== 0)
4315 internal_error (__FILE__
, __LINE__
,
4316 "gdbarch: gdbarch_frame_locals_address invalid");
4317 if (gdbarch_debug
>= 2)
4318 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4319 return gdbarch
->frame_locals_address (fi
);
4323 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4324 gdbarch_frame_locals_address_ftype frame_locals_address
)
4326 gdbarch
->frame_locals_address
= frame_locals_address
;
4330 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4332 gdb_assert (gdbarch
!= NULL
);
4333 if (gdbarch
->saved_pc_after_call
== 0)
4334 internal_error (__FILE__
, __LINE__
,
4335 "gdbarch: gdbarch_saved_pc_after_call invalid");
4336 if (gdbarch_debug
>= 2)
4337 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4338 return gdbarch
->saved_pc_after_call (frame
);
4342 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4343 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4345 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4349 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4351 gdb_assert (gdbarch
!= NULL
);
4352 if (gdbarch
->frame_num_args
== 0)
4353 internal_error (__FILE__
, __LINE__
,
4354 "gdbarch: gdbarch_frame_num_args invalid");
4355 if (gdbarch_debug
>= 2)
4356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4357 return gdbarch
->frame_num_args (frame
);
4361 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4362 gdbarch_frame_num_args_ftype frame_num_args
)
4364 gdbarch
->frame_num_args
= frame_num_args
;
4368 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4370 gdb_assert (gdbarch
!= NULL
);
4371 return gdbarch
->stack_align
!= 0;
4375 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4377 gdb_assert (gdbarch
!= NULL
);
4378 if (gdbarch
->stack_align
== 0)
4379 internal_error (__FILE__
, __LINE__
,
4380 "gdbarch: gdbarch_stack_align invalid");
4381 if (gdbarch_debug
>= 2)
4382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4383 return gdbarch
->stack_align (sp
);
4387 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4388 gdbarch_stack_align_ftype stack_align
)
4390 gdbarch
->stack_align
= stack_align
;
4394 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4396 gdb_assert (gdbarch
!= NULL
);
4397 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4398 if (gdbarch_debug
>= 2)
4399 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4400 return gdbarch
->extra_stack_alignment_needed
;
4404 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4405 int extra_stack_alignment_needed
)
4407 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4411 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4413 gdb_assert (gdbarch
!= NULL
);
4414 return gdbarch
->reg_struct_has_addr
!= 0;
4418 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4420 gdb_assert (gdbarch
!= NULL
);
4421 if (gdbarch
->reg_struct_has_addr
== 0)
4422 internal_error (__FILE__
, __LINE__
,
4423 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4424 if (gdbarch_debug
>= 2)
4425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4426 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4430 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4431 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4433 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4437 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4439 gdb_assert (gdbarch
!= NULL
);
4440 return gdbarch
->save_dummy_frame_tos
!= 0;
4444 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4446 gdb_assert (gdbarch
!= NULL
);
4447 if (gdbarch
->save_dummy_frame_tos
== 0)
4448 internal_error (__FILE__
, __LINE__
,
4449 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4450 if (gdbarch_debug
>= 2)
4451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4452 gdbarch
->save_dummy_frame_tos (sp
);
4456 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4457 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4459 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4463 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4465 gdb_assert (gdbarch
!= NULL
);
4466 if (gdbarch_debug
>= 2)
4467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4468 return gdbarch
->parm_boundary
;
4472 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4475 gdbarch
->parm_boundary
= parm_boundary
;
4478 const struct floatformat
*
4479 gdbarch_float_format (struct gdbarch
*gdbarch
)
4481 gdb_assert (gdbarch
!= NULL
);
4482 if (gdbarch_debug
>= 2)
4483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4484 return gdbarch
->float_format
;
4488 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4489 const struct floatformat
* float_format
)
4491 gdbarch
->float_format
= float_format
;
4494 const struct floatformat
*
4495 gdbarch_double_format (struct gdbarch
*gdbarch
)
4497 gdb_assert (gdbarch
!= NULL
);
4498 if (gdbarch_debug
>= 2)
4499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4500 return gdbarch
->double_format
;
4504 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4505 const struct floatformat
* double_format
)
4507 gdbarch
->double_format
= double_format
;
4510 const struct floatformat
*
4511 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4513 gdb_assert (gdbarch
!= NULL
);
4514 if (gdbarch_debug
>= 2)
4515 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4516 return gdbarch
->long_double_format
;
4520 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4521 const struct floatformat
* long_double_format
)
4523 gdbarch
->long_double_format
= long_double_format
;
4527 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4529 gdb_assert (gdbarch
!= NULL
);
4530 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4531 internal_error (__FILE__
, __LINE__
,
4532 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4533 if (gdbarch_debug
>= 2)
4534 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4535 return gdbarch
->convert_from_func_ptr_addr (addr
);
4539 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4540 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4542 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4546 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4548 gdb_assert (gdbarch
!= NULL
);
4549 if (gdbarch
->addr_bits_remove
== 0)
4550 internal_error (__FILE__
, __LINE__
,
4551 "gdbarch: gdbarch_addr_bits_remove invalid");
4552 if (gdbarch_debug
>= 2)
4553 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4554 return gdbarch
->addr_bits_remove (addr
);
4558 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4559 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4561 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4565 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4567 gdb_assert (gdbarch
!= NULL
);
4568 if (gdbarch
->smash_text_address
== 0)
4569 internal_error (__FILE__
, __LINE__
,
4570 "gdbarch: gdbarch_smash_text_address invalid");
4571 if (gdbarch_debug
>= 2)
4572 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4573 return gdbarch
->smash_text_address (addr
);
4577 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4578 gdbarch_smash_text_address_ftype smash_text_address
)
4580 gdbarch
->smash_text_address
= smash_text_address
;
4584 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4586 gdb_assert (gdbarch
!= NULL
);
4587 return gdbarch
->software_single_step
!= 0;
4591 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4593 gdb_assert (gdbarch
!= NULL
);
4594 if (gdbarch
->software_single_step
== 0)
4595 internal_error (__FILE__
, __LINE__
,
4596 "gdbarch: gdbarch_software_single_step invalid");
4597 if (gdbarch_debug
>= 2)
4598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4599 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4603 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4604 gdbarch_software_single_step_ftype software_single_step
)
4606 gdbarch
->software_single_step
= software_single_step
;
4610 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4612 gdb_assert (gdbarch
!= NULL
);
4613 if (gdbarch
->print_insn
== 0)
4614 internal_error (__FILE__
, __LINE__
,
4615 "gdbarch: gdbarch_print_insn invalid");
4616 if (gdbarch_debug
>= 2)
4617 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4618 return gdbarch
->print_insn (vma
, info
);
4622 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4623 gdbarch_print_insn_ftype print_insn
)
4625 gdbarch
->print_insn
= print_insn
;
4629 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4631 gdb_assert (gdbarch
!= NULL
);
4632 if (gdbarch
->skip_trampoline_code
== 0)
4633 internal_error (__FILE__
, __LINE__
,
4634 "gdbarch: gdbarch_skip_trampoline_code invalid");
4635 if (gdbarch_debug
>= 2)
4636 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4637 return gdbarch
->skip_trampoline_code (pc
);
4641 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4642 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4644 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4648 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4650 gdb_assert (gdbarch
!= NULL
);
4651 if (gdbarch
->in_solib_call_trampoline
== 0)
4652 internal_error (__FILE__
, __LINE__
,
4653 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4654 if (gdbarch_debug
>= 2)
4655 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4656 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4660 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4661 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4663 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4667 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4669 gdb_assert (gdbarch
!= NULL
);
4670 if (gdbarch
->pc_in_sigtramp
== 0)
4671 internal_error (__FILE__
, __LINE__
,
4672 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4673 if (gdbarch_debug
>= 2)
4674 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4675 return gdbarch
->pc_in_sigtramp (pc
, name
);
4679 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4680 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4682 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4686 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4688 gdb_assert (gdbarch
!= NULL
);
4689 if (gdbarch
->in_function_epilogue_p
== 0)
4690 internal_error (__FILE__
, __LINE__
,
4691 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4692 if (gdbarch_debug
>= 2)
4693 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4694 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4698 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4699 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4701 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4705 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4707 gdb_assert (gdbarch
!= NULL
);
4708 if (gdbarch
->construct_inferior_arguments
== 0)
4709 internal_error (__FILE__
, __LINE__
,
4710 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4711 if (gdbarch_debug
>= 2)
4712 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4713 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4717 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4718 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4720 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4724 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4726 gdb_assert (gdbarch
!= NULL
);
4727 return gdbarch
->dwarf2_build_frame_info
!= 0;
4731 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4733 gdb_assert (gdbarch
!= NULL
);
4734 if (gdbarch
->dwarf2_build_frame_info
== 0)
4735 internal_error (__FILE__
, __LINE__
,
4736 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4737 if (gdbarch_debug
>= 2)
4738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4739 gdbarch
->dwarf2_build_frame_info (objfile
);
4743 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4744 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4746 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4750 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4752 gdb_assert (gdbarch
!= NULL
);
4753 if (gdbarch
->elf_make_msymbol_special
== 0)
4754 internal_error (__FILE__
, __LINE__
,
4755 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4756 if (gdbarch_debug
>= 2)
4757 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4758 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4762 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4763 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4765 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4769 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4771 gdb_assert (gdbarch
!= NULL
);
4772 if (gdbarch
->coff_make_msymbol_special
== 0)
4773 internal_error (__FILE__
, __LINE__
,
4774 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4775 if (gdbarch_debug
>= 2)
4776 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4777 gdbarch
->coff_make_msymbol_special (val
, msym
);
4781 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4782 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4784 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4788 /* Keep a registry of per-architecture data-pointers required by GDB
4795 gdbarch_data_init_ftype
*init
;
4796 gdbarch_data_free_ftype
*free
;
4799 struct gdbarch_data_registration
4801 struct gdbarch_data
*data
;
4802 struct gdbarch_data_registration
*next
;
4805 struct gdbarch_data_registry
4808 struct gdbarch_data_registration
*registrations
;
4811 struct gdbarch_data_registry gdbarch_data_registry
=
4816 struct gdbarch_data
*
4817 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4818 gdbarch_data_free_ftype
*free
)
4820 struct gdbarch_data_registration
**curr
;
4821 /* Append the new registraration. */
4822 for (curr
= &gdbarch_data_registry
.registrations
;
4824 curr
= &(*curr
)->next
);
4825 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4826 (*curr
)->next
= NULL
;
4827 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4828 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4829 (*curr
)->data
->init
= init
;
4830 (*curr
)->data
->init_p
= 1;
4831 (*curr
)->data
->free
= free
;
4832 return (*curr
)->data
;
4836 /* Create/delete the gdbarch data vector. */
4839 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4841 gdb_assert (gdbarch
->data
== NULL
);
4842 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4843 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4847 free_gdbarch_data (struct gdbarch
*gdbarch
)
4849 struct gdbarch_data_registration
*rego
;
4850 gdb_assert (gdbarch
->data
!= NULL
);
4851 for (rego
= gdbarch_data_registry
.registrations
;
4855 struct gdbarch_data
*data
= rego
->data
;
4856 gdb_assert (data
->index
< gdbarch
->nr_data
);
4857 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4859 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4860 gdbarch
->data
[data
->index
] = NULL
;
4863 xfree (gdbarch
->data
);
4864 gdbarch
->data
= NULL
;
4868 /* Initialize the current value of the specified per-architecture
4872 set_gdbarch_data (struct gdbarch
*gdbarch
,
4873 struct gdbarch_data
*data
,
4876 gdb_assert (data
->index
< gdbarch
->nr_data
);
4877 if (gdbarch
->data
[data
->index
] != NULL
)
4879 gdb_assert (data
->free
!= NULL
);
4880 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4882 gdbarch
->data
[data
->index
] = pointer
;
4885 /* Return the current value of the specified per-architecture
4889 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4891 gdb_assert (data
->index
< gdbarch
->nr_data
);
4892 /* The data-pointer isn't initialized, call init() to get a value but
4893 only if the architecture initializaiton has completed. Otherwise
4894 punt - hope that the caller knows what they are doing. */
4895 if (gdbarch
->data
[data
->index
] == NULL
4896 && gdbarch
->initialized_p
)
4898 /* Be careful to detect an initialization cycle. */
4899 gdb_assert (data
->init_p
);
4901 gdb_assert (data
->init
!= NULL
);
4902 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
4904 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
4906 return gdbarch
->data
[data
->index
];
4911 /* Keep a registry of swapped data required by GDB modules. */
4916 struct gdbarch_swap_registration
*source
;
4917 struct gdbarch_swap
*next
;
4920 struct gdbarch_swap_registration
4923 unsigned long sizeof_data
;
4924 gdbarch_swap_ftype
*init
;
4925 struct gdbarch_swap_registration
*next
;
4928 struct gdbarch_swap_registry
4931 struct gdbarch_swap_registration
*registrations
;
4934 struct gdbarch_swap_registry gdbarch_swap_registry
=
4940 register_gdbarch_swap (void *data
,
4941 unsigned long sizeof_data
,
4942 gdbarch_swap_ftype
*init
)
4944 struct gdbarch_swap_registration
**rego
;
4945 for (rego
= &gdbarch_swap_registry
.registrations
;
4947 rego
= &(*rego
)->next
);
4948 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4949 (*rego
)->next
= NULL
;
4950 (*rego
)->init
= init
;
4951 (*rego
)->data
= data
;
4952 (*rego
)->sizeof_data
= sizeof_data
;
4956 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
4958 struct gdbarch_swap
*curr
;
4959 for (curr
= gdbarch
->swap
;
4963 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
4968 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4970 struct gdbarch_swap_registration
*rego
;
4971 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4972 for (rego
= gdbarch_swap_registry
.registrations
;
4976 if (rego
->data
!= NULL
)
4978 (*curr
) = XMALLOC (struct gdbarch_swap
);
4979 (*curr
)->source
= rego
;
4980 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4981 (*curr
)->next
= NULL
;
4982 curr
= &(*curr
)->next
;
4984 if (rego
->init
!= NULL
)
4990 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4992 struct gdbarch_swap
*curr
;
4993 for (curr
= gdbarch
->swap
;
4996 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5000 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5002 struct gdbarch_swap
*curr
;
5003 for (curr
= gdbarch
->swap
;
5006 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5010 /* Keep a registry of the architectures known by GDB. */
5012 struct gdbarch_registration
5014 enum bfd_architecture bfd_architecture
;
5015 gdbarch_init_ftype
*init
;
5016 gdbarch_dump_tdep_ftype
*dump_tdep
;
5017 struct gdbarch_list
*arches
;
5018 struct gdbarch_registration
*next
;
5021 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5024 append_name (const char ***buf
, int *nr
, const char *name
)
5026 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5032 gdbarch_printable_names (void)
5036 /* Accumulate a list of names based on the registed list of
5038 enum bfd_architecture a
;
5040 const char **arches
= NULL
;
5041 struct gdbarch_registration
*rego
;
5042 for (rego
= gdbarch_registry
;
5046 const struct bfd_arch_info
*ap
;
5047 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5049 internal_error (__FILE__
, __LINE__
,
5050 "gdbarch_architecture_names: multi-arch unknown");
5053 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5058 append_name (&arches
, &nr_arches
, NULL
);
5062 /* Just return all the architectures that BFD knows. Assume that
5063 the legacy architecture framework supports them. */
5064 return bfd_arch_list ();
5069 gdbarch_register (enum bfd_architecture bfd_architecture
,
5070 gdbarch_init_ftype
*init
,
5071 gdbarch_dump_tdep_ftype
*dump_tdep
)
5073 struct gdbarch_registration
**curr
;
5074 const struct bfd_arch_info
*bfd_arch_info
;
5075 /* Check that BFD recognizes this architecture */
5076 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5077 if (bfd_arch_info
== NULL
)
5079 internal_error (__FILE__
, __LINE__
,
5080 "gdbarch: Attempt to register unknown architecture (%d)",
5083 /* Check that we haven't seen this architecture before */
5084 for (curr
= &gdbarch_registry
;
5086 curr
= &(*curr
)->next
)
5088 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5089 internal_error (__FILE__
, __LINE__
,
5090 "gdbarch: Duplicate registraration of architecture (%s)",
5091 bfd_arch_info
->printable_name
);
5095 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5096 bfd_arch_info
->printable_name
,
5099 (*curr
) = XMALLOC (struct gdbarch_registration
);
5100 (*curr
)->bfd_architecture
= bfd_architecture
;
5101 (*curr
)->init
= init
;
5102 (*curr
)->dump_tdep
= dump_tdep
;
5103 (*curr
)->arches
= NULL
;
5104 (*curr
)->next
= NULL
;
5105 /* When non- multi-arch, install whatever target dump routine we've
5106 been provided - hopefully that routine has been written correctly
5107 and works regardless of multi-arch. */
5108 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5109 && startup_gdbarch
.dump_tdep
== NULL
)
5110 startup_gdbarch
.dump_tdep
= dump_tdep
;
5114 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5115 gdbarch_init_ftype
*init
)
5117 gdbarch_register (bfd_architecture
, init
, NULL
);
5121 /* Look for an architecture using gdbarch_info. Base search on only
5122 BFD_ARCH_INFO and BYTE_ORDER. */
5124 struct gdbarch_list
*
5125 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5126 const struct gdbarch_info
*info
)
5128 for (; arches
!= NULL
; arches
= arches
->next
)
5130 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5132 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5140 /* Update the current architecture. Return ZERO if the update request
5144 gdbarch_update_p (struct gdbarch_info info
)
5146 struct gdbarch
*new_gdbarch
;
5147 struct gdbarch
*old_gdbarch
;
5148 struct gdbarch_registration
*rego
;
5150 /* Fill in missing parts of the INFO struct using a number of
5151 sources: ``set ...''; INFOabfd supplied; existing target. */
5153 /* ``(gdb) set architecture ...'' */
5154 if (info
.bfd_arch_info
== NULL
5155 && !TARGET_ARCHITECTURE_AUTO
)
5156 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5157 if (info
.bfd_arch_info
== NULL
5158 && info
.abfd
!= NULL
5159 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5160 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5161 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5162 if (info
.bfd_arch_info
== NULL
)
5163 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5165 /* ``(gdb) set byte-order ...'' */
5166 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5167 && !TARGET_BYTE_ORDER_AUTO
)
5168 info
.byte_order
= TARGET_BYTE_ORDER
;
5169 /* From the INFO struct. */
5170 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5171 && info
.abfd
!= NULL
)
5172 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5173 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5174 : BFD_ENDIAN_UNKNOWN
);
5175 /* From the current target. */
5176 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5177 info
.byte_order
= TARGET_BYTE_ORDER
;
5179 /* Must have found some sort of architecture. */
5180 gdb_assert (info
.bfd_arch_info
!= NULL
);
5184 fprintf_unfiltered (gdb_stdlog
,
5185 "gdbarch_update: info.bfd_arch_info %s\n",
5186 (info
.bfd_arch_info
!= NULL
5187 ? info
.bfd_arch_info
->printable_name
5189 fprintf_unfiltered (gdb_stdlog
,
5190 "gdbarch_update: info.byte_order %d (%s)\n",
5192 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5193 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5195 fprintf_unfiltered (gdb_stdlog
,
5196 "gdbarch_update: info.abfd 0x%lx\n",
5198 fprintf_unfiltered (gdb_stdlog
,
5199 "gdbarch_update: info.tdep_info 0x%lx\n",
5200 (long) info
.tdep_info
);
5203 /* Find the target that knows about this architecture. */
5204 for (rego
= gdbarch_registry
;
5207 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5216 /* Swap the data belonging to the old target out setting the
5217 installed data to zero. This stops the ->init() function trying
5218 to refer to the previous architecture's global data structures. */
5219 swapout_gdbarch_swap (current_gdbarch
);
5220 clear_gdbarch_swap (current_gdbarch
);
5222 /* Save the previously selected architecture, setting the global to
5223 NULL. This stops ->init() trying to use the previous
5224 architecture's configuration. The previous architecture may not
5225 even be of the same architecture family. The most recent
5226 architecture of the same family is found at the head of the
5227 rego->arches list. */
5228 old_gdbarch
= current_gdbarch
;
5229 current_gdbarch
= NULL
;
5231 /* Ask the target for a replacement architecture. */
5232 new_gdbarch
= rego
->init (info
, rego
->arches
);
5234 /* Did the target like it? No. Reject the change and revert to the
5235 old architecture. */
5236 if (new_gdbarch
== NULL
)
5239 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5240 swapin_gdbarch_swap (old_gdbarch
);
5241 current_gdbarch
= old_gdbarch
;
5245 /* Did the architecture change? No. Oops, put the old architecture
5247 if (old_gdbarch
== new_gdbarch
)
5250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5252 new_gdbarch
->bfd_arch_info
->printable_name
);
5253 swapin_gdbarch_swap (old_gdbarch
);
5254 current_gdbarch
= old_gdbarch
;
5258 /* Is this a pre-existing architecture? Yes. Move it to the front
5259 of the list of architectures (keeping the list sorted Most
5260 Recently Used) and then copy it in. */
5262 struct gdbarch_list
**list
;
5263 for (list
= ®o
->arches
;
5265 list
= &(*list
)->next
)
5267 if ((*list
)->gdbarch
== new_gdbarch
)
5269 struct gdbarch_list
*this;
5271 fprintf_unfiltered (gdb_stdlog
,
5272 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5274 new_gdbarch
->bfd_arch_info
->printable_name
);
5277 (*list
) = this->next
;
5278 /* Insert in the front. */
5279 this->next
= rego
->arches
;
5280 rego
->arches
= this;
5281 /* Copy the new architecture in. */
5282 current_gdbarch
= new_gdbarch
;
5283 swapin_gdbarch_swap (new_gdbarch
);
5284 architecture_changed_event ();
5290 /* Prepend this new architecture to the architecture list (keep the
5291 list sorted Most Recently Used). */
5293 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5294 this->next
= rego
->arches
;
5295 this->gdbarch
= new_gdbarch
;
5296 rego
->arches
= this;
5299 /* Switch to this new architecture marking it initialized. */
5300 current_gdbarch
= new_gdbarch
;
5301 current_gdbarch
->initialized_p
= 1;
5304 fprintf_unfiltered (gdb_stdlog
,
5305 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5307 new_gdbarch
->bfd_arch_info
->printable_name
);
5310 /* Check that the newly installed architecture is valid. Plug in
5311 any post init values. */
5312 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5313 verify_gdbarch (new_gdbarch
);
5315 /* Initialize the per-architecture memory (swap) areas.
5316 CURRENT_GDBARCH must be update before these modules are
5318 init_gdbarch_swap (new_gdbarch
);
5320 /* Initialize the per-architecture data. CURRENT_GDBARCH
5321 must be updated before these modules are called. */
5322 architecture_changed_event ();
5325 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5333 /* Pointer to the target-dependent disassembly function. */
5334 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5335 disassemble_info tm_print_insn_info
;
5338 extern void _initialize_gdbarch (void);
5341 _initialize_gdbarch (void)
5343 struct cmd_list_element
*c
;
5345 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5346 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5347 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5348 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5349 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5351 add_show_from_set (add_set_cmd ("arch",
5354 (char *)&gdbarch_debug
,
5355 "Set architecture debugging.\n\
5356 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5358 c
= add_set_cmd ("archdebug",
5361 (char *)&gdbarch_debug
,
5362 "Set architecture debugging.\n\
5363 When non-zero, architecture debugging is enabled.", &setlist
);
5365 deprecate_cmd (c
, "set debug arch");
5366 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");