1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
67 #include "reggroups.h"
69 /* Static function declarations */
71 static void verify_gdbarch (struct gdbarch
*gdbarch
);
72 static void alloc_gdbarch_data (struct gdbarch
*);
73 static void free_gdbarch_data (struct gdbarch
*);
74 static void init_gdbarch_swap (struct gdbarch
*);
75 static void clear_gdbarch_swap (struct gdbarch
*);
76 static void swapout_gdbarch_swap (struct gdbarch
*);
77 static void swapin_gdbarch_swap (struct gdbarch
*);
79 /* Non-zero if we want to trace architecture code. */
82 #define GDBARCH_DEBUG 0
84 int gdbarch_debug
= GDBARCH_DEBUG
;
87 /* Maintain the struct gdbarch object */
91 /* Has this architecture been fully initialized? */
93 /* basic architectural information */
94 const struct bfd_arch_info
* bfd_arch_info
;
97 /* target specific vector. */
98 struct gdbarch_tdep
*tdep
;
99 gdbarch_dump_tdep_ftype
*dump_tdep
;
101 /* per-architecture data-pointers */
105 /* per-architecture swap-regions */
106 struct gdbarch_swap
*swap
;
108 /* Multi-arch values.
110 When extending this structure you must:
114 Declare set/get functions and define the corresponding
117 gdbarch_alloc(): If zero/NULL is not a suitable default,
118 initialize the new field.
120 verify_gdbarch(): Confirm that the target updated the field
123 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
126 ``startup_gdbarch()'': Append an initial value to the static
127 variable (base values on the host's c-type system).
129 get_gdbarch(): Implement the set/get functions (probably using
130 the macro's as shortcuts).
145 gdbarch_read_pc_ftype
*read_pc
;
146 gdbarch_write_pc_ftype
*write_pc
;
147 gdbarch_read_fp_ftype
*read_fp
;
148 gdbarch_read_sp_ftype
*read_sp
;
149 gdbarch_write_sp_ftype
*write_sp
;
150 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
151 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
152 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
161 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
162 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
163 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
164 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
165 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
166 gdbarch_register_name_ftype
*register_name
;
169 gdbarch_register_byte_ftype
*register_byte
;
170 gdbarch_register_raw_size_ftype
*register_raw_size
;
171 int max_register_raw_size
;
172 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
173 int max_register_virtual_size
;
174 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
175 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
176 gdbarch_print_registers_info_ftype
*print_registers_info
;
177 gdbarch_print_float_info_ftype
*print_float_info
;
178 gdbarch_print_vector_info_ftype
*print_vector_info
;
179 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
180 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
181 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
182 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
183 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
184 int use_generic_dummy_frames
;
185 int call_dummy_location
;
186 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
187 CORE_ADDR call_dummy_start_offset
;
188 CORE_ADDR call_dummy_breakpoint_offset
;
189 int call_dummy_breakpoint_offset_p
;
190 int call_dummy_length
;
191 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
193 LONGEST
* call_dummy_words
;
194 int sizeof_call_dummy_words
;
195 int call_dummy_stack_adjust_p
;
196 int call_dummy_stack_adjust
;
197 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
198 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
199 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
200 int believe_pcc_promotion
;
201 int believe_pcc_promotion_type
;
202 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
203 gdbarch_get_saved_register_ftype
*get_saved_register
;
204 gdbarch_register_convertible_ftype
*register_convertible
;
205 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
206 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
207 gdbarch_convert_register_p_ftype
*convert_register_p
;
208 gdbarch_register_to_value_ftype
*register_to_value
;
209 gdbarch_value_to_register_ftype
*value_to_register
;
210 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
211 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
212 gdbarch_integer_to_address_ftype
*integer_to_address
;
213 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
214 gdbarch_push_arguments_ftype
*push_arguments
;
215 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
216 gdbarch_push_return_address_ftype
*push_return_address
;
217 gdbarch_pop_frame_ftype
*pop_frame
;
218 gdbarch_store_struct_return_ftype
*store_struct_return
;
219 gdbarch_extract_return_value_ftype
*extract_return_value
;
220 gdbarch_store_return_value_ftype
*store_return_value
;
221 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
222 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
223 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
224 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
225 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
226 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
227 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
228 gdbarch_skip_prologue_ftype
*skip_prologue
;
229 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
230 gdbarch_inner_than_ftype
*inner_than
;
231 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
232 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
233 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
234 CORE_ADDR decr_pc_after_break
;
235 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
236 CORE_ADDR function_start_offset
;
237 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
238 CORE_ADDR frame_args_skip
;
239 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
240 gdbarch_frame_chain_ftype
*frame_chain
;
241 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
242 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
243 gdbarch_frame_args_address_ftype
*frame_args_address
;
244 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
245 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
246 gdbarch_frame_num_args_ftype
*frame_num_args
;
247 gdbarch_stack_align_ftype
*stack_align
;
248 gdbarch_frame_align_ftype
*frame_align
;
249 int extra_stack_alignment_needed
;
250 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
251 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
253 const struct floatformat
* float_format
;
254 const struct floatformat
* double_format
;
255 const struct floatformat
* long_double_format
;
256 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
257 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
258 gdbarch_smash_text_address_ftype
*smash_text_address
;
259 gdbarch_software_single_step_ftype
*software_single_step
;
260 gdbarch_print_insn_ftype
*print_insn
;
261 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
262 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
263 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
264 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
265 gdbarch_sigtramp_start_ftype
*sigtramp_start
;
266 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
267 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
268 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
269 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
270 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
271 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
272 const char * name_of_malloc
;
273 int cannot_step_breakpoint
;
274 int have_nonsteppable_watchpoint
;
275 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
276 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
277 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
278 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
282 /* The default architecture uses host values (for want of a better
285 extern const struct bfd_arch_info bfd_default_arch_struct
;
287 struct gdbarch startup_gdbarch
=
289 1, /* Always initialized. */
290 /* basic architecture information */
291 &bfd_default_arch_struct
,
293 /* target specific vector and its dump routine */
295 /*per-architecture data-pointers and swap regions */
297 /* Multi-arch values */
301 8 * sizeof (LONGEST
),
304 8 * sizeof (long double),
333 generic_register_byte
,
334 generic_register_size
,
336 generic_register_size
,
340 default_print_registers_info
,
431 generic_in_function_epilogue_p
,
432 construct_inferior_arguments
,
442 default_register_reggroup_p
,
443 /* startup_gdbarch() */
446 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
448 /* Do any initialization needed for a non-multiarch configuration
449 after the _initialize_MODULE functions have been run. */
451 initialize_non_multiarch (void)
453 alloc_gdbarch_data (&startup_gdbarch
);
454 /* Ensure that all swap areas are zeroed so that they again think
455 they are starting from scratch. */
456 clear_gdbarch_swap (&startup_gdbarch
);
457 init_gdbarch_swap (&startup_gdbarch
);
461 /* Create a new ``struct gdbarch'' based on information provided by
462 ``struct gdbarch_info''. */
465 gdbarch_alloc (const struct gdbarch_info
*info
,
466 struct gdbarch_tdep
*tdep
)
468 /* NOTE: The new architecture variable is named ``current_gdbarch''
469 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
470 the current local architecture and not the previous global
471 architecture. This ensures that the new architectures initial
472 values are not influenced by the previous architecture. Once
473 everything is parameterised with gdbarch, this will go away. */
474 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
475 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
477 alloc_gdbarch_data (current_gdbarch
);
479 current_gdbarch
->tdep
= tdep
;
481 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
482 current_gdbarch
->byte_order
= info
->byte_order
;
484 /* Force the explicit initialization of these. */
485 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
486 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
487 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
488 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
489 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
490 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
491 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
492 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
493 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
494 current_gdbarch
->char_signed
= -1;
495 current_gdbarch
->read_pc
= generic_target_read_pc
;
496 current_gdbarch
->write_pc
= generic_target_write_pc
;
497 current_gdbarch
->read_fp
= generic_target_read_fp
;
498 current_gdbarch
->read_sp
= generic_target_read_sp
;
499 current_gdbarch
->write_sp
= generic_target_write_sp
;
500 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
501 current_gdbarch
->num_regs
= -1;
502 current_gdbarch
->sp_regnum
= -1;
503 current_gdbarch
->fp_regnum
= -1;
504 current_gdbarch
->pc_regnum
= -1;
505 current_gdbarch
->ps_regnum
= -1;
506 current_gdbarch
->fp0_regnum
= -1;
507 current_gdbarch
->npc_regnum
= -1;
508 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
509 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
510 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
511 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
512 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
513 current_gdbarch
->register_name
= legacy_register_name
;
514 current_gdbarch
->register_size
= -1;
515 current_gdbarch
->register_bytes
= -1;
516 current_gdbarch
->register_byte
= generic_register_byte
;
517 current_gdbarch
->register_raw_size
= generic_register_size
;
518 current_gdbarch
->max_register_raw_size
= -1;
519 current_gdbarch
->register_virtual_size
= generic_register_size
;
520 current_gdbarch
->max_register_virtual_size
= -1;
521 current_gdbarch
->print_registers_info
= default_print_registers_info
;
522 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
523 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
524 current_gdbarch
->cannot_store_register
= cannot_register_not
;
525 current_gdbarch
->use_generic_dummy_frames
= -1;
526 current_gdbarch
->call_dummy_start_offset
= -1;
527 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
528 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
529 current_gdbarch
->call_dummy_length
= -1;
530 current_gdbarch
->call_dummy_p
= -1;
531 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
532 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
533 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
534 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
535 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
536 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
537 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
538 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
539 current_gdbarch
->register_to_value
= legacy_register_to_value
;
540 current_gdbarch
->value_to_register
= legacy_value_to_register
;
541 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
542 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
543 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
544 current_gdbarch
->push_arguments
= default_push_arguments
;
545 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
546 current_gdbarch
->store_return_value
= legacy_store_return_value
;
547 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
548 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
549 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
550 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
551 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
552 current_gdbarch
->decr_pc_after_break
= -1;
553 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
554 current_gdbarch
->function_start_offset
= -1;
555 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
556 current_gdbarch
->frame_args_skip
= -1;
557 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
558 current_gdbarch
->frame_chain_valid
= generic_func_frame_chain_valid
;
559 current_gdbarch
->extra_stack_alignment_needed
= 1;
560 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
561 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
562 current_gdbarch
->smash_text_address
= core_addr_identity
;
563 current_gdbarch
->print_insn
= legacy_print_insn
;
564 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
565 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
566 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
567 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
568 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
569 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
570 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
571 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
572 current_gdbarch
->name_of_malloc
= "malloc";
573 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
574 /* gdbarch_alloc() */
576 return current_gdbarch
;
580 /* Free a gdbarch struct. This should never happen in normal
581 operation --- once you've created a gdbarch, you keep it around.
582 However, if an architecture's init function encounters an error
583 building the structure, it may need to clean up a partially
584 constructed gdbarch. */
587 gdbarch_free (struct gdbarch
*arch
)
589 gdb_assert (arch
!= NULL
);
590 free_gdbarch_data (arch
);
595 /* Ensure that all values in a GDBARCH are reasonable. */
598 verify_gdbarch (struct gdbarch
*gdbarch
)
601 struct cleanup
*cleanups
;
604 /* Only perform sanity checks on a multi-arch target. */
607 log
= mem_fileopen ();
608 cleanups
= make_cleanup_ui_file_delete (log
);
610 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
611 fprintf_unfiltered (log
, "\n\tbyte-order");
612 if (gdbarch
->bfd_arch_info
== NULL
)
613 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
614 /* Check those that need to be defined for the given multi-arch level. */
615 /* Skip verify of short_bit, invalid_p == 0 */
616 /* Skip verify of int_bit, invalid_p == 0 */
617 /* Skip verify of long_bit, invalid_p == 0 */
618 /* Skip verify of long_long_bit, invalid_p == 0 */
619 /* Skip verify of float_bit, invalid_p == 0 */
620 /* Skip verify of double_bit, invalid_p == 0 */
621 /* Skip verify of long_double_bit, invalid_p == 0 */
622 /* Skip verify of ptr_bit, invalid_p == 0 */
623 if (gdbarch
->addr_bit
== 0)
624 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
625 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
626 if (gdbarch
->char_signed
== -1)
627 gdbarch
->char_signed
= 1;
628 /* Skip verify of read_pc, invalid_p == 0 */
629 /* Skip verify of write_pc, invalid_p == 0 */
630 /* Skip verify of read_fp, invalid_p == 0 */
631 /* Skip verify of read_sp, invalid_p == 0 */
632 /* Skip verify of write_sp, invalid_p == 0 */
633 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
634 /* Skip verify of pseudo_register_read, has predicate */
635 /* Skip verify of pseudo_register_write, has predicate */
636 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
637 && (gdbarch
->num_regs
== -1))
638 fprintf_unfiltered (log
, "\n\tnum_regs");
639 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
640 /* Skip verify of sp_regnum, invalid_p == 0 */
641 /* Skip verify of fp_regnum, invalid_p == 0 */
642 /* Skip verify of pc_regnum, invalid_p == 0 */
643 /* Skip verify of ps_regnum, invalid_p == 0 */
644 /* Skip verify of fp0_regnum, invalid_p == 0 */
645 /* Skip verify of npc_regnum, invalid_p == 0 */
646 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
647 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
648 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
649 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
650 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
651 /* Skip verify of register_name, invalid_p == 0 */
652 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
653 && (gdbarch
->register_size
== -1))
654 fprintf_unfiltered (log
, "\n\tregister_size");
655 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
656 && (gdbarch
->register_bytes
== -1))
657 fprintf_unfiltered (log
, "\n\tregister_bytes");
658 /* Skip verify of register_byte, invalid_p == 0 */
659 /* Skip verify of register_raw_size, invalid_p == 0 */
660 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
661 && (gdbarch
->max_register_raw_size
== -1))
662 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
663 /* Skip verify of register_virtual_size, invalid_p == 0 */
664 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
665 && (gdbarch
->max_register_virtual_size
== -1))
666 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
667 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
668 && (gdbarch
->register_virtual_type
== 0))
669 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
670 /* Skip verify of deprecated_do_registers_info, has predicate */
671 /* Skip verify of print_registers_info, invalid_p == 0 */
672 /* Skip verify of print_float_info, has predicate */
673 /* Skip verify of print_vector_info, has predicate */
674 /* Skip verify of register_sim_regno, invalid_p == 0 */
675 /* Skip verify of register_bytes_ok, has predicate */
676 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
677 /* Skip verify of cannot_store_register, invalid_p == 0 */
678 /* Skip verify of get_longjmp_target, has predicate */
679 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
680 && (gdbarch
->use_generic_dummy_frames
== -1))
681 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
682 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
683 && (gdbarch
->call_dummy_location
== 0))
684 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
685 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
686 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
687 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
688 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
689 && (gdbarch
->call_dummy_start_offset
== -1))
690 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
691 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
692 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
693 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
694 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
695 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
696 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
697 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
698 && (gdbarch
->call_dummy_length
== -1))
699 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
700 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
701 && (gdbarch
->pc_in_call_dummy
== 0))
702 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
703 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
704 && (gdbarch
->call_dummy_p
== -1))
705 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
706 /* Skip verify of call_dummy_words, invalid_p == 0 */
707 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
708 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
709 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
710 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
711 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
712 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
713 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
714 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
715 && (gdbarch
->fix_call_dummy
== 0))
716 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
717 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
718 /* Skip verify of init_frame_pc, invalid_p == 0 */
719 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
720 /* Skip verify of get_saved_register, has predicate */
721 /* Skip verify of register_convertible, invalid_p == 0 */
722 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
723 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
724 /* Skip verify of convert_register_p, invalid_p == 0 */
725 /* Skip verify of register_to_value, invalid_p == 0 */
726 /* Skip verify of value_to_register, invalid_p == 0 */
727 /* Skip verify of pointer_to_address, invalid_p == 0 */
728 /* Skip verify of address_to_pointer, invalid_p == 0 */
729 /* Skip verify of integer_to_address, has predicate */
730 /* Skip verify of return_value_on_stack, invalid_p == 0 */
731 /* Skip verify of push_arguments, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
733 && (gdbarch
->push_dummy_frame
== 0))
734 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
735 /* Skip verify of push_return_address, has predicate */
736 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
737 && (gdbarch
->pop_frame
== 0))
738 fprintf_unfiltered (log
, "\n\tpop_frame");
739 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
740 && (gdbarch
->store_struct_return
== 0))
741 fprintf_unfiltered (log
, "\n\tstore_struct_return");
742 /* Skip verify of extract_return_value, invalid_p == 0 */
743 /* Skip verify of store_return_value, invalid_p == 0 */
744 /* Skip verify of extract_struct_value_address, has predicate */
745 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
746 /* Skip verify of use_struct_convention, invalid_p == 0 */
747 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
748 && (gdbarch
->frame_init_saved_regs
== 0))
749 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
750 /* Skip verify of init_extra_frame_info, has predicate */
751 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
752 && (gdbarch
->skip_prologue
== 0))
753 fprintf_unfiltered (log
, "\n\tskip_prologue");
754 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
755 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
756 && (gdbarch
->inner_than
== 0))
757 fprintf_unfiltered (log
, "\n\tinner_than");
758 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
759 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
760 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
761 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
762 && (gdbarch
->decr_pc_after_break
== -1))
763 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
764 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
765 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
766 && (gdbarch
->function_start_offset
== -1))
767 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
768 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
769 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
770 && (gdbarch
->frame_args_skip
== -1))
771 fprintf_unfiltered (log
, "\n\tframe_args_skip");
772 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
773 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
774 && (gdbarch
->frame_chain
== 0))
775 fprintf_unfiltered (log
, "\n\tframe_chain");
776 /* Skip verify of frame_chain_valid, invalid_p == 0 */
777 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
778 && (gdbarch
->frame_saved_pc
== 0))
779 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
780 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
781 && (gdbarch
->frame_args_address
== 0))
782 fprintf_unfiltered (log
, "\n\tframe_args_address");
783 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
784 && (gdbarch
->frame_locals_address
== 0))
785 fprintf_unfiltered (log
, "\n\tframe_locals_address");
786 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
787 && (gdbarch
->saved_pc_after_call
== 0))
788 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
789 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
790 && (gdbarch
->frame_num_args
== 0))
791 fprintf_unfiltered (log
, "\n\tframe_num_args");
792 /* Skip verify of stack_align, has predicate */
793 /* Skip verify of frame_align, has predicate */
794 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
795 /* Skip verify of reg_struct_has_addr, has predicate */
796 /* Skip verify of save_dummy_frame_tos, has predicate */
797 if (gdbarch
->float_format
== 0)
798 gdbarch
->float_format
= default_float_format (gdbarch
);
799 if (gdbarch
->double_format
== 0)
800 gdbarch
->double_format
= default_double_format (gdbarch
);
801 if (gdbarch
->long_double_format
== 0)
802 gdbarch
->long_double_format
= default_double_format (gdbarch
);
803 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
804 /* Skip verify of addr_bits_remove, invalid_p == 0 */
805 /* Skip verify of smash_text_address, invalid_p == 0 */
806 /* Skip verify of software_single_step, has predicate */
807 /* Skip verify of print_insn, invalid_p == 0 */
808 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
809 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
810 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
811 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
812 /* Skip verify of sigtramp_start, has predicate */
813 /* Skip verify of sigtramp_end, has predicate */
814 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
815 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
816 /* Skip verify of dwarf2_build_frame_info, has predicate */
817 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
818 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
819 /* Skip verify of name_of_malloc, invalid_p == 0 */
820 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
821 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
822 /* Skip verify of address_class_type_flags, has predicate */
823 /* Skip verify of address_class_type_flags_to_name, has predicate */
824 /* Skip verify of address_class_name_to_type_flags, has predicate */
825 /* Skip verify of register_reggroup_p, invalid_p == 0 */
826 buf
= ui_file_xstrdup (log
, &dummy
);
827 make_cleanup (xfree
, buf
);
828 if (strlen (buf
) > 0)
829 internal_error (__FILE__
, __LINE__
,
830 "verify_gdbarch: the following are invalid ...%s",
832 do_cleanups (cleanups
);
836 /* Print out the details of the current architecture. */
838 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
839 just happens to match the global variable ``current_gdbarch''. That
840 way macros refering to that variable get the local and not the global
841 version - ulgh. Once everything is parameterised with gdbarch, this
845 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: frame_align = 0x%08lx\n",
853 (long) current_gdbarch
->frame_align
);
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
857 (long) current_gdbarch
->in_function_epilogue_p
);
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
861 (long) current_gdbarch
->register_reggroup_p
);
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
865 (long) current_gdbarch
->pseudo_register_read
);
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
869 (long) current_gdbarch
->pseudo_register_write
);
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
873 (long) current_gdbarch
->address_class_name_to_type_flags
);
874 #ifdef ADDRESS_CLASS_TYPE_FLAGS
875 fprintf_unfiltered (file
,
876 "gdbarch_dump: %s # %s\n",
877 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
878 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = 0x%08lx\n",
882 (long) current_gdbarch
->address_class_type_flags
883 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
888 (long) current_gdbarch
->address_class_type_flags_to_name
);
889 #ifdef ADDRESS_TO_POINTER
891 /* Macro might contain `[{}]' when not multi-arch */
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: %s # %s\n",
894 "ADDRESS_TO_POINTER(type, buf, addr)",
895 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
900 (long) current_gdbarch
->address_to_pointer
901 /*ADDRESS_TO_POINTER ()*/);
903 #ifdef ADDR_BITS_REMOVE
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: %s # %s\n",
906 "ADDR_BITS_REMOVE(addr)",
907 XSTRING (ADDR_BITS_REMOVE (addr
)));
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
911 (long) current_gdbarch
->addr_bits_remove
912 /*ADDR_BITS_REMOVE ()*/);
914 #ifdef BELIEVE_PCC_PROMOTION
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
917 XSTRING (BELIEVE_PCC_PROMOTION
));
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
920 BELIEVE_PCC_PROMOTION
);
922 #ifdef BELIEVE_PCC_PROMOTION_TYPE
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
925 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
928 BELIEVE_PCC_PROMOTION_TYPE
);
930 #ifdef BREAKPOINT_FROM_PC
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: %s # %s\n",
933 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
934 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
938 (long) current_gdbarch
->breakpoint_from_pc
939 /*BREAKPOINT_FROM_PC ()*/);
941 #ifdef CALL_DUMMY_ADDRESS
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: %s # %s\n",
944 "CALL_DUMMY_ADDRESS()",
945 XSTRING (CALL_DUMMY_ADDRESS ()));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
949 (long) current_gdbarch
->call_dummy_address
950 /*CALL_DUMMY_ADDRESS ()*/);
952 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
955 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
956 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
959 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
961 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
964 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
967 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
969 #ifdef CALL_DUMMY_LENGTH
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
972 XSTRING (CALL_DUMMY_LENGTH
));
973 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
978 #ifdef CALL_DUMMY_LOCATION
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
981 XSTRING (CALL_DUMMY_LOCATION
));
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
984 CALL_DUMMY_LOCATION
);
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: CALL_DUMMY_P # %s\n",
989 XSTRING (CALL_DUMMY_P
));
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: CALL_DUMMY_P = %d\n",
994 #ifdef CALL_DUMMY_STACK_ADJUST
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
997 XSTRING (CALL_DUMMY_STACK_ADJUST
));
998 if (CALL_DUMMY_STACK_ADJUST_P
)
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1001 (long) CALL_DUMMY_STACK_ADJUST
);
1003 #ifdef CALL_DUMMY_STACK_ADJUST_P
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1006 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1009 (long) CALL_DUMMY_STACK_ADJUST_P
);
1011 #ifdef CALL_DUMMY_START_OFFSET
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1014 XSTRING (CALL_DUMMY_START_OFFSET
));
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1017 (long) CALL_DUMMY_START_OFFSET
);
1019 #ifdef CALL_DUMMY_WORDS
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1022 XSTRING (CALL_DUMMY_WORDS
));
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1025 (long) CALL_DUMMY_WORDS
);
1027 #ifdef CANNOT_FETCH_REGISTER
1028 fprintf_unfiltered (file
,
1029 "gdbarch_dump: %s # %s\n",
1030 "CANNOT_FETCH_REGISTER(regnum)",
1031 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
1035 (long) current_gdbarch
->cannot_fetch_register
1036 /*CANNOT_FETCH_REGISTER ()*/);
1038 #ifdef CANNOT_STEP_BREAKPOINT
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1041 XSTRING (CANNOT_STEP_BREAKPOINT
));
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1044 CANNOT_STEP_BREAKPOINT
);
1046 #ifdef CANNOT_STORE_REGISTER
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: %s # %s\n",
1049 "CANNOT_STORE_REGISTER(regnum)",
1050 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1054 (long) current_gdbarch
->cannot_store_register
1055 /*CANNOT_STORE_REGISTER ()*/);
1057 #ifdef COERCE_FLOAT_TO_DOUBLE
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: %s # %s\n",
1060 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1061 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1065 (long) current_gdbarch
->coerce_float_to_double
1066 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1068 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1070 /* Macro might contain `[{}]' when not multi-arch */
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: %s # %s\n",
1073 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1074 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1079 (long) current_gdbarch
->coff_make_msymbol_special
1080 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1085 (long) current_gdbarch
->construct_inferior_arguments
);
1086 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: %s # %s\n",
1089 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1090 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1094 (long) current_gdbarch
->convert_from_func_ptr_addr
1095 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1097 #ifdef CONVERT_REGISTER_P
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: %s # %s\n",
1100 "CONVERT_REGISTER_P(regnum)",
1101 XSTRING (CONVERT_REGISTER_P (regnum
)));
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1105 (long) current_gdbarch
->convert_register_p
1106 /*CONVERT_REGISTER_P ()*/);
1108 #ifdef DECR_PC_AFTER_BREAK
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1111 XSTRING (DECR_PC_AFTER_BREAK
));
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1114 (long) DECR_PC_AFTER_BREAK
);
1116 #ifdef DEPRECATED_DO_REGISTERS_INFO
1118 /* Macro might contain `[{}]' when not multi-arch */
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: %s # %s\n",
1121 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1122 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = 0x%08lx\n",
1127 (long) current_gdbarch
->deprecated_do_registers_info
1128 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1130 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1132 /* Macro might contain `[{}]' when not multi-arch */
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: %s # %s\n",
1135 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1136 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1141 (long) current_gdbarch
->deprecated_extract_return_value
1142 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1144 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1145 fprintf_unfiltered (file
,
1146 "gdbarch_dump: %s # %s\n",
1147 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1148 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1152 (long) current_gdbarch
->deprecated_extract_struct_value_address
1153 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1155 #ifdef DEPRECATED_STORE_RETURN_VALUE
1157 /* Macro might contain `[{}]' when not multi-arch */
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: %s # %s\n",
1160 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1161 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = 0x%08lx\n",
1166 (long) current_gdbarch
->deprecated_store_return_value
1167 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1169 #ifdef DWARF2_BUILD_FRAME_INFO
1171 /* Macro might contain `[{}]' when not multi-arch */
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: %s # %s\n",
1174 "DWARF2_BUILD_FRAME_INFO(objfile)",
1175 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1180 (long) current_gdbarch
->dwarf2_build_frame_info
1181 /*DWARF2_BUILD_FRAME_INFO ()*/);
1183 #ifdef DWARF2_REG_TO_REGNUM
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: %s # %s\n",
1186 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1187 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1191 (long) current_gdbarch
->dwarf2_reg_to_regnum
1192 /*DWARF2_REG_TO_REGNUM ()*/);
1194 #ifdef DWARF_REG_TO_REGNUM
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: %s # %s\n",
1197 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1198 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1202 (long) current_gdbarch
->dwarf_reg_to_regnum
1203 /*DWARF_REG_TO_REGNUM ()*/);
1205 #ifdef ECOFF_REG_TO_REGNUM
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: %s # %s\n",
1208 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1209 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1213 (long) current_gdbarch
->ecoff_reg_to_regnum
1214 /*ECOFF_REG_TO_REGNUM ()*/);
1216 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1218 /* Macro might contain `[{}]' when not multi-arch */
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: %s # %s\n",
1221 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1222 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1225 fprintf_unfiltered (file
,
1226 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1227 (long) current_gdbarch
->elf_make_msymbol_special
1228 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1230 #ifdef EXTRACT_RETURN_VALUE
1232 /* Macro might contain `[{}]' when not multi-arch */
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: %s # %s\n",
1235 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1236 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1241 (long) current_gdbarch
->extract_return_value
1242 /*EXTRACT_RETURN_VALUE ()*/);
1244 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1245 fprintf_unfiltered (file
,
1246 "gdbarch_dump: %s # %s\n",
1247 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1248 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1252 (long) current_gdbarch
->extract_struct_value_address
1253 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1255 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1256 fprintf_unfiltered (file
,
1257 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1258 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1261 EXTRA_STACK_ALIGNMENT_NEEDED
);
1263 #ifdef FIX_CALL_DUMMY
1265 /* Macro might contain `[{}]' when not multi-arch */
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: %s # %s\n",
1268 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1269 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1274 (long) current_gdbarch
->fix_call_dummy
1275 /*FIX_CALL_DUMMY ()*/);
1278 fprintf_unfiltered (file
,
1279 "gdbarch_dump: FP0_REGNUM # %s\n",
1280 XSTRING (FP0_REGNUM
));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: FP0_REGNUM = %d\n",
1286 fprintf_unfiltered (file
,
1287 "gdbarch_dump: FP_REGNUM # %s\n",
1288 XSTRING (FP_REGNUM
));
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: FP_REGNUM = %d\n",
1293 #ifdef FRAMELESS_FUNCTION_INVOCATION
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: %s # %s\n",
1296 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1297 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1301 (long) current_gdbarch
->frameless_function_invocation
1302 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1304 #ifdef FRAME_ARGS_ADDRESS
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "FRAME_ARGS_ADDRESS(fi)",
1308 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1312 (long) current_gdbarch
->frame_args_address
1313 /*FRAME_ARGS_ADDRESS ()*/);
1315 #ifdef FRAME_ARGS_SKIP
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1318 XSTRING (FRAME_ARGS_SKIP
));
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1321 (long) FRAME_ARGS_SKIP
);
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: %s # %s\n",
1326 "FRAME_CHAIN(frame)",
1327 XSTRING (FRAME_CHAIN (frame
)));
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1331 (long) current_gdbarch
->frame_chain
1332 /*FRAME_CHAIN ()*/);
1334 #ifdef FRAME_CHAIN_VALID
1335 fprintf_unfiltered (file
,
1336 "gdbarch_dump: %s # %s\n",
1337 "FRAME_CHAIN_VALID(chain, thisframe)",
1338 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1342 (long) current_gdbarch
->frame_chain_valid
1343 /*FRAME_CHAIN_VALID ()*/);
1345 #ifdef FRAME_INIT_SAVED_REGS
1347 /* Macro might contain `[{}]' when not multi-arch */
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: %s # %s\n",
1350 "FRAME_INIT_SAVED_REGS(frame)",
1351 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1356 (long) current_gdbarch
->frame_init_saved_regs
1357 /*FRAME_INIT_SAVED_REGS ()*/);
1359 #ifdef FRAME_LOCALS_ADDRESS
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: %s # %s\n",
1362 "FRAME_LOCALS_ADDRESS(fi)",
1363 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1365 fprintf_unfiltered (file
,
1366 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1367 (long) current_gdbarch
->frame_locals_address
1368 /*FRAME_LOCALS_ADDRESS ()*/);
1370 #ifdef FRAME_NUM_ARGS
1371 fprintf_unfiltered (file
,
1372 "gdbarch_dump: %s # %s\n",
1373 "FRAME_NUM_ARGS(frame)",
1374 XSTRING (FRAME_NUM_ARGS (frame
)));
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1378 (long) current_gdbarch
->frame_num_args
1379 /*FRAME_NUM_ARGS ()*/);
1381 #ifdef FRAME_SAVED_PC
1382 fprintf_unfiltered (file
,
1383 "gdbarch_dump: %s # %s\n",
1384 "FRAME_SAVED_PC(fi)",
1385 XSTRING (FRAME_SAVED_PC (fi
)));
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1389 (long) current_gdbarch
->frame_saved_pc
1390 /*FRAME_SAVED_PC ()*/);
1392 #ifdef FUNCTION_START_OFFSET
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1395 XSTRING (FUNCTION_START_OFFSET
));
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1398 (long) FUNCTION_START_OFFSET
);
1400 #ifdef GET_LONGJMP_TARGET
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: %s # %s\n",
1403 "GET_LONGJMP_TARGET(pc)",
1404 XSTRING (GET_LONGJMP_TARGET (pc
)));
1406 fprintf_unfiltered (file
,
1407 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1408 (long) current_gdbarch
->get_longjmp_target
1409 /*GET_LONGJMP_TARGET ()*/);
1411 #ifdef GET_SAVED_REGISTER
1413 /* Macro might contain `[{}]' when not multi-arch */
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: %s # %s\n",
1416 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1417 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1422 (long) current_gdbarch
->get_saved_register
1423 /*GET_SAVED_REGISTER ()*/);
1425 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1428 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1431 HAVE_NONSTEPPABLE_WATCHPOINT
);
1433 #ifdef INIT_EXTRA_FRAME_INFO
1435 /* Macro might contain `[{}]' when not multi-arch */
1436 fprintf_unfiltered (file
,
1437 "gdbarch_dump: %s # %s\n",
1438 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1439 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1444 (long) current_gdbarch
->init_extra_frame_info
1445 /*INIT_EXTRA_FRAME_INFO ()*/);
1447 #ifdef INIT_FRAME_PC
1449 /* Macro might contain `[{}]' when not multi-arch */
1450 fprintf_unfiltered (file
,
1451 "gdbarch_dump: %s # %s\n",
1452 "INIT_FRAME_PC(fromleaf, prev)",
1453 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1458 (long) current_gdbarch
->init_frame_pc
1459 /*INIT_FRAME_PC ()*/);
1461 #ifdef INIT_FRAME_PC_FIRST
1463 /* Macro might contain `[{}]' when not multi-arch */
1464 fprintf_unfiltered (file
,
1465 "gdbarch_dump: %s # %s\n",
1466 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1467 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1472 (long) current_gdbarch
->init_frame_pc_first
1473 /*INIT_FRAME_PC_FIRST ()*/);
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: %s # %s\n",
1478 "INNER_THAN(lhs, rhs)",
1479 XSTRING (INNER_THAN (lhs
, rhs
)));
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1483 (long) current_gdbarch
->inner_than
1486 #ifdef INTEGER_TO_ADDRESS
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: %s # %s\n",
1489 "INTEGER_TO_ADDRESS(type, buf)",
1490 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1492 fprintf_unfiltered (file
,
1493 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1494 (long) current_gdbarch
->integer_to_address
1495 /*INTEGER_TO_ADDRESS ()*/);
1497 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: %s # %s\n",
1500 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1501 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1505 (long) current_gdbarch
->in_solib_call_trampoline
1506 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1508 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1509 fprintf_unfiltered (file
,
1510 "gdbarch_dump: %s # %s\n",
1511 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1512 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1514 fprintf_unfiltered (file
,
1515 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
1516 (long) current_gdbarch
->in_solib_return_trampoline
1517 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1519 #ifdef MAX_REGISTER_RAW_SIZE
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1522 XSTRING (MAX_REGISTER_RAW_SIZE
));
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1525 MAX_REGISTER_RAW_SIZE
);
1527 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1530 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1533 MAX_REGISTER_VIRTUAL_SIZE
);
1535 #ifdef MEMORY_INSERT_BREAKPOINT
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: %s # %s\n",
1538 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1539 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1543 (long) current_gdbarch
->memory_insert_breakpoint
1544 /*MEMORY_INSERT_BREAKPOINT ()*/);
1546 #ifdef MEMORY_REMOVE_BREAKPOINT
1547 fprintf_unfiltered (file
,
1548 "gdbarch_dump: %s # %s\n",
1549 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1550 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1552 fprintf_unfiltered (file
,
1553 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1554 (long) current_gdbarch
->memory_remove_breakpoint
1555 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1557 #ifdef NAME_OF_MALLOC
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1560 XSTRING (NAME_OF_MALLOC
));
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: NAME_OF_MALLOC = %ld\n",
1563 (long) NAME_OF_MALLOC
);
1566 fprintf_unfiltered (file
,
1567 "gdbarch_dump: NPC_REGNUM # %s\n",
1568 XSTRING (NPC_REGNUM
));
1569 fprintf_unfiltered (file
,
1570 "gdbarch_dump: NPC_REGNUM = %d\n",
1573 #ifdef NUM_PSEUDO_REGS
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1576 XSTRING (NUM_PSEUDO_REGS
));
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1582 fprintf_unfiltered (file
,
1583 "gdbarch_dump: NUM_REGS # %s\n",
1584 XSTRING (NUM_REGS
));
1585 fprintf_unfiltered (file
,
1586 "gdbarch_dump: NUM_REGS = %d\n",
1589 #ifdef PARM_BOUNDARY
1590 fprintf_unfiltered (file
,
1591 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1592 XSTRING (PARM_BOUNDARY
));
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1597 #ifdef PC_IN_CALL_DUMMY
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: %s # %s\n",
1600 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1601 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1605 (long) current_gdbarch
->pc_in_call_dummy
1606 /*PC_IN_CALL_DUMMY ()*/);
1608 #ifdef PC_IN_SIGTRAMP
1609 fprintf_unfiltered (file
,
1610 "gdbarch_dump: %s # %s\n",
1611 "PC_IN_SIGTRAMP(pc, name)",
1612 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1616 (long) current_gdbarch
->pc_in_sigtramp
1617 /*PC_IN_SIGTRAMP ()*/);
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: PC_REGNUM # %s\n",
1622 XSTRING (PC_REGNUM
));
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: PC_REGNUM = %d\n",
1627 #ifdef POINTER_TO_ADDRESS
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: %s # %s\n",
1630 "POINTER_TO_ADDRESS(type, buf)",
1631 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1635 (long) current_gdbarch
->pointer_to_address
1636 /*POINTER_TO_ADDRESS ()*/);
1640 /* Macro might contain `[{}]' when not multi-arch */
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: %s # %s\n",
1644 XSTRING (POP_FRAME (-)));
1647 fprintf_unfiltered (file
,
1648 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1649 (long) current_gdbarch
->pop_frame
1652 #ifdef PREPARE_TO_PROCEED
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: %s # %s\n",
1655 "PREPARE_TO_PROCEED(select_it)",
1656 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1660 (long) current_gdbarch
->prepare_to_proceed
1661 /*PREPARE_TO_PROCEED ()*/);
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: print_float_info = 0x%08lx\n",
1666 (long) current_gdbarch
->print_float_info
);
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1670 (long) current_gdbarch
->print_registers_info
);
1672 fprintf_unfiltered (file
,
1673 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1674 (long) current_gdbarch
->print_vector_info
);
1675 #ifdef PROLOGUE_FRAMELESS_P
1676 fprintf_unfiltered (file
,
1677 "gdbarch_dump: %s # %s\n",
1678 "PROLOGUE_FRAMELESS_P(ip)",
1679 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1681 fprintf_unfiltered (file
,
1682 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1683 (long) current_gdbarch
->prologue_frameless_p
1684 /*PROLOGUE_FRAMELESS_P ()*/);
1687 fprintf_unfiltered (file
,
1688 "gdbarch_dump: PS_REGNUM # %s\n",
1689 XSTRING (PS_REGNUM
));
1690 fprintf_unfiltered (file
,
1691 "gdbarch_dump: PS_REGNUM = %d\n",
1694 #ifdef PUSH_ARGUMENTS
1695 fprintf_unfiltered (file
,
1696 "gdbarch_dump: %s # %s\n",
1697 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1698 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1702 (long) current_gdbarch
->push_arguments
1703 /*PUSH_ARGUMENTS ()*/);
1705 #ifdef PUSH_DUMMY_FRAME
1707 /* Macro might contain `[{}]' when not multi-arch */
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: %s # %s\n",
1710 "PUSH_DUMMY_FRAME(-)",
1711 XSTRING (PUSH_DUMMY_FRAME (-)));
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1716 (long) current_gdbarch
->push_dummy_frame
1717 /*PUSH_DUMMY_FRAME ()*/);
1719 #ifdef PUSH_RETURN_ADDRESS
1720 fprintf_unfiltered (file
,
1721 "gdbarch_dump: %s # %s\n",
1722 "PUSH_RETURN_ADDRESS(pc, sp)",
1723 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1725 fprintf_unfiltered (file
,
1726 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1727 (long) current_gdbarch
->push_return_address
1728 /*PUSH_RETURN_ADDRESS ()*/);
1730 #ifdef REGISTER_BYTE
1731 fprintf_unfiltered (file
,
1732 "gdbarch_dump: %s # %s\n",
1733 "REGISTER_BYTE(reg_nr)",
1734 XSTRING (REGISTER_BYTE (reg_nr
)));
1736 fprintf_unfiltered (file
,
1737 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1738 (long) current_gdbarch
->register_byte
1739 /*REGISTER_BYTE ()*/);
1741 #ifdef REGISTER_BYTES
1742 fprintf_unfiltered (file
,
1743 "gdbarch_dump: REGISTER_BYTES # %s\n",
1744 XSTRING (REGISTER_BYTES
));
1745 fprintf_unfiltered (file
,
1746 "gdbarch_dump: REGISTER_BYTES = %d\n",
1749 #ifdef REGISTER_BYTES_OK
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: %s # %s\n",
1752 "REGISTER_BYTES_OK(nr_bytes)",
1753 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1755 fprintf_unfiltered (file
,
1756 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1757 (long) current_gdbarch
->register_bytes_ok
1758 /*REGISTER_BYTES_OK ()*/);
1760 #ifdef REGISTER_CONVERTIBLE
1761 fprintf_unfiltered (file
,
1762 "gdbarch_dump: %s # %s\n",
1763 "REGISTER_CONVERTIBLE(nr)",
1764 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1766 fprintf_unfiltered (file
,
1767 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1768 (long) current_gdbarch
->register_convertible
1769 /*REGISTER_CONVERTIBLE ()*/);
1771 #ifdef REGISTER_CONVERT_TO_RAW
1773 /* Macro might contain `[{}]' when not multi-arch */
1774 fprintf_unfiltered (file
,
1775 "gdbarch_dump: %s # %s\n",
1776 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1777 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1780 fprintf_unfiltered (file
,
1781 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1782 (long) current_gdbarch
->register_convert_to_raw
1783 /*REGISTER_CONVERT_TO_RAW ()*/);
1785 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1787 /* Macro might contain `[{}]' when not multi-arch */
1788 fprintf_unfiltered (file
,
1789 "gdbarch_dump: %s # %s\n",
1790 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1791 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1796 (long) current_gdbarch
->register_convert_to_virtual
1797 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1799 #ifdef REGISTER_NAME
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: %s # %s\n",
1802 "REGISTER_NAME(regnr)",
1803 XSTRING (REGISTER_NAME (regnr
)));
1805 fprintf_unfiltered (file
,
1806 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1807 (long) current_gdbarch
->register_name
1808 /*REGISTER_NAME ()*/);
1810 #ifdef REGISTER_RAW_SIZE
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: %s # %s\n",
1813 "REGISTER_RAW_SIZE(reg_nr)",
1814 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1818 (long) current_gdbarch
->register_raw_size
1819 /*REGISTER_RAW_SIZE ()*/);
1821 #ifdef REGISTER_SIM_REGNO
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: %s # %s\n",
1824 "REGISTER_SIM_REGNO(reg_nr)",
1825 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1827 fprintf_unfiltered (file
,
1828 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1829 (long) current_gdbarch
->register_sim_regno
1830 /*REGISTER_SIM_REGNO ()*/);
1832 #ifdef REGISTER_SIZE
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: REGISTER_SIZE # %s\n",
1835 XSTRING (REGISTER_SIZE
));
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: REGISTER_SIZE = %d\n",
1840 #ifdef REGISTER_TO_VALUE
1842 /* Macro might contain `[{}]' when not multi-arch */
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: %s # %s\n",
1845 "REGISTER_TO_VALUE(regnum, type, from, to)",
1846 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1851 (long) current_gdbarch
->register_to_value
1852 /*REGISTER_TO_VALUE ()*/);
1854 #ifdef REGISTER_VIRTUAL_SIZE
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: %s # %s\n",
1857 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1858 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1862 (long) current_gdbarch
->register_virtual_size
1863 /*REGISTER_VIRTUAL_SIZE ()*/);
1865 #ifdef REGISTER_VIRTUAL_TYPE
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: %s # %s\n",
1868 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1869 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1873 (long) current_gdbarch
->register_virtual_type
1874 /*REGISTER_VIRTUAL_TYPE ()*/);
1876 #ifdef REG_STRUCT_HAS_ADDR
1877 fprintf_unfiltered (file
,
1878 "gdbarch_dump: %s # %s\n",
1879 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1880 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1882 fprintf_unfiltered (file
,
1883 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1884 (long) current_gdbarch
->reg_struct_has_addr
1885 /*REG_STRUCT_HAS_ADDR ()*/);
1887 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1889 /* Macro might contain `[{}]' when not multi-arch */
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: %s # %s\n",
1892 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1893 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1896 fprintf_unfiltered (file
,
1897 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1898 (long) current_gdbarch
->remote_translate_xfer_address
1899 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1901 #ifdef RETURN_VALUE_ON_STACK
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: %s # %s\n",
1904 "RETURN_VALUE_ON_STACK(type)",
1905 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1907 fprintf_unfiltered (file
,
1908 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1909 (long) current_gdbarch
->return_value_on_stack
1910 /*RETURN_VALUE_ON_STACK ()*/);
1912 #ifdef SAVED_PC_AFTER_CALL
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: %s # %s\n",
1915 "SAVED_PC_AFTER_CALL(frame)",
1916 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1920 (long) current_gdbarch
->saved_pc_after_call
1921 /*SAVED_PC_AFTER_CALL ()*/);
1923 #ifdef SAVE_DUMMY_FRAME_TOS
1925 /* Macro might contain `[{}]' when not multi-arch */
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: %s # %s\n",
1928 "SAVE_DUMMY_FRAME_TOS(sp)",
1929 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1934 (long) current_gdbarch
->save_dummy_frame_tos
1935 /*SAVE_DUMMY_FRAME_TOS ()*/);
1937 #ifdef SDB_REG_TO_REGNUM
1938 fprintf_unfiltered (file
,
1939 "gdbarch_dump: %s # %s\n",
1940 "SDB_REG_TO_REGNUM(sdb_regnr)",
1941 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1945 (long) current_gdbarch
->sdb_reg_to_regnum
1946 /*SDB_REG_TO_REGNUM ()*/);
1949 fprintf_unfiltered (file
,
1950 "gdbarch_dump: %s # %s\n",
1952 XSTRING (SIGTRAMP_END (pc
)));
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: SIGTRAMP_END = 0x%08lx\n",
1956 (long) current_gdbarch
->sigtramp_end
1957 /*SIGTRAMP_END ()*/);
1959 #ifdef SIGTRAMP_START
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: %s # %s\n",
1962 "SIGTRAMP_START(pc)",
1963 XSTRING (SIGTRAMP_START (pc
)));
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: SIGTRAMP_START = 0x%08lx\n",
1967 (long) current_gdbarch
->sigtramp_start
1968 /*SIGTRAMP_START ()*/);
1970 #ifdef SIZEOF_CALL_DUMMY_WORDS
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1973 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1974 fprintf_unfiltered (file
,
1975 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1976 (long) SIZEOF_CALL_DUMMY_WORDS
);
1978 #ifdef SKIP_PROLOGUE
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: %s # %s\n",
1981 "SKIP_PROLOGUE(ip)",
1982 XSTRING (SKIP_PROLOGUE (ip
)));
1984 fprintf_unfiltered (file
,
1985 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1986 (long) current_gdbarch
->skip_prologue
1987 /*SKIP_PROLOGUE ()*/);
1989 #ifdef SKIP_TRAMPOLINE_CODE
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: %s # %s\n",
1992 "SKIP_TRAMPOLINE_CODE(pc)",
1993 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1997 (long) current_gdbarch
->skip_trampoline_code
1998 /*SKIP_TRAMPOLINE_CODE ()*/);
2000 #ifdef SMASH_TEXT_ADDRESS
2001 fprintf_unfiltered (file
,
2002 "gdbarch_dump: %s # %s\n",
2003 "SMASH_TEXT_ADDRESS(addr)",
2004 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
2008 (long) current_gdbarch
->smash_text_address
2009 /*SMASH_TEXT_ADDRESS ()*/);
2011 #ifdef SOFTWARE_SINGLE_STEP
2013 /* Macro might contain `[{}]' when not multi-arch */
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: %s # %s\n",
2016 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2017 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2022 (long) current_gdbarch
->software_single_step
2023 /*SOFTWARE_SINGLE_STEP ()*/);
2026 fprintf_unfiltered (file
,
2027 "gdbarch_dump: SP_REGNUM # %s\n",
2028 XSTRING (SP_REGNUM
));
2029 fprintf_unfiltered (file
,
2030 "gdbarch_dump: SP_REGNUM = %d\n",
2033 #ifdef STAB_REG_TO_REGNUM
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: %s # %s\n",
2036 "STAB_REG_TO_REGNUM(stab_regnr)",
2037 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
2041 (long) current_gdbarch
->stab_reg_to_regnum
2042 /*STAB_REG_TO_REGNUM ()*/);
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: %s # %s\n",
2048 XSTRING (STACK_ALIGN (sp
)));
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2052 (long) current_gdbarch
->stack_align
2053 /*STACK_ALIGN ()*/);
2055 #ifdef STORE_RETURN_VALUE
2057 /* Macro might contain `[{}]' when not multi-arch */
2058 fprintf_unfiltered (file
,
2059 "gdbarch_dump: %s # %s\n",
2060 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2061 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2064 fprintf_unfiltered (file
,
2065 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
2066 (long) current_gdbarch
->store_return_value
2067 /*STORE_RETURN_VALUE ()*/);
2069 #ifdef STORE_STRUCT_RETURN
2071 /* Macro might contain `[{}]' when not multi-arch */
2072 fprintf_unfiltered (file
,
2073 "gdbarch_dump: %s # %s\n",
2074 "STORE_STRUCT_RETURN(addr, sp)",
2075 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
2080 (long) current_gdbarch
->store_struct_return
2081 /*STORE_STRUCT_RETURN ()*/);
2083 #ifdef TARGET_ADDR_BIT
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2086 XSTRING (TARGET_ADDR_BIT
));
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2091 #ifdef TARGET_ARCHITECTURE
2092 fprintf_unfiltered (file
,
2093 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2094 XSTRING (TARGET_ARCHITECTURE
));
2095 if (TARGET_ARCHITECTURE
!= NULL
)
2096 fprintf_unfiltered (file
,
2097 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2098 TARGET_ARCHITECTURE
->printable_name
);
2100 #ifdef TARGET_BFD_VMA_BIT
2101 fprintf_unfiltered (file
,
2102 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2103 XSTRING (TARGET_BFD_VMA_BIT
));
2104 fprintf_unfiltered (file
,
2105 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2106 TARGET_BFD_VMA_BIT
);
2108 #ifdef TARGET_BYTE_ORDER
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2111 XSTRING (TARGET_BYTE_ORDER
));
2112 fprintf_unfiltered (file
,
2113 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2114 (long) TARGET_BYTE_ORDER
);
2116 #ifdef TARGET_CHAR_SIGNED
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2119 XSTRING (TARGET_CHAR_SIGNED
));
2120 fprintf_unfiltered (file
,
2121 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2122 TARGET_CHAR_SIGNED
);
2124 #ifdef TARGET_DOUBLE_BIT
2125 fprintf_unfiltered (file
,
2126 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2127 XSTRING (TARGET_DOUBLE_BIT
));
2128 fprintf_unfiltered (file
,
2129 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2132 #ifdef TARGET_DOUBLE_FORMAT
2133 fprintf_unfiltered (file
,
2134 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2135 XSTRING (TARGET_DOUBLE_FORMAT
));
2136 fprintf_unfiltered (file
,
2137 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2138 (long) TARGET_DOUBLE_FORMAT
);
2140 #ifdef TARGET_FLOAT_BIT
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2143 XSTRING (TARGET_FLOAT_BIT
));
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2148 #ifdef TARGET_FLOAT_FORMAT
2149 fprintf_unfiltered (file
,
2150 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2151 XSTRING (TARGET_FLOAT_FORMAT
));
2152 fprintf_unfiltered (file
,
2153 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2154 (long) TARGET_FLOAT_FORMAT
);
2156 #ifdef TARGET_INT_BIT
2157 fprintf_unfiltered (file
,
2158 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2159 XSTRING (TARGET_INT_BIT
));
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2164 #ifdef TARGET_LONG_BIT
2165 fprintf_unfiltered (file
,
2166 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2167 XSTRING (TARGET_LONG_BIT
));
2168 fprintf_unfiltered (file
,
2169 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2172 #ifdef TARGET_LONG_DOUBLE_BIT
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2175 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2176 fprintf_unfiltered (file
,
2177 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2178 TARGET_LONG_DOUBLE_BIT
);
2180 #ifdef TARGET_LONG_DOUBLE_FORMAT
2181 fprintf_unfiltered (file
,
2182 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2183 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2184 fprintf_unfiltered (file
,
2185 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2186 (long) TARGET_LONG_DOUBLE_FORMAT
);
2188 #ifdef TARGET_LONG_LONG_BIT
2189 fprintf_unfiltered (file
,
2190 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2191 XSTRING (TARGET_LONG_LONG_BIT
));
2192 fprintf_unfiltered (file
,
2193 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2194 TARGET_LONG_LONG_BIT
);
2196 #ifdef TARGET_PRINT_INSN
2197 fprintf_unfiltered (file
,
2198 "gdbarch_dump: %s # %s\n",
2199 "TARGET_PRINT_INSN(vma, info)",
2200 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2202 fprintf_unfiltered (file
,
2203 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2204 (long) current_gdbarch
->print_insn
2205 /*TARGET_PRINT_INSN ()*/);
2207 #ifdef TARGET_PTR_BIT
2208 fprintf_unfiltered (file
,
2209 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2210 XSTRING (TARGET_PTR_BIT
));
2211 fprintf_unfiltered (file
,
2212 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2215 #ifdef TARGET_READ_FP
2216 fprintf_unfiltered (file
,
2217 "gdbarch_dump: %s # %s\n",
2219 XSTRING (TARGET_READ_FP ()));
2221 fprintf_unfiltered (file
,
2222 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2223 (long) current_gdbarch
->read_fp
2224 /*TARGET_READ_FP ()*/);
2226 #ifdef TARGET_READ_PC
2227 fprintf_unfiltered (file
,
2228 "gdbarch_dump: %s # %s\n",
2229 "TARGET_READ_PC(ptid)",
2230 XSTRING (TARGET_READ_PC (ptid
)));
2232 fprintf_unfiltered (file
,
2233 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2234 (long) current_gdbarch
->read_pc
2235 /*TARGET_READ_PC ()*/);
2237 #ifdef TARGET_READ_SP
2238 fprintf_unfiltered (file
,
2239 "gdbarch_dump: %s # %s\n",
2241 XSTRING (TARGET_READ_SP ()));
2243 fprintf_unfiltered (file
,
2244 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2245 (long) current_gdbarch
->read_sp
2246 /*TARGET_READ_SP ()*/);
2248 #ifdef TARGET_SHORT_BIT
2249 fprintf_unfiltered (file
,
2250 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2251 XSTRING (TARGET_SHORT_BIT
));
2252 fprintf_unfiltered (file
,
2253 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2256 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2258 /* Macro might contain `[{}]' when not multi-arch */
2259 fprintf_unfiltered (file
,
2260 "gdbarch_dump: %s # %s\n",
2261 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2262 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2265 fprintf_unfiltered (file
,
2266 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2267 (long) current_gdbarch
->virtual_frame_pointer
2268 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2270 #ifdef TARGET_WRITE_PC
2272 /* Macro might contain `[{}]' when not multi-arch */
2273 fprintf_unfiltered (file
,
2274 "gdbarch_dump: %s # %s\n",
2275 "TARGET_WRITE_PC(val, ptid)",
2276 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2279 fprintf_unfiltered (file
,
2280 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2281 (long) current_gdbarch
->write_pc
2282 /*TARGET_WRITE_PC ()*/);
2284 #ifdef TARGET_WRITE_SP
2286 /* Macro might contain `[{}]' when not multi-arch */
2287 fprintf_unfiltered (file
,
2288 "gdbarch_dump: %s # %s\n",
2289 "TARGET_WRITE_SP(val)",
2290 XSTRING (TARGET_WRITE_SP (val
)));
2293 fprintf_unfiltered (file
,
2294 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2295 (long) current_gdbarch
->write_sp
2296 /*TARGET_WRITE_SP ()*/);
2298 #ifdef USE_GENERIC_DUMMY_FRAMES
2299 fprintf_unfiltered (file
,
2300 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2301 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2302 fprintf_unfiltered (file
,
2303 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2304 USE_GENERIC_DUMMY_FRAMES
);
2306 #ifdef USE_STRUCT_CONVENTION
2307 fprintf_unfiltered (file
,
2308 "gdbarch_dump: %s # %s\n",
2309 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2310 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2312 fprintf_unfiltered (file
,
2313 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2314 (long) current_gdbarch
->use_struct_convention
2315 /*USE_STRUCT_CONVENTION ()*/);
2317 #ifdef VALUE_TO_REGISTER
2319 /* Macro might contain `[{}]' when not multi-arch */
2320 fprintf_unfiltered (file
,
2321 "gdbarch_dump: %s # %s\n",
2322 "VALUE_TO_REGISTER(type, regnum, from, to)",
2323 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2326 fprintf_unfiltered (file
,
2327 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2328 (long) current_gdbarch
->value_to_register
2329 /*VALUE_TO_REGISTER ()*/);
2331 if (current_gdbarch
->dump_tdep
!= NULL
)
2332 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2335 struct gdbarch_tdep
*
2336 gdbarch_tdep (struct gdbarch
*gdbarch
)
2338 if (gdbarch_debug
>= 2)
2339 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2340 return gdbarch
->tdep
;
2344 const struct bfd_arch_info
*
2345 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2347 gdb_assert (gdbarch
!= NULL
);
2348 if (gdbarch_debug
>= 2)
2349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2350 return gdbarch
->bfd_arch_info
;
2354 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2356 gdb_assert (gdbarch
!= NULL
);
2357 if (gdbarch_debug
>= 2)
2358 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2359 return gdbarch
->byte_order
;
2363 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2365 gdb_assert (gdbarch
!= NULL
);
2366 /* Skip verify of short_bit, invalid_p == 0 */
2367 if (gdbarch_debug
>= 2)
2368 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2369 return gdbarch
->short_bit
;
2373 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2376 gdbarch
->short_bit
= short_bit
;
2380 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2382 gdb_assert (gdbarch
!= NULL
);
2383 /* Skip verify of int_bit, invalid_p == 0 */
2384 if (gdbarch_debug
>= 2)
2385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2386 return gdbarch
->int_bit
;
2390 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2393 gdbarch
->int_bit
= int_bit
;
2397 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2399 gdb_assert (gdbarch
!= NULL
);
2400 /* Skip verify of long_bit, invalid_p == 0 */
2401 if (gdbarch_debug
>= 2)
2402 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2403 return gdbarch
->long_bit
;
2407 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2410 gdbarch
->long_bit
= long_bit
;
2414 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2416 gdb_assert (gdbarch
!= NULL
);
2417 /* Skip verify of long_long_bit, invalid_p == 0 */
2418 if (gdbarch_debug
>= 2)
2419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2420 return gdbarch
->long_long_bit
;
2424 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2427 gdbarch
->long_long_bit
= long_long_bit
;
2431 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2433 gdb_assert (gdbarch
!= NULL
);
2434 /* Skip verify of float_bit, invalid_p == 0 */
2435 if (gdbarch_debug
>= 2)
2436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2437 return gdbarch
->float_bit
;
2441 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2444 gdbarch
->float_bit
= float_bit
;
2448 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2450 gdb_assert (gdbarch
!= NULL
);
2451 /* Skip verify of double_bit, invalid_p == 0 */
2452 if (gdbarch_debug
>= 2)
2453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2454 return gdbarch
->double_bit
;
2458 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2461 gdbarch
->double_bit
= double_bit
;
2465 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2467 gdb_assert (gdbarch
!= NULL
);
2468 /* Skip verify of long_double_bit, invalid_p == 0 */
2469 if (gdbarch_debug
>= 2)
2470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2471 return gdbarch
->long_double_bit
;
2475 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2476 int long_double_bit
)
2478 gdbarch
->long_double_bit
= long_double_bit
;
2482 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2484 gdb_assert (gdbarch
!= NULL
);
2485 /* Skip verify of ptr_bit, invalid_p == 0 */
2486 if (gdbarch_debug
>= 2)
2487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2488 return gdbarch
->ptr_bit
;
2492 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2495 gdbarch
->ptr_bit
= ptr_bit
;
2499 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2501 gdb_assert (gdbarch
!= NULL
);
2502 if (gdbarch
->addr_bit
== 0)
2503 internal_error (__FILE__
, __LINE__
,
2504 "gdbarch: gdbarch_addr_bit invalid");
2505 if (gdbarch_debug
>= 2)
2506 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2507 return gdbarch
->addr_bit
;
2511 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2514 gdbarch
->addr_bit
= addr_bit
;
2518 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2520 gdb_assert (gdbarch
!= NULL
);
2521 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2522 if (gdbarch_debug
>= 2)
2523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2524 return gdbarch
->bfd_vma_bit
;
2528 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2531 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2535 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2537 gdb_assert (gdbarch
!= NULL
);
2538 if (gdbarch
->char_signed
== -1)
2539 internal_error (__FILE__
, __LINE__
,
2540 "gdbarch: gdbarch_char_signed invalid");
2541 if (gdbarch_debug
>= 2)
2542 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2543 return gdbarch
->char_signed
;
2547 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2550 gdbarch
->char_signed
= char_signed
;
2554 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2556 gdb_assert (gdbarch
!= NULL
);
2557 if (gdbarch
->read_pc
== 0)
2558 internal_error (__FILE__
, __LINE__
,
2559 "gdbarch: gdbarch_read_pc invalid");
2560 if (gdbarch_debug
>= 2)
2561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2562 return gdbarch
->read_pc (ptid
);
2566 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2567 gdbarch_read_pc_ftype read_pc
)
2569 gdbarch
->read_pc
= read_pc
;
2573 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2575 gdb_assert (gdbarch
!= NULL
);
2576 if (gdbarch
->write_pc
== 0)
2577 internal_error (__FILE__
, __LINE__
,
2578 "gdbarch: gdbarch_write_pc invalid");
2579 if (gdbarch_debug
>= 2)
2580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2581 gdbarch
->write_pc (val
, ptid
);
2585 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2586 gdbarch_write_pc_ftype write_pc
)
2588 gdbarch
->write_pc
= write_pc
;
2592 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2594 gdb_assert (gdbarch
!= NULL
);
2595 if (gdbarch
->read_fp
== 0)
2596 internal_error (__FILE__
, __LINE__
,
2597 "gdbarch: gdbarch_read_fp invalid");
2598 if (gdbarch_debug
>= 2)
2599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2600 return gdbarch
->read_fp ();
2604 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2605 gdbarch_read_fp_ftype read_fp
)
2607 gdbarch
->read_fp
= read_fp
;
2611 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2613 gdb_assert (gdbarch
!= NULL
);
2614 if (gdbarch
->read_sp
== 0)
2615 internal_error (__FILE__
, __LINE__
,
2616 "gdbarch: gdbarch_read_sp invalid");
2617 if (gdbarch_debug
>= 2)
2618 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2619 return gdbarch
->read_sp ();
2623 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2624 gdbarch_read_sp_ftype read_sp
)
2626 gdbarch
->read_sp
= read_sp
;
2630 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2632 gdb_assert (gdbarch
!= NULL
);
2633 if (gdbarch
->write_sp
== 0)
2634 internal_error (__FILE__
, __LINE__
,
2635 "gdbarch: gdbarch_write_sp invalid");
2636 if (gdbarch_debug
>= 2)
2637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2638 gdbarch
->write_sp (val
);
2642 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2643 gdbarch_write_sp_ftype write_sp
)
2645 gdbarch
->write_sp
= write_sp
;
2649 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2651 gdb_assert (gdbarch
!= NULL
);
2652 if (gdbarch
->virtual_frame_pointer
== 0)
2653 internal_error (__FILE__
, __LINE__
,
2654 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2655 if (gdbarch_debug
>= 2)
2656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2657 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2661 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2662 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2664 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2668 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2670 gdb_assert (gdbarch
!= NULL
);
2671 return gdbarch
->pseudo_register_read
!= 0;
2675 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2677 gdb_assert (gdbarch
!= NULL
);
2678 if (gdbarch
->pseudo_register_read
== 0)
2679 internal_error (__FILE__
, __LINE__
,
2680 "gdbarch: gdbarch_pseudo_register_read invalid");
2681 if (gdbarch_debug
>= 2)
2682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2683 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2687 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2688 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2690 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2694 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2696 gdb_assert (gdbarch
!= NULL
);
2697 return gdbarch
->pseudo_register_write
!= 0;
2701 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2703 gdb_assert (gdbarch
!= NULL
);
2704 if (gdbarch
->pseudo_register_write
== 0)
2705 internal_error (__FILE__
, __LINE__
,
2706 "gdbarch: gdbarch_pseudo_register_write invalid");
2707 if (gdbarch_debug
>= 2)
2708 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2709 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2713 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2714 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2716 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2720 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2722 gdb_assert (gdbarch
!= NULL
);
2723 if (gdbarch
->num_regs
== -1)
2724 internal_error (__FILE__
, __LINE__
,
2725 "gdbarch: gdbarch_num_regs invalid");
2726 if (gdbarch_debug
>= 2)
2727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2728 return gdbarch
->num_regs
;
2732 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2735 gdbarch
->num_regs
= num_regs
;
2739 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2741 gdb_assert (gdbarch
!= NULL
);
2742 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2743 if (gdbarch_debug
>= 2)
2744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2745 return gdbarch
->num_pseudo_regs
;
2749 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2750 int num_pseudo_regs
)
2752 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2756 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2758 gdb_assert (gdbarch
!= NULL
);
2759 /* Skip verify of sp_regnum, invalid_p == 0 */
2760 if (gdbarch_debug
>= 2)
2761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2762 return gdbarch
->sp_regnum
;
2766 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2769 gdbarch
->sp_regnum
= sp_regnum
;
2773 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2775 gdb_assert (gdbarch
!= NULL
);
2776 /* Skip verify of fp_regnum, invalid_p == 0 */
2777 if (gdbarch_debug
>= 2)
2778 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2779 return gdbarch
->fp_regnum
;
2783 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2786 gdbarch
->fp_regnum
= fp_regnum
;
2790 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2792 gdb_assert (gdbarch
!= NULL
);
2793 /* Skip verify of pc_regnum, invalid_p == 0 */
2794 if (gdbarch_debug
>= 2)
2795 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2796 return gdbarch
->pc_regnum
;
2800 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2803 gdbarch
->pc_regnum
= pc_regnum
;
2807 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2809 gdb_assert (gdbarch
!= NULL
);
2810 /* Skip verify of ps_regnum, invalid_p == 0 */
2811 if (gdbarch_debug
>= 2)
2812 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2813 return gdbarch
->ps_regnum
;
2817 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2820 gdbarch
->ps_regnum
= ps_regnum
;
2824 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2826 gdb_assert (gdbarch
!= NULL
);
2827 /* Skip verify of fp0_regnum, invalid_p == 0 */
2828 if (gdbarch_debug
>= 2)
2829 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2830 return gdbarch
->fp0_regnum
;
2834 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2837 gdbarch
->fp0_regnum
= fp0_regnum
;
2841 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2843 gdb_assert (gdbarch
!= NULL
);
2844 /* Skip verify of npc_regnum, invalid_p == 0 */
2845 if (gdbarch_debug
>= 2)
2846 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2847 return gdbarch
->npc_regnum
;
2851 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2854 gdbarch
->npc_regnum
= npc_regnum
;
2858 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2860 gdb_assert (gdbarch
!= NULL
);
2861 if (gdbarch
->stab_reg_to_regnum
== 0)
2862 internal_error (__FILE__
, __LINE__
,
2863 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2864 if (gdbarch_debug
>= 2)
2865 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2866 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2870 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2871 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2873 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2877 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2879 gdb_assert (gdbarch
!= NULL
);
2880 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2881 internal_error (__FILE__
, __LINE__
,
2882 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2883 if (gdbarch_debug
>= 2)
2884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2885 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2889 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2890 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2892 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2896 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2898 gdb_assert (gdbarch
!= NULL
);
2899 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2900 internal_error (__FILE__
, __LINE__
,
2901 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2902 if (gdbarch_debug
>= 2)
2903 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2904 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2908 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2909 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2911 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2915 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2917 gdb_assert (gdbarch
!= NULL
);
2918 if (gdbarch
->sdb_reg_to_regnum
== 0)
2919 internal_error (__FILE__
, __LINE__
,
2920 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2921 if (gdbarch_debug
>= 2)
2922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2923 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2927 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2928 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2930 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2934 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2936 gdb_assert (gdbarch
!= NULL
);
2937 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2938 internal_error (__FILE__
, __LINE__
,
2939 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2940 if (gdbarch_debug
>= 2)
2941 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2942 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2946 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2947 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2949 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2953 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2955 gdb_assert (gdbarch
!= NULL
);
2956 if (gdbarch
->register_name
== 0)
2957 internal_error (__FILE__
, __LINE__
,
2958 "gdbarch: gdbarch_register_name invalid");
2959 if (gdbarch_debug
>= 2)
2960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2961 return gdbarch
->register_name (regnr
);
2965 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2966 gdbarch_register_name_ftype register_name
)
2968 gdbarch
->register_name
= register_name
;
2972 gdbarch_register_size (struct gdbarch
*gdbarch
)
2974 gdb_assert (gdbarch
!= NULL
);
2975 if (gdbarch
->register_size
== -1)
2976 internal_error (__FILE__
, __LINE__
,
2977 "gdbarch: gdbarch_register_size invalid");
2978 if (gdbarch_debug
>= 2)
2979 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2980 return gdbarch
->register_size
;
2984 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2987 gdbarch
->register_size
= register_size
;
2991 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2993 gdb_assert (gdbarch
!= NULL
);
2994 if (gdbarch
->register_bytes
== -1)
2995 internal_error (__FILE__
, __LINE__
,
2996 "gdbarch: gdbarch_register_bytes invalid");
2997 if (gdbarch_debug
>= 2)
2998 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2999 return gdbarch
->register_bytes
;
3003 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
3006 gdbarch
->register_bytes
= register_bytes
;
3010 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3012 gdb_assert (gdbarch
!= NULL
);
3013 if (gdbarch
->register_byte
== 0)
3014 internal_error (__FILE__
, __LINE__
,
3015 "gdbarch: gdbarch_register_byte invalid");
3016 if (gdbarch_debug
>= 2)
3017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
3018 return gdbarch
->register_byte (reg_nr
);
3022 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
3023 gdbarch_register_byte_ftype register_byte
)
3025 gdbarch
->register_byte
= register_byte
;
3029 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3031 gdb_assert (gdbarch
!= NULL
);
3032 if (gdbarch
->register_raw_size
== 0)
3033 internal_error (__FILE__
, __LINE__
,
3034 "gdbarch: gdbarch_register_raw_size invalid");
3035 if (gdbarch_debug
>= 2)
3036 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
3037 return gdbarch
->register_raw_size (reg_nr
);
3041 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
3042 gdbarch_register_raw_size_ftype register_raw_size
)
3044 gdbarch
->register_raw_size
= register_raw_size
;
3048 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
3050 gdb_assert (gdbarch
!= NULL
);
3051 if (gdbarch
->max_register_raw_size
== -1)
3052 internal_error (__FILE__
, __LINE__
,
3053 "gdbarch: gdbarch_max_register_raw_size invalid");
3054 if (gdbarch_debug
>= 2)
3055 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
3056 return gdbarch
->max_register_raw_size
;
3060 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
3061 int max_register_raw_size
)
3063 gdbarch
->max_register_raw_size
= max_register_raw_size
;
3067 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3069 gdb_assert (gdbarch
!= NULL
);
3070 if (gdbarch
->register_virtual_size
== 0)
3071 internal_error (__FILE__
, __LINE__
,
3072 "gdbarch: gdbarch_register_virtual_size invalid");
3073 if (gdbarch_debug
>= 2)
3074 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3075 return gdbarch
->register_virtual_size (reg_nr
);
3079 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3080 gdbarch_register_virtual_size_ftype register_virtual_size
)
3082 gdbarch
->register_virtual_size
= register_virtual_size
;
3086 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
3088 gdb_assert (gdbarch
!= NULL
);
3089 if (gdbarch
->max_register_virtual_size
== -1)
3090 internal_error (__FILE__
, __LINE__
,
3091 "gdbarch: gdbarch_max_register_virtual_size invalid");
3092 if (gdbarch_debug
>= 2)
3093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
3094 return gdbarch
->max_register_virtual_size
;
3098 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
3099 int max_register_virtual_size
)
3101 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
3105 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3107 gdb_assert (gdbarch
!= NULL
);
3108 if (gdbarch
->register_virtual_type
== 0)
3109 internal_error (__FILE__
, __LINE__
,
3110 "gdbarch: gdbarch_register_virtual_type invalid");
3111 if (gdbarch_debug
>= 2)
3112 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3113 return gdbarch
->register_virtual_type (reg_nr
);
3117 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3118 gdbarch_register_virtual_type_ftype register_virtual_type
)
3120 gdbarch
->register_virtual_type
= register_virtual_type
;
3124 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3126 gdb_assert (gdbarch
!= NULL
);
3127 return gdbarch
->deprecated_do_registers_info
!= 0;
3131 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3133 gdb_assert (gdbarch
!= NULL
);
3134 if (gdbarch
->deprecated_do_registers_info
== 0)
3135 internal_error (__FILE__
, __LINE__
,
3136 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3137 if (gdbarch_debug
>= 2)
3138 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3139 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3143 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3144 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3146 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3150 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3152 gdb_assert (gdbarch
!= NULL
);
3153 if (gdbarch
->print_registers_info
== 0)
3154 internal_error (__FILE__
, __LINE__
,
3155 "gdbarch: gdbarch_print_registers_info invalid");
3156 if (gdbarch_debug
>= 2)
3157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3158 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3162 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3163 gdbarch_print_registers_info_ftype print_registers_info
)
3165 gdbarch
->print_registers_info
= print_registers_info
;
3169 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3171 gdb_assert (gdbarch
!= NULL
);
3172 return gdbarch
->print_float_info
!= 0;
3176 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3178 gdb_assert (gdbarch
!= NULL
);
3179 if (gdbarch
->print_float_info
== 0)
3180 internal_error (__FILE__
, __LINE__
,
3181 "gdbarch: gdbarch_print_float_info invalid");
3182 if (gdbarch_debug
>= 2)
3183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3184 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3188 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3189 gdbarch_print_float_info_ftype print_float_info
)
3191 gdbarch
->print_float_info
= print_float_info
;
3195 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3197 gdb_assert (gdbarch
!= NULL
);
3198 return gdbarch
->print_vector_info
!= 0;
3202 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3204 gdb_assert (gdbarch
!= NULL
);
3205 if (gdbarch
->print_vector_info
== 0)
3206 internal_error (__FILE__
, __LINE__
,
3207 "gdbarch: gdbarch_print_vector_info invalid");
3208 if (gdbarch_debug
>= 2)
3209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3210 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3214 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3215 gdbarch_print_vector_info_ftype print_vector_info
)
3217 gdbarch
->print_vector_info
= print_vector_info
;
3221 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3223 gdb_assert (gdbarch
!= NULL
);
3224 if (gdbarch
->register_sim_regno
== 0)
3225 internal_error (__FILE__
, __LINE__
,
3226 "gdbarch: gdbarch_register_sim_regno invalid");
3227 if (gdbarch_debug
>= 2)
3228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3229 return gdbarch
->register_sim_regno (reg_nr
);
3233 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3234 gdbarch_register_sim_regno_ftype register_sim_regno
)
3236 gdbarch
->register_sim_regno
= register_sim_regno
;
3240 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3242 gdb_assert (gdbarch
!= NULL
);
3243 return gdbarch
->register_bytes_ok
!= 0;
3247 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3249 gdb_assert (gdbarch
!= NULL
);
3250 if (gdbarch
->register_bytes_ok
== 0)
3251 internal_error (__FILE__
, __LINE__
,
3252 "gdbarch: gdbarch_register_bytes_ok invalid");
3253 if (gdbarch_debug
>= 2)
3254 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3255 return gdbarch
->register_bytes_ok (nr_bytes
);
3259 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3260 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3262 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3266 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3268 gdb_assert (gdbarch
!= NULL
);
3269 if (gdbarch
->cannot_fetch_register
== 0)
3270 internal_error (__FILE__
, __LINE__
,
3271 "gdbarch: gdbarch_cannot_fetch_register invalid");
3272 if (gdbarch_debug
>= 2)
3273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3274 return gdbarch
->cannot_fetch_register (regnum
);
3278 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3279 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3281 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3285 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3287 gdb_assert (gdbarch
!= NULL
);
3288 if (gdbarch
->cannot_store_register
== 0)
3289 internal_error (__FILE__
, __LINE__
,
3290 "gdbarch: gdbarch_cannot_store_register invalid");
3291 if (gdbarch_debug
>= 2)
3292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3293 return gdbarch
->cannot_store_register (regnum
);
3297 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3298 gdbarch_cannot_store_register_ftype cannot_store_register
)
3300 gdbarch
->cannot_store_register
= cannot_store_register
;
3304 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3306 gdb_assert (gdbarch
!= NULL
);
3307 return gdbarch
->get_longjmp_target
!= 0;
3311 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3313 gdb_assert (gdbarch
!= NULL
);
3314 if (gdbarch
->get_longjmp_target
== 0)
3315 internal_error (__FILE__
, __LINE__
,
3316 "gdbarch: gdbarch_get_longjmp_target invalid");
3317 if (gdbarch_debug
>= 2)
3318 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3319 return gdbarch
->get_longjmp_target (pc
);
3323 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3324 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3326 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3330 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3332 gdb_assert (gdbarch
!= NULL
);
3333 if (gdbarch
->use_generic_dummy_frames
== -1)
3334 internal_error (__FILE__
, __LINE__
,
3335 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3336 if (gdbarch_debug
>= 2)
3337 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3338 return gdbarch
->use_generic_dummy_frames
;
3342 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3343 int use_generic_dummy_frames
)
3345 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3349 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3351 gdb_assert (gdbarch
!= NULL
);
3352 if (gdbarch
->call_dummy_location
== 0)
3353 internal_error (__FILE__
, __LINE__
,
3354 "gdbarch: gdbarch_call_dummy_location invalid");
3355 if (gdbarch_debug
>= 2)
3356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3357 return gdbarch
->call_dummy_location
;
3361 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3362 int call_dummy_location
)
3364 gdbarch
->call_dummy_location
= call_dummy_location
;
3368 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3370 gdb_assert (gdbarch
!= NULL
);
3371 if (gdbarch
->call_dummy_address
== 0)
3372 internal_error (__FILE__
, __LINE__
,
3373 "gdbarch: gdbarch_call_dummy_address invalid");
3374 if (gdbarch_debug
>= 2)
3375 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3376 return gdbarch
->call_dummy_address ();
3380 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3381 gdbarch_call_dummy_address_ftype call_dummy_address
)
3383 gdbarch
->call_dummy_address
= call_dummy_address
;
3387 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3389 gdb_assert (gdbarch
!= NULL
);
3390 if (gdbarch
->call_dummy_start_offset
== -1)
3391 internal_error (__FILE__
, __LINE__
,
3392 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3393 if (gdbarch_debug
>= 2)
3394 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3395 return gdbarch
->call_dummy_start_offset
;
3399 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3400 CORE_ADDR call_dummy_start_offset
)
3402 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3406 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3408 gdb_assert (gdbarch
!= NULL
);
3409 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3410 internal_error (__FILE__
, __LINE__
,
3411 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3412 if (gdbarch_debug
>= 2)
3413 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3414 return gdbarch
->call_dummy_breakpoint_offset
;
3418 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3419 CORE_ADDR call_dummy_breakpoint_offset
)
3421 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3425 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3427 gdb_assert (gdbarch
!= NULL
);
3428 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3429 internal_error (__FILE__
, __LINE__
,
3430 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3431 if (gdbarch_debug
>= 2)
3432 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3433 return gdbarch
->call_dummy_breakpoint_offset_p
;
3437 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3438 int call_dummy_breakpoint_offset_p
)
3440 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3444 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3446 gdb_assert (gdbarch
!= NULL
);
3447 if (gdbarch
->call_dummy_length
== -1)
3448 internal_error (__FILE__
, __LINE__
,
3449 "gdbarch: gdbarch_call_dummy_length invalid");
3450 if (gdbarch_debug
>= 2)
3451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3452 return gdbarch
->call_dummy_length
;
3456 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3457 int call_dummy_length
)
3459 gdbarch
->call_dummy_length
= call_dummy_length
;
3463 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3465 gdb_assert (gdbarch
!= NULL
);
3466 if (gdbarch
->pc_in_call_dummy
== 0)
3467 internal_error (__FILE__
, __LINE__
,
3468 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3469 if (gdbarch_debug
>= 2)
3470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3471 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3475 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3476 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3478 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3482 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3484 gdb_assert (gdbarch
!= NULL
);
3485 if (gdbarch
->call_dummy_p
== -1)
3486 internal_error (__FILE__
, __LINE__
,
3487 "gdbarch: gdbarch_call_dummy_p invalid");
3488 if (gdbarch_debug
>= 2)
3489 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3490 return gdbarch
->call_dummy_p
;
3494 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3497 gdbarch
->call_dummy_p
= call_dummy_p
;
3501 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3503 gdb_assert (gdbarch
!= NULL
);
3504 /* Skip verify of call_dummy_words, invalid_p == 0 */
3505 if (gdbarch_debug
>= 2)
3506 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3507 return gdbarch
->call_dummy_words
;
3511 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3512 LONGEST
* call_dummy_words
)
3514 gdbarch
->call_dummy_words
= call_dummy_words
;
3518 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3520 gdb_assert (gdbarch
!= NULL
);
3521 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3522 if (gdbarch_debug
>= 2)
3523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3524 return gdbarch
->sizeof_call_dummy_words
;
3528 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3529 int sizeof_call_dummy_words
)
3531 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3535 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3537 gdb_assert (gdbarch
!= NULL
);
3538 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3539 internal_error (__FILE__
, __LINE__
,
3540 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3541 if (gdbarch_debug
>= 2)
3542 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3543 return gdbarch
->call_dummy_stack_adjust_p
;
3547 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3548 int call_dummy_stack_adjust_p
)
3550 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3554 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3556 gdb_assert (gdbarch
!= NULL
);
3557 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3558 internal_error (__FILE__
, __LINE__
,
3559 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3560 if (gdbarch_debug
>= 2)
3561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3562 return gdbarch
->call_dummy_stack_adjust
;
3566 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3567 int call_dummy_stack_adjust
)
3569 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3573 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
)
3575 gdb_assert (gdbarch
!= NULL
);
3576 if (gdbarch
->fix_call_dummy
== 0)
3577 internal_error (__FILE__
, __LINE__
,
3578 "gdbarch: gdbarch_fix_call_dummy invalid");
3579 if (gdbarch_debug
>= 2)
3580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3581 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3585 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3586 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3588 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3592 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3594 gdb_assert (gdbarch
!= NULL
);
3595 if (gdbarch
->init_frame_pc_first
== 0)
3596 internal_error (__FILE__
, __LINE__
,
3597 "gdbarch: gdbarch_init_frame_pc_first invalid");
3598 if (gdbarch_debug
>= 2)
3599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3600 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3604 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3605 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3607 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3611 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3613 gdb_assert (gdbarch
!= NULL
);
3614 if (gdbarch
->init_frame_pc
== 0)
3615 internal_error (__FILE__
, __LINE__
,
3616 "gdbarch: gdbarch_init_frame_pc invalid");
3617 if (gdbarch_debug
>= 2)
3618 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3619 gdbarch
->init_frame_pc (fromleaf
, prev
);
3623 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3624 gdbarch_init_frame_pc_ftype init_frame_pc
)
3626 gdbarch
->init_frame_pc
= init_frame_pc
;
3630 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3632 gdb_assert (gdbarch
!= NULL
);
3633 if (gdbarch_debug
>= 2)
3634 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3635 return gdbarch
->believe_pcc_promotion
;
3639 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3640 int believe_pcc_promotion
)
3642 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3646 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3648 gdb_assert (gdbarch
!= NULL
);
3649 if (gdbarch_debug
>= 2)
3650 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3651 return gdbarch
->believe_pcc_promotion_type
;
3655 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3656 int believe_pcc_promotion_type
)
3658 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3662 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3664 gdb_assert (gdbarch
!= NULL
);
3665 if (gdbarch
->coerce_float_to_double
== 0)
3666 internal_error (__FILE__
, __LINE__
,
3667 "gdbarch: gdbarch_coerce_float_to_double invalid");
3668 if (gdbarch_debug
>= 2)
3669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3670 return gdbarch
->coerce_float_to_double (formal
, actual
);
3674 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3675 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3677 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3681 gdbarch_get_saved_register_p (struct gdbarch
*gdbarch
)
3683 gdb_assert (gdbarch
!= NULL
);
3684 return gdbarch
->get_saved_register
!= 0;
3688 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
)
3690 gdb_assert (gdbarch
!= NULL
);
3691 if (gdbarch
->get_saved_register
== 0)
3692 internal_error (__FILE__
, __LINE__
,
3693 "gdbarch: gdbarch_get_saved_register invalid");
3694 if (gdbarch_debug
>= 2)
3695 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3696 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3700 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3701 gdbarch_get_saved_register_ftype get_saved_register
)
3703 gdbarch
->get_saved_register
= get_saved_register
;
3707 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3709 gdb_assert (gdbarch
!= NULL
);
3710 if (gdbarch
->register_convertible
== 0)
3711 internal_error (__FILE__
, __LINE__
,
3712 "gdbarch: gdbarch_register_convertible invalid");
3713 if (gdbarch_debug
>= 2)
3714 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3715 return gdbarch
->register_convertible (nr
);
3719 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3720 gdbarch_register_convertible_ftype register_convertible
)
3722 gdbarch
->register_convertible
= register_convertible
;
3726 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3728 gdb_assert (gdbarch
!= NULL
);
3729 if (gdbarch
->register_convert_to_virtual
== 0)
3730 internal_error (__FILE__
, __LINE__
,
3731 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3732 if (gdbarch_debug
>= 2)
3733 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3734 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3738 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3739 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3741 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3745 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3747 gdb_assert (gdbarch
!= NULL
);
3748 if (gdbarch
->register_convert_to_raw
== 0)
3749 internal_error (__FILE__
, __LINE__
,
3750 "gdbarch: gdbarch_register_convert_to_raw invalid");
3751 if (gdbarch_debug
>= 2)
3752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3753 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3757 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3758 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3760 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3764 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3766 gdb_assert (gdbarch
!= NULL
);
3767 if (gdbarch
->convert_register_p
== 0)
3768 internal_error (__FILE__
, __LINE__
,
3769 "gdbarch: gdbarch_convert_register_p invalid");
3770 if (gdbarch_debug
>= 2)
3771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3772 return gdbarch
->convert_register_p (regnum
);
3776 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3777 gdbarch_convert_register_p_ftype convert_register_p
)
3779 gdbarch
->convert_register_p
= convert_register_p
;
3783 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3785 gdb_assert (gdbarch
!= NULL
);
3786 if (gdbarch
->register_to_value
== 0)
3787 internal_error (__FILE__
, __LINE__
,
3788 "gdbarch: gdbarch_register_to_value invalid");
3789 if (gdbarch_debug
>= 2)
3790 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3791 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3795 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3796 gdbarch_register_to_value_ftype register_to_value
)
3798 gdbarch
->register_to_value
= register_to_value
;
3802 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3804 gdb_assert (gdbarch
!= NULL
);
3805 if (gdbarch
->value_to_register
== 0)
3806 internal_error (__FILE__
, __LINE__
,
3807 "gdbarch: gdbarch_value_to_register invalid");
3808 if (gdbarch_debug
>= 2)
3809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3810 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3814 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3815 gdbarch_value_to_register_ftype value_to_register
)
3817 gdbarch
->value_to_register
= value_to_register
;
3821 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3823 gdb_assert (gdbarch
!= NULL
);
3824 if (gdbarch
->pointer_to_address
== 0)
3825 internal_error (__FILE__
, __LINE__
,
3826 "gdbarch: gdbarch_pointer_to_address invalid");
3827 if (gdbarch_debug
>= 2)
3828 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3829 return gdbarch
->pointer_to_address (type
, buf
);
3833 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3834 gdbarch_pointer_to_address_ftype pointer_to_address
)
3836 gdbarch
->pointer_to_address
= pointer_to_address
;
3840 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3842 gdb_assert (gdbarch
!= NULL
);
3843 if (gdbarch
->address_to_pointer
== 0)
3844 internal_error (__FILE__
, __LINE__
,
3845 "gdbarch: gdbarch_address_to_pointer invalid");
3846 if (gdbarch_debug
>= 2)
3847 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3848 gdbarch
->address_to_pointer (type
, buf
, addr
);
3852 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3853 gdbarch_address_to_pointer_ftype address_to_pointer
)
3855 gdbarch
->address_to_pointer
= address_to_pointer
;
3859 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3861 gdb_assert (gdbarch
!= NULL
);
3862 return gdbarch
->integer_to_address
!= 0;
3866 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3868 gdb_assert (gdbarch
!= NULL
);
3869 if (gdbarch
->integer_to_address
== 0)
3870 internal_error (__FILE__
, __LINE__
,
3871 "gdbarch: gdbarch_integer_to_address invalid");
3872 if (gdbarch_debug
>= 2)
3873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3874 return gdbarch
->integer_to_address (type
, buf
);
3878 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3879 gdbarch_integer_to_address_ftype integer_to_address
)
3881 gdbarch
->integer_to_address
= integer_to_address
;
3885 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3887 gdb_assert (gdbarch
!= NULL
);
3888 if (gdbarch
->return_value_on_stack
== 0)
3889 internal_error (__FILE__
, __LINE__
,
3890 "gdbarch: gdbarch_return_value_on_stack invalid");
3891 if (gdbarch_debug
>= 2)
3892 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3893 return gdbarch
->return_value_on_stack (type
);
3897 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3898 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3900 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3904 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3906 gdb_assert (gdbarch
!= NULL
);
3907 if (gdbarch
->push_arguments
== 0)
3908 internal_error (__FILE__
, __LINE__
,
3909 "gdbarch: gdbarch_push_arguments invalid");
3910 if (gdbarch_debug
>= 2)
3911 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3912 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3916 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3917 gdbarch_push_arguments_ftype push_arguments
)
3919 gdbarch
->push_arguments
= push_arguments
;
3923 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3925 gdb_assert (gdbarch
!= NULL
);
3926 if (gdbarch
->push_dummy_frame
== 0)
3927 internal_error (__FILE__
, __LINE__
,
3928 "gdbarch: gdbarch_push_dummy_frame invalid");
3929 if (gdbarch_debug
>= 2)
3930 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3931 gdbarch
->push_dummy_frame ();
3935 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3936 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3938 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3942 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3944 gdb_assert (gdbarch
!= NULL
);
3945 return gdbarch
->push_return_address
!= 0;
3949 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3951 gdb_assert (gdbarch
!= NULL
);
3952 if (gdbarch
->push_return_address
== 0)
3953 internal_error (__FILE__
, __LINE__
,
3954 "gdbarch: gdbarch_push_return_address invalid");
3955 if (gdbarch_debug
>= 2)
3956 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3957 return gdbarch
->push_return_address (pc
, sp
);
3961 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3962 gdbarch_push_return_address_ftype push_return_address
)
3964 gdbarch
->push_return_address
= push_return_address
;
3968 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3970 gdb_assert (gdbarch
!= NULL
);
3971 if (gdbarch
->pop_frame
== 0)
3972 internal_error (__FILE__
, __LINE__
,
3973 "gdbarch: gdbarch_pop_frame invalid");
3974 if (gdbarch_debug
>= 2)
3975 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3976 gdbarch
->pop_frame ();
3980 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3981 gdbarch_pop_frame_ftype pop_frame
)
3983 gdbarch
->pop_frame
= pop_frame
;
3987 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3989 gdb_assert (gdbarch
!= NULL
);
3990 if (gdbarch
->store_struct_return
== 0)
3991 internal_error (__FILE__
, __LINE__
,
3992 "gdbarch: gdbarch_store_struct_return invalid");
3993 if (gdbarch_debug
>= 2)
3994 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3995 gdbarch
->store_struct_return (addr
, sp
);
3999 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
4000 gdbarch_store_struct_return_ftype store_struct_return
)
4002 gdbarch
->store_struct_return
= store_struct_return
;
4006 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4008 gdb_assert (gdbarch
!= NULL
);
4009 if (gdbarch
->extract_return_value
== 0)
4010 internal_error (__FILE__
, __LINE__
,
4011 "gdbarch: gdbarch_extract_return_value invalid");
4012 if (gdbarch_debug
>= 2)
4013 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4014 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4018 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4019 gdbarch_extract_return_value_ftype extract_return_value
)
4021 gdbarch
->extract_return_value
= extract_return_value
;
4025 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4027 gdb_assert (gdbarch
!= NULL
);
4028 if (gdbarch
->store_return_value
== 0)
4029 internal_error (__FILE__
, __LINE__
,
4030 "gdbarch: gdbarch_store_return_value invalid");
4031 if (gdbarch_debug
>= 2)
4032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4033 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4037 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4038 gdbarch_store_return_value_ftype store_return_value
)
4040 gdbarch
->store_return_value
= store_return_value
;
4044 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4046 gdb_assert (gdbarch
!= NULL
);
4047 if (gdbarch
->deprecated_extract_return_value
== 0)
4048 internal_error (__FILE__
, __LINE__
,
4049 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4050 if (gdbarch_debug
>= 2)
4051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4052 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4056 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4057 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4059 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4063 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4065 gdb_assert (gdbarch
!= NULL
);
4066 if (gdbarch
->deprecated_store_return_value
== 0)
4067 internal_error (__FILE__
, __LINE__
,
4068 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4069 if (gdbarch_debug
>= 2)
4070 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4071 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4075 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4076 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4078 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4082 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4084 gdb_assert (gdbarch
!= NULL
);
4085 return gdbarch
->extract_struct_value_address
!= 0;
4089 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4091 gdb_assert (gdbarch
!= NULL
);
4092 if (gdbarch
->extract_struct_value_address
== 0)
4093 internal_error (__FILE__
, __LINE__
,
4094 "gdbarch: gdbarch_extract_struct_value_address invalid");
4095 if (gdbarch_debug
>= 2)
4096 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4097 return gdbarch
->extract_struct_value_address (regcache
);
4101 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4102 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4104 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4108 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4110 gdb_assert (gdbarch
!= NULL
);
4111 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4115 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4117 gdb_assert (gdbarch
!= NULL
);
4118 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4119 internal_error (__FILE__
, __LINE__
,
4120 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4121 if (gdbarch_debug
>= 2)
4122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4123 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4127 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4128 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4130 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4134 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4136 gdb_assert (gdbarch
!= NULL
);
4137 if (gdbarch
->use_struct_convention
== 0)
4138 internal_error (__FILE__
, __LINE__
,
4139 "gdbarch: gdbarch_use_struct_convention invalid");
4140 if (gdbarch_debug
>= 2)
4141 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4142 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4146 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4147 gdbarch_use_struct_convention_ftype use_struct_convention
)
4149 gdbarch
->use_struct_convention
= use_struct_convention
;
4153 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4155 gdb_assert (gdbarch
!= NULL
);
4156 if (gdbarch
->frame_init_saved_regs
== 0)
4157 internal_error (__FILE__
, __LINE__
,
4158 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4159 if (gdbarch_debug
>= 2)
4160 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
4161 gdbarch
->frame_init_saved_regs (frame
);
4165 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4166 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
4168 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
4172 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4174 gdb_assert (gdbarch
!= NULL
);
4175 return gdbarch
->init_extra_frame_info
!= 0;
4179 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4181 gdb_assert (gdbarch
!= NULL
);
4182 if (gdbarch
->init_extra_frame_info
== 0)
4183 internal_error (__FILE__
, __LINE__
,
4184 "gdbarch: gdbarch_init_extra_frame_info invalid");
4185 if (gdbarch_debug
>= 2)
4186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
4187 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4191 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4192 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4194 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4198 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4200 gdb_assert (gdbarch
!= NULL
);
4201 if (gdbarch
->skip_prologue
== 0)
4202 internal_error (__FILE__
, __LINE__
,
4203 "gdbarch: gdbarch_skip_prologue invalid");
4204 if (gdbarch_debug
>= 2)
4205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4206 return gdbarch
->skip_prologue (ip
);
4210 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4211 gdbarch_skip_prologue_ftype skip_prologue
)
4213 gdbarch
->skip_prologue
= skip_prologue
;
4217 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4219 gdb_assert (gdbarch
!= NULL
);
4220 if (gdbarch
->prologue_frameless_p
== 0)
4221 internal_error (__FILE__
, __LINE__
,
4222 "gdbarch: gdbarch_prologue_frameless_p invalid");
4223 if (gdbarch_debug
>= 2)
4224 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4225 return gdbarch
->prologue_frameless_p (ip
);
4229 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4230 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4232 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4236 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4238 gdb_assert (gdbarch
!= NULL
);
4239 if (gdbarch
->inner_than
== 0)
4240 internal_error (__FILE__
, __LINE__
,
4241 "gdbarch: gdbarch_inner_than invalid");
4242 if (gdbarch_debug
>= 2)
4243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4244 return gdbarch
->inner_than (lhs
, rhs
);
4248 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4249 gdbarch_inner_than_ftype inner_than
)
4251 gdbarch
->inner_than
= inner_than
;
4254 const unsigned char *
4255 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4257 gdb_assert (gdbarch
!= NULL
);
4258 if (gdbarch
->breakpoint_from_pc
== 0)
4259 internal_error (__FILE__
, __LINE__
,
4260 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4261 if (gdbarch_debug
>= 2)
4262 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4263 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4267 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4268 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4270 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4274 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4276 gdb_assert (gdbarch
!= NULL
);
4277 if (gdbarch
->memory_insert_breakpoint
== 0)
4278 internal_error (__FILE__
, __LINE__
,
4279 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4280 if (gdbarch_debug
>= 2)
4281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4282 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4286 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4287 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4289 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4293 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4295 gdb_assert (gdbarch
!= NULL
);
4296 if (gdbarch
->memory_remove_breakpoint
== 0)
4297 internal_error (__FILE__
, __LINE__
,
4298 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4299 if (gdbarch_debug
>= 2)
4300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4301 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4305 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4306 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4308 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4312 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4314 gdb_assert (gdbarch
!= NULL
);
4315 if (gdbarch
->decr_pc_after_break
== -1)
4316 internal_error (__FILE__
, __LINE__
,
4317 "gdbarch: gdbarch_decr_pc_after_break invalid");
4318 if (gdbarch_debug
>= 2)
4319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4320 return gdbarch
->decr_pc_after_break
;
4324 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4325 CORE_ADDR decr_pc_after_break
)
4327 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4331 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4333 gdb_assert (gdbarch
!= NULL
);
4334 if (gdbarch
->prepare_to_proceed
== 0)
4335 internal_error (__FILE__
, __LINE__
,
4336 "gdbarch: gdbarch_prepare_to_proceed invalid");
4337 if (gdbarch_debug
>= 2)
4338 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4339 return gdbarch
->prepare_to_proceed (select_it
);
4343 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4344 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4346 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4350 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4352 gdb_assert (gdbarch
!= NULL
);
4353 if (gdbarch
->function_start_offset
== -1)
4354 internal_error (__FILE__
, __LINE__
,
4355 "gdbarch: gdbarch_function_start_offset invalid");
4356 if (gdbarch_debug
>= 2)
4357 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4358 return gdbarch
->function_start_offset
;
4362 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4363 CORE_ADDR function_start_offset
)
4365 gdbarch
->function_start_offset
= function_start_offset
;
4369 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4371 gdb_assert (gdbarch
!= NULL
);
4372 if (gdbarch
->remote_translate_xfer_address
== 0)
4373 internal_error (__FILE__
, __LINE__
,
4374 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4375 if (gdbarch_debug
>= 2)
4376 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4377 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4381 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4382 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4384 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4388 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4390 gdb_assert (gdbarch
!= NULL
);
4391 if (gdbarch
->frame_args_skip
== -1)
4392 internal_error (__FILE__
, __LINE__
,
4393 "gdbarch: gdbarch_frame_args_skip invalid");
4394 if (gdbarch_debug
>= 2)
4395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4396 return gdbarch
->frame_args_skip
;
4400 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4401 CORE_ADDR frame_args_skip
)
4403 gdbarch
->frame_args_skip
= frame_args_skip
;
4407 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4409 gdb_assert (gdbarch
!= NULL
);
4410 if (gdbarch
->frameless_function_invocation
== 0)
4411 internal_error (__FILE__
, __LINE__
,
4412 "gdbarch: gdbarch_frameless_function_invocation invalid");
4413 if (gdbarch_debug
>= 2)
4414 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4415 return gdbarch
->frameless_function_invocation (fi
);
4419 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4420 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4422 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4426 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4428 gdb_assert (gdbarch
!= NULL
);
4429 if (gdbarch
->frame_chain
== 0)
4430 internal_error (__FILE__
, __LINE__
,
4431 "gdbarch: gdbarch_frame_chain invalid");
4432 if (gdbarch_debug
>= 2)
4433 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4434 return gdbarch
->frame_chain (frame
);
4438 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4439 gdbarch_frame_chain_ftype frame_chain
)
4441 gdbarch
->frame_chain
= frame_chain
;
4445 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4447 gdb_assert (gdbarch
!= NULL
);
4448 if (gdbarch
->frame_chain_valid
== 0)
4449 internal_error (__FILE__
, __LINE__
,
4450 "gdbarch: gdbarch_frame_chain_valid invalid");
4451 if (gdbarch_debug
>= 2)
4452 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4453 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4457 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4458 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4460 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4464 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4466 gdb_assert (gdbarch
!= NULL
);
4467 if (gdbarch
->frame_saved_pc
== 0)
4468 internal_error (__FILE__
, __LINE__
,
4469 "gdbarch: gdbarch_frame_saved_pc invalid");
4470 if (gdbarch_debug
>= 2)
4471 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4472 return gdbarch
->frame_saved_pc (fi
);
4476 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4477 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4479 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4483 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4485 gdb_assert (gdbarch
!= NULL
);
4486 if (gdbarch
->frame_args_address
== 0)
4487 internal_error (__FILE__
, __LINE__
,
4488 "gdbarch: gdbarch_frame_args_address invalid");
4489 if (gdbarch_debug
>= 2)
4490 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4491 return gdbarch
->frame_args_address (fi
);
4495 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4496 gdbarch_frame_args_address_ftype frame_args_address
)
4498 gdbarch
->frame_args_address
= frame_args_address
;
4502 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4504 gdb_assert (gdbarch
!= NULL
);
4505 if (gdbarch
->frame_locals_address
== 0)
4506 internal_error (__FILE__
, __LINE__
,
4507 "gdbarch: gdbarch_frame_locals_address invalid");
4508 if (gdbarch_debug
>= 2)
4509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4510 return gdbarch
->frame_locals_address (fi
);
4514 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4515 gdbarch_frame_locals_address_ftype frame_locals_address
)
4517 gdbarch
->frame_locals_address
= frame_locals_address
;
4521 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4523 gdb_assert (gdbarch
!= NULL
);
4524 if (gdbarch
->saved_pc_after_call
== 0)
4525 internal_error (__FILE__
, __LINE__
,
4526 "gdbarch: gdbarch_saved_pc_after_call invalid");
4527 if (gdbarch_debug
>= 2)
4528 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4529 return gdbarch
->saved_pc_after_call (frame
);
4533 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4534 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4536 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4540 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4542 gdb_assert (gdbarch
!= NULL
);
4543 if (gdbarch
->frame_num_args
== 0)
4544 internal_error (__FILE__
, __LINE__
,
4545 "gdbarch: gdbarch_frame_num_args invalid");
4546 if (gdbarch_debug
>= 2)
4547 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4548 return gdbarch
->frame_num_args (frame
);
4552 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4553 gdbarch_frame_num_args_ftype frame_num_args
)
4555 gdbarch
->frame_num_args
= frame_num_args
;
4559 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4561 gdb_assert (gdbarch
!= NULL
);
4562 return gdbarch
->stack_align
!= 0;
4566 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4568 gdb_assert (gdbarch
!= NULL
);
4569 if (gdbarch
->stack_align
== 0)
4570 internal_error (__FILE__
, __LINE__
,
4571 "gdbarch: gdbarch_stack_align invalid");
4572 if (gdbarch_debug
>= 2)
4573 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4574 return gdbarch
->stack_align (sp
);
4578 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4579 gdbarch_stack_align_ftype stack_align
)
4581 gdbarch
->stack_align
= stack_align
;
4585 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4587 gdb_assert (gdbarch
!= NULL
);
4588 return gdbarch
->frame_align
!= 0;
4592 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4594 gdb_assert (gdbarch
!= NULL
);
4595 if (gdbarch
->frame_align
== 0)
4596 internal_error (__FILE__
, __LINE__
,
4597 "gdbarch: gdbarch_frame_align invalid");
4598 if (gdbarch_debug
>= 2)
4599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4600 return gdbarch
->frame_align (gdbarch
, address
);
4604 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4605 gdbarch_frame_align_ftype frame_align
)
4607 gdbarch
->frame_align
= frame_align
;
4611 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4613 gdb_assert (gdbarch
!= NULL
);
4614 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4615 if (gdbarch_debug
>= 2)
4616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4617 return gdbarch
->extra_stack_alignment_needed
;
4621 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4622 int extra_stack_alignment_needed
)
4624 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4628 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4630 gdb_assert (gdbarch
!= NULL
);
4631 return gdbarch
->reg_struct_has_addr
!= 0;
4635 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4637 gdb_assert (gdbarch
!= NULL
);
4638 if (gdbarch
->reg_struct_has_addr
== 0)
4639 internal_error (__FILE__
, __LINE__
,
4640 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4641 if (gdbarch_debug
>= 2)
4642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4643 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4647 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4648 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4650 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4654 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4656 gdb_assert (gdbarch
!= NULL
);
4657 return gdbarch
->save_dummy_frame_tos
!= 0;
4661 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4663 gdb_assert (gdbarch
!= NULL
);
4664 if (gdbarch
->save_dummy_frame_tos
== 0)
4665 internal_error (__FILE__
, __LINE__
,
4666 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4667 if (gdbarch_debug
>= 2)
4668 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4669 gdbarch
->save_dummy_frame_tos (sp
);
4673 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4674 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4676 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4680 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4682 gdb_assert (gdbarch
!= NULL
);
4683 if (gdbarch_debug
>= 2)
4684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4685 return gdbarch
->parm_boundary
;
4689 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4692 gdbarch
->parm_boundary
= parm_boundary
;
4695 const struct floatformat
*
4696 gdbarch_float_format (struct gdbarch
*gdbarch
)
4698 gdb_assert (gdbarch
!= NULL
);
4699 if (gdbarch_debug
>= 2)
4700 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4701 return gdbarch
->float_format
;
4705 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4706 const struct floatformat
* float_format
)
4708 gdbarch
->float_format
= float_format
;
4711 const struct floatformat
*
4712 gdbarch_double_format (struct gdbarch
*gdbarch
)
4714 gdb_assert (gdbarch
!= NULL
);
4715 if (gdbarch_debug
>= 2)
4716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4717 return gdbarch
->double_format
;
4721 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4722 const struct floatformat
* double_format
)
4724 gdbarch
->double_format
= double_format
;
4727 const struct floatformat
*
4728 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4730 gdb_assert (gdbarch
!= NULL
);
4731 if (gdbarch_debug
>= 2)
4732 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4733 return gdbarch
->long_double_format
;
4737 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4738 const struct floatformat
* long_double_format
)
4740 gdbarch
->long_double_format
= long_double_format
;
4744 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4746 gdb_assert (gdbarch
!= NULL
);
4747 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4748 internal_error (__FILE__
, __LINE__
,
4749 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4750 if (gdbarch_debug
>= 2)
4751 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4752 return gdbarch
->convert_from_func_ptr_addr (addr
);
4756 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4757 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4759 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4763 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4765 gdb_assert (gdbarch
!= NULL
);
4766 if (gdbarch
->addr_bits_remove
== 0)
4767 internal_error (__FILE__
, __LINE__
,
4768 "gdbarch: gdbarch_addr_bits_remove invalid");
4769 if (gdbarch_debug
>= 2)
4770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4771 return gdbarch
->addr_bits_remove (addr
);
4775 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4776 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4778 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4782 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4784 gdb_assert (gdbarch
!= NULL
);
4785 if (gdbarch
->smash_text_address
== 0)
4786 internal_error (__FILE__
, __LINE__
,
4787 "gdbarch: gdbarch_smash_text_address invalid");
4788 if (gdbarch_debug
>= 2)
4789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4790 return gdbarch
->smash_text_address (addr
);
4794 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4795 gdbarch_smash_text_address_ftype smash_text_address
)
4797 gdbarch
->smash_text_address
= smash_text_address
;
4801 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4803 gdb_assert (gdbarch
!= NULL
);
4804 return gdbarch
->software_single_step
!= 0;
4808 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4810 gdb_assert (gdbarch
!= NULL
);
4811 if (gdbarch
->software_single_step
== 0)
4812 internal_error (__FILE__
, __LINE__
,
4813 "gdbarch: gdbarch_software_single_step invalid");
4814 if (gdbarch_debug
>= 2)
4815 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4816 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4820 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4821 gdbarch_software_single_step_ftype software_single_step
)
4823 gdbarch
->software_single_step
= software_single_step
;
4827 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4829 gdb_assert (gdbarch
!= NULL
);
4830 if (gdbarch
->print_insn
== 0)
4831 internal_error (__FILE__
, __LINE__
,
4832 "gdbarch: gdbarch_print_insn invalid");
4833 if (gdbarch_debug
>= 2)
4834 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4835 return gdbarch
->print_insn (vma
, info
);
4839 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4840 gdbarch_print_insn_ftype print_insn
)
4842 gdbarch
->print_insn
= print_insn
;
4846 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4848 gdb_assert (gdbarch
!= NULL
);
4849 if (gdbarch
->skip_trampoline_code
== 0)
4850 internal_error (__FILE__
, __LINE__
,
4851 "gdbarch: gdbarch_skip_trampoline_code invalid");
4852 if (gdbarch_debug
>= 2)
4853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4854 return gdbarch
->skip_trampoline_code (pc
);
4858 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4859 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4861 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4865 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4867 gdb_assert (gdbarch
!= NULL
);
4868 if (gdbarch
->in_solib_call_trampoline
== 0)
4869 internal_error (__FILE__
, __LINE__
,
4870 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4871 if (gdbarch_debug
>= 2)
4872 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4873 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4877 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4878 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4880 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4884 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4886 gdb_assert (gdbarch
!= NULL
);
4887 if (gdbarch
->in_solib_return_trampoline
== 0)
4888 internal_error (__FILE__
, __LINE__
,
4889 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
4890 if (gdbarch_debug
>= 2)
4891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
4892 return gdbarch
->in_solib_return_trampoline (pc
, name
);
4896 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
4897 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
4899 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
4903 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4905 gdb_assert (gdbarch
!= NULL
);
4906 if (gdbarch
->pc_in_sigtramp
== 0)
4907 internal_error (__FILE__
, __LINE__
,
4908 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4909 if (gdbarch_debug
>= 2)
4910 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4911 return gdbarch
->pc_in_sigtramp (pc
, name
);
4915 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4916 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4918 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4922 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
4924 gdb_assert (gdbarch
!= NULL
);
4925 return gdbarch
->sigtramp_start
!= 0;
4929 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4931 gdb_assert (gdbarch
!= NULL
);
4932 if (gdbarch
->sigtramp_start
== 0)
4933 internal_error (__FILE__
, __LINE__
,
4934 "gdbarch: gdbarch_sigtramp_start invalid");
4935 if (gdbarch_debug
>= 2)
4936 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
4937 return gdbarch
->sigtramp_start (pc
);
4941 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
4942 gdbarch_sigtramp_start_ftype sigtramp_start
)
4944 gdbarch
->sigtramp_start
= sigtramp_start
;
4948 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
4950 gdb_assert (gdbarch
!= NULL
);
4951 return gdbarch
->sigtramp_end
!= 0;
4955 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4957 gdb_assert (gdbarch
!= NULL
);
4958 if (gdbarch
->sigtramp_end
== 0)
4959 internal_error (__FILE__
, __LINE__
,
4960 "gdbarch: gdbarch_sigtramp_end invalid");
4961 if (gdbarch_debug
>= 2)
4962 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
4963 return gdbarch
->sigtramp_end (pc
);
4967 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
4968 gdbarch_sigtramp_end_ftype sigtramp_end
)
4970 gdbarch
->sigtramp_end
= sigtramp_end
;
4974 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4976 gdb_assert (gdbarch
!= NULL
);
4977 if (gdbarch
->in_function_epilogue_p
== 0)
4978 internal_error (__FILE__
, __LINE__
,
4979 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4980 if (gdbarch_debug
>= 2)
4981 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4982 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4986 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4987 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4989 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4993 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4995 gdb_assert (gdbarch
!= NULL
);
4996 if (gdbarch
->construct_inferior_arguments
== 0)
4997 internal_error (__FILE__
, __LINE__
,
4998 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4999 if (gdbarch_debug
>= 2)
5000 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5001 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5005 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5006 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5008 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5012 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
5014 gdb_assert (gdbarch
!= NULL
);
5015 return gdbarch
->dwarf2_build_frame_info
!= 0;
5019 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
5021 gdb_assert (gdbarch
!= NULL
);
5022 if (gdbarch
->dwarf2_build_frame_info
== 0)
5023 internal_error (__FILE__
, __LINE__
,
5024 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5025 if (gdbarch_debug
>= 2)
5026 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
5027 gdbarch
->dwarf2_build_frame_info (objfile
);
5031 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
5032 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
5034 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
5038 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5040 gdb_assert (gdbarch
!= NULL
);
5041 if (gdbarch
->elf_make_msymbol_special
== 0)
5042 internal_error (__FILE__
, __LINE__
,
5043 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5044 if (gdbarch_debug
>= 2)
5045 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5046 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5050 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5051 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5053 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5057 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5059 gdb_assert (gdbarch
!= NULL
);
5060 if (gdbarch
->coff_make_msymbol_special
== 0)
5061 internal_error (__FILE__
, __LINE__
,
5062 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5063 if (gdbarch_debug
>= 2)
5064 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5065 gdbarch
->coff_make_msymbol_special (val
, msym
);
5069 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5070 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5072 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5076 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5078 gdb_assert (gdbarch
!= NULL
);
5079 /* Skip verify of name_of_malloc, invalid_p == 0 */
5080 if (gdbarch_debug
>= 2)
5081 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5082 return gdbarch
->name_of_malloc
;
5086 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5087 const char * name_of_malloc
)
5089 gdbarch
->name_of_malloc
= name_of_malloc
;
5093 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5095 gdb_assert (gdbarch
!= NULL
);
5096 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5097 if (gdbarch_debug
>= 2)
5098 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5099 return gdbarch
->cannot_step_breakpoint
;
5103 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5104 int cannot_step_breakpoint
)
5106 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5110 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5112 gdb_assert (gdbarch
!= NULL
);
5113 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5114 if (gdbarch_debug
>= 2)
5115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5116 return gdbarch
->have_nonsteppable_watchpoint
;
5120 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5121 int have_nonsteppable_watchpoint
)
5123 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5127 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5129 gdb_assert (gdbarch
!= NULL
);
5130 return gdbarch
->address_class_type_flags
!= 0;
5134 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5136 gdb_assert (gdbarch
!= NULL
);
5137 if (gdbarch
->address_class_type_flags
== 0)
5138 internal_error (__FILE__
, __LINE__
,
5139 "gdbarch: gdbarch_address_class_type_flags invalid");
5140 if (gdbarch_debug
>= 2)
5141 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5142 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5146 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5147 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5149 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5153 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5155 gdb_assert (gdbarch
!= NULL
);
5156 return gdbarch
->address_class_type_flags_to_name
!= 0;
5160 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5162 gdb_assert (gdbarch
!= NULL
);
5163 if (gdbarch
->address_class_type_flags_to_name
== 0)
5164 internal_error (__FILE__
, __LINE__
,
5165 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5166 if (gdbarch_debug
>= 2)
5167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5168 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5172 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5173 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5175 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5179 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5181 gdb_assert (gdbarch
!= NULL
);
5182 return gdbarch
->address_class_name_to_type_flags
!= 0;
5186 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, char *name
, int *type_flags_ptr
)
5188 gdb_assert (gdbarch
!= NULL
);
5189 if (gdbarch
->address_class_name_to_type_flags
== 0)
5190 internal_error (__FILE__
, __LINE__
,
5191 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5192 if (gdbarch_debug
>= 2)
5193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5194 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5198 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5199 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5201 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5205 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5207 gdb_assert (gdbarch
!= NULL
);
5208 if (gdbarch
->register_reggroup_p
== 0)
5209 internal_error (__FILE__
, __LINE__
,
5210 "gdbarch: gdbarch_register_reggroup_p invalid");
5211 if (gdbarch_debug
>= 2)
5212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5213 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5217 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5218 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5220 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5224 /* Keep a registry of per-architecture data-pointers required by GDB
5231 gdbarch_data_init_ftype
*init
;
5232 gdbarch_data_free_ftype
*free
;
5235 struct gdbarch_data_registration
5237 struct gdbarch_data
*data
;
5238 struct gdbarch_data_registration
*next
;
5241 struct gdbarch_data_registry
5244 struct gdbarch_data_registration
*registrations
;
5247 struct gdbarch_data_registry gdbarch_data_registry
=
5252 struct gdbarch_data
*
5253 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5254 gdbarch_data_free_ftype
*free
)
5256 struct gdbarch_data_registration
**curr
;
5257 /* Append the new registraration. */
5258 for (curr
= &gdbarch_data_registry
.registrations
;
5260 curr
= &(*curr
)->next
);
5261 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5262 (*curr
)->next
= NULL
;
5263 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5264 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5265 (*curr
)->data
->init
= init
;
5266 (*curr
)->data
->init_p
= 1;
5267 (*curr
)->data
->free
= free
;
5268 return (*curr
)->data
;
5272 /* Create/delete the gdbarch data vector. */
5275 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5277 gdb_assert (gdbarch
->data
== NULL
);
5278 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5279 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5283 free_gdbarch_data (struct gdbarch
*gdbarch
)
5285 struct gdbarch_data_registration
*rego
;
5286 gdb_assert (gdbarch
->data
!= NULL
);
5287 for (rego
= gdbarch_data_registry
.registrations
;
5291 struct gdbarch_data
*data
= rego
->data
;
5292 gdb_assert (data
->index
< gdbarch
->nr_data
);
5293 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5295 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5296 gdbarch
->data
[data
->index
] = NULL
;
5299 xfree (gdbarch
->data
);
5300 gdbarch
->data
= NULL
;
5304 /* Initialize the current value of the specified per-architecture
5308 set_gdbarch_data (struct gdbarch
*gdbarch
,
5309 struct gdbarch_data
*data
,
5312 gdb_assert (data
->index
< gdbarch
->nr_data
);
5313 if (gdbarch
->data
[data
->index
] != NULL
)
5315 gdb_assert (data
->free
!= NULL
);
5316 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5318 gdbarch
->data
[data
->index
] = pointer
;
5321 /* Return the current value of the specified per-architecture
5325 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5327 gdb_assert (data
->index
< gdbarch
->nr_data
);
5328 /* The data-pointer isn't initialized, call init() to get a value but
5329 only if the architecture initializaiton has completed. Otherwise
5330 punt - hope that the caller knows what they are doing. */
5331 if (gdbarch
->data
[data
->index
] == NULL
5332 && gdbarch
->initialized_p
)
5334 /* Be careful to detect an initialization cycle. */
5335 gdb_assert (data
->init_p
);
5337 gdb_assert (data
->init
!= NULL
);
5338 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5340 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5342 return gdbarch
->data
[data
->index
];
5347 /* Keep a registry of swapped data required by GDB modules. */
5352 struct gdbarch_swap_registration
*source
;
5353 struct gdbarch_swap
*next
;
5356 struct gdbarch_swap_registration
5359 unsigned long sizeof_data
;
5360 gdbarch_swap_ftype
*init
;
5361 struct gdbarch_swap_registration
*next
;
5364 struct gdbarch_swap_registry
5367 struct gdbarch_swap_registration
*registrations
;
5370 struct gdbarch_swap_registry gdbarch_swap_registry
=
5376 register_gdbarch_swap (void *data
,
5377 unsigned long sizeof_data
,
5378 gdbarch_swap_ftype
*init
)
5380 struct gdbarch_swap_registration
**rego
;
5381 for (rego
= &gdbarch_swap_registry
.registrations
;
5383 rego
= &(*rego
)->next
);
5384 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5385 (*rego
)->next
= NULL
;
5386 (*rego
)->init
= init
;
5387 (*rego
)->data
= data
;
5388 (*rego
)->sizeof_data
= sizeof_data
;
5392 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5394 struct gdbarch_swap
*curr
;
5395 for (curr
= gdbarch
->swap
;
5399 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5404 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5406 struct gdbarch_swap_registration
*rego
;
5407 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5408 for (rego
= gdbarch_swap_registry
.registrations
;
5412 if (rego
->data
!= NULL
)
5414 (*curr
) = XMALLOC (struct gdbarch_swap
);
5415 (*curr
)->source
= rego
;
5416 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5417 (*curr
)->next
= NULL
;
5418 curr
= &(*curr
)->next
;
5420 if (rego
->init
!= NULL
)
5426 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5428 struct gdbarch_swap
*curr
;
5429 for (curr
= gdbarch
->swap
;
5432 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5436 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5438 struct gdbarch_swap
*curr
;
5439 for (curr
= gdbarch
->swap
;
5442 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5446 /* Keep a registry of the architectures known by GDB. */
5448 struct gdbarch_registration
5450 enum bfd_architecture bfd_architecture
;
5451 gdbarch_init_ftype
*init
;
5452 gdbarch_dump_tdep_ftype
*dump_tdep
;
5453 struct gdbarch_list
*arches
;
5454 struct gdbarch_registration
*next
;
5457 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5460 append_name (const char ***buf
, int *nr
, const char *name
)
5462 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5468 gdbarch_printable_names (void)
5472 /* Accumulate a list of names based on the registed list of
5474 enum bfd_architecture a
;
5476 const char **arches
= NULL
;
5477 struct gdbarch_registration
*rego
;
5478 for (rego
= gdbarch_registry
;
5482 const struct bfd_arch_info
*ap
;
5483 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5485 internal_error (__FILE__
, __LINE__
,
5486 "gdbarch_architecture_names: multi-arch unknown");
5489 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5494 append_name (&arches
, &nr_arches
, NULL
);
5498 /* Just return all the architectures that BFD knows. Assume that
5499 the legacy architecture framework supports them. */
5500 return bfd_arch_list ();
5505 gdbarch_register (enum bfd_architecture bfd_architecture
,
5506 gdbarch_init_ftype
*init
,
5507 gdbarch_dump_tdep_ftype
*dump_tdep
)
5509 struct gdbarch_registration
**curr
;
5510 const struct bfd_arch_info
*bfd_arch_info
;
5511 /* Check that BFD recognizes this architecture */
5512 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5513 if (bfd_arch_info
== NULL
)
5515 internal_error (__FILE__
, __LINE__
,
5516 "gdbarch: Attempt to register unknown architecture (%d)",
5519 /* Check that we haven't seen this architecture before */
5520 for (curr
= &gdbarch_registry
;
5522 curr
= &(*curr
)->next
)
5524 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5525 internal_error (__FILE__
, __LINE__
,
5526 "gdbarch: Duplicate registraration of architecture (%s)",
5527 bfd_arch_info
->printable_name
);
5531 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5532 bfd_arch_info
->printable_name
,
5535 (*curr
) = XMALLOC (struct gdbarch_registration
);
5536 (*curr
)->bfd_architecture
= bfd_architecture
;
5537 (*curr
)->init
= init
;
5538 (*curr
)->dump_tdep
= dump_tdep
;
5539 (*curr
)->arches
= NULL
;
5540 (*curr
)->next
= NULL
;
5541 /* When non- multi-arch, install whatever target dump routine we've
5542 been provided - hopefully that routine has been written correctly
5543 and works regardless of multi-arch. */
5544 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5545 && startup_gdbarch
.dump_tdep
== NULL
)
5546 startup_gdbarch
.dump_tdep
= dump_tdep
;
5550 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5551 gdbarch_init_ftype
*init
)
5553 gdbarch_register (bfd_architecture
, init
, NULL
);
5557 /* Look for an architecture using gdbarch_info. Base search on only
5558 BFD_ARCH_INFO and BYTE_ORDER. */
5560 struct gdbarch_list
*
5561 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5562 const struct gdbarch_info
*info
)
5564 for (; arches
!= NULL
; arches
= arches
->next
)
5566 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5568 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5576 /* Update the current architecture. Return ZERO if the update request
5580 gdbarch_update_p (struct gdbarch_info info
)
5582 struct gdbarch
*new_gdbarch
;
5583 struct gdbarch
*old_gdbarch
;
5584 struct gdbarch_registration
*rego
;
5586 /* Fill in missing parts of the INFO struct using a number of
5587 sources: ``set ...''; INFOabfd supplied; existing target. */
5589 /* ``(gdb) set architecture ...'' */
5590 if (info
.bfd_arch_info
== NULL
5591 && !TARGET_ARCHITECTURE_AUTO
)
5592 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5593 if (info
.bfd_arch_info
== NULL
5594 && info
.abfd
!= NULL
5595 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5596 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5597 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5598 if (info
.bfd_arch_info
== NULL
)
5599 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5601 /* ``(gdb) set byte-order ...'' */
5602 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5603 && !TARGET_BYTE_ORDER_AUTO
)
5604 info
.byte_order
= TARGET_BYTE_ORDER
;
5605 /* From the INFO struct. */
5606 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5607 && info
.abfd
!= NULL
)
5608 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5609 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5610 : BFD_ENDIAN_UNKNOWN
);
5611 /* From the current target. */
5612 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5613 info
.byte_order
= TARGET_BYTE_ORDER
;
5615 /* Must have found some sort of architecture. */
5616 gdb_assert (info
.bfd_arch_info
!= NULL
);
5620 fprintf_unfiltered (gdb_stdlog
,
5621 "gdbarch_update: info.bfd_arch_info %s\n",
5622 (info
.bfd_arch_info
!= NULL
5623 ? info
.bfd_arch_info
->printable_name
5625 fprintf_unfiltered (gdb_stdlog
,
5626 "gdbarch_update: info.byte_order %d (%s)\n",
5628 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5629 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5631 fprintf_unfiltered (gdb_stdlog
,
5632 "gdbarch_update: info.abfd 0x%lx\n",
5634 fprintf_unfiltered (gdb_stdlog
,
5635 "gdbarch_update: info.tdep_info 0x%lx\n",
5636 (long) info
.tdep_info
);
5639 /* Find the target that knows about this architecture. */
5640 for (rego
= gdbarch_registry
;
5643 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5648 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5652 /* Swap the data belonging to the old target out setting the
5653 installed data to zero. This stops the ->init() function trying
5654 to refer to the previous architecture's global data structures. */
5655 swapout_gdbarch_swap (current_gdbarch
);
5656 clear_gdbarch_swap (current_gdbarch
);
5658 /* Save the previously selected architecture, setting the global to
5659 NULL. This stops ->init() trying to use the previous
5660 architecture's configuration. The previous architecture may not
5661 even be of the same architecture family. The most recent
5662 architecture of the same family is found at the head of the
5663 rego->arches list. */
5664 old_gdbarch
= current_gdbarch
;
5665 current_gdbarch
= NULL
;
5667 /* Ask the target for a replacement architecture. */
5668 new_gdbarch
= rego
->init (info
, rego
->arches
);
5670 /* Did the target like it? No. Reject the change and revert to the
5671 old architecture. */
5672 if (new_gdbarch
== NULL
)
5675 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5676 swapin_gdbarch_swap (old_gdbarch
);
5677 current_gdbarch
= old_gdbarch
;
5681 /* Did the architecture change? No. Oops, put the old architecture
5683 if (old_gdbarch
== new_gdbarch
)
5686 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5688 new_gdbarch
->bfd_arch_info
->printable_name
);
5689 swapin_gdbarch_swap (old_gdbarch
);
5690 current_gdbarch
= old_gdbarch
;
5694 /* Is this a pre-existing architecture? Yes. Move it to the front
5695 of the list of architectures (keeping the list sorted Most
5696 Recently Used) and then copy it in. */
5698 struct gdbarch_list
**list
;
5699 for (list
= ®o
->arches
;
5701 list
= &(*list
)->next
)
5703 if ((*list
)->gdbarch
== new_gdbarch
)
5705 struct gdbarch_list
*this;
5707 fprintf_unfiltered (gdb_stdlog
,
5708 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5710 new_gdbarch
->bfd_arch_info
->printable_name
);
5713 (*list
) = this->next
;
5714 /* Insert in the front. */
5715 this->next
= rego
->arches
;
5716 rego
->arches
= this;
5717 /* Copy the new architecture in. */
5718 current_gdbarch
= new_gdbarch
;
5719 swapin_gdbarch_swap (new_gdbarch
);
5720 architecture_changed_event ();
5726 /* Prepend this new architecture to the architecture list (keep the
5727 list sorted Most Recently Used). */
5729 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5730 this->next
= rego
->arches
;
5731 this->gdbarch
= new_gdbarch
;
5732 rego
->arches
= this;
5735 /* Switch to this new architecture marking it initialized. */
5736 current_gdbarch
= new_gdbarch
;
5737 current_gdbarch
->initialized_p
= 1;
5740 fprintf_unfiltered (gdb_stdlog
,
5741 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5743 new_gdbarch
->bfd_arch_info
->printable_name
);
5746 /* Check that the newly installed architecture is valid. Plug in
5747 any post init values. */
5748 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5749 verify_gdbarch (new_gdbarch
);
5751 /* Initialize the per-architecture memory (swap) areas.
5752 CURRENT_GDBARCH must be update before these modules are
5754 init_gdbarch_swap (new_gdbarch
);
5756 /* Initialize the per-architecture data. CURRENT_GDBARCH
5757 must be updated before these modules are called. */
5758 architecture_changed_event ();
5761 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5769 /* Pointer to the target-dependent disassembly function. */
5770 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5771 disassemble_info tm_print_insn_info
;
5774 extern void _initialize_gdbarch (void);
5777 _initialize_gdbarch (void)
5779 struct cmd_list_element
*c
;
5781 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5782 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5783 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5784 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5785 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5787 add_show_from_set (add_set_cmd ("arch",
5790 (char *)&gdbarch_debug
,
5791 "Set architecture debugging.\n\
5792 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5794 c
= add_set_cmd ("archdebug",
5797 (char *)&gdbarch_debug
,
5798 "Set architecture debugging.\n\
5799 When non-zero, architecture debugging is enabled.", &setlist
);
5801 deprecate_cmd (c
, "set debug arch");
5802 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");