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_registers_info_ftype
*print_registers_info
;
176 gdbarch_print_float_info_ftype
*print_float_info
;
177 gdbarch_print_vector_info_ftype
*print_vector_info
;
178 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
179 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
180 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
181 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
182 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
183 int use_generic_dummy_frames
;
184 int call_dummy_location
;
185 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
186 CORE_ADDR call_dummy_start_offset
;
187 CORE_ADDR call_dummy_breakpoint_offset
;
188 int call_dummy_breakpoint_offset_p
;
189 int call_dummy_length
;
190 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
192 LONGEST
* call_dummy_words
;
193 int sizeof_call_dummy_words
;
194 int call_dummy_stack_adjust_p
;
195 int call_dummy_stack_adjust
;
196 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
197 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
198 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
199 int believe_pcc_promotion
;
200 int believe_pcc_promotion_type
;
201 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
202 gdbarch_get_saved_register_ftype
*get_saved_register
;
203 gdbarch_register_convertible_ftype
*register_convertible
;
204 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
205 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
206 gdbarch_convert_register_p_ftype
*convert_register_p
;
207 gdbarch_register_to_value_ftype
*register_to_value
;
208 gdbarch_value_to_register_ftype
*value_to_register
;
209 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
210 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
211 gdbarch_integer_to_address_ftype
*integer_to_address
;
212 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
213 gdbarch_push_arguments_ftype
*push_arguments
;
214 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
215 gdbarch_push_return_address_ftype
*push_return_address
;
216 gdbarch_pop_frame_ftype
*pop_frame
;
217 gdbarch_store_struct_return_ftype
*store_struct_return
;
218 gdbarch_extract_return_value_ftype
*extract_return_value
;
219 gdbarch_store_return_value_ftype
*store_return_value
;
220 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
221 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
222 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
223 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
224 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
225 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
226 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
227 gdbarch_skip_prologue_ftype
*skip_prologue
;
228 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
229 gdbarch_inner_than_ftype
*inner_than
;
230 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
231 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
232 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
233 CORE_ADDR decr_pc_after_break
;
234 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
235 CORE_ADDR function_start_offset
;
236 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
237 CORE_ADDR frame_args_skip
;
238 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
239 gdbarch_frame_chain_ftype
*frame_chain
;
240 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
241 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
242 gdbarch_frame_args_address_ftype
*frame_args_address
;
243 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
244 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
245 gdbarch_frame_num_args_ftype
*frame_num_args
;
246 gdbarch_stack_align_ftype
*stack_align
;
247 int extra_stack_alignment_needed
;
248 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
249 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
251 const struct floatformat
* float_format
;
252 const struct floatformat
* double_format
;
253 const struct floatformat
* long_double_format
;
254 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
255 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
256 gdbarch_smash_text_address_ftype
*smash_text_address
;
257 gdbarch_software_single_step_ftype
*software_single_step
;
258 gdbarch_print_insn_ftype
*print_insn
;
259 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
260 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
261 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
262 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
263 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
264 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
265 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
266 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
267 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
271 /* The default architecture uses host values (for want of a better
274 extern const struct bfd_arch_info bfd_default_arch_struct
;
276 struct gdbarch startup_gdbarch
=
278 1, /* Always initialized. */
279 /* basic architecture information */
280 &bfd_default_arch_struct
,
282 /* target specific vector and its dump routine */
284 /*per-architecture data-pointers and swap regions */
286 /* Multi-arch values */
290 8 * sizeof (LONGEST
),
293 8 * sizeof (long double),
322 generic_register_byte
,
323 generic_register_size
,
325 generic_register_size
,
329 default_print_registers_info
,
417 generic_in_function_epilogue_p
,
418 construct_inferior_arguments
,
422 /* startup_gdbarch() */
425 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
427 /* Do any initialization needed for a non-multiarch configuration
428 after the _initialize_MODULE functions have been run. */
430 initialize_non_multiarch (void)
432 alloc_gdbarch_data (&startup_gdbarch
);
433 /* Ensure that all swap areas are zeroed so that they again think
434 they are starting from scratch. */
435 clear_gdbarch_swap (&startup_gdbarch
);
436 init_gdbarch_swap (&startup_gdbarch
);
440 /* Create a new ``struct gdbarch'' based on information provided by
441 ``struct gdbarch_info''. */
444 gdbarch_alloc (const struct gdbarch_info
*info
,
445 struct gdbarch_tdep
*tdep
)
447 /* NOTE: The new architecture variable is named ``current_gdbarch''
448 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
449 the current local architecture and not the previous global
450 architecture. This ensures that the new architectures initial
451 values are not influenced by the previous architecture. Once
452 everything is parameterised with gdbarch, this will go away. */
453 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
454 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
456 alloc_gdbarch_data (current_gdbarch
);
458 current_gdbarch
->tdep
= tdep
;
460 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
461 current_gdbarch
->byte_order
= info
->byte_order
;
463 /* Force the explicit initialization of these. */
464 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
465 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
466 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
467 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
468 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
469 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
470 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
471 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
472 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
473 current_gdbarch
->char_signed
= -1;
474 current_gdbarch
->read_pc
= generic_target_read_pc
;
475 current_gdbarch
->write_pc
= generic_target_write_pc
;
476 current_gdbarch
->read_fp
= generic_target_read_fp
;
477 current_gdbarch
->read_sp
= generic_target_read_sp
;
478 current_gdbarch
->write_sp
= generic_target_write_sp
;
479 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
480 current_gdbarch
->num_regs
= -1;
481 current_gdbarch
->sp_regnum
= -1;
482 current_gdbarch
->fp_regnum
= -1;
483 current_gdbarch
->pc_regnum
= -1;
484 current_gdbarch
->ps_regnum
= -1;
485 current_gdbarch
->fp0_regnum
= -1;
486 current_gdbarch
->npc_regnum
= -1;
487 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
488 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
489 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
490 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
491 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
492 current_gdbarch
->register_name
= legacy_register_name
;
493 current_gdbarch
->register_size
= -1;
494 current_gdbarch
->register_bytes
= -1;
495 current_gdbarch
->register_byte
= generic_register_byte
;
496 current_gdbarch
->register_raw_size
= generic_register_size
;
497 current_gdbarch
->max_register_raw_size
= -1;
498 current_gdbarch
->register_virtual_size
= generic_register_size
;
499 current_gdbarch
->max_register_virtual_size
= -1;
500 current_gdbarch
->print_registers_info
= default_print_registers_info
;
501 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
502 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
503 current_gdbarch
->cannot_store_register
= cannot_register_not
;
504 current_gdbarch
->use_generic_dummy_frames
= -1;
505 current_gdbarch
->call_dummy_start_offset
= -1;
506 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
507 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
508 current_gdbarch
->call_dummy_length
= -1;
509 current_gdbarch
->call_dummy_p
= -1;
510 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
511 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
512 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
513 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
514 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
515 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
516 current_gdbarch
->get_saved_register
= generic_unwind_get_saved_register
;
517 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
518 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
519 current_gdbarch
->register_to_value
= legacy_register_to_value
;
520 current_gdbarch
->value_to_register
= legacy_value_to_register
;
521 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
522 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
523 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
524 current_gdbarch
->push_arguments
= default_push_arguments
;
525 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
526 current_gdbarch
->store_return_value
= legacy_store_return_value
;
527 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
528 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
529 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
530 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
531 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
532 current_gdbarch
->decr_pc_after_break
= -1;
533 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
534 current_gdbarch
->function_start_offset
= -1;
535 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
536 current_gdbarch
->frame_args_skip
= -1;
537 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
538 current_gdbarch
->frame_chain_valid
= generic_func_frame_chain_valid
;
539 current_gdbarch
->extra_stack_alignment_needed
= 1;
540 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
541 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
542 current_gdbarch
->smash_text_address
= core_addr_identity
;
543 current_gdbarch
->print_insn
= legacy_print_insn
;
544 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
545 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
546 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
547 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
548 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
549 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
550 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
551 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
552 /* gdbarch_alloc() */
554 return current_gdbarch
;
558 /* Free a gdbarch struct. This should never happen in normal
559 operation --- once you've created a gdbarch, you keep it around.
560 However, if an architecture's init function encounters an error
561 building the structure, it may need to clean up a partially
562 constructed gdbarch. */
565 gdbarch_free (struct gdbarch
*arch
)
567 gdb_assert (arch
!= NULL
);
568 free_gdbarch_data (arch
);
573 /* Ensure that all values in a GDBARCH are reasonable. */
576 verify_gdbarch (struct gdbarch
*gdbarch
)
579 struct cleanup
*cleanups
;
582 /* Only perform sanity checks on a multi-arch target. */
585 log
= mem_fileopen ();
586 cleanups
= make_cleanup_ui_file_delete (log
);
588 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
589 fprintf_unfiltered (log
, "\n\tbyte-order");
590 if (gdbarch
->bfd_arch_info
== NULL
)
591 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
592 /* Check those that need to be defined for the given multi-arch level. */
593 /* Skip verify of short_bit, invalid_p == 0 */
594 /* Skip verify of int_bit, invalid_p == 0 */
595 /* Skip verify of long_bit, invalid_p == 0 */
596 /* Skip verify of long_long_bit, invalid_p == 0 */
597 /* Skip verify of float_bit, invalid_p == 0 */
598 /* Skip verify of double_bit, invalid_p == 0 */
599 /* Skip verify of long_double_bit, invalid_p == 0 */
600 /* Skip verify of ptr_bit, invalid_p == 0 */
601 if (gdbarch
->addr_bit
== 0)
602 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
603 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
604 if (gdbarch
->char_signed
== -1)
605 gdbarch
->char_signed
= 1;
606 /* Skip verify of read_pc, invalid_p == 0 */
607 /* Skip verify of write_pc, invalid_p == 0 */
608 /* Skip verify of read_fp, invalid_p == 0 */
609 /* Skip verify of read_sp, invalid_p == 0 */
610 /* Skip verify of write_sp, invalid_p == 0 */
611 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
612 /* Skip verify of pseudo_register_read, has predicate */
613 /* Skip verify of pseudo_register_write, has predicate */
614 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
615 && (gdbarch
->num_regs
== -1))
616 fprintf_unfiltered (log
, "\n\tnum_regs");
617 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
618 /* Skip verify of sp_regnum, invalid_p == 0 */
619 /* Skip verify of fp_regnum, invalid_p == 0 */
620 /* Skip verify of pc_regnum, invalid_p == 0 */
621 /* Skip verify of ps_regnum, invalid_p == 0 */
622 /* Skip verify of fp0_regnum, invalid_p == 0 */
623 /* Skip verify of npc_regnum, invalid_p == 0 */
624 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
625 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
626 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
627 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
628 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
629 /* Skip verify of register_name, invalid_p == 0 */
630 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
631 && (gdbarch
->register_size
== -1))
632 fprintf_unfiltered (log
, "\n\tregister_size");
633 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
634 && (gdbarch
->register_bytes
== -1))
635 fprintf_unfiltered (log
, "\n\tregister_bytes");
636 /* Skip verify of register_byte, invalid_p == 0 */
637 /* Skip verify of register_raw_size, invalid_p == 0 */
638 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
639 && (gdbarch
->max_register_raw_size
== -1))
640 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
641 /* Skip verify of register_virtual_size, invalid_p == 0 */
642 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
643 && (gdbarch
->max_register_virtual_size
== -1))
644 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
645 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
646 && (gdbarch
->register_virtual_type
== 0))
647 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
648 /* Skip verify of do_registers_info, has predicate */
649 /* Skip verify of print_registers_info, invalid_p == 0 */
650 /* Skip verify of print_float_info, has predicate */
651 /* Skip verify of print_vector_info, has predicate */
652 /* Skip verify of register_sim_regno, invalid_p == 0 */
653 /* Skip verify of register_bytes_ok, has predicate */
654 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
655 /* Skip verify of cannot_store_register, invalid_p == 0 */
656 /* Skip verify of get_longjmp_target, has predicate */
657 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
658 && (gdbarch
->use_generic_dummy_frames
== -1))
659 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
660 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
661 && (gdbarch
->call_dummy_location
== 0))
662 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
663 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
664 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
665 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
666 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
667 && (gdbarch
->call_dummy_start_offset
== -1))
668 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
669 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
670 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
671 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
672 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
673 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
674 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
675 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
676 && (gdbarch
->call_dummy_length
== -1))
677 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
678 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
679 && (gdbarch
->pc_in_call_dummy
== 0))
680 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
681 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
682 && (gdbarch
->call_dummy_p
== -1))
683 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
684 /* Skip verify of call_dummy_words, invalid_p == 0 */
685 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
686 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
687 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
688 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
689 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
690 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
691 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
692 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
693 && (gdbarch
->fix_call_dummy
== 0))
694 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
695 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
696 /* Skip verify of init_frame_pc, invalid_p == 0 */
697 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
698 /* Skip verify of get_saved_register, invalid_p == 0 */
699 /* Skip verify of register_convertible, invalid_p == 0 */
700 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
701 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
702 /* Skip verify of convert_register_p, invalid_p == 0 */
703 /* Skip verify of register_to_value, invalid_p == 0 */
704 /* Skip verify of value_to_register, invalid_p == 0 */
705 /* Skip verify of pointer_to_address, invalid_p == 0 */
706 /* Skip verify of address_to_pointer, invalid_p == 0 */
707 /* Skip verify of integer_to_address, has predicate */
708 /* Skip verify of return_value_on_stack, invalid_p == 0 */
709 /* Skip verify of push_arguments, invalid_p == 0 */
710 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
711 && (gdbarch
->push_dummy_frame
== 0))
712 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
713 /* Skip verify of push_return_address, has predicate */
714 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
715 && (gdbarch
->pop_frame
== 0))
716 fprintf_unfiltered (log
, "\n\tpop_frame");
717 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
718 && (gdbarch
->store_struct_return
== 0))
719 fprintf_unfiltered (log
, "\n\tstore_struct_return");
720 /* Skip verify of extract_return_value, invalid_p == 0 */
721 /* Skip verify of store_return_value, invalid_p == 0 */
722 /* Skip verify of extract_struct_value_address, has predicate */
723 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
724 /* Skip verify of use_struct_convention, invalid_p == 0 */
725 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
726 && (gdbarch
->frame_init_saved_regs
== 0))
727 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
728 /* Skip verify of init_extra_frame_info, has predicate */
729 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
730 && (gdbarch
->skip_prologue
== 0))
731 fprintf_unfiltered (log
, "\n\tskip_prologue");
732 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
733 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
734 && (gdbarch
->inner_than
== 0))
735 fprintf_unfiltered (log
, "\n\tinner_than");
736 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
737 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
738 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
740 && (gdbarch
->decr_pc_after_break
== -1))
741 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
742 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
743 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
744 && (gdbarch
->function_start_offset
== -1))
745 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
746 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
747 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
748 && (gdbarch
->frame_args_skip
== -1))
749 fprintf_unfiltered (log
, "\n\tframe_args_skip");
750 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
751 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
752 && (gdbarch
->frame_chain
== 0))
753 fprintf_unfiltered (log
, "\n\tframe_chain");
754 /* Skip verify of frame_chain_valid, invalid_p == 0 */
755 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
756 && (gdbarch
->frame_saved_pc
== 0))
757 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
758 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
759 && (gdbarch
->frame_args_address
== 0))
760 fprintf_unfiltered (log
, "\n\tframe_args_address");
761 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
762 && (gdbarch
->frame_locals_address
== 0))
763 fprintf_unfiltered (log
, "\n\tframe_locals_address");
764 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
765 && (gdbarch
->saved_pc_after_call
== 0))
766 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
767 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
768 && (gdbarch
->frame_num_args
== 0))
769 fprintf_unfiltered (log
, "\n\tframe_num_args");
770 /* Skip verify of stack_align, has predicate */
771 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
772 /* Skip verify of reg_struct_has_addr, has predicate */
773 /* Skip verify of save_dummy_frame_tos, has predicate */
774 if (gdbarch
->float_format
== 0)
775 gdbarch
->float_format
= default_float_format (gdbarch
);
776 if (gdbarch
->double_format
== 0)
777 gdbarch
->double_format
= default_double_format (gdbarch
);
778 if (gdbarch
->long_double_format
== 0)
779 gdbarch
->long_double_format
= default_double_format (gdbarch
);
780 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
781 /* Skip verify of addr_bits_remove, invalid_p == 0 */
782 /* Skip verify of smash_text_address, invalid_p == 0 */
783 /* Skip verify of software_single_step, has predicate */
784 /* Skip verify of print_insn, invalid_p == 0 */
785 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
786 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
787 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
788 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
789 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
790 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
791 /* Skip verify of dwarf2_build_frame_info, has predicate */
792 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
793 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
794 buf
= ui_file_xstrdup (log
, &dummy
);
795 make_cleanup (xfree
, buf
);
796 if (strlen (buf
) > 0)
797 internal_error (__FILE__
, __LINE__
,
798 "verify_gdbarch: the following are invalid ...%s",
800 do_cleanups (cleanups
);
804 /* Print out the details of the current architecture. */
806 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
807 just happens to match the global variable ``current_gdbarch''. That
808 way macros refering to that variable get the local and not the global
809 version - ulgh. Once everything is parameterised with gdbarch, this
813 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
821 (long) current_gdbarch
->in_function_epilogue_p
);
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
825 (long) current_gdbarch
->pseudo_register_read
);
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
829 (long) current_gdbarch
->pseudo_register_write
);
830 #ifdef ADDRESS_TO_POINTER
832 /* Macro might contain `[{}]' when not multi-arch */
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: %s # %s\n",
835 "ADDRESS_TO_POINTER(type, buf, addr)",
836 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
841 (long) current_gdbarch
->address_to_pointer
842 /*ADDRESS_TO_POINTER ()*/);
844 #ifdef ADDR_BITS_REMOVE
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: %s # %s\n",
847 "ADDR_BITS_REMOVE(addr)",
848 XSTRING (ADDR_BITS_REMOVE (addr
)));
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
852 (long) current_gdbarch
->addr_bits_remove
853 /*ADDR_BITS_REMOVE ()*/);
855 #ifdef BELIEVE_PCC_PROMOTION
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
858 XSTRING (BELIEVE_PCC_PROMOTION
));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
861 BELIEVE_PCC_PROMOTION
);
863 #ifdef BELIEVE_PCC_PROMOTION_TYPE
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
866 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
869 BELIEVE_PCC_PROMOTION_TYPE
);
871 #ifdef BREAKPOINT_FROM_PC
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: %s # %s\n",
874 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
875 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
879 (long) current_gdbarch
->breakpoint_from_pc
880 /*BREAKPOINT_FROM_PC ()*/);
882 #ifdef CALL_DUMMY_ADDRESS
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: %s # %s\n",
885 "CALL_DUMMY_ADDRESS()",
886 XSTRING (CALL_DUMMY_ADDRESS ()));
888 fprintf_unfiltered (file
,
889 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
890 (long) current_gdbarch
->call_dummy_address
891 /*CALL_DUMMY_ADDRESS ()*/);
893 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
896 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
897 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
900 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
902 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
905 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
908 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
910 #ifdef CALL_DUMMY_LENGTH
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
913 XSTRING (CALL_DUMMY_LENGTH
));
914 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
919 #ifdef CALL_DUMMY_LOCATION
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
922 XSTRING (CALL_DUMMY_LOCATION
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
925 CALL_DUMMY_LOCATION
);
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_P # %s\n",
930 XSTRING (CALL_DUMMY_P
));
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: CALL_DUMMY_P = %d\n",
935 #ifdef CALL_DUMMY_STACK_ADJUST
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
938 XSTRING (CALL_DUMMY_STACK_ADJUST
));
939 if (CALL_DUMMY_STACK_ADJUST_P
)
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
942 (long) CALL_DUMMY_STACK_ADJUST
);
944 #ifdef CALL_DUMMY_STACK_ADJUST_P
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
947 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
950 (long) CALL_DUMMY_STACK_ADJUST_P
);
952 #ifdef CALL_DUMMY_START_OFFSET
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
955 XSTRING (CALL_DUMMY_START_OFFSET
));
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
958 (long) CALL_DUMMY_START_OFFSET
);
960 #ifdef CALL_DUMMY_WORDS
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
963 XSTRING (CALL_DUMMY_WORDS
));
964 fprintf_unfiltered (file
,
965 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
966 (long) CALL_DUMMY_WORDS
);
968 #ifdef CANNOT_FETCH_REGISTER
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: %s # %s\n",
971 "CANNOT_FETCH_REGISTER(regnum)",
972 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
976 (long) current_gdbarch
->cannot_fetch_register
977 /*CANNOT_FETCH_REGISTER ()*/);
979 #ifdef CANNOT_STORE_REGISTER
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: %s # %s\n",
982 "CANNOT_STORE_REGISTER(regnum)",
983 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
985 fprintf_unfiltered (file
,
986 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
987 (long) current_gdbarch
->cannot_store_register
988 /*CANNOT_STORE_REGISTER ()*/);
990 #ifdef COERCE_FLOAT_TO_DOUBLE
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: %s # %s\n",
993 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
994 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
998 (long) current_gdbarch
->coerce_float_to_double
999 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1001 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1003 /* Macro might contain `[{}]' when not multi-arch */
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: %s # %s\n",
1006 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1007 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1012 (long) current_gdbarch
->coff_make_msymbol_special
1013 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1018 (long) current_gdbarch
->construct_inferior_arguments
);
1019 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: %s # %s\n",
1022 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1023 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1027 (long) current_gdbarch
->convert_from_func_ptr_addr
1028 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1030 #ifdef CONVERT_REGISTER_P
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: %s # %s\n",
1033 "CONVERT_REGISTER_P(regnum)",
1034 XSTRING (CONVERT_REGISTER_P (regnum
)));
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1038 (long) current_gdbarch
->convert_register_p
1039 /*CONVERT_REGISTER_P ()*/);
1041 #ifdef DECR_PC_AFTER_BREAK
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1044 XSTRING (DECR_PC_AFTER_BREAK
));
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1047 (long) DECR_PC_AFTER_BREAK
);
1049 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1051 /* Macro might contain `[{}]' when not multi-arch */
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: %s # %s\n",
1054 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1055 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1060 (long) current_gdbarch
->deprecated_extract_return_value
1061 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1063 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: %s # %s\n",
1066 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1067 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1071 (long) current_gdbarch
->deprecated_extract_struct_value_address
1072 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1074 #ifdef DEPRECATED_STORE_RETURN_VALUE
1076 /* Macro might contain `[{}]' when not multi-arch */
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: %s # %s\n",
1079 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1080 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = 0x%08lx\n",
1085 (long) current_gdbarch
->deprecated_store_return_value
1086 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1088 #ifdef DO_REGISTERS_INFO
1090 /* Macro might contain `[{}]' when not multi-arch */
1091 fprintf_unfiltered (file
,
1092 "gdbarch_dump: %s # %s\n",
1093 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1094 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1097 fprintf_unfiltered (file
,
1098 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1099 (long) current_gdbarch
->do_registers_info
1100 /*DO_REGISTERS_INFO ()*/);
1102 #ifdef DWARF2_BUILD_FRAME_INFO
1104 /* Macro might contain `[{}]' when not multi-arch */
1105 fprintf_unfiltered (file
,
1106 "gdbarch_dump: %s # %s\n",
1107 "DWARF2_BUILD_FRAME_INFO(objfile)",
1108 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1113 (long) current_gdbarch
->dwarf2_build_frame_info
1114 /*DWARF2_BUILD_FRAME_INFO ()*/);
1116 #ifdef DWARF2_REG_TO_REGNUM
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: %s # %s\n",
1119 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1120 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1124 (long) current_gdbarch
->dwarf2_reg_to_regnum
1125 /*DWARF2_REG_TO_REGNUM ()*/);
1127 #ifdef DWARF_REG_TO_REGNUM
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: %s # %s\n",
1130 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1131 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1135 (long) current_gdbarch
->dwarf_reg_to_regnum
1136 /*DWARF_REG_TO_REGNUM ()*/);
1138 #ifdef ECOFF_REG_TO_REGNUM
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: %s # %s\n",
1141 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1142 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1144 fprintf_unfiltered (file
,
1145 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1146 (long) current_gdbarch
->ecoff_reg_to_regnum
1147 /*ECOFF_REG_TO_REGNUM ()*/);
1149 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1151 /* Macro might contain `[{}]' when not multi-arch */
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: %s # %s\n",
1154 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1155 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1160 (long) current_gdbarch
->elf_make_msymbol_special
1161 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1163 #ifdef EXTRACT_RETURN_VALUE
1165 /* Macro might contain `[{}]' when not multi-arch */
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: %s # %s\n",
1168 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1169 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1174 (long) current_gdbarch
->extract_return_value
1175 /*EXTRACT_RETURN_VALUE ()*/);
1177 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: %s # %s\n",
1180 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1181 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1183 fprintf_unfiltered (file
,
1184 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1185 (long) current_gdbarch
->extract_struct_value_address
1186 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1188 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1191 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1194 EXTRA_STACK_ALIGNMENT_NEEDED
);
1196 #ifdef FIX_CALL_DUMMY
1198 /* Macro might contain `[{}]' when not multi-arch */
1199 fprintf_unfiltered (file
,
1200 "gdbarch_dump: %s # %s\n",
1201 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1202 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1207 (long) current_gdbarch
->fix_call_dummy
1208 /*FIX_CALL_DUMMY ()*/);
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: FP0_REGNUM # %s\n",
1213 XSTRING (FP0_REGNUM
));
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: FP0_REGNUM = %d\n",
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: FP_REGNUM # %s\n",
1221 XSTRING (FP_REGNUM
));
1222 fprintf_unfiltered (file
,
1223 "gdbarch_dump: FP_REGNUM = %d\n",
1226 #ifdef FRAMELESS_FUNCTION_INVOCATION
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: %s # %s\n",
1229 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1230 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1232 fprintf_unfiltered (file
,
1233 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1234 (long) current_gdbarch
->frameless_function_invocation
1235 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1237 #ifdef FRAME_ARGS_ADDRESS
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: %s # %s\n",
1240 "FRAME_ARGS_ADDRESS(fi)",
1241 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1245 (long) current_gdbarch
->frame_args_address
1246 /*FRAME_ARGS_ADDRESS ()*/);
1248 #ifdef FRAME_ARGS_SKIP
1249 fprintf_unfiltered (file
,
1250 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1251 XSTRING (FRAME_ARGS_SKIP
));
1252 fprintf_unfiltered (file
,
1253 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1254 (long) FRAME_ARGS_SKIP
);
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: %s # %s\n",
1259 "FRAME_CHAIN(frame)",
1260 XSTRING (FRAME_CHAIN (frame
)));
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1264 (long) current_gdbarch
->frame_chain
1265 /*FRAME_CHAIN ()*/);
1267 #ifdef FRAME_CHAIN_VALID
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: %s # %s\n",
1270 "FRAME_CHAIN_VALID(chain, thisframe)",
1271 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1275 (long) current_gdbarch
->frame_chain_valid
1276 /*FRAME_CHAIN_VALID ()*/);
1278 #ifdef FRAME_INIT_SAVED_REGS
1280 /* Macro might contain `[{}]' when not multi-arch */
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: %s # %s\n",
1283 "FRAME_INIT_SAVED_REGS(frame)",
1284 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1289 (long) current_gdbarch
->frame_init_saved_regs
1290 /*FRAME_INIT_SAVED_REGS ()*/);
1292 #ifdef FRAME_LOCALS_ADDRESS
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "FRAME_LOCALS_ADDRESS(fi)",
1296 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1298 fprintf_unfiltered (file
,
1299 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1300 (long) current_gdbarch
->frame_locals_address
1301 /*FRAME_LOCALS_ADDRESS ()*/);
1303 #ifdef FRAME_NUM_ARGS
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: %s # %s\n",
1306 "FRAME_NUM_ARGS(frame)",
1307 XSTRING (FRAME_NUM_ARGS (frame
)));
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1311 (long) current_gdbarch
->frame_num_args
1312 /*FRAME_NUM_ARGS ()*/);
1314 #ifdef FRAME_SAVED_PC
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: %s # %s\n",
1317 "FRAME_SAVED_PC(fi)",
1318 XSTRING (FRAME_SAVED_PC (fi
)));
1320 fprintf_unfiltered (file
,
1321 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1322 (long) current_gdbarch
->frame_saved_pc
1323 /*FRAME_SAVED_PC ()*/);
1325 #ifdef FUNCTION_START_OFFSET
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1328 XSTRING (FUNCTION_START_OFFSET
));
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1331 (long) FUNCTION_START_OFFSET
);
1333 #ifdef GET_LONGJMP_TARGET
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: %s # %s\n",
1336 "GET_LONGJMP_TARGET(pc)",
1337 XSTRING (GET_LONGJMP_TARGET (pc
)));
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1341 (long) current_gdbarch
->get_longjmp_target
1342 /*GET_LONGJMP_TARGET ()*/);
1344 #ifdef GET_SAVED_REGISTER
1346 /* Macro might contain `[{}]' when not multi-arch */
1347 fprintf_unfiltered (file
,
1348 "gdbarch_dump: %s # %s\n",
1349 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1350 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1353 fprintf_unfiltered (file
,
1354 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1355 (long) current_gdbarch
->get_saved_register
1356 /*GET_SAVED_REGISTER ()*/);
1358 #ifdef INIT_EXTRA_FRAME_INFO
1360 /* Macro might contain `[{}]' when not multi-arch */
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: %s # %s\n",
1363 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1364 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1369 (long) current_gdbarch
->init_extra_frame_info
1370 /*INIT_EXTRA_FRAME_INFO ()*/);
1372 #ifdef INIT_FRAME_PC
1374 /* Macro might contain `[{}]' when not multi-arch */
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: %s # %s\n",
1377 "INIT_FRAME_PC(fromleaf, prev)",
1378 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1383 (long) current_gdbarch
->init_frame_pc
1384 /*INIT_FRAME_PC ()*/);
1386 #ifdef INIT_FRAME_PC_FIRST
1388 /* Macro might contain `[{}]' when not multi-arch */
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: %s # %s\n",
1391 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1392 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1397 (long) current_gdbarch
->init_frame_pc_first
1398 /*INIT_FRAME_PC_FIRST ()*/);
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: %s # %s\n",
1403 "INNER_THAN(lhs, rhs)",
1404 XSTRING (INNER_THAN (lhs
, rhs
)));
1406 fprintf_unfiltered (file
,
1407 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1408 (long) current_gdbarch
->inner_than
1411 #ifdef INTEGER_TO_ADDRESS
1412 fprintf_unfiltered (file
,
1413 "gdbarch_dump: %s # %s\n",
1414 "INTEGER_TO_ADDRESS(type, buf)",
1415 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1419 (long) current_gdbarch
->integer_to_address
1420 /*INTEGER_TO_ADDRESS ()*/);
1422 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: %s # %s\n",
1425 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1426 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1428 fprintf_unfiltered (file
,
1429 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1430 (long) current_gdbarch
->in_solib_call_trampoline
1431 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1433 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1434 fprintf_unfiltered (file
,
1435 "gdbarch_dump: %s # %s\n",
1436 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1437 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
1441 (long) current_gdbarch
->in_solib_return_trampoline
1442 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1444 #ifdef MAX_REGISTER_RAW_SIZE
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1447 XSTRING (MAX_REGISTER_RAW_SIZE
));
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1450 MAX_REGISTER_RAW_SIZE
);
1452 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1453 fprintf_unfiltered (file
,
1454 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1455 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1458 MAX_REGISTER_VIRTUAL_SIZE
);
1460 #ifdef MEMORY_INSERT_BREAKPOINT
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: %s # %s\n",
1463 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1464 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1468 (long) current_gdbarch
->memory_insert_breakpoint
1469 /*MEMORY_INSERT_BREAKPOINT ()*/);
1471 #ifdef MEMORY_REMOVE_BREAKPOINT
1472 fprintf_unfiltered (file
,
1473 "gdbarch_dump: %s # %s\n",
1474 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1475 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1479 (long) current_gdbarch
->memory_remove_breakpoint
1480 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: NPC_REGNUM # %s\n",
1485 XSTRING (NPC_REGNUM
));
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: NPC_REGNUM = %d\n",
1490 #ifdef NUM_PSEUDO_REGS
1491 fprintf_unfiltered (file
,
1492 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1493 XSTRING (NUM_PSEUDO_REGS
));
1494 fprintf_unfiltered (file
,
1495 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: NUM_REGS # %s\n",
1501 XSTRING (NUM_REGS
));
1502 fprintf_unfiltered (file
,
1503 "gdbarch_dump: NUM_REGS = %d\n",
1506 #ifdef PARM_BOUNDARY
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1509 XSTRING (PARM_BOUNDARY
));
1510 fprintf_unfiltered (file
,
1511 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1514 #ifdef PC_IN_CALL_DUMMY
1515 fprintf_unfiltered (file
,
1516 "gdbarch_dump: %s # %s\n",
1517 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1518 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1522 (long) current_gdbarch
->pc_in_call_dummy
1523 /*PC_IN_CALL_DUMMY ()*/);
1525 #ifdef PC_IN_SIGTRAMP
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: %s # %s\n",
1528 "PC_IN_SIGTRAMP(pc, name)",
1529 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1533 (long) current_gdbarch
->pc_in_sigtramp
1534 /*PC_IN_SIGTRAMP ()*/);
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: PC_REGNUM # %s\n",
1539 XSTRING (PC_REGNUM
));
1540 fprintf_unfiltered (file
,
1541 "gdbarch_dump: PC_REGNUM = %d\n",
1544 #ifdef POINTER_TO_ADDRESS
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: %s # %s\n",
1547 "POINTER_TO_ADDRESS(type, buf)",
1548 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1552 (long) current_gdbarch
->pointer_to_address
1553 /*POINTER_TO_ADDRESS ()*/);
1557 /* Macro might contain `[{}]' when not multi-arch */
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: %s # %s\n",
1561 XSTRING (POP_FRAME (-)));
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1566 (long) current_gdbarch
->pop_frame
1569 #ifdef PREPARE_TO_PROCEED
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: %s # %s\n",
1572 "PREPARE_TO_PROCEED(select_it)",
1573 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1575 fprintf_unfiltered (file
,
1576 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1577 (long) current_gdbarch
->prepare_to_proceed
1578 /*PREPARE_TO_PROCEED ()*/);
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: print_float_info = 0x%08lx\n",
1583 (long) current_gdbarch
->print_float_info
);
1585 fprintf_unfiltered (file
,
1586 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1587 (long) current_gdbarch
->print_registers_info
);
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1591 (long) current_gdbarch
->print_vector_info
);
1592 #ifdef PROLOGUE_FRAMELESS_P
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: %s # %s\n",
1595 "PROLOGUE_FRAMELESS_P(ip)",
1596 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1600 (long) current_gdbarch
->prologue_frameless_p
1601 /*PROLOGUE_FRAMELESS_P ()*/);
1604 fprintf_unfiltered (file
,
1605 "gdbarch_dump: PS_REGNUM # %s\n",
1606 XSTRING (PS_REGNUM
));
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: PS_REGNUM = %d\n",
1611 #ifdef PUSH_ARGUMENTS
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: %s # %s\n",
1614 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1615 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1619 (long) current_gdbarch
->push_arguments
1620 /*PUSH_ARGUMENTS ()*/);
1622 #ifdef PUSH_DUMMY_FRAME
1624 /* Macro might contain `[{}]' when not multi-arch */
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: %s # %s\n",
1627 "PUSH_DUMMY_FRAME(-)",
1628 XSTRING (PUSH_DUMMY_FRAME (-)));
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1633 (long) current_gdbarch
->push_dummy_frame
1634 /*PUSH_DUMMY_FRAME ()*/);
1636 #ifdef PUSH_RETURN_ADDRESS
1637 fprintf_unfiltered (file
,
1638 "gdbarch_dump: %s # %s\n",
1639 "PUSH_RETURN_ADDRESS(pc, sp)",
1640 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1642 fprintf_unfiltered (file
,
1643 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1644 (long) current_gdbarch
->push_return_address
1645 /*PUSH_RETURN_ADDRESS ()*/);
1647 #ifdef REGISTER_BYTE
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: %s # %s\n",
1650 "REGISTER_BYTE(reg_nr)",
1651 XSTRING (REGISTER_BYTE (reg_nr
)));
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1655 (long) current_gdbarch
->register_byte
1656 /*REGISTER_BYTE ()*/);
1658 #ifdef REGISTER_BYTES
1659 fprintf_unfiltered (file
,
1660 "gdbarch_dump: REGISTER_BYTES # %s\n",
1661 XSTRING (REGISTER_BYTES
));
1662 fprintf_unfiltered (file
,
1663 "gdbarch_dump: REGISTER_BYTES = %d\n",
1666 #ifdef REGISTER_BYTES_OK
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: %s # %s\n",
1669 "REGISTER_BYTES_OK(nr_bytes)",
1670 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1672 fprintf_unfiltered (file
,
1673 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1674 (long) current_gdbarch
->register_bytes_ok
1675 /*REGISTER_BYTES_OK ()*/);
1677 #ifdef REGISTER_CONVERTIBLE
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: %s # %s\n",
1680 "REGISTER_CONVERTIBLE(nr)",
1681 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1685 (long) current_gdbarch
->register_convertible
1686 /*REGISTER_CONVERTIBLE ()*/);
1688 #ifdef REGISTER_CONVERT_TO_RAW
1690 /* Macro might contain `[{}]' when not multi-arch */
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: %s # %s\n",
1693 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1694 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1697 fprintf_unfiltered (file
,
1698 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1699 (long) current_gdbarch
->register_convert_to_raw
1700 /*REGISTER_CONVERT_TO_RAW ()*/);
1702 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1704 /* Macro might contain `[{}]' when not multi-arch */
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: %s # %s\n",
1707 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1708 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1711 fprintf_unfiltered (file
,
1712 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1713 (long) current_gdbarch
->register_convert_to_virtual
1714 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1716 #ifdef REGISTER_NAME
1717 fprintf_unfiltered (file
,
1718 "gdbarch_dump: %s # %s\n",
1719 "REGISTER_NAME(regnr)",
1720 XSTRING (REGISTER_NAME (regnr
)));
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1724 (long) current_gdbarch
->register_name
1725 /*REGISTER_NAME ()*/);
1727 #ifdef REGISTER_RAW_SIZE
1728 fprintf_unfiltered (file
,
1729 "gdbarch_dump: %s # %s\n",
1730 "REGISTER_RAW_SIZE(reg_nr)",
1731 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1735 (long) current_gdbarch
->register_raw_size
1736 /*REGISTER_RAW_SIZE ()*/);
1738 #ifdef REGISTER_SIM_REGNO
1739 fprintf_unfiltered (file
,
1740 "gdbarch_dump: %s # %s\n",
1741 "REGISTER_SIM_REGNO(reg_nr)",
1742 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1746 (long) current_gdbarch
->register_sim_regno
1747 /*REGISTER_SIM_REGNO ()*/);
1749 #ifdef REGISTER_SIZE
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: REGISTER_SIZE # %s\n",
1752 XSTRING (REGISTER_SIZE
));
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: REGISTER_SIZE = %d\n",
1757 #ifdef REGISTER_TO_VALUE
1759 /* Macro might contain `[{}]' when not multi-arch */
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: %s # %s\n",
1762 "REGISTER_TO_VALUE(regnum, type, from, to)",
1763 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1766 fprintf_unfiltered (file
,
1767 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1768 (long) current_gdbarch
->register_to_value
1769 /*REGISTER_TO_VALUE ()*/);
1771 #ifdef REGISTER_VIRTUAL_SIZE
1772 fprintf_unfiltered (file
,
1773 "gdbarch_dump: %s # %s\n",
1774 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1775 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1777 fprintf_unfiltered (file
,
1778 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1779 (long) current_gdbarch
->register_virtual_size
1780 /*REGISTER_VIRTUAL_SIZE ()*/);
1782 #ifdef REGISTER_VIRTUAL_TYPE
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: %s # %s\n",
1785 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1786 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1788 fprintf_unfiltered (file
,
1789 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1790 (long) current_gdbarch
->register_virtual_type
1791 /*REGISTER_VIRTUAL_TYPE ()*/);
1793 #ifdef REG_STRUCT_HAS_ADDR
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: %s # %s\n",
1796 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1797 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1801 (long) current_gdbarch
->reg_struct_has_addr
1802 /*REG_STRUCT_HAS_ADDR ()*/);
1804 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1806 /* Macro might contain `[{}]' when not multi-arch */
1807 fprintf_unfiltered (file
,
1808 "gdbarch_dump: %s # %s\n",
1809 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1810 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1815 (long) current_gdbarch
->remote_translate_xfer_address
1816 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1818 #ifdef RETURN_VALUE_ON_STACK
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: %s # %s\n",
1821 "RETURN_VALUE_ON_STACK(type)",
1822 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1826 (long) current_gdbarch
->return_value_on_stack
1827 /*RETURN_VALUE_ON_STACK ()*/);
1829 #ifdef SAVED_PC_AFTER_CALL
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: %s # %s\n",
1832 "SAVED_PC_AFTER_CALL(frame)",
1833 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1837 (long) current_gdbarch
->saved_pc_after_call
1838 /*SAVED_PC_AFTER_CALL ()*/);
1840 #ifdef SAVE_DUMMY_FRAME_TOS
1842 /* Macro might contain `[{}]' when not multi-arch */
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: %s # %s\n",
1845 "SAVE_DUMMY_FRAME_TOS(sp)",
1846 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1851 (long) current_gdbarch
->save_dummy_frame_tos
1852 /*SAVE_DUMMY_FRAME_TOS ()*/);
1854 #ifdef SDB_REG_TO_REGNUM
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: %s # %s\n",
1857 "SDB_REG_TO_REGNUM(sdb_regnr)",
1858 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1862 (long) current_gdbarch
->sdb_reg_to_regnum
1863 /*SDB_REG_TO_REGNUM ()*/);
1865 #ifdef SIZEOF_CALL_DUMMY_WORDS
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1868 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1869 fprintf_unfiltered (file
,
1870 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1871 (long) SIZEOF_CALL_DUMMY_WORDS
);
1873 #ifdef SKIP_PROLOGUE
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: %s # %s\n",
1876 "SKIP_PROLOGUE(ip)",
1877 XSTRING (SKIP_PROLOGUE (ip
)));
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1881 (long) current_gdbarch
->skip_prologue
1882 /*SKIP_PROLOGUE ()*/);
1884 #ifdef SKIP_TRAMPOLINE_CODE
1885 fprintf_unfiltered (file
,
1886 "gdbarch_dump: %s # %s\n",
1887 "SKIP_TRAMPOLINE_CODE(pc)",
1888 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1892 (long) current_gdbarch
->skip_trampoline_code
1893 /*SKIP_TRAMPOLINE_CODE ()*/);
1895 #ifdef SMASH_TEXT_ADDRESS
1896 fprintf_unfiltered (file
,
1897 "gdbarch_dump: %s # %s\n",
1898 "SMASH_TEXT_ADDRESS(addr)",
1899 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1901 fprintf_unfiltered (file
,
1902 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1903 (long) current_gdbarch
->smash_text_address
1904 /*SMASH_TEXT_ADDRESS ()*/);
1906 #ifdef SOFTWARE_SINGLE_STEP
1908 /* Macro might contain `[{}]' when not multi-arch */
1909 fprintf_unfiltered (file
,
1910 "gdbarch_dump: %s # %s\n",
1911 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1912 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1917 (long) current_gdbarch
->software_single_step
1918 /*SOFTWARE_SINGLE_STEP ()*/);
1921 fprintf_unfiltered (file
,
1922 "gdbarch_dump: SP_REGNUM # %s\n",
1923 XSTRING (SP_REGNUM
));
1924 fprintf_unfiltered (file
,
1925 "gdbarch_dump: SP_REGNUM = %d\n",
1928 #ifdef STAB_REG_TO_REGNUM
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: %s # %s\n",
1931 "STAB_REG_TO_REGNUM(stab_regnr)",
1932 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1936 (long) current_gdbarch
->stab_reg_to_regnum
1937 /*STAB_REG_TO_REGNUM ()*/);
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: %s # %s\n",
1943 XSTRING (STACK_ALIGN (sp
)));
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1947 (long) current_gdbarch
->stack_align
1948 /*STACK_ALIGN ()*/);
1950 #ifdef STORE_RETURN_VALUE
1952 /* Macro might contain `[{}]' when not multi-arch */
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: %s # %s\n",
1955 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1956 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1961 (long) current_gdbarch
->store_return_value
1962 /*STORE_RETURN_VALUE ()*/);
1964 #ifdef STORE_STRUCT_RETURN
1966 /* Macro might contain `[{}]' when not multi-arch */
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: %s # %s\n",
1969 "STORE_STRUCT_RETURN(addr, sp)",
1970 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1975 (long) current_gdbarch
->store_struct_return
1976 /*STORE_STRUCT_RETURN ()*/);
1978 #ifdef TARGET_ADDR_BIT
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1981 XSTRING (TARGET_ADDR_BIT
));
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1986 #ifdef TARGET_ARCHITECTURE
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1989 XSTRING (TARGET_ARCHITECTURE
));
1990 if (TARGET_ARCHITECTURE
!= NULL
)
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1993 TARGET_ARCHITECTURE
->printable_name
);
1995 #ifdef TARGET_BFD_VMA_BIT
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1998 XSTRING (TARGET_BFD_VMA_BIT
));
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2001 TARGET_BFD_VMA_BIT
);
2003 #ifdef TARGET_BYTE_ORDER
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2006 XSTRING (TARGET_BYTE_ORDER
));
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2009 (long) TARGET_BYTE_ORDER
);
2011 #ifdef TARGET_CHAR_SIGNED
2012 fprintf_unfiltered (file
,
2013 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2014 XSTRING (TARGET_CHAR_SIGNED
));
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2017 TARGET_CHAR_SIGNED
);
2019 #ifdef TARGET_DOUBLE_BIT
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2022 XSTRING (TARGET_DOUBLE_BIT
));
2023 fprintf_unfiltered (file
,
2024 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2027 #ifdef TARGET_DOUBLE_FORMAT
2028 fprintf_unfiltered (file
,
2029 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2030 XSTRING (TARGET_DOUBLE_FORMAT
));
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2033 (long) TARGET_DOUBLE_FORMAT
);
2035 #ifdef TARGET_FLOAT_BIT
2036 fprintf_unfiltered (file
,
2037 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2038 XSTRING (TARGET_FLOAT_BIT
));
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2043 #ifdef TARGET_FLOAT_FORMAT
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2046 XSTRING (TARGET_FLOAT_FORMAT
));
2047 fprintf_unfiltered (file
,
2048 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2049 (long) TARGET_FLOAT_FORMAT
);
2051 #ifdef TARGET_INT_BIT
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2054 XSTRING (TARGET_INT_BIT
));
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2059 #ifdef TARGET_LONG_BIT
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2062 XSTRING (TARGET_LONG_BIT
));
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2067 #ifdef TARGET_LONG_DOUBLE_BIT
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2070 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2073 TARGET_LONG_DOUBLE_BIT
);
2075 #ifdef TARGET_LONG_DOUBLE_FORMAT
2076 fprintf_unfiltered (file
,
2077 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2078 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2079 fprintf_unfiltered (file
,
2080 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2081 (long) TARGET_LONG_DOUBLE_FORMAT
);
2083 #ifdef TARGET_LONG_LONG_BIT
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2086 XSTRING (TARGET_LONG_LONG_BIT
));
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2089 TARGET_LONG_LONG_BIT
);
2091 #ifdef TARGET_PRINT_INSN
2092 fprintf_unfiltered (file
,
2093 "gdbarch_dump: %s # %s\n",
2094 "TARGET_PRINT_INSN(vma, info)",
2095 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2097 fprintf_unfiltered (file
,
2098 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2099 (long) current_gdbarch
->print_insn
2100 /*TARGET_PRINT_INSN ()*/);
2102 #ifdef TARGET_PTR_BIT
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2105 XSTRING (TARGET_PTR_BIT
));
2106 fprintf_unfiltered (file
,
2107 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2110 #ifdef TARGET_READ_FP
2111 fprintf_unfiltered (file
,
2112 "gdbarch_dump: %s # %s\n",
2114 XSTRING (TARGET_READ_FP ()));
2116 fprintf_unfiltered (file
,
2117 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2118 (long) current_gdbarch
->read_fp
2119 /*TARGET_READ_FP ()*/);
2121 #ifdef TARGET_READ_PC
2122 fprintf_unfiltered (file
,
2123 "gdbarch_dump: %s # %s\n",
2124 "TARGET_READ_PC(ptid)",
2125 XSTRING (TARGET_READ_PC (ptid
)));
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2129 (long) current_gdbarch
->read_pc
2130 /*TARGET_READ_PC ()*/);
2132 #ifdef TARGET_READ_SP
2133 fprintf_unfiltered (file
,
2134 "gdbarch_dump: %s # %s\n",
2136 XSTRING (TARGET_READ_SP ()));
2138 fprintf_unfiltered (file
,
2139 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2140 (long) current_gdbarch
->read_sp
2141 /*TARGET_READ_SP ()*/);
2143 #ifdef TARGET_SHORT_BIT
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2146 XSTRING (TARGET_SHORT_BIT
));
2147 fprintf_unfiltered (file
,
2148 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2151 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2153 /* Macro might contain `[{}]' when not multi-arch */
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: %s # %s\n",
2156 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2157 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2162 (long) current_gdbarch
->virtual_frame_pointer
2163 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2165 #ifdef TARGET_WRITE_PC
2167 /* Macro might contain `[{}]' when not multi-arch */
2168 fprintf_unfiltered (file
,
2169 "gdbarch_dump: %s # %s\n",
2170 "TARGET_WRITE_PC(val, ptid)",
2171 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2174 fprintf_unfiltered (file
,
2175 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2176 (long) current_gdbarch
->write_pc
2177 /*TARGET_WRITE_PC ()*/);
2179 #ifdef TARGET_WRITE_SP
2181 /* Macro might contain `[{}]' when not multi-arch */
2182 fprintf_unfiltered (file
,
2183 "gdbarch_dump: %s # %s\n",
2184 "TARGET_WRITE_SP(val)",
2185 XSTRING (TARGET_WRITE_SP (val
)));
2188 fprintf_unfiltered (file
,
2189 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2190 (long) current_gdbarch
->write_sp
2191 /*TARGET_WRITE_SP ()*/);
2193 #ifdef USE_GENERIC_DUMMY_FRAMES
2194 fprintf_unfiltered (file
,
2195 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2196 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2197 fprintf_unfiltered (file
,
2198 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2199 USE_GENERIC_DUMMY_FRAMES
);
2201 #ifdef USE_STRUCT_CONVENTION
2202 fprintf_unfiltered (file
,
2203 "gdbarch_dump: %s # %s\n",
2204 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2205 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2207 fprintf_unfiltered (file
,
2208 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2209 (long) current_gdbarch
->use_struct_convention
2210 /*USE_STRUCT_CONVENTION ()*/);
2212 #ifdef VALUE_TO_REGISTER
2214 /* Macro might contain `[{}]' when not multi-arch */
2215 fprintf_unfiltered (file
,
2216 "gdbarch_dump: %s # %s\n",
2217 "VALUE_TO_REGISTER(type, regnum, from, to)",
2218 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2221 fprintf_unfiltered (file
,
2222 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2223 (long) current_gdbarch
->value_to_register
2224 /*VALUE_TO_REGISTER ()*/);
2226 if (current_gdbarch
->dump_tdep
!= NULL
)
2227 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2230 struct gdbarch_tdep
*
2231 gdbarch_tdep (struct gdbarch
*gdbarch
)
2233 if (gdbarch_debug
>= 2)
2234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2235 return gdbarch
->tdep
;
2239 const struct bfd_arch_info
*
2240 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2242 gdb_assert (gdbarch
!= NULL
);
2243 if (gdbarch_debug
>= 2)
2244 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2245 return gdbarch
->bfd_arch_info
;
2249 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2251 gdb_assert (gdbarch
!= NULL
);
2252 if (gdbarch_debug
>= 2)
2253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2254 return gdbarch
->byte_order
;
2258 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2260 gdb_assert (gdbarch
!= NULL
);
2261 /* Skip verify of short_bit, invalid_p == 0 */
2262 if (gdbarch_debug
>= 2)
2263 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2264 return gdbarch
->short_bit
;
2268 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2271 gdbarch
->short_bit
= short_bit
;
2275 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2277 gdb_assert (gdbarch
!= NULL
);
2278 /* Skip verify of int_bit, invalid_p == 0 */
2279 if (gdbarch_debug
>= 2)
2280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2281 return gdbarch
->int_bit
;
2285 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2288 gdbarch
->int_bit
= int_bit
;
2292 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2294 gdb_assert (gdbarch
!= NULL
);
2295 /* Skip verify of long_bit, invalid_p == 0 */
2296 if (gdbarch_debug
>= 2)
2297 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2298 return gdbarch
->long_bit
;
2302 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2305 gdbarch
->long_bit
= long_bit
;
2309 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2311 gdb_assert (gdbarch
!= NULL
);
2312 /* Skip verify of long_long_bit, invalid_p == 0 */
2313 if (gdbarch_debug
>= 2)
2314 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2315 return gdbarch
->long_long_bit
;
2319 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2322 gdbarch
->long_long_bit
= long_long_bit
;
2326 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2328 gdb_assert (gdbarch
!= NULL
);
2329 /* Skip verify of float_bit, invalid_p == 0 */
2330 if (gdbarch_debug
>= 2)
2331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2332 return gdbarch
->float_bit
;
2336 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2339 gdbarch
->float_bit
= float_bit
;
2343 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2345 gdb_assert (gdbarch
!= NULL
);
2346 /* Skip verify of double_bit, invalid_p == 0 */
2347 if (gdbarch_debug
>= 2)
2348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2349 return gdbarch
->double_bit
;
2353 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2356 gdbarch
->double_bit
= double_bit
;
2360 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2362 gdb_assert (gdbarch
!= NULL
);
2363 /* Skip verify of long_double_bit, invalid_p == 0 */
2364 if (gdbarch_debug
>= 2)
2365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2366 return gdbarch
->long_double_bit
;
2370 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2371 int long_double_bit
)
2373 gdbarch
->long_double_bit
= long_double_bit
;
2377 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2379 gdb_assert (gdbarch
!= NULL
);
2380 /* Skip verify of ptr_bit, invalid_p == 0 */
2381 if (gdbarch_debug
>= 2)
2382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2383 return gdbarch
->ptr_bit
;
2387 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2390 gdbarch
->ptr_bit
= ptr_bit
;
2394 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2396 gdb_assert (gdbarch
!= NULL
);
2397 if (gdbarch
->addr_bit
== 0)
2398 internal_error (__FILE__
, __LINE__
,
2399 "gdbarch: gdbarch_addr_bit invalid");
2400 if (gdbarch_debug
>= 2)
2401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2402 return gdbarch
->addr_bit
;
2406 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2409 gdbarch
->addr_bit
= addr_bit
;
2413 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2415 gdb_assert (gdbarch
!= NULL
);
2416 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2417 if (gdbarch_debug
>= 2)
2418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2419 return gdbarch
->bfd_vma_bit
;
2423 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2426 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2430 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2432 gdb_assert (gdbarch
!= NULL
);
2433 if (gdbarch
->char_signed
== -1)
2434 internal_error (__FILE__
, __LINE__
,
2435 "gdbarch: gdbarch_char_signed invalid");
2436 if (gdbarch_debug
>= 2)
2437 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2438 return gdbarch
->char_signed
;
2442 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2445 gdbarch
->char_signed
= char_signed
;
2449 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2451 gdb_assert (gdbarch
!= NULL
);
2452 if (gdbarch
->read_pc
== 0)
2453 internal_error (__FILE__
, __LINE__
,
2454 "gdbarch: gdbarch_read_pc invalid");
2455 if (gdbarch_debug
>= 2)
2456 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2457 return gdbarch
->read_pc (ptid
);
2461 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2462 gdbarch_read_pc_ftype read_pc
)
2464 gdbarch
->read_pc
= read_pc
;
2468 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2470 gdb_assert (gdbarch
!= NULL
);
2471 if (gdbarch
->write_pc
== 0)
2472 internal_error (__FILE__
, __LINE__
,
2473 "gdbarch: gdbarch_write_pc invalid");
2474 if (gdbarch_debug
>= 2)
2475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2476 gdbarch
->write_pc (val
, ptid
);
2480 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2481 gdbarch_write_pc_ftype write_pc
)
2483 gdbarch
->write_pc
= write_pc
;
2487 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2489 gdb_assert (gdbarch
!= NULL
);
2490 if (gdbarch
->read_fp
== 0)
2491 internal_error (__FILE__
, __LINE__
,
2492 "gdbarch: gdbarch_read_fp invalid");
2493 if (gdbarch_debug
>= 2)
2494 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2495 return gdbarch
->read_fp ();
2499 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2500 gdbarch_read_fp_ftype read_fp
)
2502 gdbarch
->read_fp
= read_fp
;
2506 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2508 gdb_assert (gdbarch
!= NULL
);
2509 if (gdbarch
->read_sp
== 0)
2510 internal_error (__FILE__
, __LINE__
,
2511 "gdbarch: gdbarch_read_sp invalid");
2512 if (gdbarch_debug
>= 2)
2513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2514 return gdbarch
->read_sp ();
2518 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2519 gdbarch_read_sp_ftype read_sp
)
2521 gdbarch
->read_sp
= read_sp
;
2525 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2527 gdb_assert (gdbarch
!= NULL
);
2528 if (gdbarch
->write_sp
== 0)
2529 internal_error (__FILE__
, __LINE__
,
2530 "gdbarch: gdbarch_write_sp invalid");
2531 if (gdbarch_debug
>= 2)
2532 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2533 gdbarch
->write_sp (val
);
2537 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2538 gdbarch_write_sp_ftype write_sp
)
2540 gdbarch
->write_sp
= write_sp
;
2544 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2546 gdb_assert (gdbarch
!= NULL
);
2547 if (gdbarch
->virtual_frame_pointer
== 0)
2548 internal_error (__FILE__
, __LINE__
,
2549 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2550 if (gdbarch_debug
>= 2)
2551 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2552 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2556 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2557 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2559 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2563 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2565 gdb_assert (gdbarch
!= NULL
);
2566 return gdbarch
->pseudo_register_read
!= 0;
2570 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2572 gdb_assert (gdbarch
!= NULL
);
2573 if (gdbarch
->pseudo_register_read
== 0)
2574 internal_error (__FILE__
, __LINE__
,
2575 "gdbarch: gdbarch_pseudo_register_read invalid");
2576 if (gdbarch_debug
>= 2)
2577 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2578 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2582 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2583 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2585 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2589 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2591 gdb_assert (gdbarch
!= NULL
);
2592 return gdbarch
->pseudo_register_write
!= 0;
2596 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2598 gdb_assert (gdbarch
!= NULL
);
2599 if (gdbarch
->pseudo_register_write
== 0)
2600 internal_error (__FILE__
, __LINE__
,
2601 "gdbarch: gdbarch_pseudo_register_write invalid");
2602 if (gdbarch_debug
>= 2)
2603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2604 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2608 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2609 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2611 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2615 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2617 gdb_assert (gdbarch
!= NULL
);
2618 if (gdbarch
->num_regs
== -1)
2619 internal_error (__FILE__
, __LINE__
,
2620 "gdbarch: gdbarch_num_regs invalid");
2621 if (gdbarch_debug
>= 2)
2622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2623 return gdbarch
->num_regs
;
2627 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2630 gdbarch
->num_regs
= num_regs
;
2634 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2636 gdb_assert (gdbarch
!= NULL
);
2637 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2638 if (gdbarch_debug
>= 2)
2639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2640 return gdbarch
->num_pseudo_regs
;
2644 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2645 int num_pseudo_regs
)
2647 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2651 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2653 gdb_assert (gdbarch
!= NULL
);
2654 /* Skip verify of sp_regnum, invalid_p == 0 */
2655 if (gdbarch_debug
>= 2)
2656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2657 return gdbarch
->sp_regnum
;
2661 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2664 gdbarch
->sp_regnum
= sp_regnum
;
2668 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2670 gdb_assert (gdbarch
!= NULL
);
2671 /* Skip verify of fp_regnum, invalid_p == 0 */
2672 if (gdbarch_debug
>= 2)
2673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2674 return gdbarch
->fp_regnum
;
2678 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2681 gdbarch
->fp_regnum
= fp_regnum
;
2685 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2687 gdb_assert (gdbarch
!= NULL
);
2688 /* Skip verify of pc_regnum, invalid_p == 0 */
2689 if (gdbarch_debug
>= 2)
2690 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2691 return gdbarch
->pc_regnum
;
2695 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2698 gdbarch
->pc_regnum
= pc_regnum
;
2702 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2704 gdb_assert (gdbarch
!= NULL
);
2705 /* Skip verify of ps_regnum, invalid_p == 0 */
2706 if (gdbarch_debug
>= 2)
2707 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2708 return gdbarch
->ps_regnum
;
2712 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2715 gdbarch
->ps_regnum
= ps_regnum
;
2719 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2721 gdb_assert (gdbarch
!= NULL
);
2722 /* Skip verify of fp0_regnum, invalid_p == 0 */
2723 if (gdbarch_debug
>= 2)
2724 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2725 return gdbarch
->fp0_regnum
;
2729 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2732 gdbarch
->fp0_regnum
= fp0_regnum
;
2736 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2738 gdb_assert (gdbarch
!= NULL
);
2739 /* Skip verify of npc_regnum, invalid_p == 0 */
2740 if (gdbarch_debug
>= 2)
2741 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2742 return gdbarch
->npc_regnum
;
2746 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2749 gdbarch
->npc_regnum
= npc_regnum
;
2753 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2755 gdb_assert (gdbarch
!= NULL
);
2756 if (gdbarch
->stab_reg_to_regnum
== 0)
2757 internal_error (__FILE__
, __LINE__
,
2758 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2759 if (gdbarch_debug
>= 2)
2760 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2761 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2765 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2766 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2768 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2772 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2774 gdb_assert (gdbarch
!= NULL
);
2775 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2776 internal_error (__FILE__
, __LINE__
,
2777 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2778 if (gdbarch_debug
>= 2)
2779 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2780 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2784 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2785 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2787 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2791 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2793 gdb_assert (gdbarch
!= NULL
);
2794 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2795 internal_error (__FILE__
, __LINE__
,
2796 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2797 if (gdbarch_debug
>= 2)
2798 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2799 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2803 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2804 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2806 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2810 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2812 gdb_assert (gdbarch
!= NULL
);
2813 if (gdbarch
->sdb_reg_to_regnum
== 0)
2814 internal_error (__FILE__
, __LINE__
,
2815 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2816 if (gdbarch_debug
>= 2)
2817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2818 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2822 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2823 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2825 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2829 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2831 gdb_assert (gdbarch
!= NULL
);
2832 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2833 internal_error (__FILE__
, __LINE__
,
2834 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2835 if (gdbarch_debug
>= 2)
2836 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2837 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2841 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2842 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2844 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2848 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2850 gdb_assert (gdbarch
!= NULL
);
2851 if (gdbarch
->register_name
== 0)
2852 internal_error (__FILE__
, __LINE__
,
2853 "gdbarch: gdbarch_register_name invalid");
2854 if (gdbarch_debug
>= 2)
2855 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2856 return gdbarch
->register_name (regnr
);
2860 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2861 gdbarch_register_name_ftype register_name
)
2863 gdbarch
->register_name
= register_name
;
2867 gdbarch_register_size (struct gdbarch
*gdbarch
)
2869 gdb_assert (gdbarch
!= NULL
);
2870 if (gdbarch
->register_size
== -1)
2871 internal_error (__FILE__
, __LINE__
,
2872 "gdbarch: gdbarch_register_size invalid");
2873 if (gdbarch_debug
>= 2)
2874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2875 return gdbarch
->register_size
;
2879 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2882 gdbarch
->register_size
= register_size
;
2886 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2888 gdb_assert (gdbarch
!= NULL
);
2889 if (gdbarch
->register_bytes
== -1)
2890 internal_error (__FILE__
, __LINE__
,
2891 "gdbarch: gdbarch_register_bytes invalid");
2892 if (gdbarch_debug
>= 2)
2893 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2894 return gdbarch
->register_bytes
;
2898 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2901 gdbarch
->register_bytes
= register_bytes
;
2905 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2907 gdb_assert (gdbarch
!= NULL
);
2908 if (gdbarch
->register_byte
== 0)
2909 internal_error (__FILE__
, __LINE__
,
2910 "gdbarch: gdbarch_register_byte invalid");
2911 if (gdbarch_debug
>= 2)
2912 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2913 return gdbarch
->register_byte (reg_nr
);
2917 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2918 gdbarch_register_byte_ftype register_byte
)
2920 gdbarch
->register_byte
= register_byte
;
2924 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2926 gdb_assert (gdbarch
!= NULL
);
2927 if (gdbarch
->register_raw_size
== 0)
2928 internal_error (__FILE__
, __LINE__
,
2929 "gdbarch: gdbarch_register_raw_size invalid");
2930 if (gdbarch_debug
>= 2)
2931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2932 return gdbarch
->register_raw_size (reg_nr
);
2936 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2937 gdbarch_register_raw_size_ftype register_raw_size
)
2939 gdbarch
->register_raw_size
= register_raw_size
;
2943 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2945 gdb_assert (gdbarch
!= NULL
);
2946 if (gdbarch
->max_register_raw_size
== -1)
2947 internal_error (__FILE__
, __LINE__
,
2948 "gdbarch: gdbarch_max_register_raw_size invalid");
2949 if (gdbarch_debug
>= 2)
2950 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2951 return gdbarch
->max_register_raw_size
;
2955 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2956 int max_register_raw_size
)
2958 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2962 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2964 gdb_assert (gdbarch
!= NULL
);
2965 if (gdbarch
->register_virtual_size
== 0)
2966 internal_error (__FILE__
, __LINE__
,
2967 "gdbarch: gdbarch_register_virtual_size invalid");
2968 if (gdbarch_debug
>= 2)
2969 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2970 return gdbarch
->register_virtual_size (reg_nr
);
2974 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2975 gdbarch_register_virtual_size_ftype register_virtual_size
)
2977 gdbarch
->register_virtual_size
= register_virtual_size
;
2981 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2983 gdb_assert (gdbarch
!= NULL
);
2984 if (gdbarch
->max_register_virtual_size
== -1)
2985 internal_error (__FILE__
, __LINE__
,
2986 "gdbarch: gdbarch_max_register_virtual_size invalid");
2987 if (gdbarch_debug
>= 2)
2988 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2989 return gdbarch
->max_register_virtual_size
;
2993 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2994 int max_register_virtual_size
)
2996 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
3000 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3002 gdb_assert (gdbarch
!= NULL
);
3003 if (gdbarch
->register_virtual_type
== 0)
3004 internal_error (__FILE__
, __LINE__
,
3005 "gdbarch: gdbarch_register_virtual_type invalid");
3006 if (gdbarch_debug
>= 2)
3007 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3008 return gdbarch
->register_virtual_type (reg_nr
);
3012 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3013 gdbarch_register_virtual_type_ftype register_virtual_type
)
3015 gdbarch
->register_virtual_type
= register_virtual_type
;
3019 gdbarch_do_registers_info_p (struct gdbarch
*gdbarch
)
3021 gdb_assert (gdbarch
!= NULL
);
3022 return gdbarch
->do_registers_info
!= 0;
3026 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3028 gdb_assert (gdbarch
!= NULL
);
3029 if (gdbarch
->do_registers_info
== 0)
3030 internal_error (__FILE__
, __LINE__
,
3031 "gdbarch: gdbarch_do_registers_info invalid");
3032 if (gdbarch_debug
>= 2)
3033 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
3034 gdbarch
->do_registers_info (reg_nr
, fpregs
);
3038 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
3039 gdbarch_do_registers_info_ftype do_registers_info
)
3041 gdbarch
->do_registers_info
= do_registers_info
;
3045 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3047 gdb_assert (gdbarch
!= NULL
);
3048 if (gdbarch
->print_registers_info
== 0)
3049 internal_error (__FILE__
, __LINE__
,
3050 "gdbarch: gdbarch_print_registers_info invalid");
3051 if (gdbarch_debug
>= 2)
3052 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3053 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3057 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3058 gdbarch_print_registers_info_ftype print_registers_info
)
3060 gdbarch
->print_registers_info
= print_registers_info
;
3064 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3066 gdb_assert (gdbarch
!= NULL
);
3067 return gdbarch
->print_float_info
!= 0;
3071 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3073 gdb_assert (gdbarch
!= NULL
);
3074 if (gdbarch
->print_float_info
== 0)
3075 internal_error (__FILE__
, __LINE__
,
3076 "gdbarch: gdbarch_print_float_info invalid");
3077 if (gdbarch_debug
>= 2)
3078 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3079 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3083 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3084 gdbarch_print_float_info_ftype print_float_info
)
3086 gdbarch
->print_float_info
= print_float_info
;
3090 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3092 gdb_assert (gdbarch
!= NULL
);
3093 return gdbarch
->print_vector_info
!= 0;
3097 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3099 gdb_assert (gdbarch
!= NULL
);
3100 if (gdbarch
->print_vector_info
== 0)
3101 internal_error (__FILE__
, __LINE__
,
3102 "gdbarch: gdbarch_print_vector_info invalid");
3103 if (gdbarch_debug
>= 2)
3104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3105 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3109 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3110 gdbarch_print_vector_info_ftype print_vector_info
)
3112 gdbarch
->print_vector_info
= print_vector_info
;
3116 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3118 gdb_assert (gdbarch
!= NULL
);
3119 if (gdbarch
->register_sim_regno
== 0)
3120 internal_error (__FILE__
, __LINE__
,
3121 "gdbarch: gdbarch_register_sim_regno invalid");
3122 if (gdbarch_debug
>= 2)
3123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3124 return gdbarch
->register_sim_regno (reg_nr
);
3128 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3129 gdbarch_register_sim_regno_ftype register_sim_regno
)
3131 gdbarch
->register_sim_regno
= register_sim_regno
;
3135 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3137 gdb_assert (gdbarch
!= NULL
);
3138 return gdbarch
->register_bytes_ok
!= 0;
3142 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3144 gdb_assert (gdbarch
!= NULL
);
3145 if (gdbarch
->register_bytes_ok
== 0)
3146 internal_error (__FILE__
, __LINE__
,
3147 "gdbarch: gdbarch_register_bytes_ok invalid");
3148 if (gdbarch_debug
>= 2)
3149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3150 return gdbarch
->register_bytes_ok (nr_bytes
);
3154 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3155 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3157 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3161 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3163 gdb_assert (gdbarch
!= NULL
);
3164 if (gdbarch
->cannot_fetch_register
== 0)
3165 internal_error (__FILE__
, __LINE__
,
3166 "gdbarch: gdbarch_cannot_fetch_register invalid");
3167 if (gdbarch_debug
>= 2)
3168 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3169 return gdbarch
->cannot_fetch_register (regnum
);
3173 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3174 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3176 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3180 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3182 gdb_assert (gdbarch
!= NULL
);
3183 if (gdbarch
->cannot_store_register
== 0)
3184 internal_error (__FILE__
, __LINE__
,
3185 "gdbarch: gdbarch_cannot_store_register invalid");
3186 if (gdbarch_debug
>= 2)
3187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3188 return gdbarch
->cannot_store_register (regnum
);
3192 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3193 gdbarch_cannot_store_register_ftype cannot_store_register
)
3195 gdbarch
->cannot_store_register
= cannot_store_register
;
3199 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3201 gdb_assert (gdbarch
!= NULL
);
3202 return gdbarch
->get_longjmp_target
!= 0;
3206 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3208 gdb_assert (gdbarch
!= NULL
);
3209 if (gdbarch
->get_longjmp_target
== 0)
3210 internal_error (__FILE__
, __LINE__
,
3211 "gdbarch: gdbarch_get_longjmp_target invalid");
3212 if (gdbarch_debug
>= 2)
3213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3214 return gdbarch
->get_longjmp_target (pc
);
3218 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3219 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3221 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3225 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3227 gdb_assert (gdbarch
!= NULL
);
3228 if (gdbarch
->use_generic_dummy_frames
== -1)
3229 internal_error (__FILE__
, __LINE__
,
3230 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3231 if (gdbarch_debug
>= 2)
3232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3233 return gdbarch
->use_generic_dummy_frames
;
3237 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3238 int use_generic_dummy_frames
)
3240 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3244 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3246 gdb_assert (gdbarch
!= NULL
);
3247 if (gdbarch
->call_dummy_location
== 0)
3248 internal_error (__FILE__
, __LINE__
,
3249 "gdbarch: gdbarch_call_dummy_location invalid");
3250 if (gdbarch_debug
>= 2)
3251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3252 return gdbarch
->call_dummy_location
;
3256 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3257 int call_dummy_location
)
3259 gdbarch
->call_dummy_location
= call_dummy_location
;
3263 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3265 gdb_assert (gdbarch
!= NULL
);
3266 if (gdbarch
->call_dummy_address
== 0)
3267 internal_error (__FILE__
, __LINE__
,
3268 "gdbarch: gdbarch_call_dummy_address invalid");
3269 if (gdbarch_debug
>= 2)
3270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3271 return gdbarch
->call_dummy_address ();
3275 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3276 gdbarch_call_dummy_address_ftype call_dummy_address
)
3278 gdbarch
->call_dummy_address
= call_dummy_address
;
3282 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3284 gdb_assert (gdbarch
!= NULL
);
3285 if (gdbarch
->call_dummy_start_offset
== -1)
3286 internal_error (__FILE__
, __LINE__
,
3287 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3288 if (gdbarch_debug
>= 2)
3289 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3290 return gdbarch
->call_dummy_start_offset
;
3294 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3295 CORE_ADDR call_dummy_start_offset
)
3297 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3301 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3303 gdb_assert (gdbarch
!= NULL
);
3304 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3305 internal_error (__FILE__
, __LINE__
,
3306 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3307 if (gdbarch_debug
>= 2)
3308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3309 return gdbarch
->call_dummy_breakpoint_offset
;
3313 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3314 CORE_ADDR call_dummy_breakpoint_offset
)
3316 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3320 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3322 gdb_assert (gdbarch
!= NULL
);
3323 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3324 internal_error (__FILE__
, __LINE__
,
3325 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3326 if (gdbarch_debug
>= 2)
3327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3328 return gdbarch
->call_dummy_breakpoint_offset_p
;
3332 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3333 int call_dummy_breakpoint_offset_p
)
3335 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3339 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3341 gdb_assert (gdbarch
!= NULL
);
3342 if (gdbarch
->call_dummy_length
== -1)
3343 internal_error (__FILE__
, __LINE__
,
3344 "gdbarch: gdbarch_call_dummy_length invalid");
3345 if (gdbarch_debug
>= 2)
3346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3347 return gdbarch
->call_dummy_length
;
3351 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3352 int call_dummy_length
)
3354 gdbarch
->call_dummy_length
= call_dummy_length
;
3358 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3360 gdb_assert (gdbarch
!= NULL
);
3361 if (gdbarch
->pc_in_call_dummy
== 0)
3362 internal_error (__FILE__
, __LINE__
,
3363 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3364 if (gdbarch_debug
>= 2)
3365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3366 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3370 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3371 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3373 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3377 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3379 gdb_assert (gdbarch
!= NULL
);
3380 if (gdbarch
->call_dummy_p
== -1)
3381 internal_error (__FILE__
, __LINE__
,
3382 "gdbarch: gdbarch_call_dummy_p invalid");
3383 if (gdbarch_debug
>= 2)
3384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3385 return gdbarch
->call_dummy_p
;
3389 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3392 gdbarch
->call_dummy_p
= call_dummy_p
;
3396 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3398 gdb_assert (gdbarch
!= NULL
);
3399 /* Skip verify of call_dummy_words, invalid_p == 0 */
3400 if (gdbarch_debug
>= 2)
3401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3402 return gdbarch
->call_dummy_words
;
3406 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3407 LONGEST
* call_dummy_words
)
3409 gdbarch
->call_dummy_words
= call_dummy_words
;
3413 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3415 gdb_assert (gdbarch
!= NULL
);
3416 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3417 if (gdbarch_debug
>= 2)
3418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3419 return gdbarch
->sizeof_call_dummy_words
;
3423 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3424 int sizeof_call_dummy_words
)
3426 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3430 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3432 gdb_assert (gdbarch
!= NULL
);
3433 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3434 internal_error (__FILE__
, __LINE__
,
3435 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3436 if (gdbarch_debug
>= 2)
3437 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3438 return gdbarch
->call_dummy_stack_adjust_p
;
3442 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3443 int call_dummy_stack_adjust_p
)
3445 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3449 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3451 gdb_assert (gdbarch
!= NULL
);
3452 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3453 internal_error (__FILE__
, __LINE__
,
3454 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3455 if (gdbarch_debug
>= 2)
3456 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3457 return gdbarch
->call_dummy_stack_adjust
;
3461 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3462 int call_dummy_stack_adjust
)
3464 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3468 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
)
3470 gdb_assert (gdbarch
!= NULL
);
3471 if (gdbarch
->fix_call_dummy
== 0)
3472 internal_error (__FILE__
, __LINE__
,
3473 "gdbarch: gdbarch_fix_call_dummy invalid");
3474 if (gdbarch_debug
>= 2)
3475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3476 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3480 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3481 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3483 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3487 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3489 gdb_assert (gdbarch
!= NULL
);
3490 if (gdbarch
->init_frame_pc_first
== 0)
3491 internal_error (__FILE__
, __LINE__
,
3492 "gdbarch: gdbarch_init_frame_pc_first invalid");
3493 if (gdbarch_debug
>= 2)
3494 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3495 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3499 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3500 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3502 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3506 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3508 gdb_assert (gdbarch
!= NULL
);
3509 if (gdbarch
->init_frame_pc
== 0)
3510 internal_error (__FILE__
, __LINE__
,
3511 "gdbarch: gdbarch_init_frame_pc invalid");
3512 if (gdbarch_debug
>= 2)
3513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3514 gdbarch
->init_frame_pc (fromleaf
, prev
);
3518 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3519 gdbarch_init_frame_pc_ftype init_frame_pc
)
3521 gdbarch
->init_frame_pc
= init_frame_pc
;
3525 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3527 gdb_assert (gdbarch
!= NULL
);
3528 if (gdbarch_debug
>= 2)
3529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3530 return gdbarch
->believe_pcc_promotion
;
3534 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3535 int believe_pcc_promotion
)
3537 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3541 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3543 gdb_assert (gdbarch
!= NULL
);
3544 if (gdbarch_debug
>= 2)
3545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3546 return gdbarch
->believe_pcc_promotion_type
;
3550 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3551 int believe_pcc_promotion_type
)
3553 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3557 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3559 gdb_assert (gdbarch
!= NULL
);
3560 if (gdbarch
->coerce_float_to_double
== 0)
3561 internal_error (__FILE__
, __LINE__
,
3562 "gdbarch: gdbarch_coerce_float_to_double invalid");
3563 if (gdbarch_debug
>= 2)
3564 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3565 return gdbarch
->coerce_float_to_double (formal
, actual
);
3569 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3570 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3572 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3576 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
)
3578 gdb_assert (gdbarch
!= NULL
);
3579 if (gdbarch
->get_saved_register
== 0)
3580 internal_error (__FILE__
, __LINE__
,
3581 "gdbarch: gdbarch_get_saved_register invalid");
3582 if (gdbarch_debug
>= 2)
3583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3584 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3588 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3589 gdbarch_get_saved_register_ftype get_saved_register
)
3591 gdbarch
->get_saved_register
= get_saved_register
;
3595 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3597 gdb_assert (gdbarch
!= NULL
);
3598 if (gdbarch
->register_convertible
== 0)
3599 internal_error (__FILE__
, __LINE__
,
3600 "gdbarch: gdbarch_register_convertible invalid");
3601 if (gdbarch_debug
>= 2)
3602 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3603 return gdbarch
->register_convertible (nr
);
3607 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3608 gdbarch_register_convertible_ftype register_convertible
)
3610 gdbarch
->register_convertible
= register_convertible
;
3614 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3616 gdb_assert (gdbarch
!= NULL
);
3617 if (gdbarch
->register_convert_to_virtual
== 0)
3618 internal_error (__FILE__
, __LINE__
,
3619 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3620 if (gdbarch_debug
>= 2)
3621 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3622 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3626 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3627 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3629 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3633 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3635 gdb_assert (gdbarch
!= NULL
);
3636 if (gdbarch
->register_convert_to_raw
== 0)
3637 internal_error (__FILE__
, __LINE__
,
3638 "gdbarch: gdbarch_register_convert_to_raw invalid");
3639 if (gdbarch_debug
>= 2)
3640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3641 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3645 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3646 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3648 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3652 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3654 gdb_assert (gdbarch
!= NULL
);
3655 if (gdbarch
->convert_register_p
== 0)
3656 internal_error (__FILE__
, __LINE__
,
3657 "gdbarch: gdbarch_convert_register_p invalid");
3658 if (gdbarch_debug
>= 2)
3659 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3660 return gdbarch
->convert_register_p (regnum
);
3664 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3665 gdbarch_convert_register_p_ftype convert_register_p
)
3667 gdbarch
->convert_register_p
= convert_register_p
;
3671 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3673 gdb_assert (gdbarch
!= NULL
);
3674 if (gdbarch
->register_to_value
== 0)
3675 internal_error (__FILE__
, __LINE__
,
3676 "gdbarch: gdbarch_register_to_value invalid");
3677 if (gdbarch_debug
>= 2)
3678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3679 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3683 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3684 gdbarch_register_to_value_ftype register_to_value
)
3686 gdbarch
->register_to_value
= register_to_value
;
3690 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3692 gdb_assert (gdbarch
!= NULL
);
3693 if (gdbarch
->value_to_register
== 0)
3694 internal_error (__FILE__
, __LINE__
,
3695 "gdbarch: gdbarch_value_to_register invalid");
3696 if (gdbarch_debug
>= 2)
3697 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3698 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3702 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3703 gdbarch_value_to_register_ftype value_to_register
)
3705 gdbarch
->value_to_register
= value_to_register
;
3709 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3711 gdb_assert (gdbarch
!= NULL
);
3712 if (gdbarch
->pointer_to_address
== 0)
3713 internal_error (__FILE__
, __LINE__
,
3714 "gdbarch: gdbarch_pointer_to_address invalid");
3715 if (gdbarch_debug
>= 2)
3716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3717 return gdbarch
->pointer_to_address (type
, buf
);
3721 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3722 gdbarch_pointer_to_address_ftype pointer_to_address
)
3724 gdbarch
->pointer_to_address
= pointer_to_address
;
3728 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3730 gdb_assert (gdbarch
!= NULL
);
3731 if (gdbarch
->address_to_pointer
== 0)
3732 internal_error (__FILE__
, __LINE__
,
3733 "gdbarch: gdbarch_address_to_pointer invalid");
3734 if (gdbarch_debug
>= 2)
3735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3736 gdbarch
->address_to_pointer (type
, buf
, addr
);
3740 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3741 gdbarch_address_to_pointer_ftype address_to_pointer
)
3743 gdbarch
->address_to_pointer
= address_to_pointer
;
3747 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3749 gdb_assert (gdbarch
!= NULL
);
3750 return gdbarch
->integer_to_address
!= 0;
3754 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3756 gdb_assert (gdbarch
!= NULL
);
3757 if (gdbarch
->integer_to_address
== 0)
3758 internal_error (__FILE__
, __LINE__
,
3759 "gdbarch: gdbarch_integer_to_address invalid");
3760 if (gdbarch_debug
>= 2)
3761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3762 return gdbarch
->integer_to_address (type
, buf
);
3766 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3767 gdbarch_integer_to_address_ftype integer_to_address
)
3769 gdbarch
->integer_to_address
= integer_to_address
;
3773 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3775 gdb_assert (gdbarch
!= NULL
);
3776 if (gdbarch
->return_value_on_stack
== 0)
3777 internal_error (__FILE__
, __LINE__
,
3778 "gdbarch: gdbarch_return_value_on_stack invalid");
3779 if (gdbarch_debug
>= 2)
3780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3781 return gdbarch
->return_value_on_stack (type
);
3785 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3786 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3788 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3792 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3794 gdb_assert (gdbarch
!= NULL
);
3795 if (gdbarch
->push_arguments
== 0)
3796 internal_error (__FILE__
, __LINE__
,
3797 "gdbarch: gdbarch_push_arguments invalid");
3798 if (gdbarch_debug
>= 2)
3799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3800 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3804 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3805 gdbarch_push_arguments_ftype push_arguments
)
3807 gdbarch
->push_arguments
= push_arguments
;
3811 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3813 gdb_assert (gdbarch
!= NULL
);
3814 if (gdbarch
->push_dummy_frame
== 0)
3815 internal_error (__FILE__
, __LINE__
,
3816 "gdbarch: gdbarch_push_dummy_frame invalid");
3817 if (gdbarch_debug
>= 2)
3818 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3819 gdbarch
->push_dummy_frame ();
3823 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3824 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3826 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3830 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3832 gdb_assert (gdbarch
!= NULL
);
3833 return gdbarch
->push_return_address
!= 0;
3837 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3839 gdb_assert (gdbarch
!= NULL
);
3840 if (gdbarch
->push_return_address
== 0)
3841 internal_error (__FILE__
, __LINE__
,
3842 "gdbarch: gdbarch_push_return_address invalid");
3843 if (gdbarch_debug
>= 2)
3844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3845 return gdbarch
->push_return_address (pc
, sp
);
3849 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3850 gdbarch_push_return_address_ftype push_return_address
)
3852 gdbarch
->push_return_address
= push_return_address
;
3856 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3858 gdb_assert (gdbarch
!= NULL
);
3859 if (gdbarch
->pop_frame
== 0)
3860 internal_error (__FILE__
, __LINE__
,
3861 "gdbarch: gdbarch_pop_frame invalid");
3862 if (gdbarch_debug
>= 2)
3863 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3864 gdbarch
->pop_frame ();
3868 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3869 gdbarch_pop_frame_ftype pop_frame
)
3871 gdbarch
->pop_frame
= pop_frame
;
3875 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3877 gdb_assert (gdbarch
!= NULL
);
3878 if (gdbarch
->store_struct_return
== 0)
3879 internal_error (__FILE__
, __LINE__
,
3880 "gdbarch: gdbarch_store_struct_return invalid");
3881 if (gdbarch_debug
>= 2)
3882 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3883 gdbarch
->store_struct_return (addr
, sp
);
3887 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3888 gdbarch_store_struct_return_ftype store_struct_return
)
3890 gdbarch
->store_struct_return
= store_struct_return
;
3894 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
3896 gdb_assert (gdbarch
!= NULL
);
3897 if (gdbarch
->extract_return_value
== 0)
3898 internal_error (__FILE__
, __LINE__
,
3899 "gdbarch: gdbarch_extract_return_value invalid");
3900 if (gdbarch_debug
>= 2)
3901 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3902 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3906 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3907 gdbarch_extract_return_value_ftype extract_return_value
)
3909 gdbarch
->extract_return_value
= extract_return_value
;
3913 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
3915 gdb_assert (gdbarch
!= NULL
);
3916 if (gdbarch
->store_return_value
== 0)
3917 internal_error (__FILE__
, __LINE__
,
3918 "gdbarch: gdbarch_store_return_value invalid");
3919 if (gdbarch_debug
>= 2)
3920 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3921 gdbarch
->store_return_value (type
, regcache
, valbuf
);
3925 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3926 gdbarch_store_return_value_ftype store_return_value
)
3928 gdbarch
->store_return_value
= store_return_value
;
3932 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3934 gdb_assert (gdbarch
!= NULL
);
3935 if (gdbarch
->deprecated_extract_return_value
== 0)
3936 internal_error (__FILE__
, __LINE__
,
3937 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
3938 if (gdbarch_debug
>= 2)
3939 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3940 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
3944 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
3945 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
3947 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
3951 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3953 gdb_assert (gdbarch
!= NULL
);
3954 if (gdbarch
->deprecated_store_return_value
== 0)
3955 internal_error (__FILE__
, __LINE__
,
3956 "gdbarch: gdbarch_deprecated_store_return_value invalid");
3957 if (gdbarch_debug
>= 2)
3958 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
3959 gdbarch
->deprecated_store_return_value (type
, valbuf
);
3963 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
3964 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
3966 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
3970 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3972 gdb_assert (gdbarch
!= NULL
);
3973 return gdbarch
->extract_struct_value_address
!= 0;
3977 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3979 gdb_assert (gdbarch
!= NULL
);
3980 if (gdbarch
->extract_struct_value_address
== 0)
3981 internal_error (__FILE__
, __LINE__
,
3982 "gdbarch: gdbarch_extract_struct_value_address invalid");
3983 if (gdbarch_debug
>= 2)
3984 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3985 return gdbarch
->extract_struct_value_address (regcache
);
3989 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3990 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3992 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3996 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3998 gdb_assert (gdbarch
!= NULL
);
3999 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4003 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4005 gdb_assert (gdbarch
!= NULL
);
4006 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4007 internal_error (__FILE__
, __LINE__
,
4008 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4009 if (gdbarch_debug
>= 2)
4010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4011 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4015 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4016 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4018 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4022 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4024 gdb_assert (gdbarch
!= NULL
);
4025 if (gdbarch
->use_struct_convention
== 0)
4026 internal_error (__FILE__
, __LINE__
,
4027 "gdbarch: gdbarch_use_struct_convention invalid");
4028 if (gdbarch_debug
>= 2)
4029 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4030 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4034 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4035 gdbarch_use_struct_convention_ftype use_struct_convention
)
4037 gdbarch
->use_struct_convention
= use_struct_convention
;
4041 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4043 gdb_assert (gdbarch
!= NULL
);
4044 if (gdbarch
->frame_init_saved_regs
== 0)
4045 internal_error (__FILE__
, __LINE__
,
4046 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4047 if (gdbarch_debug
>= 2)
4048 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
4049 gdbarch
->frame_init_saved_regs (frame
);
4053 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4054 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
4056 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
4060 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4062 gdb_assert (gdbarch
!= NULL
);
4063 return gdbarch
->init_extra_frame_info
!= 0;
4067 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4069 gdb_assert (gdbarch
!= NULL
);
4070 if (gdbarch
->init_extra_frame_info
== 0)
4071 internal_error (__FILE__
, __LINE__
,
4072 "gdbarch: gdbarch_init_extra_frame_info invalid");
4073 if (gdbarch_debug
>= 2)
4074 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
4075 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4079 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4080 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4082 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4086 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4088 gdb_assert (gdbarch
!= NULL
);
4089 if (gdbarch
->skip_prologue
== 0)
4090 internal_error (__FILE__
, __LINE__
,
4091 "gdbarch: gdbarch_skip_prologue invalid");
4092 if (gdbarch_debug
>= 2)
4093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4094 return gdbarch
->skip_prologue (ip
);
4098 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4099 gdbarch_skip_prologue_ftype skip_prologue
)
4101 gdbarch
->skip_prologue
= skip_prologue
;
4105 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4107 gdb_assert (gdbarch
!= NULL
);
4108 if (gdbarch
->prologue_frameless_p
== 0)
4109 internal_error (__FILE__
, __LINE__
,
4110 "gdbarch: gdbarch_prologue_frameless_p invalid");
4111 if (gdbarch_debug
>= 2)
4112 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4113 return gdbarch
->prologue_frameless_p (ip
);
4117 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4118 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4120 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4124 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4126 gdb_assert (gdbarch
!= NULL
);
4127 if (gdbarch
->inner_than
== 0)
4128 internal_error (__FILE__
, __LINE__
,
4129 "gdbarch: gdbarch_inner_than invalid");
4130 if (gdbarch_debug
>= 2)
4131 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4132 return gdbarch
->inner_than (lhs
, rhs
);
4136 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4137 gdbarch_inner_than_ftype inner_than
)
4139 gdbarch
->inner_than
= inner_than
;
4142 const unsigned char *
4143 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4145 gdb_assert (gdbarch
!= NULL
);
4146 if (gdbarch
->breakpoint_from_pc
== 0)
4147 internal_error (__FILE__
, __LINE__
,
4148 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4149 if (gdbarch_debug
>= 2)
4150 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4151 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4155 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4156 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4158 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4162 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4164 gdb_assert (gdbarch
!= NULL
);
4165 if (gdbarch
->memory_insert_breakpoint
== 0)
4166 internal_error (__FILE__
, __LINE__
,
4167 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4168 if (gdbarch_debug
>= 2)
4169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4170 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4174 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4175 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4177 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4181 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4183 gdb_assert (gdbarch
!= NULL
);
4184 if (gdbarch
->memory_remove_breakpoint
== 0)
4185 internal_error (__FILE__
, __LINE__
,
4186 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4187 if (gdbarch_debug
>= 2)
4188 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4189 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4193 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4194 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4196 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4200 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4202 gdb_assert (gdbarch
!= NULL
);
4203 if (gdbarch
->decr_pc_after_break
== -1)
4204 internal_error (__FILE__
, __LINE__
,
4205 "gdbarch: gdbarch_decr_pc_after_break invalid");
4206 if (gdbarch_debug
>= 2)
4207 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4208 return gdbarch
->decr_pc_after_break
;
4212 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4213 CORE_ADDR decr_pc_after_break
)
4215 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4219 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4221 gdb_assert (gdbarch
!= NULL
);
4222 if (gdbarch
->prepare_to_proceed
== 0)
4223 internal_error (__FILE__
, __LINE__
,
4224 "gdbarch: gdbarch_prepare_to_proceed invalid");
4225 if (gdbarch_debug
>= 2)
4226 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4227 return gdbarch
->prepare_to_proceed (select_it
);
4231 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4232 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4234 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4238 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4240 gdb_assert (gdbarch
!= NULL
);
4241 if (gdbarch
->function_start_offset
== -1)
4242 internal_error (__FILE__
, __LINE__
,
4243 "gdbarch: gdbarch_function_start_offset invalid");
4244 if (gdbarch_debug
>= 2)
4245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4246 return gdbarch
->function_start_offset
;
4250 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4251 CORE_ADDR function_start_offset
)
4253 gdbarch
->function_start_offset
= function_start_offset
;
4257 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4259 gdb_assert (gdbarch
!= NULL
);
4260 if (gdbarch
->remote_translate_xfer_address
== 0)
4261 internal_error (__FILE__
, __LINE__
,
4262 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4263 if (gdbarch_debug
>= 2)
4264 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4265 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4269 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4270 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4272 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4276 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4278 gdb_assert (gdbarch
!= NULL
);
4279 if (gdbarch
->frame_args_skip
== -1)
4280 internal_error (__FILE__
, __LINE__
,
4281 "gdbarch: gdbarch_frame_args_skip invalid");
4282 if (gdbarch_debug
>= 2)
4283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4284 return gdbarch
->frame_args_skip
;
4288 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4289 CORE_ADDR frame_args_skip
)
4291 gdbarch
->frame_args_skip
= frame_args_skip
;
4295 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4297 gdb_assert (gdbarch
!= NULL
);
4298 if (gdbarch
->frameless_function_invocation
== 0)
4299 internal_error (__FILE__
, __LINE__
,
4300 "gdbarch: gdbarch_frameless_function_invocation invalid");
4301 if (gdbarch_debug
>= 2)
4302 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4303 return gdbarch
->frameless_function_invocation (fi
);
4307 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4308 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4310 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4314 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4316 gdb_assert (gdbarch
!= NULL
);
4317 if (gdbarch
->frame_chain
== 0)
4318 internal_error (__FILE__
, __LINE__
,
4319 "gdbarch: gdbarch_frame_chain invalid");
4320 if (gdbarch_debug
>= 2)
4321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4322 return gdbarch
->frame_chain (frame
);
4326 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4327 gdbarch_frame_chain_ftype frame_chain
)
4329 gdbarch
->frame_chain
= frame_chain
;
4333 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4335 gdb_assert (gdbarch
!= NULL
);
4336 if (gdbarch
->frame_chain_valid
== 0)
4337 internal_error (__FILE__
, __LINE__
,
4338 "gdbarch: gdbarch_frame_chain_valid invalid");
4339 if (gdbarch_debug
>= 2)
4340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4341 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4345 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4346 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4348 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4352 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4354 gdb_assert (gdbarch
!= NULL
);
4355 if (gdbarch
->frame_saved_pc
== 0)
4356 internal_error (__FILE__
, __LINE__
,
4357 "gdbarch: gdbarch_frame_saved_pc invalid");
4358 if (gdbarch_debug
>= 2)
4359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4360 return gdbarch
->frame_saved_pc (fi
);
4364 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4365 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4367 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4371 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4373 gdb_assert (gdbarch
!= NULL
);
4374 if (gdbarch
->frame_args_address
== 0)
4375 internal_error (__FILE__
, __LINE__
,
4376 "gdbarch: gdbarch_frame_args_address invalid");
4377 if (gdbarch_debug
>= 2)
4378 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4379 return gdbarch
->frame_args_address (fi
);
4383 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4384 gdbarch_frame_args_address_ftype frame_args_address
)
4386 gdbarch
->frame_args_address
= frame_args_address
;
4390 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4392 gdb_assert (gdbarch
!= NULL
);
4393 if (gdbarch
->frame_locals_address
== 0)
4394 internal_error (__FILE__
, __LINE__
,
4395 "gdbarch: gdbarch_frame_locals_address invalid");
4396 if (gdbarch_debug
>= 2)
4397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4398 return gdbarch
->frame_locals_address (fi
);
4402 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4403 gdbarch_frame_locals_address_ftype frame_locals_address
)
4405 gdbarch
->frame_locals_address
= frame_locals_address
;
4409 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4411 gdb_assert (gdbarch
!= NULL
);
4412 if (gdbarch
->saved_pc_after_call
== 0)
4413 internal_error (__FILE__
, __LINE__
,
4414 "gdbarch: gdbarch_saved_pc_after_call invalid");
4415 if (gdbarch_debug
>= 2)
4416 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4417 return gdbarch
->saved_pc_after_call (frame
);
4421 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4422 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4424 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4428 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4430 gdb_assert (gdbarch
!= NULL
);
4431 if (gdbarch
->frame_num_args
== 0)
4432 internal_error (__FILE__
, __LINE__
,
4433 "gdbarch: gdbarch_frame_num_args invalid");
4434 if (gdbarch_debug
>= 2)
4435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4436 return gdbarch
->frame_num_args (frame
);
4440 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4441 gdbarch_frame_num_args_ftype frame_num_args
)
4443 gdbarch
->frame_num_args
= frame_num_args
;
4447 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4449 gdb_assert (gdbarch
!= NULL
);
4450 return gdbarch
->stack_align
!= 0;
4454 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4456 gdb_assert (gdbarch
!= NULL
);
4457 if (gdbarch
->stack_align
== 0)
4458 internal_error (__FILE__
, __LINE__
,
4459 "gdbarch: gdbarch_stack_align invalid");
4460 if (gdbarch_debug
>= 2)
4461 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4462 return gdbarch
->stack_align (sp
);
4466 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4467 gdbarch_stack_align_ftype stack_align
)
4469 gdbarch
->stack_align
= stack_align
;
4473 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4475 gdb_assert (gdbarch
!= NULL
);
4476 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4477 if (gdbarch_debug
>= 2)
4478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4479 return gdbarch
->extra_stack_alignment_needed
;
4483 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4484 int extra_stack_alignment_needed
)
4486 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4490 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4492 gdb_assert (gdbarch
!= NULL
);
4493 return gdbarch
->reg_struct_has_addr
!= 0;
4497 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4499 gdb_assert (gdbarch
!= NULL
);
4500 if (gdbarch
->reg_struct_has_addr
== 0)
4501 internal_error (__FILE__
, __LINE__
,
4502 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4503 if (gdbarch_debug
>= 2)
4504 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4505 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4509 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4510 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4512 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4516 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4518 gdb_assert (gdbarch
!= NULL
);
4519 return gdbarch
->save_dummy_frame_tos
!= 0;
4523 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4525 gdb_assert (gdbarch
!= NULL
);
4526 if (gdbarch
->save_dummy_frame_tos
== 0)
4527 internal_error (__FILE__
, __LINE__
,
4528 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4529 if (gdbarch_debug
>= 2)
4530 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4531 gdbarch
->save_dummy_frame_tos (sp
);
4535 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4536 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4538 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4542 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4544 gdb_assert (gdbarch
!= NULL
);
4545 if (gdbarch_debug
>= 2)
4546 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4547 return gdbarch
->parm_boundary
;
4551 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4554 gdbarch
->parm_boundary
= parm_boundary
;
4557 const struct floatformat
*
4558 gdbarch_float_format (struct gdbarch
*gdbarch
)
4560 gdb_assert (gdbarch
!= NULL
);
4561 if (gdbarch_debug
>= 2)
4562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4563 return gdbarch
->float_format
;
4567 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4568 const struct floatformat
* float_format
)
4570 gdbarch
->float_format
= float_format
;
4573 const struct floatformat
*
4574 gdbarch_double_format (struct gdbarch
*gdbarch
)
4576 gdb_assert (gdbarch
!= NULL
);
4577 if (gdbarch_debug
>= 2)
4578 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4579 return gdbarch
->double_format
;
4583 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4584 const struct floatformat
* double_format
)
4586 gdbarch
->double_format
= double_format
;
4589 const struct floatformat
*
4590 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4592 gdb_assert (gdbarch
!= NULL
);
4593 if (gdbarch_debug
>= 2)
4594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4595 return gdbarch
->long_double_format
;
4599 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4600 const struct floatformat
* long_double_format
)
4602 gdbarch
->long_double_format
= long_double_format
;
4606 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4608 gdb_assert (gdbarch
!= NULL
);
4609 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4610 internal_error (__FILE__
, __LINE__
,
4611 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4612 if (gdbarch_debug
>= 2)
4613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4614 return gdbarch
->convert_from_func_ptr_addr (addr
);
4618 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4619 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4621 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4625 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4627 gdb_assert (gdbarch
!= NULL
);
4628 if (gdbarch
->addr_bits_remove
== 0)
4629 internal_error (__FILE__
, __LINE__
,
4630 "gdbarch: gdbarch_addr_bits_remove invalid");
4631 if (gdbarch_debug
>= 2)
4632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4633 return gdbarch
->addr_bits_remove (addr
);
4637 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4638 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4640 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4644 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4646 gdb_assert (gdbarch
!= NULL
);
4647 if (gdbarch
->smash_text_address
== 0)
4648 internal_error (__FILE__
, __LINE__
,
4649 "gdbarch: gdbarch_smash_text_address invalid");
4650 if (gdbarch_debug
>= 2)
4651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4652 return gdbarch
->smash_text_address (addr
);
4656 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4657 gdbarch_smash_text_address_ftype smash_text_address
)
4659 gdbarch
->smash_text_address
= smash_text_address
;
4663 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4665 gdb_assert (gdbarch
!= NULL
);
4666 return gdbarch
->software_single_step
!= 0;
4670 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4672 gdb_assert (gdbarch
!= NULL
);
4673 if (gdbarch
->software_single_step
== 0)
4674 internal_error (__FILE__
, __LINE__
,
4675 "gdbarch: gdbarch_software_single_step invalid");
4676 if (gdbarch_debug
>= 2)
4677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4678 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4682 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4683 gdbarch_software_single_step_ftype software_single_step
)
4685 gdbarch
->software_single_step
= software_single_step
;
4689 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4691 gdb_assert (gdbarch
!= NULL
);
4692 if (gdbarch
->print_insn
== 0)
4693 internal_error (__FILE__
, __LINE__
,
4694 "gdbarch: gdbarch_print_insn invalid");
4695 if (gdbarch_debug
>= 2)
4696 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4697 return gdbarch
->print_insn (vma
, info
);
4701 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4702 gdbarch_print_insn_ftype print_insn
)
4704 gdbarch
->print_insn
= print_insn
;
4708 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4710 gdb_assert (gdbarch
!= NULL
);
4711 if (gdbarch
->skip_trampoline_code
== 0)
4712 internal_error (__FILE__
, __LINE__
,
4713 "gdbarch: gdbarch_skip_trampoline_code invalid");
4714 if (gdbarch_debug
>= 2)
4715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4716 return gdbarch
->skip_trampoline_code (pc
);
4720 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4721 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4723 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4727 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4729 gdb_assert (gdbarch
!= NULL
);
4730 if (gdbarch
->in_solib_call_trampoline
== 0)
4731 internal_error (__FILE__
, __LINE__
,
4732 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4733 if (gdbarch_debug
>= 2)
4734 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4735 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4739 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4740 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4742 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4746 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4748 gdb_assert (gdbarch
!= NULL
);
4749 if (gdbarch
->in_solib_return_trampoline
== 0)
4750 internal_error (__FILE__
, __LINE__
,
4751 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
4752 if (gdbarch_debug
>= 2)
4753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
4754 return gdbarch
->in_solib_return_trampoline (pc
, name
);
4758 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
4759 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
4761 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
4765 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4767 gdb_assert (gdbarch
!= NULL
);
4768 if (gdbarch
->pc_in_sigtramp
== 0)
4769 internal_error (__FILE__
, __LINE__
,
4770 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4771 if (gdbarch_debug
>= 2)
4772 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4773 return gdbarch
->pc_in_sigtramp (pc
, name
);
4777 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4778 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4780 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4784 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4786 gdb_assert (gdbarch
!= NULL
);
4787 if (gdbarch
->in_function_epilogue_p
== 0)
4788 internal_error (__FILE__
, __LINE__
,
4789 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4790 if (gdbarch_debug
>= 2)
4791 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4792 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4796 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4797 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4799 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4803 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4805 gdb_assert (gdbarch
!= NULL
);
4806 if (gdbarch
->construct_inferior_arguments
== 0)
4807 internal_error (__FILE__
, __LINE__
,
4808 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4809 if (gdbarch_debug
>= 2)
4810 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4811 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4815 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4816 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4818 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4822 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4824 gdb_assert (gdbarch
!= NULL
);
4825 return gdbarch
->dwarf2_build_frame_info
!= 0;
4829 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4831 gdb_assert (gdbarch
!= NULL
);
4832 if (gdbarch
->dwarf2_build_frame_info
== 0)
4833 internal_error (__FILE__
, __LINE__
,
4834 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4835 if (gdbarch_debug
>= 2)
4836 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4837 gdbarch
->dwarf2_build_frame_info (objfile
);
4841 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4842 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4844 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4848 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4850 gdb_assert (gdbarch
!= NULL
);
4851 if (gdbarch
->elf_make_msymbol_special
== 0)
4852 internal_error (__FILE__
, __LINE__
,
4853 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4854 if (gdbarch_debug
>= 2)
4855 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4856 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4860 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4861 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4863 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4867 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4869 gdb_assert (gdbarch
!= NULL
);
4870 if (gdbarch
->coff_make_msymbol_special
== 0)
4871 internal_error (__FILE__
, __LINE__
,
4872 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4873 if (gdbarch_debug
>= 2)
4874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4875 gdbarch
->coff_make_msymbol_special (val
, msym
);
4879 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4880 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4882 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4886 /* Keep a registry of per-architecture data-pointers required by GDB
4893 gdbarch_data_init_ftype
*init
;
4894 gdbarch_data_free_ftype
*free
;
4897 struct gdbarch_data_registration
4899 struct gdbarch_data
*data
;
4900 struct gdbarch_data_registration
*next
;
4903 struct gdbarch_data_registry
4906 struct gdbarch_data_registration
*registrations
;
4909 struct gdbarch_data_registry gdbarch_data_registry
=
4914 struct gdbarch_data
*
4915 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4916 gdbarch_data_free_ftype
*free
)
4918 struct gdbarch_data_registration
**curr
;
4919 /* Append the new registraration. */
4920 for (curr
= &gdbarch_data_registry
.registrations
;
4922 curr
= &(*curr
)->next
);
4923 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4924 (*curr
)->next
= NULL
;
4925 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4926 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4927 (*curr
)->data
->init
= init
;
4928 (*curr
)->data
->init_p
= 1;
4929 (*curr
)->data
->free
= free
;
4930 return (*curr
)->data
;
4934 /* Create/delete the gdbarch data vector. */
4937 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4939 gdb_assert (gdbarch
->data
== NULL
);
4940 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4941 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4945 free_gdbarch_data (struct gdbarch
*gdbarch
)
4947 struct gdbarch_data_registration
*rego
;
4948 gdb_assert (gdbarch
->data
!= NULL
);
4949 for (rego
= gdbarch_data_registry
.registrations
;
4953 struct gdbarch_data
*data
= rego
->data
;
4954 gdb_assert (data
->index
< gdbarch
->nr_data
);
4955 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4957 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4958 gdbarch
->data
[data
->index
] = NULL
;
4961 xfree (gdbarch
->data
);
4962 gdbarch
->data
= NULL
;
4966 /* Initialize the current value of the specified per-architecture
4970 set_gdbarch_data (struct gdbarch
*gdbarch
,
4971 struct gdbarch_data
*data
,
4974 gdb_assert (data
->index
< gdbarch
->nr_data
);
4975 if (gdbarch
->data
[data
->index
] != NULL
)
4977 gdb_assert (data
->free
!= NULL
);
4978 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4980 gdbarch
->data
[data
->index
] = pointer
;
4983 /* Return the current value of the specified per-architecture
4987 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4989 gdb_assert (data
->index
< gdbarch
->nr_data
);
4990 /* The data-pointer isn't initialized, call init() to get a value but
4991 only if the architecture initializaiton has completed. Otherwise
4992 punt - hope that the caller knows what they are doing. */
4993 if (gdbarch
->data
[data
->index
] == NULL
4994 && gdbarch
->initialized_p
)
4996 /* Be careful to detect an initialization cycle. */
4997 gdb_assert (data
->init_p
);
4999 gdb_assert (data
->init
!= NULL
);
5000 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5002 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5004 return gdbarch
->data
[data
->index
];
5009 /* Keep a registry of swapped data required by GDB modules. */
5014 struct gdbarch_swap_registration
*source
;
5015 struct gdbarch_swap
*next
;
5018 struct gdbarch_swap_registration
5021 unsigned long sizeof_data
;
5022 gdbarch_swap_ftype
*init
;
5023 struct gdbarch_swap_registration
*next
;
5026 struct gdbarch_swap_registry
5029 struct gdbarch_swap_registration
*registrations
;
5032 struct gdbarch_swap_registry gdbarch_swap_registry
=
5038 register_gdbarch_swap (void *data
,
5039 unsigned long sizeof_data
,
5040 gdbarch_swap_ftype
*init
)
5042 struct gdbarch_swap_registration
**rego
;
5043 for (rego
= &gdbarch_swap_registry
.registrations
;
5045 rego
= &(*rego
)->next
);
5046 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5047 (*rego
)->next
= NULL
;
5048 (*rego
)->init
= init
;
5049 (*rego
)->data
= data
;
5050 (*rego
)->sizeof_data
= sizeof_data
;
5054 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5056 struct gdbarch_swap
*curr
;
5057 for (curr
= gdbarch
->swap
;
5061 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5066 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5068 struct gdbarch_swap_registration
*rego
;
5069 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5070 for (rego
= gdbarch_swap_registry
.registrations
;
5074 if (rego
->data
!= NULL
)
5076 (*curr
) = XMALLOC (struct gdbarch_swap
);
5077 (*curr
)->source
= rego
;
5078 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5079 (*curr
)->next
= NULL
;
5080 curr
= &(*curr
)->next
;
5082 if (rego
->init
!= NULL
)
5088 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5090 struct gdbarch_swap
*curr
;
5091 for (curr
= gdbarch
->swap
;
5094 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5098 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5100 struct gdbarch_swap
*curr
;
5101 for (curr
= gdbarch
->swap
;
5104 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5108 /* Keep a registry of the architectures known by GDB. */
5110 struct gdbarch_registration
5112 enum bfd_architecture bfd_architecture
;
5113 gdbarch_init_ftype
*init
;
5114 gdbarch_dump_tdep_ftype
*dump_tdep
;
5115 struct gdbarch_list
*arches
;
5116 struct gdbarch_registration
*next
;
5119 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5122 append_name (const char ***buf
, int *nr
, const char *name
)
5124 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5130 gdbarch_printable_names (void)
5134 /* Accumulate a list of names based on the registed list of
5136 enum bfd_architecture a
;
5138 const char **arches
= NULL
;
5139 struct gdbarch_registration
*rego
;
5140 for (rego
= gdbarch_registry
;
5144 const struct bfd_arch_info
*ap
;
5145 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5147 internal_error (__FILE__
, __LINE__
,
5148 "gdbarch_architecture_names: multi-arch unknown");
5151 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5156 append_name (&arches
, &nr_arches
, NULL
);
5160 /* Just return all the architectures that BFD knows. Assume that
5161 the legacy architecture framework supports them. */
5162 return bfd_arch_list ();
5167 gdbarch_register (enum bfd_architecture bfd_architecture
,
5168 gdbarch_init_ftype
*init
,
5169 gdbarch_dump_tdep_ftype
*dump_tdep
)
5171 struct gdbarch_registration
**curr
;
5172 const struct bfd_arch_info
*bfd_arch_info
;
5173 /* Check that BFD recognizes this architecture */
5174 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5175 if (bfd_arch_info
== NULL
)
5177 internal_error (__FILE__
, __LINE__
,
5178 "gdbarch: Attempt to register unknown architecture (%d)",
5181 /* Check that we haven't seen this architecture before */
5182 for (curr
= &gdbarch_registry
;
5184 curr
= &(*curr
)->next
)
5186 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5187 internal_error (__FILE__
, __LINE__
,
5188 "gdbarch: Duplicate registraration of architecture (%s)",
5189 bfd_arch_info
->printable_name
);
5193 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5194 bfd_arch_info
->printable_name
,
5197 (*curr
) = XMALLOC (struct gdbarch_registration
);
5198 (*curr
)->bfd_architecture
= bfd_architecture
;
5199 (*curr
)->init
= init
;
5200 (*curr
)->dump_tdep
= dump_tdep
;
5201 (*curr
)->arches
= NULL
;
5202 (*curr
)->next
= NULL
;
5203 /* When non- multi-arch, install whatever target dump routine we've
5204 been provided - hopefully that routine has been written correctly
5205 and works regardless of multi-arch. */
5206 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5207 && startup_gdbarch
.dump_tdep
== NULL
)
5208 startup_gdbarch
.dump_tdep
= dump_tdep
;
5212 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5213 gdbarch_init_ftype
*init
)
5215 gdbarch_register (bfd_architecture
, init
, NULL
);
5219 /* Look for an architecture using gdbarch_info. Base search on only
5220 BFD_ARCH_INFO and BYTE_ORDER. */
5222 struct gdbarch_list
*
5223 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5224 const struct gdbarch_info
*info
)
5226 for (; arches
!= NULL
; arches
= arches
->next
)
5228 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5230 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5238 /* Update the current architecture. Return ZERO if the update request
5242 gdbarch_update_p (struct gdbarch_info info
)
5244 struct gdbarch
*new_gdbarch
;
5245 struct gdbarch
*old_gdbarch
;
5246 struct gdbarch_registration
*rego
;
5248 /* Fill in missing parts of the INFO struct using a number of
5249 sources: ``set ...''; INFOabfd supplied; existing target. */
5251 /* ``(gdb) set architecture ...'' */
5252 if (info
.bfd_arch_info
== NULL
5253 && !TARGET_ARCHITECTURE_AUTO
)
5254 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5255 if (info
.bfd_arch_info
== NULL
5256 && info
.abfd
!= NULL
5257 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5258 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5259 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5260 if (info
.bfd_arch_info
== NULL
)
5261 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5263 /* ``(gdb) set byte-order ...'' */
5264 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5265 && !TARGET_BYTE_ORDER_AUTO
)
5266 info
.byte_order
= TARGET_BYTE_ORDER
;
5267 /* From the INFO struct. */
5268 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5269 && info
.abfd
!= NULL
)
5270 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5271 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5272 : BFD_ENDIAN_UNKNOWN
);
5273 /* From the current target. */
5274 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5275 info
.byte_order
= TARGET_BYTE_ORDER
;
5277 /* Must have found some sort of architecture. */
5278 gdb_assert (info
.bfd_arch_info
!= NULL
);
5282 fprintf_unfiltered (gdb_stdlog
,
5283 "gdbarch_update: info.bfd_arch_info %s\n",
5284 (info
.bfd_arch_info
!= NULL
5285 ? info
.bfd_arch_info
->printable_name
5287 fprintf_unfiltered (gdb_stdlog
,
5288 "gdbarch_update: info.byte_order %d (%s)\n",
5290 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5291 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5293 fprintf_unfiltered (gdb_stdlog
,
5294 "gdbarch_update: info.abfd 0x%lx\n",
5296 fprintf_unfiltered (gdb_stdlog
,
5297 "gdbarch_update: info.tdep_info 0x%lx\n",
5298 (long) info
.tdep_info
);
5301 /* Find the target that knows about this architecture. */
5302 for (rego
= gdbarch_registry
;
5305 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5314 /* Swap the data belonging to the old target out setting the
5315 installed data to zero. This stops the ->init() function trying
5316 to refer to the previous architecture's global data structures. */
5317 swapout_gdbarch_swap (current_gdbarch
);
5318 clear_gdbarch_swap (current_gdbarch
);
5320 /* Save the previously selected architecture, setting the global to
5321 NULL. This stops ->init() trying to use the previous
5322 architecture's configuration. The previous architecture may not
5323 even be of the same architecture family. The most recent
5324 architecture of the same family is found at the head of the
5325 rego->arches list. */
5326 old_gdbarch
= current_gdbarch
;
5327 current_gdbarch
= NULL
;
5329 /* Ask the target for a replacement architecture. */
5330 new_gdbarch
= rego
->init (info
, rego
->arches
);
5332 /* Did the target like it? No. Reject the change and revert to the
5333 old architecture. */
5334 if (new_gdbarch
== NULL
)
5337 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5338 swapin_gdbarch_swap (old_gdbarch
);
5339 current_gdbarch
= old_gdbarch
;
5343 /* Did the architecture change? No. Oops, put the old architecture
5345 if (old_gdbarch
== new_gdbarch
)
5348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5350 new_gdbarch
->bfd_arch_info
->printable_name
);
5351 swapin_gdbarch_swap (old_gdbarch
);
5352 current_gdbarch
= old_gdbarch
;
5356 /* Is this a pre-existing architecture? Yes. Move it to the front
5357 of the list of architectures (keeping the list sorted Most
5358 Recently Used) and then copy it in. */
5360 struct gdbarch_list
**list
;
5361 for (list
= ®o
->arches
;
5363 list
= &(*list
)->next
)
5365 if ((*list
)->gdbarch
== new_gdbarch
)
5367 struct gdbarch_list
*this;
5369 fprintf_unfiltered (gdb_stdlog
,
5370 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5372 new_gdbarch
->bfd_arch_info
->printable_name
);
5375 (*list
) = this->next
;
5376 /* Insert in the front. */
5377 this->next
= rego
->arches
;
5378 rego
->arches
= this;
5379 /* Copy the new architecture in. */
5380 current_gdbarch
= new_gdbarch
;
5381 swapin_gdbarch_swap (new_gdbarch
);
5382 architecture_changed_event ();
5388 /* Prepend this new architecture to the architecture list (keep the
5389 list sorted Most Recently Used). */
5391 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5392 this->next
= rego
->arches
;
5393 this->gdbarch
= new_gdbarch
;
5394 rego
->arches
= this;
5397 /* Switch to this new architecture marking it initialized. */
5398 current_gdbarch
= new_gdbarch
;
5399 current_gdbarch
->initialized_p
= 1;
5402 fprintf_unfiltered (gdb_stdlog
,
5403 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5405 new_gdbarch
->bfd_arch_info
->printable_name
);
5408 /* Check that the newly installed architecture is valid. Plug in
5409 any post init values. */
5410 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5411 verify_gdbarch (new_gdbarch
);
5413 /* Initialize the per-architecture memory (swap) areas.
5414 CURRENT_GDBARCH must be update before these modules are
5416 init_gdbarch_swap (new_gdbarch
);
5418 /* Initialize the per-architecture data. CURRENT_GDBARCH
5419 must be updated before these modules are called. */
5420 architecture_changed_event ();
5423 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5431 /* Pointer to the target-dependent disassembly function. */
5432 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5433 disassemble_info tm_print_insn_info
;
5436 extern void _initialize_gdbarch (void);
5439 _initialize_gdbarch (void)
5441 struct cmd_list_element
*c
;
5443 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5444 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5445 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5446 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5447 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5449 add_show_from_set (add_set_cmd ("arch",
5452 (char *)&gdbarch_debug
,
5453 "Set architecture debugging.\n\
5454 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5456 c
= add_set_cmd ("archdebug",
5459 (char *)&gdbarch_debug
,
5460 "Set architecture debugging.\n\
5461 When non-zero, architecture debugging is enabled.", &setlist
);
5463 deprecate_cmd (c
, "set debug arch");
5464 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");