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_sigtramp_start_ftype
*sigtramp_start
;
264 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
265 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
266 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
267 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
268 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
269 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
270 const char * name_of_malloc
;
274 /* The default architecture uses host values (for want of a better
277 extern const struct bfd_arch_info bfd_default_arch_struct
;
279 struct gdbarch startup_gdbarch
=
281 1, /* Always initialized. */
282 /* basic architecture information */
283 &bfd_default_arch_struct
,
285 /* target specific vector and its dump routine */
287 /*per-architecture data-pointers and swap regions */
289 /* Multi-arch values */
293 8 * sizeof (LONGEST
),
296 8 * sizeof (long double),
325 generic_register_byte
,
326 generic_register_size
,
328 generic_register_size
,
332 default_print_registers_info
,
422 generic_in_function_epilogue_p
,
423 construct_inferior_arguments
,
428 /* startup_gdbarch() */
431 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
433 /* Do any initialization needed for a non-multiarch configuration
434 after the _initialize_MODULE functions have been run. */
436 initialize_non_multiarch (void)
438 alloc_gdbarch_data (&startup_gdbarch
);
439 /* Ensure that all swap areas are zeroed so that they again think
440 they are starting from scratch. */
441 clear_gdbarch_swap (&startup_gdbarch
);
442 init_gdbarch_swap (&startup_gdbarch
);
446 /* Create a new ``struct gdbarch'' based on information provided by
447 ``struct gdbarch_info''. */
450 gdbarch_alloc (const struct gdbarch_info
*info
,
451 struct gdbarch_tdep
*tdep
)
453 /* NOTE: The new architecture variable is named ``current_gdbarch''
454 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
455 the current local architecture and not the previous global
456 architecture. This ensures that the new architectures initial
457 values are not influenced by the previous architecture. Once
458 everything is parameterised with gdbarch, this will go away. */
459 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
460 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
462 alloc_gdbarch_data (current_gdbarch
);
464 current_gdbarch
->tdep
= tdep
;
466 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
467 current_gdbarch
->byte_order
= info
->byte_order
;
469 /* Force the explicit initialization of these. */
470 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
471 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
472 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
473 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
474 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
475 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
476 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
477 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
478 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
479 current_gdbarch
->char_signed
= -1;
480 current_gdbarch
->read_pc
= generic_target_read_pc
;
481 current_gdbarch
->write_pc
= generic_target_write_pc
;
482 current_gdbarch
->read_fp
= generic_target_read_fp
;
483 current_gdbarch
->read_sp
= generic_target_read_sp
;
484 current_gdbarch
->write_sp
= generic_target_write_sp
;
485 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
486 current_gdbarch
->num_regs
= -1;
487 current_gdbarch
->sp_regnum
= -1;
488 current_gdbarch
->fp_regnum
= -1;
489 current_gdbarch
->pc_regnum
= -1;
490 current_gdbarch
->ps_regnum
= -1;
491 current_gdbarch
->fp0_regnum
= -1;
492 current_gdbarch
->npc_regnum
= -1;
493 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
494 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
495 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
496 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
497 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
498 current_gdbarch
->register_name
= legacy_register_name
;
499 current_gdbarch
->register_size
= -1;
500 current_gdbarch
->register_bytes
= -1;
501 current_gdbarch
->register_byte
= generic_register_byte
;
502 current_gdbarch
->register_raw_size
= generic_register_size
;
503 current_gdbarch
->max_register_raw_size
= -1;
504 current_gdbarch
->register_virtual_size
= generic_register_size
;
505 current_gdbarch
->max_register_virtual_size
= -1;
506 current_gdbarch
->print_registers_info
= default_print_registers_info
;
507 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
508 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
509 current_gdbarch
->cannot_store_register
= cannot_register_not
;
510 current_gdbarch
->use_generic_dummy_frames
= -1;
511 current_gdbarch
->call_dummy_start_offset
= -1;
512 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
513 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
514 current_gdbarch
->call_dummy_length
= -1;
515 current_gdbarch
->call_dummy_p
= -1;
516 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
517 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
518 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
519 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
520 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
521 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
522 current_gdbarch
->get_saved_register
= generic_unwind_get_saved_register
;
523 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
524 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
525 current_gdbarch
->register_to_value
= legacy_register_to_value
;
526 current_gdbarch
->value_to_register
= legacy_value_to_register
;
527 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
528 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
529 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
530 current_gdbarch
->push_arguments
= default_push_arguments
;
531 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
532 current_gdbarch
->store_return_value
= legacy_store_return_value
;
533 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
534 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
535 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
536 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
537 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
538 current_gdbarch
->decr_pc_after_break
= -1;
539 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
540 current_gdbarch
->function_start_offset
= -1;
541 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
542 current_gdbarch
->frame_args_skip
= -1;
543 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
544 current_gdbarch
->frame_chain_valid
= generic_func_frame_chain_valid
;
545 current_gdbarch
->extra_stack_alignment_needed
= 1;
546 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
547 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
548 current_gdbarch
->smash_text_address
= core_addr_identity
;
549 current_gdbarch
->print_insn
= legacy_print_insn
;
550 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
551 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
552 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
553 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
554 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
555 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
556 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
557 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
558 current_gdbarch
->name_of_malloc
= "malloc";
559 /* gdbarch_alloc() */
561 return current_gdbarch
;
565 /* Free a gdbarch struct. This should never happen in normal
566 operation --- once you've created a gdbarch, you keep it around.
567 However, if an architecture's init function encounters an error
568 building the structure, it may need to clean up a partially
569 constructed gdbarch. */
572 gdbarch_free (struct gdbarch
*arch
)
574 gdb_assert (arch
!= NULL
);
575 free_gdbarch_data (arch
);
580 /* Ensure that all values in a GDBARCH are reasonable. */
583 verify_gdbarch (struct gdbarch
*gdbarch
)
586 struct cleanup
*cleanups
;
589 /* Only perform sanity checks on a multi-arch target. */
592 log
= mem_fileopen ();
593 cleanups
= make_cleanup_ui_file_delete (log
);
595 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
596 fprintf_unfiltered (log
, "\n\tbyte-order");
597 if (gdbarch
->bfd_arch_info
== NULL
)
598 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
599 /* Check those that need to be defined for the given multi-arch level. */
600 /* Skip verify of short_bit, invalid_p == 0 */
601 /* Skip verify of int_bit, invalid_p == 0 */
602 /* Skip verify of long_bit, invalid_p == 0 */
603 /* Skip verify of long_long_bit, invalid_p == 0 */
604 /* Skip verify of float_bit, invalid_p == 0 */
605 /* Skip verify of double_bit, invalid_p == 0 */
606 /* Skip verify of long_double_bit, invalid_p == 0 */
607 /* Skip verify of ptr_bit, invalid_p == 0 */
608 if (gdbarch
->addr_bit
== 0)
609 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
610 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
611 if (gdbarch
->char_signed
== -1)
612 gdbarch
->char_signed
= 1;
613 /* Skip verify of read_pc, invalid_p == 0 */
614 /* Skip verify of write_pc, invalid_p == 0 */
615 /* Skip verify of read_fp, invalid_p == 0 */
616 /* Skip verify of read_sp, invalid_p == 0 */
617 /* Skip verify of write_sp, invalid_p == 0 */
618 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
619 /* Skip verify of pseudo_register_read, has predicate */
620 /* Skip verify of pseudo_register_write, has predicate */
621 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
622 && (gdbarch
->num_regs
== -1))
623 fprintf_unfiltered (log
, "\n\tnum_regs");
624 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
625 /* Skip verify of sp_regnum, invalid_p == 0 */
626 /* Skip verify of fp_regnum, invalid_p == 0 */
627 /* Skip verify of pc_regnum, invalid_p == 0 */
628 /* Skip verify of ps_regnum, invalid_p == 0 */
629 /* Skip verify of fp0_regnum, invalid_p == 0 */
630 /* Skip verify of npc_regnum, invalid_p == 0 */
631 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
632 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
633 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
634 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
635 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
636 /* Skip verify of register_name, invalid_p == 0 */
637 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
638 && (gdbarch
->register_size
== -1))
639 fprintf_unfiltered (log
, "\n\tregister_size");
640 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
641 && (gdbarch
->register_bytes
== -1))
642 fprintf_unfiltered (log
, "\n\tregister_bytes");
643 /* Skip verify of register_byte, invalid_p == 0 */
644 /* Skip verify of register_raw_size, invalid_p == 0 */
645 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
646 && (gdbarch
->max_register_raw_size
== -1))
647 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
648 /* Skip verify of register_virtual_size, invalid_p == 0 */
649 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
650 && (gdbarch
->max_register_virtual_size
== -1))
651 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
652 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
653 && (gdbarch
->register_virtual_type
== 0))
654 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
655 /* Skip verify of do_registers_info, has predicate */
656 /* Skip verify of print_registers_info, invalid_p == 0 */
657 /* Skip verify of print_float_info, has predicate */
658 /* Skip verify of print_vector_info, has predicate */
659 /* Skip verify of register_sim_regno, invalid_p == 0 */
660 /* Skip verify of register_bytes_ok, has predicate */
661 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
662 /* Skip verify of cannot_store_register, invalid_p == 0 */
663 /* Skip verify of get_longjmp_target, has predicate */
664 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
665 && (gdbarch
->use_generic_dummy_frames
== -1))
666 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
667 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
668 && (gdbarch
->call_dummy_location
== 0))
669 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
670 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
671 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
672 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
673 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
674 && (gdbarch
->call_dummy_start_offset
== -1))
675 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
676 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
677 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
678 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
679 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
680 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
681 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
682 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
683 && (gdbarch
->call_dummy_length
== -1))
684 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
685 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
686 && (gdbarch
->pc_in_call_dummy
== 0))
687 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
688 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
689 && (gdbarch
->call_dummy_p
== -1))
690 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
691 /* Skip verify of call_dummy_words, invalid_p == 0 */
692 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
693 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
694 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
695 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
696 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
697 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
698 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
699 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
700 && (gdbarch
->fix_call_dummy
== 0))
701 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
702 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
703 /* Skip verify of init_frame_pc, invalid_p == 0 */
704 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
705 /* Skip verify of get_saved_register, invalid_p == 0 */
706 /* Skip verify of register_convertible, invalid_p == 0 */
707 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
708 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
709 /* Skip verify of convert_register_p, invalid_p == 0 */
710 /* Skip verify of register_to_value, invalid_p == 0 */
711 /* Skip verify of value_to_register, invalid_p == 0 */
712 /* Skip verify of pointer_to_address, invalid_p == 0 */
713 /* Skip verify of address_to_pointer, invalid_p == 0 */
714 /* Skip verify of integer_to_address, has predicate */
715 /* Skip verify of return_value_on_stack, invalid_p == 0 */
716 /* Skip verify of push_arguments, invalid_p == 0 */
717 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
718 && (gdbarch
->push_dummy_frame
== 0))
719 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
720 /* Skip verify of push_return_address, has predicate */
721 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
722 && (gdbarch
->pop_frame
== 0))
723 fprintf_unfiltered (log
, "\n\tpop_frame");
724 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
725 && (gdbarch
->store_struct_return
== 0))
726 fprintf_unfiltered (log
, "\n\tstore_struct_return");
727 /* Skip verify of extract_return_value, invalid_p == 0 */
728 /* Skip verify of store_return_value, invalid_p == 0 */
729 /* Skip verify of extract_struct_value_address, has predicate */
730 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
731 /* Skip verify of use_struct_convention, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
733 && (gdbarch
->frame_init_saved_regs
== 0))
734 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
735 /* Skip verify of init_extra_frame_info, has predicate */
736 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
737 && (gdbarch
->skip_prologue
== 0))
738 fprintf_unfiltered (log
, "\n\tskip_prologue");
739 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
740 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
741 && (gdbarch
->inner_than
== 0))
742 fprintf_unfiltered (log
, "\n\tinner_than");
743 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
744 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
745 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
746 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
747 && (gdbarch
->decr_pc_after_break
== -1))
748 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
749 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
750 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
751 && (gdbarch
->function_start_offset
== -1))
752 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
753 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
754 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
755 && (gdbarch
->frame_args_skip
== -1))
756 fprintf_unfiltered (log
, "\n\tframe_args_skip");
757 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
758 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
759 && (gdbarch
->frame_chain
== 0))
760 fprintf_unfiltered (log
, "\n\tframe_chain");
761 /* Skip verify of frame_chain_valid, invalid_p == 0 */
762 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
763 && (gdbarch
->frame_saved_pc
== 0))
764 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
765 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
766 && (gdbarch
->frame_args_address
== 0))
767 fprintf_unfiltered (log
, "\n\tframe_args_address");
768 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
769 && (gdbarch
->frame_locals_address
== 0))
770 fprintf_unfiltered (log
, "\n\tframe_locals_address");
771 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
772 && (gdbarch
->saved_pc_after_call
== 0))
773 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
774 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
775 && (gdbarch
->frame_num_args
== 0))
776 fprintf_unfiltered (log
, "\n\tframe_num_args");
777 /* Skip verify of stack_align, has predicate */
778 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
779 /* Skip verify of reg_struct_has_addr, has predicate */
780 /* Skip verify of save_dummy_frame_tos, has predicate */
781 if (gdbarch
->float_format
== 0)
782 gdbarch
->float_format
= default_float_format (gdbarch
);
783 if (gdbarch
->double_format
== 0)
784 gdbarch
->double_format
= default_double_format (gdbarch
);
785 if (gdbarch
->long_double_format
== 0)
786 gdbarch
->long_double_format
= default_double_format (gdbarch
);
787 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
788 /* Skip verify of addr_bits_remove, invalid_p == 0 */
789 /* Skip verify of smash_text_address, invalid_p == 0 */
790 /* Skip verify of software_single_step, has predicate */
791 /* Skip verify of print_insn, invalid_p == 0 */
792 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
793 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
794 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
795 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
796 /* Skip verify of sigtramp_start, has predicate */
797 /* Skip verify of sigtramp_end, has predicate */
798 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
799 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
800 /* Skip verify of dwarf2_build_frame_info, has predicate */
801 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
802 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
803 /* Skip verify of name_of_malloc, invalid_p == 0 */
804 buf
= ui_file_xstrdup (log
, &dummy
);
805 make_cleanup (xfree
, buf
);
806 if (strlen (buf
) > 0)
807 internal_error (__FILE__
, __LINE__
,
808 "verify_gdbarch: the following are invalid ...%s",
810 do_cleanups (cleanups
);
814 /* Print out the details of the current architecture. */
816 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
817 just happens to match the global variable ``current_gdbarch''. That
818 way macros refering to that variable get the local and not the global
819 version - ulgh. Once everything is parameterised with gdbarch, this
823 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
831 (long) current_gdbarch
->in_function_epilogue_p
);
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
835 (long) current_gdbarch
->pseudo_register_read
);
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
839 (long) current_gdbarch
->pseudo_register_write
);
840 #ifdef ADDRESS_TO_POINTER
842 /* Macro might contain `[{}]' when not multi-arch */
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: %s # %s\n",
845 "ADDRESS_TO_POINTER(type, buf, addr)",
846 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
851 (long) current_gdbarch
->address_to_pointer
852 /*ADDRESS_TO_POINTER ()*/);
854 #ifdef ADDR_BITS_REMOVE
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: %s # %s\n",
857 "ADDR_BITS_REMOVE(addr)",
858 XSTRING (ADDR_BITS_REMOVE (addr
)));
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
862 (long) current_gdbarch
->addr_bits_remove
863 /*ADDR_BITS_REMOVE ()*/);
865 #ifdef BELIEVE_PCC_PROMOTION
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
868 XSTRING (BELIEVE_PCC_PROMOTION
));
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
871 BELIEVE_PCC_PROMOTION
);
873 #ifdef BELIEVE_PCC_PROMOTION_TYPE
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
876 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
879 BELIEVE_PCC_PROMOTION_TYPE
);
881 #ifdef BREAKPOINT_FROM_PC
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: %s # %s\n",
884 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
885 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
889 (long) current_gdbarch
->breakpoint_from_pc
890 /*BREAKPOINT_FROM_PC ()*/);
892 #ifdef CALL_DUMMY_ADDRESS
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: %s # %s\n",
895 "CALL_DUMMY_ADDRESS()",
896 XSTRING (CALL_DUMMY_ADDRESS ()));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
900 (long) current_gdbarch
->call_dummy_address
901 /*CALL_DUMMY_ADDRESS ()*/);
903 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
906 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
907 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
910 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
912 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
913 fprintf_unfiltered (file
,
914 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
915 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
918 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
920 #ifdef CALL_DUMMY_LENGTH
921 fprintf_unfiltered (file
,
922 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
923 XSTRING (CALL_DUMMY_LENGTH
));
924 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
929 #ifdef CALL_DUMMY_LOCATION
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
932 XSTRING (CALL_DUMMY_LOCATION
));
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
935 CALL_DUMMY_LOCATION
);
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: CALL_DUMMY_P # %s\n",
940 XSTRING (CALL_DUMMY_P
));
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: CALL_DUMMY_P = %d\n",
945 #ifdef CALL_DUMMY_STACK_ADJUST
946 fprintf_unfiltered (file
,
947 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
948 XSTRING (CALL_DUMMY_STACK_ADJUST
));
949 if (CALL_DUMMY_STACK_ADJUST_P
)
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
952 (long) CALL_DUMMY_STACK_ADJUST
);
954 #ifdef CALL_DUMMY_STACK_ADJUST_P
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
957 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
960 (long) CALL_DUMMY_STACK_ADJUST_P
);
962 #ifdef CALL_DUMMY_START_OFFSET
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
965 XSTRING (CALL_DUMMY_START_OFFSET
));
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
968 (long) CALL_DUMMY_START_OFFSET
);
970 #ifdef CALL_DUMMY_WORDS
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
973 XSTRING (CALL_DUMMY_WORDS
));
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
976 (long) CALL_DUMMY_WORDS
);
978 #ifdef CANNOT_FETCH_REGISTER
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: %s # %s\n",
981 "CANNOT_FETCH_REGISTER(regnum)",
982 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
986 (long) current_gdbarch
->cannot_fetch_register
987 /*CANNOT_FETCH_REGISTER ()*/);
989 #ifdef CANNOT_STORE_REGISTER
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: %s # %s\n",
992 "CANNOT_STORE_REGISTER(regnum)",
993 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
997 (long) current_gdbarch
->cannot_store_register
998 /*CANNOT_STORE_REGISTER ()*/);
1000 #ifdef COERCE_FLOAT_TO_DOUBLE
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: %s # %s\n",
1003 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1004 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1008 (long) current_gdbarch
->coerce_float_to_double
1009 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1011 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1013 /* Macro might contain `[{}]' when not multi-arch */
1014 fprintf_unfiltered (file
,
1015 "gdbarch_dump: %s # %s\n",
1016 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1017 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1022 (long) current_gdbarch
->coff_make_msymbol_special
1023 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1028 (long) current_gdbarch
->construct_inferior_arguments
);
1029 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1030 fprintf_unfiltered (file
,
1031 "gdbarch_dump: %s # %s\n",
1032 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1033 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1037 (long) current_gdbarch
->convert_from_func_ptr_addr
1038 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1040 #ifdef CONVERT_REGISTER_P
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: %s # %s\n",
1043 "CONVERT_REGISTER_P(regnum)",
1044 XSTRING (CONVERT_REGISTER_P (regnum
)));
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1048 (long) current_gdbarch
->convert_register_p
1049 /*CONVERT_REGISTER_P ()*/);
1051 #ifdef DECR_PC_AFTER_BREAK
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1054 XSTRING (DECR_PC_AFTER_BREAK
));
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1057 (long) DECR_PC_AFTER_BREAK
);
1059 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1061 /* Macro might contain `[{}]' when not multi-arch */
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: %s # %s\n",
1064 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1065 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1070 (long) current_gdbarch
->deprecated_extract_return_value
1071 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1073 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: %s # %s\n",
1076 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1077 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1079 fprintf_unfiltered (file
,
1080 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1081 (long) current_gdbarch
->deprecated_extract_struct_value_address
1082 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1084 #ifdef DEPRECATED_STORE_RETURN_VALUE
1086 /* Macro might contain `[{}]' when not multi-arch */
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: %s # %s\n",
1089 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1090 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1093 fprintf_unfiltered (file
,
1094 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = 0x%08lx\n",
1095 (long) current_gdbarch
->deprecated_store_return_value
1096 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1098 #ifdef DO_REGISTERS_INFO
1100 /* Macro might contain `[{}]' when not multi-arch */
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: %s # %s\n",
1103 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1104 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1109 (long) current_gdbarch
->do_registers_info
1110 /*DO_REGISTERS_INFO ()*/);
1112 #ifdef DWARF2_BUILD_FRAME_INFO
1114 /* Macro might contain `[{}]' when not multi-arch */
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: %s # %s\n",
1117 "DWARF2_BUILD_FRAME_INFO(objfile)",
1118 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1123 (long) current_gdbarch
->dwarf2_build_frame_info
1124 /*DWARF2_BUILD_FRAME_INFO ()*/);
1126 #ifdef DWARF2_REG_TO_REGNUM
1127 fprintf_unfiltered (file
,
1128 "gdbarch_dump: %s # %s\n",
1129 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1130 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1132 fprintf_unfiltered (file
,
1133 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1134 (long) current_gdbarch
->dwarf2_reg_to_regnum
1135 /*DWARF2_REG_TO_REGNUM ()*/);
1137 #ifdef DWARF_REG_TO_REGNUM
1138 fprintf_unfiltered (file
,
1139 "gdbarch_dump: %s # %s\n",
1140 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1141 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1145 (long) current_gdbarch
->dwarf_reg_to_regnum
1146 /*DWARF_REG_TO_REGNUM ()*/);
1148 #ifdef ECOFF_REG_TO_REGNUM
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: %s # %s\n",
1151 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1152 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1156 (long) current_gdbarch
->ecoff_reg_to_regnum
1157 /*ECOFF_REG_TO_REGNUM ()*/);
1159 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1161 /* Macro might contain `[{}]' when not multi-arch */
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: %s # %s\n",
1164 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1165 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1170 (long) current_gdbarch
->elf_make_msymbol_special
1171 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1173 #ifdef EXTRACT_RETURN_VALUE
1175 /* Macro might contain `[{}]' when not multi-arch */
1176 fprintf_unfiltered (file
,
1177 "gdbarch_dump: %s # %s\n",
1178 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1179 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1184 (long) current_gdbarch
->extract_return_value
1185 /*EXTRACT_RETURN_VALUE ()*/);
1187 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: %s # %s\n",
1190 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1191 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1195 (long) current_gdbarch
->extract_struct_value_address
1196 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1198 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1199 fprintf_unfiltered (file
,
1200 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1201 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1204 EXTRA_STACK_ALIGNMENT_NEEDED
);
1206 #ifdef FIX_CALL_DUMMY
1208 /* Macro might contain `[{}]' when not multi-arch */
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: %s # %s\n",
1211 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1212 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1217 (long) current_gdbarch
->fix_call_dummy
1218 /*FIX_CALL_DUMMY ()*/);
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: FP0_REGNUM # %s\n",
1223 XSTRING (FP0_REGNUM
));
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: FP0_REGNUM = %d\n",
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: FP_REGNUM # %s\n",
1231 XSTRING (FP_REGNUM
));
1232 fprintf_unfiltered (file
,
1233 "gdbarch_dump: FP_REGNUM = %d\n",
1236 #ifdef FRAMELESS_FUNCTION_INVOCATION
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: %s # %s\n",
1239 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1240 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1244 (long) current_gdbarch
->frameless_function_invocation
1245 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1247 #ifdef FRAME_ARGS_ADDRESS
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: %s # %s\n",
1250 "FRAME_ARGS_ADDRESS(fi)",
1251 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1255 (long) current_gdbarch
->frame_args_address
1256 /*FRAME_ARGS_ADDRESS ()*/);
1258 #ifdef FRAME_ARGS_SKIP
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1261 XSTRING (FRAME_ARGS_SKIP
));
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1264 (long) FRAME_ARGS_SKIP
);
1267 fprintf_unfiltered (file
,
1268 "gdbarch_dump: %s # %s\n",
1269 "FRAME_CHAIN(frame)",
1270 XSTRING (FRAME_CHAIN (frame
)));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1274 (long) current_gdbarch
->frame_chain
1275 /*FRAME_CHAIN ()*/);
1277 #ifdef FRAME_CHAIN_VALID
1278 fprintf_unfiltered (file
,
1279 "gdbarch_dump: %s # %s\n",
1280 "FRAME_CHAIN_VALID(chain, thisframe)",
1281 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1285 (long) current_gdbarch
->frame_chain_valid
1286 /*FRAME_CHAIN_VALID ()*/);
1288 #ifdef FRAME_INIT_SAVED_REGS
1290 /* Macro might contain `[{}]' when not multi-arch */
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: %s # %s\n",
1293 "FRAME_INIT_SAVED_REGS(frame)",
1294 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1299 (long) current_gdbarch
->frame_init_saved_regs
1300 /*FRAME_INIT_SAVED_REGS ()*/);
1302 #ifdef FRAME_LOCALS_ADDRESS
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: %s # %s\n",
1305 "FRAME_LOCALS_ADDRESS(fi)",
1306 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1310 (long) current_gdbarch
->frame_locals_address
1311 /*FRAME_LOCALS_ADDRESS ()*/);
1313 #ifdef FRAME_NUM_ARGS
1314 fprintf_unfiltered (file
,
1315 "gdbarch_dump: %s # %s\n",
1316 "FRAME_NUM_ARGS(frame)",
1317 XSTRING (FRAME_NUM_ARGS (frame
)));
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1321 (long) current_gdbarch
->frame_num_args
1322 /*FRAME_NUM_ARGS ()*/);
1324 #ifdef FRAME_SAVED_PC
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: %s # %s\n",
1327 "FRAME_SAVED_PC(fi)",
1328 XSTRING (FRAME_SAVED_PC (fi
)));
1330 fprintf_unfiltered (file
,
1331 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1332 (long) current_gdbarch
->frame_saved_pc
1333 /*FRAME_SAVED_PC ()*/);
1335 #ifdef FUNCTION_START_OFFSET
1336 fprintf_unfiltered (file
,
1337 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1338 XSTRING (FUNCTION_START_OFFSET
));
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1341 (long) FUNCTION_START_OFFSET
);
1343 #ifdef GET_LONGJMP_TARGET
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: %s # %s\n",
1346 "GET_LONGJMP_TARGET(pc)",
1347 XSTRING (GET_LONGJMP_TARGET (pc
)));
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1351 (long) current_gdbarch
->get_longjmp_target
1352 /*GET_LONGJMP_TARGET ()*/);
1354 #ifdef GET_SAVED_REGISTER
1356 /* Macro might contain `[{}]' when not multi-arch */
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: %s # %s\n",
1359 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1360 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1365 (long) current_gdbarch
->get_saved_register
1366 /*GET_SAVED_REGISTER ()*/);
1368 #ifdef INIT_EXTRA_FRAME_INFO
1370 /* Macro might contain `[{}]' when not multi-arch */
1371 fprintf_unfiltered (file
,
1372 "gdbarch_dump: %s # %s\n",
1373 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1374 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1377 fprintf_unfiltered (file
,
1378 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1379 (long) current_gdbarch
->init_extra_frame_info
1380 /*INIT_EXTRA_FRAME_INFO ()*/);
1382 #ifdef INIT_FRAME_PC
1384 /* Macro might contain `[{}]' when not multi-arch */
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: %s # %s\n",
1387 "INIT_FRAME_PC(fromleaf, prev)",
1388 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1393 (long) current_gdbarch
->init_frame_pc
1394 /*INIT_FRAME_PC ()*/);
1396 #ifdef INIT_FRAME_PC_FIRST
1398 /* Macro might contain `[{}]' when not multi-arch */
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: %s # %s\n",
1401 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1402 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1407 (long) current_gdbarch
->init_frame_pc_first
1408 /*INIT_FRAME_PC_FIRST ()*/);
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: %s # %s\n",
1413 "INNER_THAN(lhs, rhs)",
1414 XSTRING (INNER_THAN (lhs
, rhs
)));
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1418 (long) current_gdbarch
->inner_than
1421 #ifdef INTEGER_TO_ADDRESS
1422 fprintf_unfiltered (file
,
1423 "gdbarch_dump: %s # %s\n",
1424 "INTEGER_TO_ADDRESS(type, buf)",
1425 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1429 (long) current_gdbarch
->integer_to_address
1430 /*INTEGER_TO_ADDRESS ()*/);
1432 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: %s # %s\n",
1435 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1436 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1440 (long) current_gdbarch
->in_solib_call_trampoline
1441 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1443 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1444 fprintf_unfiltered (file
,
1445 "gdbarch_dump: %s # %s\n",
1446 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1447 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1449 fprintf_unfiltered (file
,
1450 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
1451 (long) current_gdbarch
->in_solib_return_trampoline
1452 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1454 #ifdef MAX_REGISTER_RAW_SIZE
1455 fprintf_unfiltered (file
,
1456 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1457 XSTRING (MAX_REGISTER_RAW_SIZE
));
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1460 MAX_REGISTER_RAW_SIZE
);
1462 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1463 fprintf_unfiltered (file
,
1464 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1465 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1468 MAX_REGISTER_VIRTUAL_SIZE
);
1470 #ifdef MEMORY_INSERT_BREAKPOINT
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: %s # %s\n",
1473 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1474 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1478 (long) current_gdbarch
->memory_insert_breakpoint
1479 /*MEMORY_INSERT_BREAKPOINT ()*/);
1481 #ifdef MEMORY_REMOVE_BREAKPOINT
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: %s # %s\n",
1484 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1485 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1489 (long) current_gdbarch
->memory_remove_breakpoint
1490 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1492 #ifdef NAME_OF_MALLOC
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1495 XSTRING (NAME_OF_MALLOC
));
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: NAME_OF_MALLOC = %ld\n",
1498 (long) NAME_OF_MALLOC
);
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: NPC_REGNUM # %s\n",
1503 XSTRING (NPC_REGNUM
));
1504 fprintf_unfiltered (file
,
1505 "gdbarch_dump: NPC_REGNUM = %d\n",
1508 #ifdef NUM_PSEUDO_REGS
1509 fprintf_unfiltered (file
,
1510 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1511 XSTRING (NUM_PSEUDO_REGS
));
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: NUM_REGS # %s\n",
1519 XSTRING (NUM_REGS
));
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: NUM_REGS = %d\n",
1524 #ifdef PARM_BOUNDARY
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1527 XSTRING (PARM_BOUNDARY
));
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1532 #ifdef PC_IN_CALL_DUMMY
1533 fprintf_unfiltered (file
,
1534 "gdbarch_dump: %s # %s\n",
1535 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1536 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1540 (long) current_gdbarch
->pc_in_call_dummy
1541 /*PC_IN_CALL_DUMMY ()*/);
1543 #ifdef PC_IN_SIGTRAMP
1544 fprintf_unfiltered (file
,
1545 "gdbarch_dump: %s # %s\n",
1546 "PC_IN_SIGTRAMP(pc, name)",
1547 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1551 (long) current_gdbarch
->pc_in_sigtramp
1552 /*PC_IN_SIGTRAMP ()*/);
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: PC_REGNUM # %s\n",
1557 XSTRING (PC_REGNUM
));
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: PC_REGNUM = %d\n",
1562 #ifdef POINTER_TO_ADDRESS
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: %s # %s\n",
1565 "POINTER_TO_ADDRESS(type, buf)",
1566 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1568 fprintf_unfiltered (file
,
1569 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1570 (long) current_gdbarch
->pointer_to_address
1571 /*POINTER_TO_ADDRESS ()*/);
1575 /* Macro might contain `[{}]' when not multi-arch */
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: %s # %s\n",
1579 XSTRING (POP_FRAME (-)));
1582 fprintf_unfiltered (file
,
1583 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1584 (long) current_gdbarch
->pop_frame
1587 #ifdef PREPARE_TO_PROCEED
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: %s # %s\n",
1590 "PREPARE_TO_PROCEED(select_it)",
1591 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1595 (long) current_gdbarch
->prepare_to_proceed
1596 /*PREPARE_TO_PROCEED ()*/);
1599 fprintf_unfiltered (file
,
1600 "gdbarch_dump: print_float_info = 0x%08lx\n",
1601 (long) current_gdbarch
->print_float_info
);
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1605 (long) current_gdbarch
->print_registers_info
);
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1609 (long) current_gdbarch
->print_vector_info
);
1610 #ifdef PROLOGUE_FRAMELESS_P
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: %s # %s\n",
1613 "PROLOGUE_FRAMELESS_P(ip)",
1614 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1616 fprintf_unfiltered (file
,
1617 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1618 (long) current_gdbarch
->prologue_frameless_p
1619 /*PROLOGUE_FRAMELESS_P ()*/);
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: PS_REGNUM # %s\n",
1624 XSTRING (PS_REGNUM
));
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: PS_REGNUM = %d\n",
1629 #ifdef PUSH_ARGUMENTS
1630 fprintf_unfiltered (file
,
1631 "gdbarch_dump: %s # %s\n",
1632 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1633 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1637 (long) current_gdbarch
->push_arguments
1638 /*PUSH_ARGUMENTS ()*/);
1640 #ifdef PUSH_DUMMY_FRAME
1642 /* Macro might contain `[{}]' when not multi-arch */
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: %s # %s\n",
1645 "PUSH_DUMMY_FRAME(-)",
1646 XSTRING (PUSH_DUMMY_FRAME (-)));
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1651 (long) current_gdbarch
->push_dummy_frame
1652 /*PUSH_DUMMY_FRAME ()*/);
1654 #ifdef PUSH_RETURN_ADDRESS
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: %s # %s\n",
1657 "PUSH_RETURN_ADDRESS(pc, sp)",
1658 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1662 (long) current_gdbarch
->push_return_address
1663 /*PUSH_RETURN_ADDRESS ()*/);
1665 #ifdef REGISTER_BYTE
1666 fprintf_unfiltered (file
,
1667 "gdbarch_dump: %s # %s\n",
1668 "REGISTER_BYTE(reg_nr)",
1669 XSTRING (REGISTER_BYTE (reg_nr
)));
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1673 (long) current_gdbarch
->register_byte
1674 /*REGISTER_BYTE ()*/);
1676 #ifdef REGISTER_BYTES
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: REGISTER_BYTES # %s\n",
1679 XSTRING (REGISTER_BYTES
));
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: REGISTER_BYTES = %d\n",
1684 #ifdef REGISTER_BYTES_OK
1685 fprintf_unfiltered (file
,
1686 "gdbarch_dump: %s # %s\n",
1687 "REGISTER_BYTES_OK(nr_bytes)",
1688 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1690 fprintf_unfiltered (file
,
1691 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1692 (long) current_gdbarch
->register_bytes_ok
1693 /*REGISTER_BYTES_OK ()*/);
1695 #ifdef REGISTER_CONVERTIBLE
1696 fprintf_unfiltered (file
,
1697 "gdbarch_dump: %s # %s\n",
1698 "REGISTER_CONVERTIBLE(nr)",
1699 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1701 fprintf_unfiltered (file
,
1702 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1703 (long) current_gdbarch
->register_convertible
1704 /*REGISTER_CONVERTIBLE ()*/);
1706 #ifdef REGISTER_CONVERT_TO_RAW
1708 /* Macro might contain `[{}]' when not multi-arch */
1709 fprintf_unfiltered (file
,
1710 "gdbarch_dump: %s # %s\n",
1711 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1712 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1715 fprintf_unfiltered (file
,
1716 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1717 (long) current_gdbarch
->register_convert_to_raw
1718 /*REGISTER_CONVERT_TO_RAW ()*/);
1720 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1722 /* Macro might contain `[{}]' when not multi-arch */
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: %s # %s\n",
1725 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1726 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1731 (long) current_gdbarch
->register_convert_to_virtual
1732 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1734 #ifdef REGISTER_NAME
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: %s # %s\n",
1737 "REGISTER_NAME(regnr)",
1738 XSTRING (REGISTER_NAME (regnr
)));
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1742 (long) current_gdbarch
->register_name
1743 /*REGISTER_NAME ()*/);
1745 #ifdef REGISTER_RAW_SIZE
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: %s # %s\n",
1748 "REGISTER_RAW_SIZE(reg_nr)",
1749 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1751 fprintf_unfiltered (file
,
1752 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1753 (long) current_gdbarch
->register_raw_size
1754 /*REGISTER_RAW_SIZE ()*/);
1756 #ifdef REGISTER_SIM_REGNO
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: %s # %s\n",
1759 "REGISTER_SIM_REGNO(reg_nr)",
1760 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1762 fprintf_unfiltered (file
,
1763 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1764 (long) current_gdbarch
->register_sim_regno
1765 /*REGISTER_SIM_REGNO ()*/);
1767 #ifdef REGISTER_SIZE
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: REGISTER_SIZE # %s\n",
1770 XSTRING (REGISTER_SIZE
));
1771 fprintf_unfiltered (file
,
1772 "gdbarch_dump: REGISTER_SIZE = %d\n",
1775 #ifdef REGISTER_TO_VALUE
1777 /* Macro might contain `[{}]' when not multi-arch */
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: %s # %s\n",
1780 "REGISTER_TO_VALUE(regnum, type, from, to)",
1781 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1786 (long) current_gdbarch
->register_to_value
1787 /*REGISTER_TO_VALUE ()*/);
1789 #ifdef REGISTER_VIRTUAL_SIZE
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: %s # %s\n",
1792 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1793 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1797 (long) current_gdbarch
->register_virtual_size
1798 /*REGISTER_VIRTUAL_SIZE ()*/);
1800 #ifdef REGISTER_VIRTUAL_TYPE
1801 fprintf_unfiltered (file
,
1802 "gdbarch_dump: %s # %s\n",
1803 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1804 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1808 (long) current_gdbarch
->register_virtual_type
1809 /*REGISTER_VIRTUAL_TYPE ()*/);
1811 #ifdef REG_STRUCT_HAS_ADDR
1812 fprintf_unfiltered (file
,
1813 "gdbarch_dump: %s # %s\n",
1814 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1815 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1817 fprintf_unfiltered (file
,
1818 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1819 (long) current_gdbarch
->reg_struct_has_addr
1820 /*REG_STRUCT_HAS_ADDR ()*/);
1822 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1824 /* Macro might contain `[{}]' when not multi-arch */
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: %s # %s\n",
1827 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1828 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1833 (long) current_gdbarch
->remote_translate_xfer_address
1834 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1836 #ifdef RETURN_VALUE_ON_STACK
1837 fprintf_unfiltered (file
,
1838 "gdbarch_dump: %s # %s\n",
1839 "RETURN_VALUE_ON_STACK(type)",
1840 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1844 (long) current_gdbarch
->return_value_on_stack
1845 /*RETURN_VALUE_ON_STACK ()*/);
1847 #ifdef SAVED_PC_AFTER_CALL
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: %s # %s\n",
1850 "SAVED_PC_AFTER_CALL(frame)",
1851 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1853 fprintf_unfiltered (file
,
1854 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1855 (long) current_gdbarch
->saved_pc_after_call
1856 /*SAVED_PC_AFTER_CALL ()*/);
1858 #ifdef SAVE_DUMMY_FRAME_TOS
1860 /* Macro might contain `[{}]' when not multi-arch */
1861 fprintf_unfiltered (file
,
1862 "gdbarch_dump: %s # %s\n",
1863 "SAVE_DUMMY_FRAME_TOS(sp)",
1864 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1869 (long) current_gdbarch
->save_dummy_frame_tos
1870 /*SAVE_DUMMY_FRAME_TOS ()*/);
1872 #ifdef SDB_REG_TO_REGNUM
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: %s # %s\n",
1875 "SDB_REG_TO_REGNUM(sdb_regnr)",
1876 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1878 fprintf_unfiltered (file
,
1879 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1880 (long) current_gdbarch
->sdb_reg_to_regnum
1881 /*SDB_REG_TO_REGNUM ()*/);
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: %s # %s\n",
1887 XSTRING (SIGTRAMP_END (pc
)));
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: SIGTRAMP_END = 0x%08lx\n",
1891 (long) current_gdbarch
->sigtramp_end
1892 /*SIGTRAMP_END ()*/);
1894 #ifdef SIGTRAMP_START
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: %s # %s\n",
1897 "SIGTRAMP_START(pc)",
1898 XSTRING (SIGTRAMP_START (pc
)));
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: SIGTRAMP_START = 0x%08lx\n",
1902 (long) current_gdbarch
->sigtramp_start
1903 /*SIGTRAMP_START ()*/);
1905 #ifdef SIZEOF_CALL_DUMMY_WORDS
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1908 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1909 fprintf_unfiltered (file
,
1910 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1911 (long) SIZEOF_CALL_DUMMY_WORDS
);
1913 #ifdef SKIP_PROLOGUE
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: %s # %s\n",
1916 "SKIP_PROLOGUE(ip)",
1917 XSTRING (SKIP_PROLOGUE (ip
)));
1919 fprintf_unfiltered (file
,
1920 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1921 (long) current_gdbarch
->skip_prologue
1922 /*SKIP_PROLOGUE ()*/);
1924 #ifdef SKIP_TRAMPOLINE_CODE
1925 fprintf_unfiltered (file
,
1926 "gdbarch_dump: %s # %s\n",
1927 "SKIP_TRAMPOLINE_CODE(pc)",
1928 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1930 fprintf_unfiltered (file
,
1931 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1932 (long) current_gdbarch
->skip_trampoline_code
1933 /*SKIP_TRAMPOLINE_CODE ()*/);
1935 #ifdef SMASH_TEXT_ADDRESS
1936 fprintf_unfiltered (file
,
1937 "gdbarch_dump: %s # %s\n",
1938 "SMASH_TEXT_ADDRESS(addr)",
1939 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1943 (long) current_gdbarch
->smash_text_address
1944 /*SMASH_TEXT_ADDRESS ()*/);
1946 #ifdef SOFTWARE_SINGLE_STEP
1948 /* Macro might contain `[{}]' when not multi-arch */
1949 fprintf_unfiltered (file
,
1950 "gdbarch_dump: %s # %s\n",
1951 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1952 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1955 fprintf_unfiltered (file
,
1956 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1957 (long) current_gdbarch
->software_single_step
1958 /*SOFTWARE_SINGLE_STEP ()*/);
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: SP_REGNUM # %s\n",
1963 XSTRING (SP_REGNUM
));
1964 fprintf_unfiltered (file
,
1965 "gdbarch_dump: SP_REGNUM = %d\n",
1968 #ifdef STAB_REG_TO_REGNUM
1969 fprintf_unfiltered (file
,
1970 "gdbarch_dump: %s # %s\n",
1971 "STAB_REG_TO_REGNUM(stab_regnr)",
1972 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1974 fprintf_unfiltered (file
,
1975 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1976 (long) current_gdbarch
->stab_reg_to_regnum
1977 /*STAB_REG_TO_REGNUM ()*/);
1980 fprintf_unfiltered (file
,
1981 "gdbarch_dump: %s # %s\n",
1983 XSTRING (STACK_ALIGN (sp
)));
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1987 (long) current_gdbarch
->stack_align
1988 /*STACK_ALIGN ()*/);
1990 #ifdef STORE_RETURN_VALUE
1992 /* Macro might contain `[{}]' when not multi-arch */
1993 fprintf_unfiltered (file
,
1994 "gdbarch_dump: %s # %s\n",
1995 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1996 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
2001 (long) current_gdbarch
->store_return_value
2002 /*STORE_RETURN_VALUE ()*/);
2004 #ifdef STORE_STRUCT_RETURN
2006 /* Macro might contain `[{}]' when not multi-arch */
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: %s # %s\n",
2009 "STORE_STRUCT_RETURN(addr, sp)",
2010 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
2015 (long) current_gdbarch
->store_struct_return
2016 /*STORE_STRUCT_RETURN ()*/);
2018 #ifdef TARGET_ADDR_BIT
2019 fprintf_unfiltered (file
,
2020 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2021 XSTRING (TARGET_ADDR_BIT
));
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2026 #ifdef TARGET_ARCHITECTURE
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2029 XSTRING (TARGET_ARCHITECTURE
));
2030 if (TARGET_ARCHITECTURE
!= NULL
)
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2033 TARGET_ARCHITECTURE
->printable_name
);
2035 #ifdef TARGET_BFD_VMA_BIT
2036 fprintf_unfiltered (file
,
2037 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2038 XSTRING (TARGET_BFD_VMA_BIT
));
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2041 TARGET_BFD_VMA_BIT
);
2043 #ifdef TARGET_BYTE_ORDER
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2046 XSTRING (TARGET_BYTE_ORDER
));
2047 fprintf_unfiltered (file
,
2048 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2049 (long) TARGET_BYTE_ORDER
);
2051 #ifdef TARGET_CHAR_SIGNED
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2054 XSTRING (TARGET_CHAR_SIGNED
));
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2057 TARGET_CHAR_SIGNED
);
2059 #ifdef TARGET_DOUBLE_BIT
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2062 XSTRING (TARGET_DOUBLE_BIT
));
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2067 #ifdef TARGET_DOUBLE_FORMAT
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2070 XSTRING (TARGET_DOUBLE_FORMAT
));
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2073 (long) TARGET_DOUBLE_FORMAT
);
2075 #ifdef TARGET_FLOAT_BIT
2076 fprintf_unfiltered (file
,
2077 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2078 XSTRING (TARGET_FLOAT_BIT
));
2079 fprintf_unfiltered (file
,
2080 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2083 #ifdef TARGET_FLOAT_FORMAT
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2086 XSTRING (TARGET_FLOAT_FORMAT
));
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2089 (long) TARGET_FLOAT_FORMAT
);
2091 #ifdef TARGET_INT_BIT
2092 fprintf_unfiltered (file
,
2093 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2094 XSTRING (TARGET_INT_BIT
));
2095 fprintf_unfiltered (file
,
2096 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2099 #ifdef TARGET_LONG_BIT
2100 fprintf_unfiltered (file
,
2101 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2102 XSTRING (TARGET_LONG_BIT
));
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2107 #ifdef TARGET_LONG_DOUBLE_BIT
2108 fprintf_unfiltered (file
,
2109 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2110 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2111 fprintf_unfiltered (file
,
2112 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2113 TARGET_LONG_DOUBLE_BIT
);
2115 #ifdef TARGET_LONG_DOUBLE_FORMAT
2116 fprintf_unfiltered (file
,
2117 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2118 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2119 fprintf_unfiltered (file
,
2120 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2121 (long) TARGET_LONG_DOUBLE_FORMAT
);
2123 #ifdef TARGET_LONG_LONG_BIT
2124 fprintf_unfiltered (file
,
2125 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2126 XSTRING (TARGET_LONG_LONG_BIT
));
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2129 TARGET_LONG_LONG_BIT
);
2131 #ifdef TARGET_PRINT_INSN
2132 fprintf_unfiltered (file
,
2133 "gdbarch_dump: %s # %s\n",
2134 "TARGET_PRINT_INSN(vma, info)",
2135 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2139 (long) current_gdbarch
->print_insn
2140 /*TARGET_PRINT_INSN ()*/);
2142 #ifdef TARGET_PTR_BIT
2143 fprintf_unfiltered (file
,
2144 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2145 XSTRING (TARGET_PTR_BIT
));
2146 fprintf_unfiltered (file
,
2147 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2150 #ifdef TARGET_READ_FP
2151 fprintf_unfiltered (file
,
2152 "gdbarch_dump: %s # %s\n",
2154 XSTRING (TARGET_READ_FP ()));
2156 fprintf_unfiltered (file
,
2157 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2158 (long) current_gdbarch
->read_fp
2159 /*TARGET_READ_FP ()*/);
2161 #ifdef TARGET_READ_PC
2162 fprintf_unfiltered (file
,
2163 "gdbarch_dump: %s # %s\n",
2164 "TARGET_READ_PC(ptid)",
2165 XSTRING (TARGET_READ_PC (ptid
)));
2167 fprintf_unfiltered (file
,
2168 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2169 (long) current_gdbarch
->read_pc
2170 /*TARGET_READ_PC ()*/);
2172 #ifdef TARGET_READ_SP
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: %s # %s\n",
2176 XSTRING (TARGET_READ_SP ()));
2178 fprintf_unfiltered (file
,
2179 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2180 (long) current_gdbarch
->read_sp
2181 /*TARGET_READ_SP ()*/);
2183 #ifdef TARGET_SHORT_BIT
2184 fprintf_unfiltered (file
,
2185 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2186 XSTRING (TARGET_SHORT_BIT
));
2187 fprintf_unfiltered (file
,
2188 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2191 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2193 /* Macro might contain `[{}]' when not multi-arch */
2194 fprintf_unfiltered (file
,
2195 "gdbarch_dump: %s # %s\n",
2196 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2197 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2200 fprintf_unfiltered (file
,
2201 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2202 (long) current_gdbarch
->virtual_frame_pointer
2203 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2205 #ifdef TARGET_WRITE_PC
2207 /* Macro might contain `[{}]' when not multi-arch */
2208 fprintf_unfiltered (file
,
2209 "gdbarch_dump: %s # %s\n",
2210 "TARGET_WRITE_PC(val, ptid)",
2211 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2214 fprintf_unfiltered (file
,
2215 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2216 (long) current_gdbarch
->write_pc
2217 /*TARGET_WRITE_PC ()*/);
2219 #ifdef TARGET_WRITE_SP
2221 /* Macro might contain `[{}]' when not multi-arch */
2222 fprintf_unfiltered (file
,
2223 "gdbarch_dump: %s # %s\n",
2224 "TARGET_WRITE_SP(val)",
2225 XSTRING (TARGET_WRITE_SP (val
)));
2228 fprintf_unfiltered (file
,
2229 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2230 (long) current_gdbarch
->write_sp
2231 /*TARGET_WRITE_SP ()*/);
2233 #ifdef USE_GENERIC_DUMMY_FRAMES
2234 fprintf_unfiltered (file
,
2235 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2236 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2237 fprintf_unfiltered (file
,
2238 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2239 USE_GENERIC_DUMMY_FRAMES
);
2241 #ifdef USE_STRUCT_CONVENTION
2242 fprintf_unfiltered (file
,
2243 "gdbarch_dump: %s # %s\n",
2244 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2245 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2247 fprintf_unfiltered (file
,
2248 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2249 (long) current_gdbarch
->use_struct_convention
2250 /*USE_STRUCT_CONVENTION ()*/);
2252 #ifdef VALUE_TO_REGISTER
2254 /* Macro might contain `[{}]' when not multi-arch */
2255 fprintf_unfiltered (file
,
2256 "gdbarch_dump: %s # %s\n",
2257 "VALUE_TO_REGISTER(type, regnum, from, to)",
2258 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2261 fprintf_unfiltered (file
,
2262 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2263 (long) current_gdbarch
->value_to_register
2264 /*VALUE_TO_REGISTER ()*/);
2266 if (current_gdbarch
->dump_tdep
!= NULL
)
2267 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2270 struct gdbarch_tdep
*
2271 gdbarch_tdep (struct gdbarch
*gdbarch
)
2273 if (gdbarch_debug
>= 2)
2274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2275 return gdbarch
->tdep
;
2279 const struct bfd_arch_info
*
2280 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2282 gdb_assert (gdbarch
!= NULL
);
2283 if (gdbarch_debug
>= 2)
2284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2285 return gdbarch
->bfd_arch_info
;
2289 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2291 gdb_assert (gdbarch
!= NULL
);
2292 if (gdbarch_debug
>= 2)
2293 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2294 return gdbarch
->byte_order
;
2298 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2300 gdb_assert (gdbarch
!= NULL
);
2301 /* Skip verify of short_bit, invalid_p == 0 */
2302 if (gdbarch_debug
>= 2)
2303 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2304 return gdbarch
->short_bit
;
2308 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2311 gdbarch
->short_bit
= short_bit
;
2315 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2317 gdb_assert (gdbarch
!= NULL
);
2318 /* Skip verify of int_bit, invalid_p == 0 */
2319 if (gdbarch_debug
>= 2)
2320 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2321 return gdbarch
->int_bit
;
2325 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2328 gdbarch
->int_bit
= int_bit
;
2332 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2334 gdb_assert (gdbarch
!= NULL
);
2335 /* Skip verify of long_bit, invalid_p == 0 */
2336 if (gdbarch_debug
>= 2)
2337 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2338 return gdbarch
->long_bit
;
2342 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2345 gdbarch
->long_bit
= long_bit
;
2349 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2351 gdb_assert (gdbarch
!= NULL
);
2352 /* Skip verify of long_long_bit, invalid_p == 0 */
2353 if (gdbarch_debug
>= 2)
2354 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2355 return gdbarch
->long_long_bit
;
2359 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2362 gdbarch
->long_long_bit
= long_long_bit
;
2366 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2368 gdb_assert (gdbarch
!= NULL
);
2369 /* Skip verify of float_bit, invalid_p == 0 */
2370 if (gdbarch_debug
>= 2)
2371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2372 return gdbarch
->float_bit
;
2376 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2379 gdbarch
->float_bit
= float_bit
;
2383 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2385 gdb_assert (gdbarch
!= NULL
);
2386 /* Skip verify of double_bit, invalid_p == 0 */
2387 if (gdbarch_debug
>= 2)
2388 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2389 return gdbarch
->double_bit
;
2393 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2396 gdbarch
->double_bit
= double_bit
;
2400 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2402 gdb_assert (gdbarch
!= NULL
);
2403 /* Skip verify of long_double_bit, invalid_p == 0 */
2404 if (gdbarch_debug
>= 2)
2405 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2406 return gdbarch
->long_double_bit
;
2410 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2411 int long_double_bit
)
2413 gdbarch
->long_double_bit
= long_double_bit
;
2417 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2419 gdb_assert (gdbarch
!= NULL
);
2420 /* Skip verify of ptr_bit, invalid_p == 0 */
2421 if (gdbarch_debug
>= 2)
2422 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2423 return gdbarch
->ptr_bit
;
2427 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2430 gdbarch
->ptr_bit
= ptr_bit
;
2434 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2436 gdb_assert (gdbarch
!= NULL
);
2437 if (gdbarch
->addr_bit
== 0)
2438 internal_error (__FILE__
, __LINE__
,
2439 "gdbarch: gdbarch_addr_bit invalid");
2440 if (gdbarch_debug
>= 2)
2441 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2442 return gdbarch
->addr_bit
;
2446 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2449 gdbarch
->addr_bit
= addr_bit
;
2453 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2455 gdb_assert (gdbarch
!= NULL
);
2456 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2457 if (gdbarch_debug
>= 2)
2458 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2459 return gdbarch
->bfd_vma_bit
;
2463 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2466 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2470 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2472 gdb_assert (gdbarch
!= NULL
);
2473 if (gdbarch
->char_signed
== -1)
2474 internal_error (__FILE__
, __LINE__
,
2475 "gdbarch: gdbarch_char_signed invalid");
2476 if (gdbarch_debug
>= 2)
2477 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2478 return gdbarch
->char_signed
;
2482 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2485 gdbarch
->char_signed
= char_signed
;
2489 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2491 gdb_assert (gdbarch
!= NULL
);
2492 if (gdbarch
->read_pc
== 0)
2493 internal_error (__FILE__
, __LINE__
,
2494 "gdbarch: gdbarch_read_pc invalid");
2495 if (gdbarch_debug
>= 2)
2496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2497 return gdbarch
->read_pc (ptid
);
2501 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2502 gdbarch_read_pc_ftype read_pc
)
2504 gdbarch
->read_pc
= read_pc
;
2508 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2510 gdb_assert (gdbarch
!= NULL
);
2511 if (gdbarch
->write_pc
== 0)
2512 internal_error (__FILE__
, __LINE__
,
2513 "gdbarch: gdbarch_write_pc invalid");
2514 if (gdbarch_debug
>= 2)
2515 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2516 gdbarch
->write_pc (val
, ptid
);
2520 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2521 gdbarch_write_pc_ftype write_pc
)
2523 gdbarch
->write_pc
= write_pc
;
2527 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2529 gdb_assert (gdbarch
!= NULL
);
2530 if (gdbarch
->read_fp
== 0)
2531 internal_error (__FILE__
, __LINE__
,
2532 "gdbarch: gdbarch_read_fp invalid");
2533 if (gdbarch_debug
>= 2)
2534 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2535 return gdbarch
->read_fp ();
2539 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2540 gdbarch_read_fp_ftype read_fp
)
2542 gdbarch
->read_fp
= read_fp
;
2546 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2548 gdb_assert (gdbarch
!= NULL
);
2549 if (gdbarch
->read_sp
== 0)
2550 internal_error (__FILE__
, __LINE__
,
2551 "gdbarch: gdbarch_read_sp invalid");
2552 if (gdbarch_debug
>= 2)
2553 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2554 return gdbarch
->read_sp ();
2558 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2559 gdbarch_read_sp_ftype read_sp
)
2561 gdbarch
->read_sp
= read_sp
;
2565 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2567 gdb_assert (gdbarch
!= NULL
);
2568 if (gdbarch
->write_sp
== 0)
2569 internal_error (__FILE__
, __LINE__
,
2570 "gdbarch: gdbarch_write_sp invalid");
2571 if (gdbarch_debug
>= 2)
2572 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2573 gdbarch
->write_sp (val
);
2577 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2578 gdbarch_write_sp_ftype write_sp
)
2580 gdbarch
->write_sp
= write_sp
;
2584 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2586 gdb_assert (gdbarch
!= NULL
);
2587 if (gdbarch
->virtual_frame_pointer
== 0)
2588 internal_error (__FILE__
, __LINE__
,
2589 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2590 if (gdbarch_debug
>= 2)
2591 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2592 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2596 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2597 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2599 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2603 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2605 gdb_assert (gdbarch
!= NULL
);
2606 return gdbarch
->pseudo_register_read
!= 0;
2610 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2612 gdb_assert (gdbarch
!= NULL
);
2613 if (gdbarch
->pseudo_register_read
== 0)
2614 internal_error (__FILE__
, __LINE__
,
2615 "gdbarch: gdbarch_pseudo_register_read invalid");
2616 if (gdbarch_debug
>= 2)
2617 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2618 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2622 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2623 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2625 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2629 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2631 gdb_assert (gdbarch
!= NULL
);
2632 return gdbarch
->pseudo_register_write
!= 0;
2636 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2638 gdb_assert (gdbarch
!= NULL
);
2639 if (gdbarch
->pseudo_register_write
== 0)
2640 internal_error (__FILE__
, __LINE__
,
2641 "gdbarch: gdbarch_pseudo_register_write invalid");
2642 if (gdbarch_debug
>= 2)
2643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2644 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2648 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2649 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2651 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2655 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2657 gdb_assert (gdbarch
!= NULL
);
2658 if (gdbarch
->num_regs
== -1)
2659 internal_error (__FILE__
, __LINE__
,
2660 "gdbarch: gdbarch_num_regs invalid");
2661 if (gdbarch_debug
>= 2)
2662 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2663 return gdbarch
->num_regs
;
2667 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2670 gdbarch
->num_regs
= num_regs
;
2674 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2676 gdb_assert (gdbarch
!= NULL
);
2677 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2678 if (gdbarch_debug
>= 2)
2679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2680 return gdbarch
->num_pseudo_regs
;
2684 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2685 int num_pseudo_regs
)
2687 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2691 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2693 gdb_assert (gdbarch
!= NULL
);
2694 /* Skip verify of sp_regnum, invalid_p == 0 */
2695 if (gdbarch_debug
>= 2)
2696 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2697 return gdbarch
->sp_regnum
;
2701 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2704 gdbarch
->sp_regnum
= sp_regnum
;
2708 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2710 gdb_assert (gdbarch
!= NULL
);
2711 /* Skip verify of fp_regnum, invalid_p == 0 */
2712 if (gdbarch_debug
>= 2)
2713 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2714 return gdbarch
->fp_regnum
;
2718 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2721 gdbarch
->fp_regnum
= fp_regnum
;
2725 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2727 gdb_assert (gdbarch
!= NULL
);
2728 /* Skip verify of pc_regnum, invalid_p == 0 */
2729 if (gdbarch_debug
>= 2)
2730 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2731 return gdbarch
->pc_regnum
;
2735 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2738 gdbarch
->pc_regnum
= pc_regnum
;
2742 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2744 gdb_assert (gdbarch
!= NULL
);
2745 /* Skip verify of ps_regnum, invalid_p == 0 */
2746 if (gdbarch_debug
>= 2)
2747 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2748 return gdbarch
->ps_regnum
;
2752 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2755 gdbarch
->ps_regnum
= ps_regnum
;
2759 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2761 gdb_assert (gdbarch
!= NULL
);
2762 /* Skip verify of fp0_regnum, invalid_p == 0 */
2763 if (gdbarch_debug
>= 2)
2764 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2765 return gdbarch
->fp0_regnum
;
2769 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2772 gdbarch
->fp0_regnum
= fp0_regnum
;
2776 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2778 gdb_assert (gdbarch
!= NULL
);
2779 /* Skip verify of npc_regnum, invalid_p == 0 */
2780 if (gdbarch_debug
>= 2)
2781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2782 return gdbarch
->npc_regnum
;
2786 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2789 gdbarch
->npc_regnum
= npc_regnum
;
2793 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2795 gdb_assert (gdbarch
!= NULL
);
2796 if (gdbarch
->stab_reg_to_regnum
== 0)
2797 internal_error (__FILE__
, __LINE__
,
2798 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2799 if (gdbarch_debug
>= 2)
2800 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2801 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2805 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2806 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2808 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2812 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2814 gdb_assert (gdbarch
!= NULL
);
2815 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2816 internal_error (__FILE__
, __LINE__
,
2817 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2818 if (gdbarch_debug
>= 2)
2819 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2820 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2824 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2825 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2827 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2831 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2833 gdb_assert (gdbarch
!= NULL
);
2834 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2835 internal_error (__FILE__
, __LINE__
,
2836 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2837 if (gdbarch_debug
>= 2)
2838 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2839 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2843 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2844 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2846 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2850 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2852 gdb_assert (gdbarch
!= NULL
);
2853 if (gdbarch
->sdb_reg_to_regnum
== 0)
2854 internal_error (__FILE__
, __LINE__
,
2855 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2856 if (gdbarch_debug
>= 2)
2857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2858 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2862 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2863 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2865 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2869 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2871 gdb_assert (gdbarch
!= NULL
);
2872 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2873 internal_error (__FILE__
, __LINE__
,
2874 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2875 if (gdbarch_debug
>= 2)
2876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2877 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2881 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2882 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2884 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2888 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2890 gdb_assert (gdbarch
!= NULL
);
2891 if (gdbarch
->register_name
== 0)
2892 internal_error (__FILE__
, __LINE__
,
2893 "gdbarch: gdbarch_register_name invalid");
2894 if (gdbarch_debug
>= 2)
2895 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2896 return gdbarch
->register_name (regnr
);
2900 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2901 gdbarch_register_name_ftype register_name
)
2903 gdbarch
->register_name
= register_name
;
2907 gdbarch_register_size (struct gdbarch
*gdbarch
)
2909 gdb_assert (gdbarch
!= NULL
);
2910 if (gdbarch
->register_size
== -1)
2911 internal_error (__FILE__
, __LINE__
,
2912 "gdbarch: gdbarch_register_size invalid");
2913 if (gdbarch_debug
>= 2)
2914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2915 return gdbarch
->register_size
;
2919 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2922 gdbarch
->register_size
= register_size
;
2926 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2928 gdb_assert (gdbarch
!= NULL
);
2929 if (gdbarch
->register_bytes
== -1)
2930 internal_error (__FILE__
, __LINE__
,
2931 "gdbarch: gdbarch_register_bytes invalid");
2932 if (gdbarch_debug
>= 2)
2933 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2934 return gdbarch
->register_bytes
;
2938 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2941 gdbarch
->register_bytes
= register_bytes
;
2945 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2947 gdb_assert (gdbarch
!= NULL
);
2948 if (gdbarch
->register_byte
== 0)
2949 internal_error (__FILE__
, __LINE__
,
2950 "gdbarch: gdbarch_register_byte invalid");
2951 if (gdbarch_debug
>= 2)
2952 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2953 return gdbarch
->register_byte (reg_nr
);
2957 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2958 gdbarch_register_byte_ftype register_byte
)
2960 gdbarch
->register_byte
= register_byte
;
2964 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2966 gdb_assert (gdbarch
!= NULL
);
2967 if (gdbarch
->register_raw_size
== 0)
2968 internal_error (__FILE__
, __LINE__
,
2969 "gdbarch: gdbarch_register_raw_size invalid");
2970 if (gdbarch_debug
>= 2)
2971 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2972 return gdbarch
->register_raw_size (reg_nr
);
2976 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2977 gdbarch_register_raw_size_ftype register_raw_size
)
2979 gdbarch
->register_raw_size
= register_raw_size
;
2983 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2985 gdb_assert (gdbarch
!= NULL
);
2986 if (gdbarch
->max_register_raw_size
== -1)
2987 internal_error (__FILE__
, __LINE__
,
2988 "gdbarch: gdbarch_max_register_raw_size invalid");
2989 if (gdbarch_debug
>= 2)
2990 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2991 return gdbarch
->max_register_raw_size
;
2995 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2996 int max_register_raw_size
)
2998 gdbarch
->max_register_raw_size
= max_register_raw_size
;
3002 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3004 gdb_assert (gdbarch
!= NULL
);
3005 if (gdbarch
->register_virtual_size
== 0)
3006 internal_error (__FILE__
, __LINE__
,
3007 "gdbarch: gdbarch_register_virtual_size invalid");
3008 if (gdbarch_debug
>= 2)
3009 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3010 return gdbarch
->register_virtual_size (reg_nr
);
3014 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3015 gdbarch_register_virtual_size_ftype register_virtual_size
)
3017 gdbarch
->register_virtual_size
= register_virtual_size
;
3021 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
3023 gdb_assert (gdbarch
!= NULL
);
3024 if (gdbarch
->max_register_virtual_size
== -1)
3025 internal_error (__FILE__
, __LINE__
,
3026 "gdbarch: gdbarch_max_register_virtual_size invalid");
3027 if (gdbarch_debug
>= 2)
3028 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
3029 return gdbarch
->max_register_virtual_size
;
3033 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
3034 int max_register_virtual_size
)
3036 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
3040 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3042 gdb_assert (gdbarch
!= NULL
);
3043 if (gdbarch
->register_virtual_type
== 0)
3044 internal_error (__FILE__
, __LINE__
,
3045 "gdbarch: gdbarch_register_virtual_type invalid");
3046 if (gdbarch_debug
>= 2)
3047 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3048 return gdbarch
->register_virtual_type (reg_nr
);
3052 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3053 gdbarch_register_virtual_type_ftype register_virtual_type
)
3055 gdbarch
->register_virtual_type
= register_virtual_type
;
3059 gdbarch_do_registers_info_p (struct gdbarch
*gdbarch
)
3061 gdb_assert (gdbarch
!= NULL
);
3062 return gdbarch
->do_registers_info
!= 0;
3066 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3068 gdb_assert (gdbarch
!= NULL
);
3069 if (gdbarch
->do_registers_info
== 0)
3070 internal_error (__FILE__
, __LINE__
,
3071 "gdbarch: gdbarch_do_registers_info invalid");
3072 if (gdbarch_debug
>= 2)
3073 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
3074 gdbarch
->do_registers_info (reg_nr
, fpregs
);
3078 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
3079 gdbarch_do_registers_info_ftype do_registers_info
)
3081 gdbarch
->do_registers_info
= do_registers_info
;
3085 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3087 gdb_assert (gdbarch
!= NULL
);
3088 if (gdbarch
->print_registers_info
== 0)
3089 internal_error (__FILE__
, __LINE__
,
3090 "gdbarch: gdbarch_print_registers_info invalid");
3091 if (gdbarch_debug
>= 2)
3092 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3093 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3097 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3098 gdbarch_print_registers_info_ftype print_registers_info
)
3100 gdbarch
->print_registers_info
= print_registers_info
;
3104 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3106 gdb_assert (gdbarch
!= NULL
);
3107 return gdbarch
->print_float_info
!= 0;
3111 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3113 gdb_assert (gdbarch
!= NULL
);
3114 if (gdbarch
->print_float_info
== 0)
3115 internal_error (__FILE__
, __LINE__
,
3116 "gdbarch: gdbarch_print_float_info invalid");
3117 if (gdbarch_debug
>= 2)
3118 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3119 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3123 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3124 gdbarch_print_float_info_ftype print_float_info
)
3126 gdbarch
->print_float_info
= print_float_info
;
3130 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3132 gdb_assert (gdbarch
!= NULL
);
3133 return gdbarch
->print_vector_info
!= 0;
3137 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3139 gdb_assert (gdbarch
!= NULL
);
3140 if (gdbarch
->print_vector_info
== 0)
3141 internal_error (__FILE__
, __LINE__
,
3142 "gdbarch: gdbarch_print_vector_info invalid");
3143 if (gdbarch_debug
>= 2)
3144 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3145 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3149 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3150 gdbarch_print_vector_info_ftype print_vector_info
)
3152 gdbarch
->print_vector_info
= print_vector_info
;
3156 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3158 gdb_assert (gdbarch
!= NULL
);
3159 if (gdbarch
->register_sim_regno
== 0)
3160 internal_error (__FILE__
, __LINE__
,
3161 "gdbarch: gdbarch_register_sim_regno invalid");
3162 if (gdbarch_debug
>= 2)
3163 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3164 return gdbarch
->register_sim_regno (reg_nr
);
3168 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3169 gdbarch_register_sim_regno_ftype register_sim_regno
)
3171 gdbarch
->register_sim_regno
= register_sim_regno
;
3175 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3177 gdb_assert (gdbarch
!= NULL
);
3178 return gdbarch
->register_bytes_ok
!= 0;
3182 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3184 gdb_assert (gdbarch
!= NULL
);
3185 if (gdbarch
->register_bytes_ok
== 0)
3186 internal_error (__FILE__
, __LINE__
,
3187 "gdbarch: gdbarch_register_bytes_ok invalid");
3188 if (gdbarch_debug
>= 2)
3189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3190 return gdbarch
->register_bytes_ok (nr_bytes
);
3194 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3195 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3197 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3201 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3203 gdb_assert (gdbarch
!= NULL
);
3204 if (gdbarch
->cannot_fetch_register
== 0)
3205 internal_error (__FILE__
, __LINE__
,
3206 "gdbarch: gdbarch_cannot_fetch_register invalid");
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3209 return gdbarch
->cannot_fetch_register (regnum
);
3213 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3214 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3216 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3220 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3222 gdb_assert (gdbarch
!= NULL
);
3223 if (gdbarch
->cannot_store_register
== 0)
3224 internal_error (__FILE__
, __LINE__
,
3225 "gdbarch: gdbarch_cannot_store_register invalid");
3226 if (gdbarch_debug
>= 2)
3227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3228 return gdbarch
->cannot_store_register (regnum
);
3232 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3233 gdbarch_cannot_store_register_ftype cannot_store_register
)
3235 gdbarch
->cannot_store_register
= cannot_store_register
;
3239 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3241 gdb_assert (gdbarch
!= NULL
);
3242 return gdbarch
->get_longjmp_target
!= 0;
3246 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3248 gdb_assert (gdbarch
!= NULL
);
3249 if (gdbarch
->get_longjmp_target
== 0)
3250 internal_error (__FILE__
, __LINE__
,
3251 "gdbarch: gdbarch_get_longjmp_target invalid");
3252 if (gdbarch_debug
>= 2)
3253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3254 return gdbarch
->get_longjmp_target (pc
);
3258 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3259 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3261 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3265 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3267 gdb_assert (gdbarch
!= NULL
);
3268 if (gdbarch
->use_generic_dummy_frames
== -1)
3269 internal_error (__FILE__
, __LINE__
,
3270 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3271 if (gdbarch_debug
>= 2)
3272 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3273 return gdbarch
->use_generic_dummy_frames
;
3277 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3278 int use_generic_dummy_frames
)
3280 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3284 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3286 gdb_assert (gdbarch
!= NULL
);
3287 if (gdbarch
->call_dummy_location
== 0)
3288 internal_error (__FILE__
, __LINE__
,
3289 "gdbarch: gdbarch_call_dummy_location invalid");
3290 if (gdbarch_debug
>= 2)
3291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3292 return gdbarch
->call_dummy_location
;
3296 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3297 int call_dummy_location
)
3299 gdbarch
->call_dummy_location
= call_dummy_location
;
3303 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3305 gdb_assert (gdbarch
!= NULL
);
3306 if (gdbarch
->call_dummy_address
== 0)
3307 internal_error (__FILE__
, __LINE__
,
3308 "gdbarch: gdbarch_call_dummy_address invalid");
3309 if (gdbarch_debug
>= 2)
3310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3311 return gdbarch
->call_dummy_address ();
3315 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3316 gdbarch_call_dummy_address_ftype call_dummy_address
)
3318 gdbarch
->call_dummy_address
= call_dummy_address
;
3322 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3324 gdb_assert (gdbarch
!= NULL
);
3325 if (gdbarch
->call_dummy_start_offset
== -1)
3326 internal_error (__FILE__
, __LINE__
,
3327 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3328 if (gdbarch_debug
>= 2)
3329 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3330 return gdbarch
->call_dummy_start_offset
;
3334 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3335 CORE_ADDR call_dummy_start_offset
)
3337 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3341 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3343 gdb_assert (gdbarch
!= NULL
);
3344 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3345 internal_error (__FILE__
, __LINE__
,
3346 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3347 if (gdbarch_debug
>= 2)
3348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3349 return gdbarch
->call_dummy_breakpoint_offset
;
3353 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3354 CORE_ADDR call_dummy_breakpoint_offset
)
3356 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3360 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3362 gdb_assert (gdbarch
!= NULL
);
3363 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3364 internal_error (__FILE__
, __LINE__
,
3365 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3366 if (gdbarch_debug
>= 2)
3367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3368 return gdbarch
->call_dummy_breakpoint_offset_p
;
3372 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3373 int call_dummy_breakpoint_offset_p
)
3375 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3379 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3381 gdb_assert (gdbarch
!= NULL
);
3382 if (gdbarch
->call_dummy_length
== -1)
3383 internal_error (__FILE__
, __LINE__
,
3384 "gdbarch: gdbarch_call_dummy_length invalid");
3385 if (gdbarch_debug
>= 2)
3386 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3387 return gdbarch
->call_dummy_length
;
3391 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3392 int call_dummy_length
)
3394 gdbarch
->call_dummy_length
= call_dummy_length
;
3398 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3400 gdb_assert (gdbarch
!= NULL
);
3401 if (gdbarch
->pc_in_call_dummy
== 0)
3402 internal_error (__FILE__
, __LINE__
,
3403 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3404 if (gdbarch_debug
>= 2)
3405 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3406 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3410 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3411 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3413 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3417 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3419 gdb_assert (gdbarch
!= NULL
);
3420 if (gdbarch
->call_dummy_p
== -1)
3421 internal_error (__FILE__
, __LINE__
,
3422 "gdbarch: gdbarch_call_dummy_p invalid");
3423 if (gdbarch_debug
>= 2)
3424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3425 return gdbarch
->call_dummy_p
;
3429 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3432 gdbarch
->call_dummy_p
= call_dummy_p
;
3436 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3438 gdb_assert (gdbarch
!= NULL
);
3439 /* Skip verify of call_dummy_words, invalid_p == 0 */
3440 if (gdbarch_debug
>= 2)
3441 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3442 return gdbarch
->call_dummy_words
;
3446 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3447 LONGEST
* call_dummy_words
)
3449 gdbarch
->call_dummy_words
= call_dummy_words
;
3453 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3455 gdb_assert (gdbarch
!= NULL
);
3456 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3457 if (gdbarch_debug
>= 2)
3458 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3459 return gdbarch
->sizeof_call_dummy_words
;
3463 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3464 int sizeof_call_dummy_words
)
3466 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3470 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3472 gdb_assert (gdbarch
!= NULL
);
3473 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3474 internal_error (__FILE__
, __LINE__
,
3475 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3476 if (gdbarch_debug
>= 2)
3477 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3478 return gdbarch
->call_dummy_stack_adjust_p
;
3482 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3483 int call_dummy_stack_adjust_p
)
3485 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3489 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3491 gdb_assert (gdbarch
!= NULL
);
3492 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3493 internal_error (__FILE__
, __LINE__
,
3494 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3495 if (gdbarch_debug
>= 2)
3496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3497 return gdbarch
->call_dummy_stack_adjust
;
3501 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3502 int call_dummy_stack_adjust
)
3504 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3508 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
)
3510 gdb_assert (gdbarch
!= NULL
);
3511 if (gdbarch
->fix_call_dummy
== 0)
3512 internal_error (__FILE__
, __LINE__
,
3513 "gdbarch: gdbarch_fix_call_dummy invalid");
3514 if (gdbarch_debug
>= 2)
3515 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3516 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3520 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3521 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3523 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3527 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3529 gdb_assert (gdbarch
!= NULL
);
3530 if (gdbarch
->init_frame_pc_first
== 0)
3531 internal_error (__FILE__
, __LINE__
,
3532 "gdbarch: gdbarch_init_frame_pc_first invalid");
3533 if (gdbarch_debug
>= 2)
3534 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3535 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3539 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3540 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3542 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3546 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3548 gdb_assert (gdbarch
!= NULL
);
3549 if (gdbarch
->init_frame_pc
== 0)
3550 internal_error (__FILE__
, __LINE__
,
3551 "gdbarch: gdbarch_init_frame_pc invalid");
3552 if (gdbarch_debug
>= 2)
3553 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3554 gdbarch
->init_frame_pc (fromleaf
, prev
);
3558 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3559 gdbarch_init_frame_pc_ftype init_frame_pc
)
3561 gdbarch
->init_frame_pc
= init_frame_pc
;
3565 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3567 gdb_assert (gdbarch
!= NULL
);
3568 if (gdbarch_debug
>= 2)
3569 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3570 return gdbarch
->believe_pcc_promotion
;
3574 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3575 int believe_pcc_promotion
)
3577 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3581 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3583 gdb_assert (gdbarch
!= NULL
);
3584 if (gdbarch_debug
>= 2)
3585 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3586 return gdbarch
->believe_pcc_promotion_type
;
3590 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3591 int believe_pcc_promotion_type
)
3593 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3597 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3599 gdb_assert (gdbarch
!= NULL
);
3600 if (gdbarch
->coerce_float_to_double
== 0)
3601 internal_error (__FILE__
, __LINE__
,
3602 "gdbarch: gdbarch_coerce_float_to_double invalid");
3603 if (gdbarch_debug
>= 2)
3604 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3605 return gdbarch
->coerce_float_to_double (formal
, actual
);
3609 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3610 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3612 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3616 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
)
3618 gdb_assert (gdbarch
!= NULL
);
3619 if (gdbarch
->get_saved_register
== 0)
3620 internal_error (__FILE__
, __LINE__
,
3621 "gdbarch: gdbarch_get_saved_register invalid");
3622 if (gdbarch_debug
>= 2)
3623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3624 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3628 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3629 gdbarch_get_saved_register_ftype get_saved_register
)
3631 gdbarch
->get_saved_register
= get_saved_register
;
3635 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3637 gdb_assert (gdbarch
!= NULL
);
3638 if (gdbarch
->register_convertible
== 0)
3639 internal_error (__FILE__
, __LINE__
,
3640 "gdbarch: gdbarch_register_convertible invalid");
3641 if (gdbarch_debug
>= 2)
3642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3643 return gdbarch
->register_convertible (nr
);
3647 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3648 gdbarch_register_convertible_ftype register_convertible
)
3650 gdbarch
->register_convertible
= register_convertible
;
3654 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3656 gdb_assert (gdbarch
!= NULL
);
3657 if (gdbarch
->register_convert_to_virtual
== 0)
3658 internal_error (__FILE__
, __LINE__
,
3659 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3660 if (gdbarch_debug
>= 2)
3661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3662 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3666 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3667 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3669 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3673 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3675 gdb_assert (gdbarch
!= NULL
);
3676 if (gdbarch
->register_convert_to_raw
== 0)
3677 internal_error (__FILE__
, __LINE__
,
3678 "gdbarch: gdbarch_register_convert_to_raw invalid");
3679 if (gdbarch_debug
>= 2)
3680 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3681 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3685 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3686 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3688 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3692 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3694 gdb_assert (gdbarch
!= NULL
);
3695 if (gdbarch
->convert_register_p
== 0)
3696 internal_error (__FILE__
, __LINE__
,
3697 "gdbarch: gdbarch_convert_register_p invalid");
3698 if (gdbarch_debug
>= 2)
3699 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3700 return gdbarch
->convert_register_p (regnum
);
3704 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3705 gdbarch_convert_register_p_ftype convert_register_p
)
3707 gdbarch
->convert_register_p
= convert_register_p
;
3711 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3713 gdb_assert (gdbarch
!= NULL
);
3714 if (gdbarch
->register_to_value
== 0)
3715 internal_error (__FILE__
, __LINE__
,
3716 "gdbarch: gdbarch_register_to_value invalid");
3717 if (gdbarch_debug
>= 2)
3718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3719 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3723 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3724 gdbarch_register_to_value_ftype register_to_value
)
3726 gdbarch
->register_to_value
= register_to_value
;
3730 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3732 gdb_assert (gdbarch
!= NULL
);
3733 if (gdbarch
->value_to_register
== 0)
3734 internal_error (__FILE__
, __LINE__
,
3735 "gdbarch: gdbarch_value_to_register invalid");
3736 if (gdbarch_debug
>= 2)
3737 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3738 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3742 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3743 gdbarch_value_to_register_ftype value_to_register
)
3745 gdbarch
->value_to_register
= value_to_register
;
3749 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3751 gdb_assert (gdbarch
!= NULL
);
3752 if (gdbarch
->pointer_to_address
== 0)
3753 internal_error (__FILE__
, __LINE__
,
3754 "gdbarch: gdbarch_pointer_to_address invalid");
3755 if (gdbarch_debug
>= 2)
3756 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3757 return gdbarch
->pointer_to_address (type
, buf
);
3761 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3762 gdbarch_pointer_to_address_ftype pointer_to_address
)
3764 gdbarch
->pointer_to_address
= pointer_to_address
;
3768 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3770 gdb_assert (gdbarch
!= NULL
);
3771 if (gdbarch
->address_to_pointer
== 0)
3772 internal_error (__FILE__
, __LINE__
,
3773 "gdbarch: gdbarch_address_to_pointer invalid");
3774 if (gdbarch_debug
>= 2)
3775 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3776 gdbarch
->address_to_pointer (type
, buf
, addr
);
3780 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3781 gdbarch_address_to_pointer_ftype address_to_pointer
)
3783 gdbarch
->address_to_pointer
= address_to_pointer
;
3787 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3789 gdb_assert (gdbarch
!= NULL
);
3790 return gdbarch
->integer_to_address
!= 0;
3794 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3796 gdb_assert (gdbarch
!= NULL
);
3797 if (gdbarch
->integer_to_address
== 0)
3798 internal_error (__FILE__
, __LINE__
,
3799 "gdbarch: gdbarch_integer_to_address invalid");
3800 if (gdbarch_debug
>= 2)
3801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3802 return gdbarch
->integer_to_address (type
, buf
);
3806 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3807 gdbarch_integer_to_address_ftype integer_to_address
)
3809 gdbarch
->integer_to_address
= integer_to_address
;
3813 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3815 gdb_assert (gdbarch
!= NULL
);
3816 if (gdbarch
->return_value_on_stack
== 0)
3817 internal_error (__FILE__
, __LINE__
,
3818 "gdbarch: gdbarch_return_value_on_stack invalid");
3819 if (gdbarch_debug
>= 2)
3820 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3821 return gdbarch
->return_value_on_stack (type
);
3825 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3826 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3828 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3832 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3834 gdb_assert (gdbarch
!= NULL
);
3835 if (gdbarch
->push_arguments
== 0)
3836 internal_error (__FILE__
, __LINE__
,
3837 "gdbarch: gdbarch_push_arguments invalid");
3838 if (gdbarch_debug
>= 2)
3839 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3840 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3844 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3845 gdbarch_push_arguments_ftype push_arguments
)
3847 gdbarch
->push_arguments
= push_arguments
;
3851 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3853 gdb_assert (gdbarch
!= NULL
);
3854 if (gdbarch
->push_dummy_frame
== 0)
3855 internal_error (__FILE__
, __LINE__
,
3856 "gdbarch: gdbarch_push_dummy_frame invalid");
3857 if (gdbarch_debug
>= 2)
3858 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3859 gdbarch
->push_dummy_frame ();
3863 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3864 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3866 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3870 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3872 gdb_assert (gdbarch
!= NULL
);
3873 return gdbarch
->push_return_address
!= 0;
3877 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3879 gdb_assert (gdbarch
!= NULL
);
3880 if (gdbarch
->push_return_address
== 0)
3881 internal_error (__FILE__
, __LINE__
,
3882 "gdbarch: gdbarch_push_return_address invalid");
3883 if (gdbarch_debug
>= 2)
3884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3885 return gdbarch
->push_return_address (pc
, sp
);
3889 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3890 gdbarch_push_return_address_ftype push_return_address
)
3892 gdbarch
->push_return_address
= push_return_address
;
3896 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3898 gdb_assert (gdbarch
!= NULL
);
3899 if (gdbarch
->pop_frame
== 0)
3900 internal_error (__FILE__
, __LINE__
,
3901 "gdbarch: gdbarch_pop_frame invalid");
3902 if (gdbarch_debug
>= 2)
3903 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3904 gdbarch
->pop_frame ();
3908 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3909 gdbarch_pop_frame_ftype pop_frame
)
3911 gdbarch
->pop_frame
= pop_frame
;
3915 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3917 gdb_assert (gdbarch
!= NULL
);
3918 if (gdbarch
->store_struct_return
== 0)
3919 internal_error (__FILE__
, __LINE__
,
3920 "gdbarch: gdbarch_store_struct_return invalid");
3921 if (gdbarch_debug
>= 2)
3922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3923 gdbarch
->store_struct_return (addr
, sp
);
3927 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3928 gdbarch_store_struct_return_ftype store_struct_return
)
3930 gdbarch
->store_struct_return
= store_struct_return
;
3934 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
3936 gdb_assert (gdbarch
!= NULL
);
3937 if (gdbarch
->extract_return_value
== 0)
3938 internal_error (__FILE__
, __LINE__
,
3939 "gdbarch: gdbarch_extract_return_value invalid");
3940 if (gdbarch_debug
>= 2)
3941 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3942 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3946 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3947 gdbarch_extract_return_value_ftype extract_return_value
)
3949 gdbarch
->extract_return_value
= extract_return_value
;
3953 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
3955 gdb_assert (gdbarch
!= NULL
);
3956 if (gdbarch
->store_return_value
== 0)
3957 internal_error (__FILE__
, __LINE__
,
3958 "gdbarch: gdbarch_store_return_value invalid");
3959 if (gdbarch_debug
>= 2)
3960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3961 gdbarch
->store_return_value (type
, regcache
, valbuf
);
3965 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3966 gdbarch_store_return_value_ftype store_return_value
)
3968 gdbarch
->store_return_value
= store_return_value
;
3972 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3974 gdb_assert (gdbarch
!= NULL
);
3975 if (gdbarch
->deprecated_extract_return_value
== 0)
3976 internal_error (__FILE__
, __LINE__
,
3977 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
3978 if (gdbarch_debug
>= 2)
3979 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3980 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
3984 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
3985 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
3987 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
3991 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3993 gdb_assert (gdbarch
!= NULL
);
3994 if (gdbarch
->deprecated_store_return_value
== 0)
3995 internal_error (__FILE__
, __LINE__
,
3996 "gdbarch: gdbarch_deprecated_store_return_value invalid");
3997 if (gdbarch_debug
>= 2)
3998 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
3999 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4003 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4004 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4006 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4010 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4012 gdb_assert (gdbarch
!= NULL
);
4013 return gdbarch
->extract_struct_value_address
!= 0;
4017 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4019 gdb_assert (gdbarch
!= NULL
);
4020 if (gdbarch
->extract_struct_value_address
== 0)
4021 internal_error (__FILE__
, __LINE__
,
4022 "gdbarch: gdbarch_extract_struct_value_address invalid");
4023 if (gdbarch_debug
>= 2)
4024 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4025 return gdbarch
->extract_struct_value_address (regcache
);
4029 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4030 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4032 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4036 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4038 gdb_assert (gdbarch
!= NULL
);
4039 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4043 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4045 gdb_assert (gdbarch
!= NULL
);
4046 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4047 internal_error (__FILE__
, __LINE__
,
4048 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4049 if (gdbarch_debug
>= 2)
4050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4051 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4055 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4056 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4058 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4062 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4064 gdb_assert (gdbarch
!= NULL
);
4065 if (gdbarch
->use_struct_convention
== 0)
4066 internal_error (__FILE__
, __LINE__
,
4067 "gdbarch: gdbarch_use_struct_convention invalid");
4068 if (gdbarch_debug
>= 2)
4069 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4070 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4074 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4075 gdbarch_use_struct_convention_ftype use_struct_convention
)
4077 gdbarch
->use_struct_convention
= use_struct_convention
;
4081 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4083 gdb_assert (gdbarch
!= NULL
);
4084 if (gdbarch
->frame_init_saved_regs
== 0)
4085 internal_error (__FILE__
, __LINE__
,
4086 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4087 if (gdbarch_debug
>= 2)
4088 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
4089 gdbarch
->frame_init_saved_regs (frame
);
4093 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4094 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
4096 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
4100 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4102 gdb_assert (gdbarch
!= NULL
);
4103 return gdbarch
->init_extra_frame_info
!= 0;
4107 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4109 gdb_assert (gdbarch
!= NULL
);
4110 if (gdbarch
->init_extra_frame_info
== 0)
4111 internal_error (__FILE__
, __LINE__
,
4112 "gdbarch: gdbarch_init_extra_frame_info invalid");
4113 if (gdbarch_debug
>= 2)
4114 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
4115 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4119 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4120 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4122 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4126 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4128 gdb_assert (gdbarch
!= NULL
);
4129 if (gdbarch
->skip_prologue
== 0)
4130 internal_error (__FILE__
, __LINE__
,
4131 "gdbarch: gdbarch_skip_prologue invalid");
4132 if (gdbarch_debug
>= 2)
4133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4134 return gdbarch
->skip_prologue (ip
);
4138 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4139 gdbarch_skip_prologue_ftype skip_prologue
)
4141 gdbarch
->skip_prologue
= skip_prologue
;
4145 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4147 gdb_assert (gdbarch
!= NULL
);
4148 if (gdbarch
->prologue_frameless_p
== 0)
4149 internal_error (__FILE__
, __LINE__
,
4150 "gdbarch: gdbarch_prologue_frameless_p invalid");
4151 if (gdbarch_debug
>= 2)
4152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4153 return gdbarch
->prologue_frameless_p (ip
);
4157 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4158 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4160 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4164 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4166 gdb_assert (gdbarch
!= NULL
);
4167 if (gdbarch
->inner_than
== 0)
4168 internal_error (__FILE__
, __LINE__
,
4169 "gdbarch: gdbarch_inner_than invalid");
4170 if (gdbarch_debug
>= 2)
4171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4172 return gdbarch
->inner_than (lhs
, rhs
);
4176 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4177 gdbarch_inner_than_ftype inner_than
)
4179 gdbarch
->inner_than
= inner_than
;
4182 const unsigned char *
4183 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4185 gdb_assert (gdbarch
!= NULL
);
4186 if (gdbarch
->breakpoint_from_pc
== 0)
4187 internal_error (__FILE__
, __LINE__
,
4188 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4189 if (gdbarch_debug
>= 2)
4190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4191 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4195 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4196 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4198 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4202 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4204 gdb_assert (gdbarch
!= NULL
);
4205 if (gdbarch
->memory_insert_breakpoint
== 0)
4206 internal_error (__FILE__
, __LINE__
,
4207 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4208 if (gdbarch_debug
>= 2)
4209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4210 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4214 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4215 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4217 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4221 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4223 gdb_assert (gdbarch
!= NULL
);
4224 if (gdbarch
->memory_remove_breakpoint
== 0)
4225 internal_error (__FILE__
, __LINE__
,
4226 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4227 if (gdbarch_debug
>= 2)
4228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4229 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4233 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4234 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4236 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4240 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4242 gdb_assert (gdbarch
!= NULL
);
4243 if (gdbarch
->decr_pc_after_break
== -1)
4244 internal_error (__FILE__
, __LINE__
,
4245 "gdbarch: gdbarch_decr_pc_after_break invalid");
4246 if (gdbarch_debug
>= 2)
4247 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4248 return gdbarch
->decr_pc_after_break
;
4252 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4253 CORE_ADDR decr_pc_after_break
)
4255 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4259 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4261 gdb_assert (gdbarch
!= NULL
);
4262 if (gdbarch
->prepare_to_proceed
== 0)
4263 internal_error (__FILE__
, __LINE__
,
4264 "gdbarch: gdbarch_prepare_to_proceed invalid");
4265 if (gdbarch_debug
>= 2)
4266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4267 return gdbarch
->prepare_to_proceed (select_it
);
4271 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4272 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4274 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4278 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4280 gdb_assert (gdbarch
!= NULL
);
4281 if (gdbarch
->function_start_offset
== -1)
4282 internal_error (__FILE__
, __LINE__
,
4283 "gdbarch: gdbarch_function_start_offset invalid");
4284 if (gdbarch_debug
>= 2)
4285 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4286 return gdbarch
->function_start_offset
;
4290 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4291 CORE_ADDR function_start_offset
)
4293 gdbarch
->function_start_offset
= function_start_offset
;
4297 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4299 gdb_assert (gdbarch
!= NULL
);
4300 if (gdbarch
->remote_translate_xfer_address
== 0)
4301 internal_error (__FILE__
, __LINE__
,
4302 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4303 if (gdbarch_debug
>= 2)
4304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4305 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4309 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4310 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4312 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4316 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4318 gdb_assert (gdbarch
!= NULL
);
4319 if (gdbarch
->frame_args_skip
== -1)
4320 internal_error (__FILE__
, __LINE__
,
4321 "gdbarch: gdbarch_frame_args_skip invalid");
4322 if (gdbarch_debug
>= 2)
4323 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4324 return gdbarch
->frame_args_skip
;
4328 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4329 CORE_ADDR frame_args_skip
)
4331 gdbarch
->frame_args_skip
= frame_args_skip
;
4335 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4337 gdb_assert (gdbarch
!= NULL
);
4338 if (gdbarch
->frameless_function_invocation
== 0)
4339 internal_error (__FILE__
, __LINE__
,
4340 "gdbarch: gdbarch_frameless_function_invocation invalid");
4341 if (gdbarch_debug
>= 2)
4342 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4343 return gdbarch
->frameless_function_invocation (fi
);
4347 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4348 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4350 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4354 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4356 gdb_assert (gdbarch
!= NULL
);
4357 if (gdbarch
->frame_chain
== 0)
4358 internal_error (__FILE__
, __LINE__
,
4359 "gdbarch: gdbarch_frame_chain invalid");
4360 if (gdbarch_debug
>= 2)
4361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4362 return gdbarch
->frame_chain (frame
);
4366 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4367 gdbarch_frame_chain_ftype frame_chain
)
4369 gdbarch
->frame_chain
= frame_chain
;
4373 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4375 gdb_assert (gdbarch
!= NULL
);
4376 if (gdbarch
->frame_chain_valid
== 0)
4377 internal_error (__FILE__
, __LINE__
,
4378 "gdbarch: gdbarch_frame_chain_valid invalid");
4379 if (gdbarch_debug
>= 2)
4380 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4381 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4385 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4386 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4388 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4392 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4394 gdb_assert (gdbarch
!= NULL
);
4395 if (gdbarch
->frame_saved_pc
== 0)
4396 internal_error (__FILE__
, __LINE__
,
4397 "gdbarch: gdbarch_frame_saved_pc invalid");
4398 if (gdbarch_debug
>= 2)
4399 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4400 return gdbarch
->frame_saved_pc (fi
);
4404 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4405 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4407 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4411 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4413 gdb_assert (gdbarch
!= NULL
);
4414 if (gdbarch
->frame_args_address
== 0)
4415 internal_error (__FILE__
, __LINE__
,
4416 "gdbarch: gdbarch_frame_args_address invalid");
4417 if (gdbarch_debug
>= 2)
4418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4419 return gdbarch
->frame_args_address (fi
);
4423 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4424 gdbarch_frame_args_address_ftype frame_args_address
)
4426 gdbarch
->frame_args_address
= frame_args_address
;
4430 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4432 gdb_assert (gdbarch
!= NULL
);
4433 if (gdbarch
->frame_locals_address
== 0)
4434 internal_error (__FILE__
, __LINE__
,
4435 "gdbarch: gdbarch_frame_locals_address invalid");
4436 if (gdbarch_debug
>= 2)
4437 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4438 return gdbarch
->frame_locals_address (fi
);
4442 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4443 gdbarch_frame_locals_address_ftype frame_locals_address
)
4445 gdbarch
->frame_locals_address
= frame_locals_address
;
4449 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4451 gdb_assert (gdbarch
!= NULL
);
4452 if (gdbarch
->saved_pc_after_call
== 0)
4453 internal_error (__FILE__
, __LINE__
,
4454 "gdbarch: gdbarch_saved_pc_after_call invalid");
4455 if (gdbarch_debug
>= 2)
4456 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4457 return gdbarch
->saved_pc_after_call (frame
);
4461 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4462 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4464 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4468 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4470 gdb_assert (gdbarch
!= NULL
);
4471 if (gdbarch
->frame_num_args
== 0)
4472 internal_error (__FILE__
, __LINE__
,
4473 "gdbarch: gdbarch_frame_num_args invalid");
4474 if (gdbarch_debug
>= 2)
4475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4476 return gdbarch
->frame_num_args (frame
);
4480 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4481 gdbarch_frame_num_args_ftype frame_num_args
)
4483 gdbarch
->frame_num_args
= frame_num_args
;
4487 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4489 gdb_assert (gdbarch
!= NULL
);
4490 return gdbarch
->stack_align
!= 0;
4494 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4496 gdb_assert (gdbarch
!= NULL
);
4497 if (gdbarch
->stack_align
== 0)
4498 internal_error (__FILE__
, __LINE__
,
4499 "gdbarch: gdbarch_stack_align invalid");
4500 if (gdbarch_debug
>= 2)
4501 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4502 return gdbarch
->stack_align (sp
);
4506 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4507 gdbarch_stack_align_ftype stack_align
)
4509 gdbarch
->stack_align
= stack_align
;
4513 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4515 gdb_assert (gdbarch
!= NULL
);
4516 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4517 if (gdbarch_debug
>= 2)
4518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4519 return gdbarch
->extra_stack_alignment_needed
;
4523 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4524 int extra_stack_alignment_needed
)
4526 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4530 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4532 gdb_assert (gdbarch
!= NULL
);
4533 return gdbarch
->reg_struct_has_addr
!= 0;
4537 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4539 gdb_assert (gdbarch
!= NULL
);
4540 if (gdbarch
->reg_struct_has_addr
== 0)
4541 internal_error (__FILE__
, __LINE__
,
4542 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4543 if (gdbarch_debug
>= 2)
4544 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4545 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4549 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4550 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4552 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4556 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4558 gdb_assert (gdbarch
!= NULL
);
4559 return gdbarch
->save_dummy_frame_tos
!= 0;
4563 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4565 gdb_assert (gdbarch
!= NULL
);
4566 if (gdbarch
->save_dummy_frame_tos
== 0)
4567 internal_error (__FILE__
, __LINE__
,
4568 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4569 if (gdbarch_debug
>= 2)
4570 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4571 gdbarch
->save_dummy_frame_tos (sp
);
4575 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4576 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4578 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4582 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4584 gdb_assert (gdbarch
!= NULL
);
4585 if (gdbarch_debug
>= 2)
4586 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4587 return gdbarch
->parm_boundary
;
4591 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4594 gdbarch
->parm_boundary
= parm_boundary
;
4597 const struct floatformat
*
4598 gdbarch_float_format (struct gdbarch
*gdbarch
)
4600 gdb_assert (gdbarch
!= NULL
);
4601 if (gdbarch_debug
>= 2)
4602 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4603 return gdbarch
->float_format
;
4607 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4608 const struct floatformat
* float_format
)
4610 gdbarch
->float_format
= float_format
;
4613 const struct floatformat
*
4614 gdbarch_double_format (struct gdbarch
*gdbarch
)
4616 gdb_assert (gdbarch
!= NULL
);
4617 if (gdbarch_debug
>= 2)
4618 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4619 return gdbarch
->double_format
;
4623 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4624 const struct floatformat
* double_format
)
4626 gdbarch
->double_format
= double_format
;
4629 const struct floatformat
*
4630 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4632 gdb_assert (gdbarch
!= NULL
);
4633 if (gdbarch_debug
>= 2)
4634 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4635 return gdbarch
->long_double_format
;
4639 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4640 const struct floatformat
* long_double_format
)
4642 gdbarch
->long_double_format
= long_double_format
;
4646 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4648 gdb_assert (gdbarch
!= NULL
);
4649 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4650 internal_error (__FILE__
, __LINE__
,
4651 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4652 if (gdbarch_debug
>= 2)
4653 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4654 return gdbarch
->convert_from_func_ptr_addr (addr
);
4658 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4659 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4661 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4665 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4667 gdb_assert (gdbarch
!= NULL
);
4668 if (gdbarch
->addr_bits_remove
== 0)
4669 internal_error (__FILE__
, __LINE__
,
4670 "gdbarch: gdbarch_addr_bits_remove invalid");
4671 if (gdbarch_debug
>= 2)
4672 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4673 return gdbarch
->addr_bits_remove (addr
);
4677 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4678 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4680 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4684 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4686 gdb_assert (gdbarch
!= NULL
);
4687 if (gdbarch
->smash_text_address
== 0)
4688 internal_error (__FILE__
, __LINE__
,
4689 "gdbarch: gdbarch_smash_text_address invalid");
4690 if (gdbarch_debug
>= 2)
4691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4692 return gdbarch
->smash_text_address (addr
);
4696 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4697 gdbarch_smash_text_address_ftype smash_text_address
)
4699 gdbarch
->smash_text_address
= smash_text_address
;
4703 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4705 gdb_assert (gdbarch
!= NULL
);
4706 return gdbarch
->software_single_step
!= 0;
4710 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4712 gdb_assert (gdbarch
!= NULL
);
4713 if (gdbarch
->software_single_step
== 0)
4714 internal_error (__FILE__
, __LINE__
,
4715 "gdbarch: gdbarch_software_single_step invalid");
4716 if (gdbarch_debug
>= 2)
4717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4718 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4722 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4723 gdbarch_software_single_step_ftype software_single_step
)
4725 gdbarch
->software_single_step
= software_single_step
;
4729 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4731 gdb_assert (gdbarch
!= NULL
);
4732 if (gdbarch
->print_insn
== 0)
4733 internal_error (__FILE__
, __LINE__
,
4734 "gdbarch: gdbarch_print_insn invalid");
4735 if (gdbarch_debug
>= 2)
4736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4737 return gdbarch
->print_insn (vma
, info
);
4741 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4742 gdbarch_print_insn_ftype print_insn
)
4744 gdbarch
->print_insn
= print_insn
;
4748 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4750 gdb_assert (gdbarch
!= NULL
);
4751 if (gdbarch
->skip_trampoline_code
== 0)
4752 internal_error (__FILE__
, __LINE__
,
4753 "gdbarch: gdbarch_skip_trampoline_code invalid");
4754 if (gdbarch_debug
>= 2)
4755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4756 return gdbarch
->skip_trampoline_code (pc
);
4760 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4761 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4763 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4767 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4769 gdb_assert (gdbarch
!= NULL
);
4770 if (gdbarch
->in_solib_call_trampoline
== 0)
4771 internal_error (__FILE__
, __LINE__
,
4772 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4773 if (gdbarch_debug
>= 2)
4774 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4775 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4779 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4780 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4782 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4786 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4788 gdb_assert (gdbarch
!= NULL
);
4789 if (gdbarch
->in_solib_return_trampoline
== 0)
4790 internal_error (__FILE__
, __LINE__
,
4791 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
4792 if (gdbarch_debug
>= 2)
4793 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
4794 return gdbarch
->in_solib_return_trampoline (pc
, name
);
4798 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
4799 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
4801 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
4805 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4807 gdb_assert (gdbarch
!= NULL
);
4808 if (gdbarch
->pc_in_sigtramp
== 0)
4809 internal_error (__FILE__
, __LINE__
,
4810 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4811 if (gdbarch_debug
>= 2)
4812 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4813 return gdbarch
->pc_in_sigtramp (pc
, name
);
4817 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4818 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4820 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4824 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
4826 gdb_assert (gdbarch
!= NULL
);
4827 return gdbarch
->sigtramp_start
!= 0;
4831 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4833 gdb_assert (gdbarch
!= NULL
);
4834 if (gdbarch
->sigtramp_start
== 0)
4835 internal_error (__FILE__
, __LINE__
,
4836 "gdbarch: gdbarch_sigtramp_start invalid");
4837 if (gdbarch_debug
>= 2)
4838 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
4839 return gdbarch
->sigtramp_start (pc
);
4843 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
4844 gdbarch_sigtramp_start_ftype sigtramp_start
)
4846 gdbarch
->sigtramp_start
= sigtramp_start
;
4850 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
4852 gdb_assert (gdbarch
!= NULL
);
4853 return gdbarch
->sigtramp_end
!= 0;
4857 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4859 gdb_assert (gdbarch
!= NULL
);
4860 if (gdbarch
->sigtramp_end
== 0)
4861 internal_error (__FILE__
, __LINE__
,
4862 "gdbarch: gdbarch_sigtramp_end invalid");
4863 if (gdbarch_debug
>= 2)
4864 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
4865 return gdbarch
->sigtramp_end (pc
);
4869 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
4870 gdbarch_sigtramp_end_ftype sigtramp_end
)
4872 gdbarch
->sigtramp_end
= sigtramp_end
;
4876 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4878 gdb_assert (gdbarch
!= NULL
);
4879 if (gdbarch
->in_function_epilogue_p
== 0)
4880 internal_error (__FILE__
, __LINE__
,
4881 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4882 if (gdbarch_debug
>= 2)
4883 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4884 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4888 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4889 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4891 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4895 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4897 gdb_assert (gdbarch
!= NULL
);
4898 if (gdbarch
->construct_inferior_arguments
== 0)
4899 internal_error (__FILE__
, __LINE__
,
4900 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4901 if (gdbarch_debug
>= 2)
4902 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4903 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4907 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4908 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4910 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4914 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4916 gdb_assert (gdbarch
!= NULL
);
4917 return gdbarch
->dwarf2_build_frame_info
!= 0;
4921 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4923 gdb_assert (gdbarch
!= NULL
);
4924 if (gdbarch
->dwarf2_build_frame_info
== 0)
4925 internal_error (__FILE__
, __LINE__
,
4926 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4927 if (gdbarch_debug
>= 2)
4928 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4929 gdbarch
->dwarf2_build_frame_info (objfile
);
4933 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4934 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4936 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4940 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4942 gdb_assert (gdbarch
!= NULL
);
4943 if (gdbarch
->elf_make_msymbol_special
== 0)
4944 internal_error (__FILE__
, __LINE__
,
4945 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4946 if (gdbarch_debug
>= 2)
4947 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4948 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4952 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4953 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4955 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4959 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4961 gdb_assert (gdbarch
!= NULL
);
4962 if (gdbarch
->coff_make_msymbol_special
== 0)
4963 internal_error (__FILE__
, __LINE__
,
4964 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4965 if (gdbarch_debug
>= 2)
4966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4967 gdbarch
->coff_make_msymbol_special (val
, msym
);
4971 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4972 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4974 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4978 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
4980 gdb_assert (gdbarch
!= NULL
);
4981 /* Skip verify of name_of_malloc, invalid_p == 0 */
4982 if (gdbarch_debug
>= 2)
4983 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
4984 return gdbarch
->name_of_malloc
;
4988 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
4989 const char * name_of_malloc
)
4991 gdbarch
->name_of_malloc
= name_of_malloc
;
4995 /* Keep a registry of per-architecture data-pointers required by GDB
5002 gdbarch_data_init_ftype
*init
;
5003 gdbarch_data_free_ftype
*free
;
5006 struct gdbarch_data_registration
5008 struct gdbarch_data
*data
;
5009 struct gdbarch_data_registration
*next
;
5012 struct gdbarch_data_registry
5015 struct gdbarch_data_registration
*registrations
;
5018 struct gdbarch_data_registry gdbarch_data_registry
=
5023 struct gdbarch_data
*
5024 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5025 gdbarch_data_free_ftype
*free
)
5027 struct gdbarch_data_registration
**curr
;
5028 /* Append the new registraration. */
5029 for (curr
= &gdbarch_data_registry
.registrations
;
5031 curr
= &(*curr
)->next
);
5032 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5033 (*curr
)->next
= NULL
;
5034 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5035 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5036 (*curr
)->data
->init
= init
;
5037 (*curr
)->data
->init_p
= 1;
5038 (*curr
)->data
->free
= free
;
5039 return (*curr
)->data
;
5043 /* Create/delete the gdbarch data vector. */
5046 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5048 gdb_assert (gdbarch
->data
== NULL
);
5049 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5050 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5054 free_gdbarch_data (struct gdbarch
*gdbarch
)
5056 struct gdbarch_data_registration
*rego
;
5057 gdb_assert (gdbarch
->data
!= NULL
);
5058 for (rego
= gdbarch_data_registry
.registrations
;
5062 struct gdbarch_data
*data
= rego
->data
;
5063 gdb_assert (data
->index
< gdbarch
->nr_data
);
5064 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5066 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5067 gdbarch
->data
[data
->index
] = NULL
;
5070 xfree (gdbarch
->data
);
5071 gdbarch
->data
= NULL
;
5075 /* Initialize the current value of the specified per-architecture
5079 set_gdbarch_data (struct gdbarch
*gdbarch
,
5080 struct gdbarch_data
*data
,
5083 gdb_assert (data
->index
< gdbarch
->nr_data
);
5084 if (gdbarch
->data
[data
->index
] != NULL
)
5086 gdb_assert (data
->free
!= NULL
);
5087 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5089 gdbarch
->data
[data
->index
] = pointer
;
5092 /* Return the current value of the specified per-architecture
5096 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5098 gdb_assert (data
->index
< gdbarch
->nr_data
);
5099 /* The data-pointer isn't initialized, call init() to get a value but
5100 only if the architecture initializaiton has completed. Otherwise
5101 punt - hope that the caller knows what they are doing. */
5102 if (gdbarch
->data
[data
->index
] == NULL
5103 && gdbarch
->initialized_p
)
5105 /* Be careful to detect an initialization cycle. */
5106 gdb_assert (data
->init_p
);
5108 gdb_assert (data
->init
!= NULL
);
5109 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5111 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5113 return gdbarch
->data
[data
->index
];
5118 /* Keep a registry of swapped data required by GDB modules. */
5123 struct gdbarch_swap_registration
*source
;
5124 struct gdbarch_swap
*next
;
5127 struct gdbarch_swap_registration
5130 unsigned long sizeof_data
;
5131 gdbarch_swap_ftype
*init
;
5132 struct gdbarch_swap_registration
*next
;
5135 struct gdbarch_swap_registry
5138 struct gdbarch_swap_registration
*registrations
;
5141 struct gdbarch_swap_registry gdbarch_swap_registry
=
5147 register_gdbarch_swap (void *data
,
5148 unsigned long sizeof_data
,
5149 gdbarch_swap_ftype
*init
)
5151 struct gdbarch_swap_registration
**rego
;
5152 for (rego
= &gdbarch_swap_registry
.registrations
;
5154 rego
= &(*rego
)->next
);
5155 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5156 (*rego
)->next
= NULL
;
5157 (*rego
)->init
= init
;
5158 (*rego
)->data
= data
;
5159 (*rego
)->sizeof_data
= sizeof_data
;
5163 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5165 struct gdbarch_swap
*curr
;
5166 for (curr
= gdbarch
->swap
;
5170 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5175 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5177 struct gdbarch_swap_registration
*rego
;
5178 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5179 for (rego
= gdbarch_swap_registry
.registrations
;
5183 if (rego
->data
!= NULL
)
5185 (*curr
) = XMALLOC (struct gdbarch_swap
);
5186 (*curr
)->source
= rego
;
5187 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5188 (*curr
)->next
= NULL
;
5189 curr
= &(*curr
)->next
;
5191 if (rego
->init
!= NULL
)
5197 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5199 struct gdbarch_swap
*curr
;
5200 for (curr
= gdbarch
->swap
;
5203 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5207 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5209 struct gdbarch_swap
*curr
;
5210 for (curr
= gdbarch
->swap
;
5213 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5217 /* Keep a registry of the architectures known by GDB. */
5219 struct gdbarch_registration
5221 enum bfd_architecture bfd_architecture
;
5222 gdbarch_init_ftype
*init
;
5223 gdbarch_dump_tdep_ftype
*dump_tdep
;
5224 struct gdbarch_list
*arches
;
5225 struct gdbarch_registration
*next
;
5228 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5231 append_name (const char ***buf
, int *nr
, const char *name
)
5233 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5239 gdbarch_printable_names (void)
5243 /* Accumulate a list of names based on the registed list of
5245 enum bfd_architecture a
;
5247 const char **arches
= NULL
;
5248 struct gdbarch_registration
*rego
;
5249 for (rego
= gdbarch_registry
;
5253 const struct bfd_arch_info
*ap
;
5254 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5256 internal_error (__FILE__
, __LINE__
,
5257 "gdbarch_architecture_names: multi-arch unknown");
5260 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5265 append_name (&arches
, &nr_arches
, NULL
);
5269 /* Just return all the architectures that BFD knows. Assume that
5270 the legacy architecture framework supports them. */
5271 return bfd_arch_list ();
5276 gdbarch_register (enum bfd_architecture bfd_architecture
,
5277 gdbarch_init_ftype
*init
,
5278 gdbarch_dump_tdep_ftype
*dump_tdep
)
5280 struct gdbarch_registration
**curr
;
5281 const struct bfd_arch_info
*bfd_arch_info
;
5282 /* Check that BFD recognizes this architecture */
5283 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5284 if (bfd_arch_info
== NULL
)
5286 internal_error (__FILE__
, __LINE__
,
5287 "gdbarch: Attempt to register unknown architecture (%d)",
5290 /* Check that we haven't seen this architecture before */
5291 for (curr
= &gdbarch_registry
;
5293 curr
= &(*curr
)->next
)
5295 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5296 internal_error (__FILE__
, __LINE__
,
5297 "gdbarch: Duplicate registraration of architecture (%s)",
5298 bfd_arch_info
->printable_name
);
5302 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5303 bfd_arch_info
->printable_name
,
5306 (*curr
) = XMALLOC (struct gdbarch_registration
);
5307 (*curr
)->bfd_architecture
= bfd_architecture
;
5308 (*curr
)->init
= init
;
5309 (*curr
)->dump_tdep
= dump_tdep
;
5310 (*curr
)->arches
= NULL
;
5311 (*curr
)->next
= NULL
;
5312 /* When non- multi-arch, install whatever target dump routine we've
5313 been provided - hopefully that routine has been written correctly
5314 and works regardless of multi-arch. */
5315 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5316 && startup_gdbarch
.dump_tdep
== NULL
)
5317 startup_gdbarch
.dump_tdep
= dump_tdep
;
5321 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5322 gdbarch_init_ftype
*init
)
5324 gdbarch_register (bfd_architecture
, init
, NULL
);
5328 /* Look for an architecture using gdbarch_info. Base search on only
5329 BFD_ARCH_INFO and BYTE_ORDER. */
5331 struct gdbarch_list
*
5332 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5333 const struct gdbarch_info
*info
)
5335 for (; arches
!= NULL
; arches
= arches
->next
)
5337 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5339 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5347 /* Update the current architecture. Return ZERO if the update request
5351 gdbarch_update_p (struct gdbarch_info info
)
5353 struct gdbarch
*new_gdbarch
;
5354 struct gdbarch
*old_gdbarch
;
5355 struct gdbarch_registration
*rego
;
5357 /* Fill in missing parts of the INFO struct using a number of
5358 sources: ``set ...''; INFOabfd supplied; existing target. */
5360 /* ``(gdb) set architecture ...'' */
5361 if (info
.bfd_arch_info
== NULL
5362 && !TARGET_ARCHITECTURE_AUTO
)
5363 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5364 if (info
.bfd_arch_info
== NULL
5365 && info
.abfd
!= NULL
5366 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5367 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5368 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5369 if (info
.bfd_arch_info
== NULL
)
5370 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5372 /* ``(gdb) set byte-order ...'' */
5373 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5374 && !TARGET_BYTE_ORDER_AUTO
)
5375 info
.byte_order
= TARGET_BYTE_ORDER
;
5376 /* From the INFO struct. */
5377 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5378 && info
.abfd
!= NULL
)
5379 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5380 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5381 : BFD_ENDIAN_UNKNOWN
);
5382 /* From the current target. */
5383 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5384 info
.byte_order
= TARGET_BYTE_ORDER
;
5386 /* Must have found some sort of architecture. */
5387 gdb_assert (info
.bfd_arch_info
!= NULL
);
5391 fprintf_unfiltered (gdb_stdlog
,
5392 "gdbarch_update: info.bfd_arch_info %s\n",
5393 (info
.bfd_arch_info
!= NULL
5394 ? info
.bfd_arch_info
->printable_name
5396 fprintf_unfiltered (gdb_stdlog
,
5397 "gdbarch_update: info.byte_order %d (%s)\n",
5399 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5400 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5402 fprintf_unfiltered (gdb_stdlog
,
5403 "gdbarch_update: info.abfd 0x%lx\n",
5405 fprintf_unfiltered (gdb_stdlog
,
5406 "gdbarch_update: info.tdep_info 0x%lx\n",
5407 (long) info
.tdep_info
);
5410 /* Find the target that knows about this architecture. */
5411 for (rego
= gdbarch_registry
;
5414 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5423 /* Swap the data belonging to the old target out setting the
5424 installed data to zero. This stops the ->init() function trying
5425 to refer to the previous architecture's global data structures. */
5426 swapout_gdbarch_swap (current_gdbarch
);
5427 clear_gdbarch_swap (current_gdbarch
);
5429 /* Save the previously selected architecture, setting the global to
5430 NULL. This stops ->init() trying to use the previous
5431 architecture's configuration. The previous architecture may not
5432 even be of the same architecture family. The most recent
5433 architecture of the same family is found at the head of the
5434 rego->arches list. */
5435 old_gdbarch
= current_gdbarch
;
5436 current_gdbarch
= NULL
;
5438 /* Ask the target for a replacement architecture. */
5439 new_gdbarch
= rego
->init (info
, rego
->arches
);
5441 /* Did the target like it? No. Reject the change and revert to the
5442 old architecture. */
5443 if (new_gdbarch
== NULL
)
5446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5447 swapin_gdbarch_swap (old_gdbarch
);
5448 current_gdbarch
= old_gdbarch
;
5452 /* Did the architecture change? No. Oops, put the old architecture
5454 if (old_gdbarch
== new_gdbarch
)
5457 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5459 new_gdbarch
->bfd_arch_info
->printable_name
);
5460 swapin_gdbarch_swap (old_gdbarch
);
5461 current_gdbarch
= old_gdbarch
;
5465 /* Is this a pre-existing architecture? Yes. Move it to the front
5466 of the list of architectures (keeping the list sorted Most
5467 Recently Used) and then copy it in. */
5469 struct gdbarch_list
**list
;
5470 for (list
= ®o
->arches
;
5472 list
= &(*list
)->next
)
5474 if ((*list
)->gdbarch
== new_gdbarch
)
5476 struct gdbarch_list
*this;
5478 fprintf_unfiltered (gdb_stdlog
,
5479 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5481 new_gdbarch
->bfd_arch_info
->printable_name
);
5484 (*list
) = this->next
;
5485 /* Insert in the front. */
5486 this->next
= rego
->arches
;
5487 rego
->arches
= this;
5488 /* Copy the new architecture in. */
5489 current_gdbarch
= new_gdbarch
;
5490 swapin_gdbarch_swap (new_gdbarch
);
5491 architecture_changed_event ();
5497 /* Prepend this new architecture to the architecture list (keep the
5498 list sorted Most Recently Used). */
5500 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5501 this->next
= rego
->arches
;
5502 this->gdbarch
= new_gdbarch
;
5503 rego
->arches
= this;
5506 /* Switch to this new architecture marking it initialized. */
5507 current_gdbarch
= new_gdbarch
;
5508 current_gdbarch
->initialized_p
= 1;
5511 fprintf_unfiltered (gdb_stdlog
,
5512 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5514 new_gdbarch
->bfd_arch_info
->printable_name
);
5517 /* Check that the newly installed architecture is valid. Plug in
5518 any post init values. */
5519 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5520 verify_gdbarch (new_gdbarch
);
5522 /* Initialize the per-architecture memory (swap) areas.
5523 CURRENT_GDBARCH must be update before these modules are
5525 init_gdbarch_swap (new_gdbarch
);
5527 /* Initialize the per-architecture data. CURRENT_GDBARCH
5528 must be updated before these modules are called. */
5529 architecture_changed_event ();
5532 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5540 /* Pointer to the target-dependent disassembly function. */
5541 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5542 disassemble_info tm_print_insn_info
;
5545 extern void _initialize_gdbarch (void);
5548 _initialize_gdbarch (void)
5550 struct cmd_list_element
*c
;
5552 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5553 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5554 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5555 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5556 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5558 add_show_from_set (add_set_cmd ("arch",
5561 (char *)&gdbarch_debug
,
5562 "Set architecture debugging.\n\
5563 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5565 c
= add_set_cmd ("archdebug",
5568 (char *)&gdbarch_debug
,
5569 "Set architecture debugging.\n\
5570 When non-zero, architecture debugging is enabled.", &setlist
);
5572 deprecate_cmd (c
, "set debug arch");
5573 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");