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-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch
*gdbarch
);
70 static void alloc_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void clear_gdbarch_swap (struct gdbarch
*);
75 static void swapout_gdbarch_swap (struct gdbarch
*);
76 static void swapin_gdbarch_swap (struct gdbarch
*);
78 /* Non-zero if we want to trace architecture code. */
81 #define GDBARCH_DEBUG 0
83 int gdbarch_debug
= GDBARCH_DEBUG
;
86 /* Maintain the struct gdbarch object */
90 /* basic architectural information */
91 const struct bfd_arch_info
* bfd_arch_info
;
94 /* target specific vector. */
95 struct gdbarch_tdep
*tdep
;
96 gdbarch_dump_tdep_ftype
*dump_tdep
;
98 /* per-architecture data-pointers */
102 /* per-architecture swap-regions */
103 struct gdbarch_swap
*swap
;
105 /* Multi-arch values.
107 When extending this structure you must:
111 Declare set/get functions and define the corresponding
114 gdbarch_alloc(): If zero/NULL is not a suitable default,
115 initialize the new field.
117 verify_gdbarch(): Confirm that the target updated the field
120 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
123 ``startup_gdbarch()'': Append an initial value to the static
124 variable (base values on the host's c-type system).
126 get_gdbarch(): Implement the set/get functions (probably using
127 the macro's as shortcuts).
142 gdbarch_read_pc_ftype
*read_pc
;
143 gdbarch_write_pc_ftype
*write_pc
;
144 gdbarch_read_fp_ftype
*read_fp
;
145 gdbarch_read_sp_ftype
*read_sp
;
146 gdbarch_write_sp_ftype
*write_sp
;
147 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
148 gdbarch_register_read_ftype
*register_read
;
149 gdbarch_register_write_ftype
*register_write
;
159 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
160 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
161 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
162 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
163 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
164 gdbarch_register_name_ftype
*register_name
;
167 gdbarch_register_byte_ftype
*register_byte
;
168 gdbarch_register_raw_size_ftype
*register_raw_size
;
169 int max_register_raw_size
;
170 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
171 int max_register_virtual_size
;
172 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
173 gdbarch_do_registers_info_ftype
*do_registers_info
;
174 gdbarch_print_float_info_ftype
*print_float_info
;
175 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
176 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
177 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
178 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
179 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
180 int use_generic_dummy_frames
;
181 int call_dummy_location
;
182 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
183 CORE_ADDR call_dummy_start_offset
;
184 CORE_ADDR call_dummy_breakpoint_offset
;
185 int call_dummy_breakpoint_offset_p
;
186 int call_dummy_length
;
187 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
189 LONGEST
* call_dummy_words
;
190 int sizeof_call_dummy_words
;
191 int call_dummy_stack_adjust_p
;
192 int call_dummy_stack_adjust
;
193 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
194 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
195 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
196 int believe_pcc_promotion
;
197 int believe_pcc_promotion_type
;
198 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
199 gdbarch_get_saved_register_ftype
*get_saved_register
;
200 gdbarch_register_convertible_ftype
*register_convertible
;
201 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
202 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
203 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
204 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
205 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
206 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
207 gdbarch_integer_to_address_ftype
*integer_to_address
;
208 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
209 gdbarch_extract_return_value_ftype
*extract_return_value
;
210 gdbarch_push_arguments_ftype
*push_arguments
;
211 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
212 gdbarch_push_return_address_ftype
*push_return_address
;
213 gdbarch_pop_frame_ftype
*pop_frame
;
214 gdbarch_store_struct_return_ftype
*store_struct_return
;
215 gdbarch_store_return_value_ftype
*store_return_value
;
216 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
217 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
218 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
219 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
220 gdbarch_skip_prologue_ftype
*skip_prologue
;
221 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
222 gdbarch_inner_than_ftype
*inner_than
;
223 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
224 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
225 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
226 CORE_ADDR decr_pc_after_break
;
227 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
228 CORE_ADDR function_start_offset
;
229 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
230 CORE_ADDR frame_args_skip
;
231 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
232 gdbarch_frame_chain_ftype
*frame_chain
;
233 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
234 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
235 gdbarch_frame_args_address_ftype
*frame_args_address
;
236 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
237 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
238 gdbarch_frame_num_args_ftype
*frame_num_args
;
239 gdbarch_stack_align_ftype
*stack_align
;
240 int extra_stack_alignment_needed
;
241 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
242 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
244 const struct floatformat
* float_format
;
245 const struct floatformat
* double_format
;
246 const struct floatformat
* long_double_format
;
247 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
248 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
249 gdbarch_smash_text_address_ftype
*smash_text_address
;
250 gdbarch_software_single_step_ftype
*software_single_step
;
251 gdbarch_print_insn_ftype
*print_insn
;
252 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
253 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
254 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
255 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
256 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
257 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
258 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
259 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
263 /* The default architecture uses host values (for want of a better
266 extern const struct bfd_arch_info bfd_default_arch_struct
;
268 struct gdbarch startup_gdbarch
=
270 /* basic architecture information */
271 &bfd_default_arch_struct
,
273 /* target specific vector and its dump routine */
275 /*per-architecture data-pointers and swap regions */
277 /* Multi-arch values */
281 8 * sizeof (LONGEST
),
284 8 * sizeof (long double),
315 generic_register_size
,
317 generic_register_size
,
346 generic_get_saved_register
,
402 generic_in_function_epilogue_p
,
403 construct_inferior_arguments
,
407 /* startup_gdbarch() */
410 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
412 /* Do any initialization needed for a non-multiarch configuration
413 after the _initialize_MODULE functions have been run. */
415 initialize_non_multiarch ()
417 alloc_gdbarch_data (&startup_gdbarch
);
418 /* Ensure that all swap areas are zeroed so that they again think
419 they are starting from scratch. */
420 clear_gdbarch_swap (&startup_gdbarch
);
421 init_gdbarch_swap (&startup_gdbarch
);
422 init_gdbarch_data (&startup_gdbarch
);
426 /* Create a new ``struct gdbarch'' based on information provided by
427 ``struct gdbarch_info''. */
430 gdbarch_alloc (const struct gdbarch_info
*info
,
431 struct gdbarch_tdep
*tdep
)
433 /* NOTE: The new architecture variable is named ``current_gdbarch''
434 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
435 the current local architecture and not the previous global
436 architecture. This ensures that the new architectures initial
437 values are not influenced by the previous architecture. Once
438 everything is parameterised with gdbarch, this will go away. */
439 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
440 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
442 alloc_gdbarch_data (current_gdbarch
);
444 current_gdbarch
->tdep
= tdep
;
446 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
447 current_gdbarch
->byte_order
= info
->byte_order
;
449 /* Force the explicit initialization of these. */
450 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
451 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
452 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
453 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
454 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
455 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
456 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
457 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
458 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
459 current_gdbarch
->char_signed
= -1;
460 current_gdbarch
->read_pc
= generic_target_read_pc
;
461 current_gdbarch
->write_pc
= generic_target_write_pc
;
462 current_gdbarch
->read_fp
= generic_target_read_fp
;
463 current_gdbarch
->read_sp
= generic_target_read_sp
;
464 current_gdbarch
->write_sp
= generic_target_write_sp
;
465 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
466 current_gdbarch
->num_regs
= -1;
467 current_gdbarch
->sp_regnum
= -1;
468 current_gdbarch
->fp_regnum
= -1;
469 current_gdbarch
->pc_regnum
= -1;
470 current_gdbarch
->ps_regnum
= -1;
471 current_gdbarch
->fp0_regnum
= -1;
472 current_gdbarch
->npc_regnum
= -1;
473 current_gdbarch
->nnpc_regnum
= -1;
474 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
475 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
476 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
477 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
478 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
479 current_gdbarch
->register_name
= legacy_register_name
;
480 current_gdbarch
->register_size
= -1;
481 current_gdbarch
->register_bytes
= -1;
482 current_gdbarch
->register_raw_size
= generic_register_size
;
483 current_gdbarch
->max_register_raw_size
= -1;
484 current_gdbarch
->register_virtual_size
= generic_register_size
;
485 current_gdbarch
->max_register_virtual_size
= -1;
486 current_gdbarch
->do_registers_info
= do_registers_info
;
487 current_gdbarch
->print_float_info
= default_print_float_info
;
488 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
489 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
490 current_gdbarch
->cannot_store_register
= cannot_register_not
;
491 current_gdbarch
->use_generic_dummy_frames
= -1;
492 current_gdbarch
->call_dummy_start_offset
= -1;
493 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
494 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
495 current_gdbarch
->call_dummy_length
= -1;
496 current_gdbarch
->call_dummy_p
= -1;
497 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
498 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
499 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
500 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
501 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
502 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
503 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
504 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
505 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
506 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
507 current_gdbarch
->push_arguments
= default_push_arguments
;
508 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
509 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
510 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
511 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
512 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
513 current_gdbarch
->decr_pc_after_break
= -1;
514 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
515 current_gdbarch
->function_start_offset
= -1;
516 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
517 current_gdbarch
->frame_args_skip
= -1;
518 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
519 current_gdbarch
->frame_chain_valid
= func_frame_chain_valid
;
520 current_gdbarch
->extra_stack_alignment_needed
= 1;
521 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
522 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
523 current_gdbarch
->smash_text_address
= core_addr_identity
;
524 current_gdbarch
->print_insn
= legacy_print_insn
;
525 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
526 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
527 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
528 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
529 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
530 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
531 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
532 /* gdbarch_alloc() */
534 return current_gdbarch
;
538 /* Free a gdbarch struct. This should never happen in normal
539 operation --- once you've created a gdbarch, you keep it around.
540 However, if an architecture's init function encounters an error
541 building the structure, it may need to clean up a partially
542 constructed gdbarch. */
545 gdbarch_free (struct gdbarch
*arch
)
547 gdb_assert (arch
!= NULL
);
548 free_gdbarch_data (arch
);
553 /* Ensure that all values in a GDBARCH are reasonable. */
556 verify_gdbarch (struct gdbarch
*gdbarch
)
559 struct cleanup
*cleanups
;
562 /* Only perform sanity checks on a multi-arch target. */
565 log
= mem_fileopen ();
566 cleanups
= make_cleanup_ui_file_delete (log
);
568 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
569 fprintf_unfiltered (log
, "\n\tbyte-order");
570 if (gdbarch
->bfd_arch_info
== NULL
)
571 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
572 /* Check those that need to be defined for the given multi-arch level. */
573 /* Skip verify of short_bit, invalid_p == 0 */
574 /* Skip verify of int_bit, invalid_p == 0 */
575 /* Skip verify of long_bit, invalid_p == 0 */
576 /* Skip verify of long_long_bit, invalid_p == 0 */
577 /* Skip verify of float_bit, invalid_p == 0 */
578 /* Skip verify of double_bit, invalid_p == 0 */
579 /* Skip verify of long_double_bit, invalid_p == 0 */
580 /* Skip verify of ptr_bit, invalid_p == 0 */
581 if (gdbarch
->addr_bit
== 0)
582 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
583 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
584 if (gdbarch
->char_signed
== -1)
585 gdbarch
->char_signed
= 1;
586 /* Skip verify of read_pc, invalid_p == 0 */
587 /* Skip verify of write_pc, invalid_p == 0 */
588 /* Skip verify of read_fp, invalid_p == 0 */
589 /* Skip verify of read_sp, invalid_p == 0 */
590 /* Skip verify of write_sp, invalid_p == 0 */
591 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
592 /* Skip verify of register_read, has predicate */
593 /* Skip verify of register_write, has predicate */
594 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
595 && (gdbarch
->num_regs
== -1))
596 fprintf_unfiltered (log
, "\n\tnum_regs");
597 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
598 /* Skip verify of sp_regnum, invalid_p == 0 */
599 /* Skip verify of fp_regnum, invalid_p == 0 */
600 /* Skip verify of pc_regnum, invalid_p == 0 */
601 /* Skip verify of ps_regnum, invalid_p == 0 */
602 /* Skip verify of fp0_regnum, invalid_p == 0 */
603 /* Skip verify of npc_regnum, invalid_p == 0 */
604 /* Skip verify of nnpc_regnum, invalid_p == 0 */
605 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
606 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
607 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
608 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
609 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
610 /* Skip verify of register_name, invalid_p == 0 */
611 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
612 && (gdbarch
->register_size
== -1))
613 fprintf_unfiltered (log
, "\n\tregister_size");
614 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
615 && (gdbarch
->register_bytes
== -1))
616 fprintf_unfiltered (log
, "\n\tregister_bytes");
617 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
618 && (gdbarch
->register_byte
== 0))
619 fprintf_unfiltered (log
, "\n\tregister_byte");
620 /* Skip verify of register_raw_size, invalid_p == 0 */
621 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
622 && (gdbarch
->max_register_raw_size
== -1))
623 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
624 /* Skip verify of register_virtual_size, invalid_p == 0 */
625 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
626 && (gdbarch
->max_register_virtual_size
== -1))
627 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
628 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
629 && (gdbarch
->register_virtual_type
== 0))
630 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
631 /* Skip verify of do_registers_info, invalid_p == 0 */
632 /* Skip verify of print_float_info, invalid_p == 0 */
633 /* Skip verify of register_sim_regno, invalid_p == 0 */
634 /* Skip verify of register_bytes_ok, has predicate */
635 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
636 /* Skip verify of cannot_store_register, invalid_p == 0 */
637 /* Skip verify of get_longjmp_target, has predicate */
638 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
639 && (gdbarch
->use_generic_dummy_frames
== -1))
640 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
641 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
642 && (gdbarch
->call_dummy_location
== 0))
643 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
644 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
645 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
646 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
647 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
648 && (gdbarch
->call_dummy_start_offset
== -1))
649 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
650 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
651 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
652 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
653 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
654 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
655 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
656 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
657 && (gdbarch
->call_dummy_length
== -1))
658 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
659 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
660 && (gdbarch
->pc_in_call_dummy
== 0))
661 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
662 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
663 && (gdbarch
->call_dummy_p
== -1))
664 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
665 /* Skip verify of call_dummy_words, invalid_p == 0 */
666 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
667 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
668 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
669 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
670 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
671 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
672 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
673 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
674 && (gdbarch
->fix_call_dummy
== 0))
675 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
676 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
677 /* Skip verify of init_frame_pc, invalid_p == 0 */
678 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
679 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
680 && (gdbarch
->get_saved_register
== 0))
681 fprintf_unfiltered (log
, "\n\tget_saved_register");
682 /* Skip verify of register_convertible, invalid_p == 0 */
683 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
684 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
685 /* Skip verify of fetch_pseudo_register, has predicate */
686 /* Skip verify of store_pseudo_register, has predicate */
687 /* Skip verify of pointer_to_address, invalid_p == 0 */
688 /* Skip verify of address_to_pointer, invalid_p == 0 */
689 /* Skip verify of integer_to_address, has predicate */
690 /* Skip verify of return_value_on_stack, invalid_p == 0 */
691 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
692 && (gdbarch
->extract_return_value
== 0))
693 fprintf_unfiltered (log
, "\n\textract_return_value");
694 /* Skip verify of push_arguments, invalid_p == 0 */
695 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
696 && (gdbarch
->push_dummy_frame
== 0))
697 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
698 /* Skip verify of push_return_address, has predicate */
699 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
700 && (gdbarch
->pop_frame
== 0))
701 fprintf_unfiltered (log
, "\n\tpop_frame");
702 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
703 && (gdbarch
->store_struct_return
== 0))
704 fprintf_unfiltered (log
, "\n\tstore_struct_return");
705 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
706 && (gdbarch
->store_return_value
== 0))
707 fprintf_unfiltered (log
, "\n\tstore_return_value");
708 /* Skip verify of extract_struct_value_address, has predicate */
709 /* Skip verify of use_struct_convention, invalid_p == 0 */
710 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
711 && (gdbarch
->frame_init_saved_regs
== 0))
712 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
713 /* Skip verify of init_extra_frame_info, has predicate */
714 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
715 && (gdbarch
->skip_prologue
== 0))
716 fprintf_unfiltered (log
, "\n\tskip_prologue");
717 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
718 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
719 && (gdbarch
->inner_than
== 0))
720 fprintf_unfiltered (log
, "\n\tinner_than");
721 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
722 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
723 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
724 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
725 && (gdbarch
->decr_pc_after_break
== -1))
726 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
727 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
728 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
729 && (gdbarch
->function_start_offset
== -1))
730 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
731 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
733 && (gdbarch
->frame_args_skip
== -1))
734 fprintf_unfiltered (log
, "\n\tframe_args_skip");
735 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
737 && (gdbarch
->frame_chain
== 0))
738 fprintf_unfiltered (log
, "\n\tframe_chain");
739 /* Skip verify of frame_chain_valid, invalid_p == 0 */
740 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
741 && (gdbarch
->frame_saved_pc
== 0))
742 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
743 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
744 && (gdbarch
->frame_args_address
== 0))
745 fprintf_unfiltered (log
, "\n\tframe_args_address");
746 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
747 && (gdbarch
->frame_locals_address
== 0))
748 fprintf_unfiltered (log
, "\n\tframe_locals_address");
749 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
750 && (gdbarch
->saved_pc_after_call
== 0))
751 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
752 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
753 && (gdbarch
->frame_num_args
== 0))
754 fprintf_unfiltered (log
, "\n\tframe_num_args");
755 /* Skip verify of stack_align, has predicate */
756 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
757 /* Skip verify of reg_struct_has_addr, has predicate */
758 /* Skip verify of save_dummy_frame_tos, has predicate */
759 if (gdbarch
->float_format
== 0)
760 gdbarch
->float_format
= default_float_format (gdbarch
);
761 if (gdbarch
->double_format
== 0)
762 gdbarch
->double_format
= default_double_format (gdbarch
);
763 if (gdbarch
->long_double_format
== 0)
764 gdbarch
->long_double_format
= default_double_format (gdbarch
);
765 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
766 /* Skip verify of addr_bits_remove, invalid_p == 0 */
767 /* Skip verify of smash_text_address, invalid_p == 0 */
768 /* Skip verify of software_single_step, has predicate */
769 /* Skip verify of print_insn, invalid_p == 0 */
770 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
771 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
772 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
773 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
774 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
775 /* Skip verify of dwarf2_build_frame_info, has predicate */
776 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
777 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
778 buf
= ui_file_xstrdup (log
, &dummy
);
779 make_cleanup (xfree
, buf
);
780 if (strlen (buf
) > 0)
781 internal_error (__FILE__
, __LINE__
,
782 "verify_gdbarch: the following are invalid ...%s",
784 do_cleanups (cleanups
);
788 /* Print out the details of the current architecture. */
790 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
791 just happens to match the global variable ``current_gdbarch''. That
792 way macros refering to that variable get the local and not the global
793 version - ulgh. Once everything is parameterised with gdbarch, this
797 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
799 fprintf_unfiltered (file
,
800 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
803 fprintf_unfiltered (file
,
804 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
805 (long) current_gdbarch
->in_function_epilogue_p
);
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: register_read = 0x%08lx\n",
809 (long) current_gdbarch
->register_read
);
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: register_write = 0x%08lx\n",
813 (long) current_gdbarch
->register_write
);
814 #ifdef ADDRESS_TO_POINTER
816 /* Macro might contain `[{}]' when not multi-arch */
817 fprintf_unfiltered (file
,
818 "gdbarch_dump: %s # %s\n",
819 "ADDRESS_TO_POINTER(type, buf, addr)",
820 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
825 (long) current_gdbarch
->address_to_pointer
826 /*ADDRESS_TO_POINTER ()*/);
828 #ifdef ADDR_BITS_REMOVE
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: %s # %s\n",
831 "ADDR_BITS_REMOVE(addr)",
832 XSTRING (ADDR_BITS_REMOVE (addr
)));
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
836 (long) current_gdbarch
->addr_bits_remove
837 /*ADDR_BITS_REMOVE ()*/);
839 #ifdef BELIEVE_PCC_PROMOTION
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
842 XSTRING (BELIEVE_PCC_PROMOTION
));
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
845 BELIEVE_PCC_PROMOTION
);
847 #ifdef BELIEVE_PCC_PROMOTION_TYPE
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
850 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
853 BELIEVE_PCC_PROMOTION_TYPE
);
855 #ifdef BREAKPOINT_FROM_PC
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: %s # %s\n",
858 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
859 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
863 (long) current_gdbarch
->breakpoint_from_pc
864 /*BREAKPOINT_FROM_PC ()*/);
866 #ifdef CALL_DUMMY_ADDRESS
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: %s # %s\n",
869 "CALL_DUMMY_ADDRESS()",
870 XSTRING (CALL_DUMMY_ADDRESS ()));
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
874 (long) current_gdbarch
->call_dummy_address
875 /*CALL_DUMMY_ADDRESS ()*/);
877 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
880 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
881 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
884 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
886 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
889 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
892 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
894 #ifdef CALL_DUMMY_LENGTH
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
897 XSTRING (CALL_DUMMY_LENGTH
));
898 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
903 #ifdef CALL_DUMMY_LOCATION
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
906 XSTRING (CALL_DUMMY_LOCATION
));
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
909 CALL_DUMMY_LOCATION
);
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: CALL_DUMMY_P # %s\n",
914 XSTRING (CALL_DUMMY_P
));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: CALL_DUMMY_P = %d\n",
919 #ifdef CALL_DUMMY_STACK_ADJUST
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
922 XSTRING (CALL_DUMMY_STACK_ADJUST
));
923 if (CALL_DUMMY_STACK_ADJUST_P
)
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
926 (long) CALL_DUMMY_STACK_ADJUST
);
928 #ifdef CALL_DUMMY_STACK_ADJUST_P
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
931 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
934 (long) CALL_DUMMY_STACK_ADJUST_P
);
936 #ifdef CALL_DUMMY_START_OFFSET
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
939 XSTRING (CALL_DUMMY_START_OFFSET
));
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
942 (long) CALL_DUMMY_START_OFFSET
);
944 #ifdef CALL_DUMMY_WORDS
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
947 XSTRING (CALL_DUMMY_WORDS
));
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
950 (long) CALL_DUMMY_WORDS
);
952 #ifdef CANNOT_FETCH_REGISTER
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: %s # %s\n",
955 "CANNOT_FETCH_REGISTER(regnum)",
956 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
960 (long) current_gdbarch
->cannot_fetch_register
961 /*CANNOT_FETCH_REGISTER ()*/);
963 #ifdef CANNOT_STORE_REGISTER
964 fprintf_unfiltered (file
,
965 "gdbarch_dump: %s # %s\n",
966 "CANNOT_STORE_REGISTER(regnum)",
967 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
971 (long) current_gdbarch
->cannot_store_register
972 /*CANNOT_STORE_REGISTER ()*/);
974 #ifdef COERCE_FLOAT_TO_DOUBLE
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: %s # %s\n",
977 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
978 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
982 (long) current_gdbarch
->coerce_float_to_double
983 /*COERCE_FLOAT_TO_DOUBLE ()*/);
985 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
987 /* Macro might contain `[{}]' when not multi-arch */
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: %s # %s\n",
990 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
991 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
996 (long) current_gdbarch
->coff_make_msymbol_special
997 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1002 (long) current_gdbarch
->construct_inferior_arguments
);
1003 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: %s # %s\n",
1006 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1007 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1011 (long) current_gdbarch
->convert_from_func_ptr_addr
1012 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1014 #ifdef DECR_PC_AFTER_BREAK
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1017 XSTRING (DECR_PC_AFTER_BREAK
));
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1020 (long) DECR_PC_AFTER_BREAK
);
1022 #ifdef DO_REGISTERS_INFO
1024 /* Macro might contain `[{}]' when not multi-arch */
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: %s # %s\n",
1027 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1028 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1033 (long) current_gdbarch
->do_registers_info
1034 /*DO_REGISTERS_INFO ()*/);
1036 #ifdef DWARF2_BUILD_FRAME_INFO
1038 /* Macro might contain `[{}]' when not multi-arch */
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: %s # %s\n",
1041 "DWARF2_BUILD_FRAME_INFO(objfile)",
1042 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1047 (long) current_gdbarch
->dwarf2_build_frame_info
1048 /*DWARF2_BUILD_FRAME_INFO ()*/);
1050 #ifdef DWARF2_REG_TO_REGNUM
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: %s # %s\n",
1053 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1054 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1058 (long) current_gdbarch
->dwarf2_reg_to_regnum
1059 /*DWARF2_REG_TO_REGNUM ()*/);
1061 #ifdef DWARF_REG_TO_REGNUM
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: %s # %s\n",
1064 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1065 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1067 fprintf_unfiltered (file
,
1068 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1069 (long) current_gdbarch
->dwarf_reg_to_regnum
1070 /*DWARF_REG_TO_REGNUM ()*/);
1072 #ifdef ECOFF_REG_TO_REGNUM
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: %s # %s\n",
1075 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1076 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1078 fprintf_unfiltered (file
,
1079 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1080 (long) current_gdbarch
->ecoff_reg_to_regnum
1081 /*ECOFF_REG_TO_REGNUM ()*/);
1083 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1085 /* Macro might contain `[{}]' when not multi-arch */
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: %s # %s\n",
1088 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1089 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1094 (long) current_gdbarch
->elf_make_msymbol_special
1095 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1097 #ifdef EXTRACT_RETURN_VALUE
1099 /* Macro might contain `[{}]' when not multi-arch */
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: %s # %s\n",
1102 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1103 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1108 (long) current_gdbarch
->extract_return_value
1109 /*EXTRACT_RETURN_VALUE ()*/);
1111 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: %s # %s\n",
1114 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1115 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1119 (long) current_gdbarch
->extract_struct_value_address
1120 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1122 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1125 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1128 EXTRA_STACK_ALIGNMENT_NEEDED
);
1130 #ifdef FETCH_PSEUDO_REGISTER
1132 /* Macro might contain `[{}]' when not multi-arch */
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: %s # %s\n",
1135 "FETCH_PSEUDO_REGISTER(regnum)",
1136 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1141 (long) current_gdbarch
->fetch_pseudo_register
1142 /*FETCH_PSEUDO_REGISTER ()*/);
1144 #ifdef FIX_CALL_DUMMY
1146 /* Macro might contain `[{}]' when not multi-arch */
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: %s # %s\n",
1149 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1150 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1155 (long) current_gdbarch
->fix_call_dummy
1156 /*FIX_CALL_DUMMY ()*/);
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: FP0_REGNUM # %s\n",
1161 XSTRING (FP0_REGNUM
));
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: FP0_REGNUM = %d\n",
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: FP_REGNUM # %s\n",
1169 XSTRING (FP_REGNUM
));
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: FP_REGNUM = %d\n",
1174 #ifdef FRAMELESS_FUNCTION_INVOCATION
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: %s # %s\n",
1177 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1178 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1182 (long) current_gdbarch
->frameless_function_invocation
1183 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1185 #ifdef FRAME_ARGS_ADDRESS
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: %s # %s\n",
1188 "FRAME_ARGS_ADDRESS(fi)",
1189 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1193 (long) current_gdbarch
->frame_args_address
1194 /*FRAME_ARGS_ADDRESS ()*/);
1196 #ifdef FRAME_ARGS_SKIP
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1199 XSTRING (FRAME_ARGS_SKIP
));
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1202 (long) FRAME_ARGS_SKIP
);
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: %s # %s\n",
1207 "FRAME_CHAIN(frame)",
1208 XSTRING (FRAME_CHAIN (frame
)));
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1212 (long) current_gdbarch
->frame_chain
1213 /*FRAME_CHAIN ()*/);
1215 #ifdef FRAME_CHAIN_VALID
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: %s # %s\n",
1218 "FRAME_CHAIN_VALID(chain, thisframe)",
1219 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1223 (long) current_gdbarch
->frame_chain_valid
1224 /*FRAME_CHAIN_VALID ()*/);
1226 #ifdef FRAME_INIT_SAVED_REGS
1228 /* Macro might contain `[{}]' when not multi-arch */
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: %s # %s\n",
1231 "FRAME_INIT_SAVED_REGS(frame)",
1232 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1237 (long) current_gdbarch
->frame_init_saved_regs
1238 /*FRAME_INIT_SAVED_REGS ()*/);
1240 #ifdef FRAME_LOCALS_ADDRESS
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: %s # %s\n",
1243 "FRAME_LOCALS_ADDRESS(fi)",
1244 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1248 (long) current_gdbarch
->frame_locals_address
1249 /*FRAME_LOCALS_ADDRESS ()*/);
1251 #ifdef FRAME_NUM_ARGS
1252 fprintf_unfiltered (file
,
1253 "gdbarch_dump: %s # %s\n",
1254 "FRAME_NUM_ARGS(frame)",
1255 XSTRING (FRAME_NUM_ARGS (frame
)));
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1259 (long) current_gdbarch
->frame_num_args
1260 /*FRAME_NUM_ARGS ()*/);
1262 #ifdef FRAME_SAVED_PC
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: %s # %s\n",
1265 "FRAME_SAVED_PC(fi)",
1266 XSTRING (FRAME_SAVED_PC (fi
)));
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1270 (long) current_gdbarch
->frame_saved_pc
1271 /*FRAME_SAVED_PC ()*/);
1273 #ifdef FUNCTION_START_OFFSET
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1276 XSTRING (FUNCTION_START_OFFSET
));
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1279 (long) FUNCTION_START_OFFSET
);
1281 #ifdef GET_LONGJMP_TARGET
1282 fprintf_unfiltered (file
,
1283 "gdbarch_dump: %s # %s\n",
1284 "GET_LONGJMP_TARGET(pc)",
1285 XSTRING (GET_LONGJMP_TARGET (pc
)));
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1289 (long) current_gdbarch
->get_longjmp_target
1290 /*GET_LONGJMP_TARGET ()*/);
1292 #ifdef GET_SAVED_REGISTER
1294 /* Macro might contain `[{}]' when not multi-arch */
1295 fprintf_unfiltered (file
,
1296 "gdbarch_dump: %s # %s\n",
1297 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1298 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1301 fprintf_unfiltered (file
,
1302 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1303 (long) current_gdbarch
->get_saved_register
1304 /*GET_SAVED_REGISTER ()*/);
1306 #ifdef INIT_EXTRA_FRAME_INFO
1308 /* Macro might contain `[{}]' when not multi-arch */
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: %s # %s\n",
1311 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1312 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1317 (long) current_gdbarch
->init_extra_frame_info
1318 /*INIT_EXTRA_FRAME_INFO ()*/);
1320 #ifdef INIT_FRAME_PC
1322 /* Macro might contain `[{}]' when not multi-arch */
1323 fprintf_unfiltered (file
,
1324 "gdbarch_dump: %s # %s\n",
1325 "INIT_FRAME_PC(fromleaf, prev)",
1326 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1331 (long) current_gdbarch
->init_frame_pc
1332 /*INIT_FRAME_PC ()*/);
1334 #ifdef INIT_FRAME_PC_FIRST
1336 /* Macro might contain `[{}]' when not multi-arch */
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: %s # %s\n",
1339 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1340 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1345 (long) current_gdbarch
->init_frame_pc_first
1346 /*INIT_FRAME_PC_FIRST ()*/);
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: %s # %s\n",
1351 "INNER_THAN(lhs, rhs)",
1352 XSTRING (INNER_THAN (lhs
, rhs
)));
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1356 (long) current_gdbarch
->inner_than
1359 #ifdef INTEGER_TO_ADDRESS
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: %s # %s\n",
1362 "INTEGER_TO_ADDRESS(type, buf)",
1363 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1365 fprintf_unfiltered (file
,
1366 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1367 (long) current_gdbarch
->integer_to_address
1368 /*INTEGER_TO_ADDRESS ()*/);
1370 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1371 fprintf_unfiltered (file
,
1372 "gdbarch_dump: %s # %s\n",
1373 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1374 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1378 (long) current_gdbarch
->in_solib_call_trampoline
1379 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1381 #ifdef MAX_REGISTER_RAW_SIZE
1382 fprintf_unfiltered (file
,
1383 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1384 XSTRING (MAX_REGISTER_RAW_SIZE
));
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1387 MAX_REGISTER_RAW_SIZE
);
1389 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1390 fprintf_unfiltered (file
,
1391 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1392 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1395 MAX_REGISTER_VIRTUAL_SIZE
);
1397 #ifdef MEMORY_INSERT_BREAKPOINT
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: %s # %s\n",
1400 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1401 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1405 (long) current_gdbarch
->memory_insert_breakpoint
1406 /*MEMORY_INSERT_BREAKPOINT ()*/);
1408 #ifdef MEMORY_REMOVE_BREAKPOINT
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: %s # %s\n",
1411 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1412 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1416 (long) current_gdbarch
->memory_remove_breakpoint
1417 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: NNPC_REGNUM # %s\n",
1422 XSTRING (NNPC_REGNUM
));
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: NNPC_REGNUM = %d\n",
1428 fprintf_unfiltered (file
,
1429 "gdbarch_dump: NPC_REGNUM # %s\n",
1430 XSTRING (NPC_REGNUM
));
1431 fprintf_unfiltered (file
,
1432 "gdbarch_dump: NPC_REGNUM = %d\n",
1435 #ifdef NUM_PSEUDO_REGS
1436 fprintf_unfiltered (file
,
1437 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1438 XSTRING (NUM_PSEUDO_REGS
));
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1444 fprintf_unfiltered (file
,
1445 "gdbarch_dump: NUM_REGS # %s\n",
1446 XSTRING (NUM_REGS
));
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: NUM_REGS = %d\n",
1451 #ifdef PARM_BOUNDARY
1452 fprintf_unfiltered (file
,
1453 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1454 XSTRING (PARM_BOUNDARY
));
1455 fprintf_unfiltered (file
,
1456 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1459 #ifdef PC_IN_CALL_DUMMY
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: %s # %s\n",
1462 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1463 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1467 (long) current_gdbarch
->pc_in_call_dummy
1468 /*PC_IN_CALL_DUMMY ()*/);
1470 #ifdef PC_IN_SIGTRAMP
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: %s # %s\n",
1473 "PC_IN_SIGTRAMP(pc, name)",
1474 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1478 (long) current_gdbarch
->pc_in_sigtramp
1479 /*PC_IN_SIGTRAMP ()*/);
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: PC_REGNUM # %s\n",
1484 XSTRING (PC_REGNUM
));
1485 fprintf_unfiltered (file
,
1486 "gdbarch_dump: PC_REGNUM = %d\n",
1489 #ifdef POINTER_TO_ADDRESS
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: %s # %s\n",
1492 "POINTER_TO_ADDRESS(type, buf)",
1493 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1497 (long) current_gdbarch
->pointer_to_address
1498 /*POINTER_TO_ADDRESS ()*/);
1502 /* Macro might contain `[{}]' when not multi-arch */
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: %s # %s\n",
1506 XSTRING (POP_FRAME (-)));
1509 fprintf_unfiltered (file
,
1510 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1511 (long) current_gdbarch
->pop_frame
1514 #ifdef PREPARE_TO_PROCEED
1515 fprintf_unfiltered (file
,
1516 "gdbarch_dump: %s # %s\n",
1517 "PREPARE_TO_PROCEED(select_it)",
1518 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1522 (long) current_gdbarch
->prepare_to_proceed
1523 /*PREPARE_TO_PROCEED ()*/);
1525 #ifdef PRINT_FLOAT_INFO
1527 /* Macro might contain `[{}]' when not multi-arch */
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: %s # %s\n",
1530 "PRINT_FLOAT_INFO()",
1531 XSTRING (PRINT_FLOAT_INFO ()));
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1536 (long) current_gdbarch
->print_float_info
1537 /*PRINT_FLOAT_INFO ()*/);
1539 #ifdef PROLOGUE_FRAMELESS_P
1540 fprintf_unfiltered (file
,
1541 "gdbarch_dump: %s # %s\n",
1542 "PROLOGUE_FRAMELESS_P(ip)",
1543 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1547 (long) current_gdbarch
->prologue_frameless_p
1548 /*PROLOGUE_FRAMELESS_P ()*/);
1551 fprintf_unfiltered (file
,
1552 "gdbarch_dump: PS_REGNUM # %s\n",
1553 XSTRING (PS_REGNUM
));
1554 fprintf_unfiltered (file
,
1555 "gdbarch_dump: PS_REGNUM = %d\n",
1558 #ifdef PUSH_ARGUMENTS
1559 fprintf_unfiltered (file
,
1560 "gdbarch_dump: %s # %s\n",
1561 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1562 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1566 (long) current_gdbarch
->push_arguments
1567 /*PUSH_ARGUMENTS ()*/);
1569 #ifdef PUSH_DUMMY_FRAME
1571 /* Macro might contain `[{}]' when not multi-arch */
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: %s # %s\n",
1574 "PUSH_DUMMY_FRAME(-)",
1575 XSTRING (PUSH_DUMMY_FRAME (-)));
1578 fprintf_unfiltered (file
,
1579 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1580 (long) current_gdbarch
->push_dummy_frame
1581 /*PUSH_DUMMY_FRAME ()*/);
1583 #ifdef PUSH_RETURN_ADDRESS
1584 fprintf_unfiltered (file
,
1585 "gdbarch_dump: %s # %s\n",
1586 "PUSH_RETURN_ADDRESS(pc, sp)",
1587 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1591 (long) current_gdbarch
->push_return_address
1592 /*PUSH_RETURN_ADDRESS ()*/);
1594 #ifdef REGISTER_BYTE
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: %s # %s\n",
1597 "REGISTER_BYTE(reg_nr)",
1598 XSTRING (REGISTER_BYTE (reg_nr
)));
1600 fprintf_unfiltered (file
,
1601 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1602 (long) current_gdbarch
->register_byte
1603 /*REGISTER_BYTE ()*/);
1605 #ifdef REGISTER_BYTES
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: REGISTER_BYTES # %s\n",
1608 XSTRING (REGISTER_BYTES
));
1609 fprintf_unfiltered (file
,
1610 "gdbarch_dump: REGISTER_BYTES = %d\n",
1613 #ifdef REGISTER_BYTES_OK
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: %s # %s\n",
1616 "REGISTER_BYTES_OK(nr_bytes)",
1617 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1621 (long) current_gdbarch
->register_bytes_ok
1622 /*REGISTER_BYTES_OK ()*/);
1624 #ifdef REGISTER_CONVERTIBLE
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: %s # %s\n",
1627 "REGISTER_CONVERTIBLE(nr)",
1628 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1630 fprintf_unfiltered (file
,
1631 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1632 (long) current_gdbarch
->register_convertible
1633 /*REGISTER_CONVERTIBLE ()*/);
1635 #ifdef REGISTER_CONVERT_TO_RAW
1637 /* Macro might contain `[{}]' when not multi-arch */
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: %s # %s\n",
1640 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1641 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1646 (long) current_gdbarch
->register_convert_to_raw
1647 /*REGISTER_CONVERT_TO_RAW ()*/);
1649 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1651 /* Macro might contain `[{}]' when not multi-arch */
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: %s # %s\n",
1654 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1655 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1660 (long) current_gdbarch
->register_convert_to_virtual
1661 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1663 #ifdef REGISTER_NAME
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: %s # %s\n",
1666 "REGISTER_NAME(regnr)",
1667 XSTRING (REGISTER_NAME (regnr
)));
1669 fprintf_unfiltered (file
,
1670 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1671 (long) current_gdbarch
->register_name
1672 /*REGISTER_NAME ()*/);
1674 #ifdef REGISTER_RAW_SIZE
1675 fprintf_unfiltered (file
,
1676 "gdbarch_dump: %s # %s\n",
1677 "REGISTER_RAW_SIZE(reg_nr)",
1678 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1682 (long) current_gdbarch
->register_raw_size
1683 /*REGISTER_RAW_SIZE ()*/);
1685 #ifdef REGISTER_SIM_REGNO
1686 fprintf_unfiltered (file
,
1687 "gdbarch_dump: %s # %s\n",
1688 "REGISTER_SIM_REGNO(reg_nr)",
1689 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1693 (long) current_gdbarch
->register_sim_regno
1694 /*REGISTER_SIM_REGNO ()*/);
1696 #ifdef REGISTER_SIZE
1697 fprintf_unfiltered (file
,
1698 "gdbarch_dump: REGISTER_SIZE # %s\n",
1699 XSTRING (REGISTER_SIZE
));
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: REGISTER_SIZE = %d\n",
1704 #ifdef REGISTER_VIRTUAL_SIZE
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: %s # %s\n",
1707 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1708 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1712 (long) current_gdbarch
->register_virtual_size
1713 /*REGISTER_VIRTUAL_SIZE ()*/);
1715 #ifdef REGISTER_VIRTUAL_TYPE
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: %s # %s\n",
1718 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1719 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1721 fprintf_unfiltered (file
,
1722 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1723 (long) current_gdbarch
->register_virtual_type
1724 /*REGISTER_VIRTUAL_TYPE ()*/);
1726 #ifdef REG_STRUCT_HAS_ADDR
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: %s # %s\n",
1729 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1730 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1732 fprintf_unfiltered (file
,
1733 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1734 (long) current_gdbarch
->reg_struct_has_addr
1735 /*REG_STRUCT_HAS_ADDR ()*/);
1737 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1739 /* Macro might contain `[{}]' when not multi-arch */
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: %s # %s\n",
1742 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1743 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1748 (long) current_gdbarch
->remote_translate_xfer_address
1749 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1751 #ifdef RETURN_VALUE_ON_STACK
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: %s # %s\n",
1754 "RETURN_VALUE_ON_STACK(type)",
1755 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1759 (long) current_gdbarch
->return_value_on_stack
1760 /*RETURN_VALUE_ON_STACK ()*/);
1762 #ifdef SAVED_PC_AFTER_CALL
1763 fprintf_unfiltered (file
,
1764 "gdbarch_dump: %s # %s\n",
1765 "SAVED_PC_AFTER_CALL(frame)",
1766 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1770 (long) current_gdbarch
->saved_pc_after_call
1771 /*SAVED_PC_AFTER_CALL ()*/);
1773 #ifdef SAVE_DUMMY_FRAME_TOS
1775 /* Macro might contain `[{}]' when not multi-arch */
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: %s # %s\n",
1778 "SAVE_DUMMY_FRAME_TOS(sp)",
1779 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1784 (long) current_gdbarch
->save_dummy_frame_tos
1785 /*SAVE_DUMMY_FRAME_TOS ()*/);
1787 #ifdef SDB_REG_TO_REGNUM
1788 fprintf_unfiltered (file
,
1789 "gdbarch_dump: %s # %s\n",
1790 "SDB_REG_TO_REGNUM(sdb_regnr)",
1791 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1795 (long) current_gdbarch
->sdb_reg_to_regnum
1796 /*SDB_REG_TO_REGNUM ()*/);
1798 #ifdef SIZEOF_CALL_DUMMY_WORDS
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1801 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1802 fprintf_unfiltered (file
,
1803 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1804 (long) SIZEOF_CALL_DUMMY_WORDS
);
1806 #ifdef SKIP_PROLOGUE
1807 fprintf_unfiltered (file
,
1808 "gdbarch_dump: %s # %s\n",
1809 "SKIP_PROLOGUE(ip)",
1810 XSTRING (SKIP_PROLOGUE (ip
)));
1812 fprintf_unfiltered (file
,
1813 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1814 (long) current_gdbarch
->skip_prologue
1815 /*SKIP_PROLOGUE ()*/);
1817 #ifdef SKIP_TRAMPOLINE_CODE
1818 fprintf_unfiltered (file
,
1819 "gdbarch_dump: %s # %s\n",
1820 "SKIP_TRAMPOLINE_CODE(pc)",
1821 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1823 fprintf_unfiltered (file
,
1824 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1825 (long) current_gdbarch
->skip_trampoline_code
1826 /*SKIP_TRAMPOLINE_CODE ()*/);
1828 #ifdef SMASH_TEXT_ADDRESS
1829 fprintf_unfiltered (file
,
1830 "gdbarch_dump: %s # %s\n",
1831 "SMASH_TEXT_ADDRESS(addr)",
1832 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1836 (long) current_gdbarch
->smash_text_address
1837 /*SMASH_TEXT_ADDRESS ()*/);
1839 #ifdef SOFTWARE_SINGLE_STEP
1841 /* Macro might contain `[{}]' when not multi-arch */
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: %s # %s\n",
1844 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1845 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1850 (long) current_gdbarch
->software_single_step
1851 /*SOFTWARE_SINGLE_STEP ()*/);
1854 fprintf_unfiltered (file
,
1855 "gdbarch_dump: SP_REGNUM # %s\n",
1856 XSTRING (SP_REGNUM
));
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: SP_REGNUM = %d\n",
1861 #ifdef STAB_REG_TO_REGNUM
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: %s # %s\n",
1864 "STAB_REG_TO_REGNUM(stab_regnr)",
1865 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1869 (long) current_gdbarch
->stab_reg_to_regnum
1870 /*STAB_REG_TO_REGNUM ()*/);
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: %s # %s\n",
1876 XSTRING (STACK_ALIGN (sp
)));
1878 fprintf_unfiltered (file
,
1879 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1880 (long) current_gdbarch
->stack_align
1881 /*STACK_ALIGN ()*/);
1883 #ifdef STORE_PSEUDO_REGISTER
1885 /* Macro might contain `[{}]' when not multi-arch */
1886 fprintf_unfiltered (file
,
1887 "gdbarch_dump: %s # %s\n",
1888 "STORE_PSEUDO_REGISTER(regnum)",
1889 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1892 fprintf_unfiltered (file
,
1893 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1894 (long) current_gdbarch
->store_pseudo_register
1895 /*STORE_PSEUDO_REGISTER ()*/);
1897 #ifdef STORE_RETURN_VALUE
1899 /* Macro might contain `[{}]' when not multi-arch */
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: %s # %s\n",
1902 "STORE_RETURN_VALUE(type, valbuf)",
1903 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1908 (long) current_gdbarch
->store_return_value
1909 /*STORE_RETURN_VALUE ()*/);
1911 #ifdef STORE_STRUCT_RETURN
1913 /* Macro might contain `[{}]' when not multi-arch */
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: %s # %s\n",
1916 "STORE_STRUCT_RETURN(addr, sp)",
1917 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1922 (long) current_gdbarch
->store_struct_return
1923 /*STORE_STRUCT_RETURN ()*/);
1925 #ifdef TARGET_ADDR_BIT
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1928 XSTRING (TARGET_ADDR_BIT
));
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1933 #ifdef TARGET_ARCHITECTURE
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1936 XSTRING (TARGET_ARCHITECTURE
));
1937 if (TARGET_ARCHITECTURE
!= NULL
)
1938 fprintf_unfiltered (file
,
1939 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1940 TARGET_ARCHITECTURE
->printable_name
);
1942 #ifdef TARGET_BFD_VMA_BIT
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1945 XSTRING (TARGET_BFD_VMA_BIT
));
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1948 TARGET_BFD_VMA_BIT
);
1950 #ifdef TARGET_BYTE_ORDER
1951 fprintf_unfiltered (file
,
1952 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1953 XSTRING (TARGET_BYTE_ORDER
));
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1956 (long) TARGET_BYTE_ORDER
);
1958 #ifdef TARGET_CHAR_SIGNED
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1961 XSTRING (TARGET_CHAR_SIGNED
));
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1964 TARGET_CHAR_SIGNED
);
1966 #ifdef TARGET_DOUBLE_BIT
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1969 XSTRING (TARGET_DOUBLE_BIT
));
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1974 #ifdef TARGET_DOUBLE_FORMAT
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1977 XSTRING (TARGET_DOUBLE_FORMAT
));
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1980 (long) TARGET_DOUBLE_FORMAT
);
1982 #ifdef TARGET_FLOAT_BIT
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1985 XSTRING (TARGET_FLOAT_BIT
));
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1990 #ifdef TARGET_FLOAT_FORMAT
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1993 XSTRING (TARGET_FLOAT_FORMAT
));
1994 fprintf_unfiltered (file
,
1995 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1996 (long) TARGET_FLOAT_FORMAT
);
1998 #ifdef TARGET_INT_BIT
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2001 XSTRING (TARGET_INT_BIT
));
2002 fprintf_unfiltered (file
,
2003 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2006 #ifdef TARGET_LONG_BIT
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2009 XSTRING (TARGET_LONG_BIT
));
2010 fprintf_unfiltered (file
,
2011 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2014 #ifdef TARGET_LONG_DOUBLE_BIT
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2017 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2020 TARGET_LONG_DOUBLE_BIT
);
2022 #ifdef TARGET_LONG_DOUBLE_FORMAT
2023 fprintf_unfiltered (file
,
2024 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2025 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2026 fprintf_unfiltered (file
,
2027 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2028 (long) TARGET_LONG_DOUBLE_FORMAT
);
2030 #ifdef TARGET_LONG_LONG_BIT
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2033 XSTRING (TARGET_LONG_LONG_BIT
));
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2036 TARGET_LONG_LONG_BIT
);
2038 #ifdef TARGET_PRINT_INSN
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: %s # %s\n",
2041 "TARGET_PRINT_INSN(vma, info)",
2042 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2046 (long) current_gdbarch
->print_insn
2047 /*TARGET_PRINT_INSN ()*/);
2049 #ifdef TARGET_PTR_BIT
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2052 XSTRING (TARGET_PTR_BIT
));
2053 fprintf_unfiltered (file
,
2054 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2057 #ifdef TARGET_READ_FP
2058 fprintf_unfiltered (file
,
2059 "gdbarch_dump: %s # %s\n",
2061 XSTRING (TARGET_READ_FP ()));
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2065 (long) current_gdbarch
->read_fp
2066 /*TARGET_READ_FP ()*/);
2068 #ifdef TARGET_READ_PC
2069 fprintf_unfiltered (file
,
2070 "gdbarch_dump: %s # %s\n",
2071 "TARGET_READ_PC(ptid)",
2072 XSTRING (TARGET_READ_PC (ptid
)));
2074 fprintf_unfiltered (file
,
2075 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2076 (long) current_gdbarch
->read_pc
2077 /*TARGET_READ_PC ()*/);
2079 #ifdef TARGET_READ_SP
2080 fprintf_unfiltered (file
,
2081 "gdbarch_dump: %s # %s\n",
2083 XSTRING (TARGET_READ_SP ()));
2085 fprintf_unfiltered (file
,
2086 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2087 (long) current_gdbarch
->read_sp
2088 /*TARGET_READ_SP ()*/);
2090 #ifdef TARGET_SHORT_BIT
2091 fprintf_unfiltered (file
,
2092 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2093 XSTRING (TARGET_SHORT_BIT
));
2094 fprintf_unfiltered (file
,
2095 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2098 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2100 /* Macro might contain `[{}]' when not multi-arch */
2101 fprintf_unfiltered (file
,
2102 "gdbarch_dump: %s # %s\n",
2103 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2104 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2107 fprintf_unfiltered (file
,
2108 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2109 (long) current_gdbarch
->virtual_frame_pointer
2110 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2112 #ifdef TARGET_WRITE_PC
2114 /* Macro might contain `[{}]' when not multi-arch */
2115 fprintf_unfiltered (file
,
2116 "gdbarch_dump: %s # %s\n",
2117 "TARGET_WRITE_PC(val, ptid)",
2118 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2121 fprintf_unfiltered (file
,
2122 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2123 (long) current_gdbarch
->write_pc
2124 /*TARGET_WRITE_PC ()*/);
2126 #ifdef TARGET_WRITE_SP
2128 /* Macro might contain `[{}]' when not multi-arch */
2129 fprintf_unfiltered (file
,
2130 "gdbarch_dump: %s # %s\n",
2131 "TARGET_WRITE_SP(val)",
2132 XSTRING (TARGET_WRITE_SP (val
)));
2135 fprintf_unfiltered (file
,
2136 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2137 (long) current_gdbarch
->write_sp
2138 /*TARGET_WRITE_SP ()*/);
2140 #ifdef USE_GENERIC_DUMMY_FRAMES
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2143 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2146 USE_GENERIC_DUMMY_FRAMES
);
2148 #ifdef USE_STRUCT_CONVENTION
2149 fprintf_unfiltered (file
,
2150 "gdbarch_dump: %s # %s\n",
2151 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2152 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2156 (long) current_gdbarch
->use_struct_convention
2157 /*USE_STRUCT_CONVENTION ()*/);
2159 if (current_gdbarch
->dump_tdep
!= NULL
)
2160 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2163 struct gdbarch_tdep
*
2164 gdbarch_tdep (struct gdbarch
*gdbarch
)
2166 if (gdbarch_debug
>= 2)
2167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2168 return gdbarch
->tdep
;
2172 const struct bfd_arch_info
*
2173 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2175 gdb_assert (gdbarch
!= NULL
);
2176 if (gdbarch_debug
>= 2)
2177 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2178 return gdbarch
->bfd_arch_info
;
2182 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2184 gdb_assert (gdbarch
!= NULL
);
2185 if (gdbarch_debug
>= 2)
2186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2187 return gdbarch
->byte_order
;
2191 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2193 gdb_assert (gdbarch
!= NULL
);
2194 /* Skip verify of short_bit, invalid_p == 0 */
2195 if (gdbarch_debug
>= 2)
2196 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2197 return gdbarch
->short_bit
;
2201 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2204 gdbarch
->short_bit
= short_bit
;
2208 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2210 gdb_assert (gdbarch
!= NULL
);
2211 /* Skip verify of int_bit, invalid_p == 0 */
2212 if (gdbarch_debug
>= 2)
2213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2214 return gdbarch
->int_bit
;
2218 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2221 gdbarch
->int_bit
= int_bit
;
2225 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2227 gdb_assert (gdbarch
!= NULL
);
2228 /* Skip verify of long_bit, invalid_p == 0 */
2229 if (gdbarch_debug
>= 2)
2230 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2231 return gdbarch
->long_bit
;
2235 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2238 gdbarch
->long_bit
= long_bit
;
2242 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2244 gdb_assert (gdbarch
!= NULL
);
2245 /* Skip verify of long_long_bit, invalid_p == 0 */
2246 if (gdbarch_debug
>= 2)
2247 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2248 return gdbarch
->long_long_bit
;
2252 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2255 gdbarch
->long_long_bit
= long_long_bit
;
2259 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2261 gdb_assert (gdbarch
!= NULL
);
2262 /* Skip verify of float_bit, invalid_p == 0 */
2263 if (gdbarch_debug
>= 2)
2264 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2265 return gdbarch
->float_bit
;
2269 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2272 gdbarch
->float_bit
= float_bit
;
2276 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2278 gdb_assert (gdbarch
!= NULL
);
2279 /* Skip verify of double_bit, invalid_p == 0 */
2280 if (gdbarch_debug
>= 2)
2281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2282 return gdbarch
->double_bit
;
2286 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2289 gdbarch
->double_bit
= double_bit
;
2293 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2295 gdb_assert (gdbarch
!= NULL
);
2296 /* Skip verify of long_double_bit, invalid_p == 0 */
2297 if (gdbarch_debug
>= 2)
2298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2299 return gdbarch
->long_double_bit
;
2303 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2304 int long_double_bit
)
2306 gdbarch
->long_double_bit
= long_double_bit
;
2310 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2312 gdb_assert (gdbarch
!= NULL
);
2313 /* Skip verify of ptr_bit, invalid_p == 0 */
2314 if (gdbarch_debug
>= 2)
2315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2316 return gdbarch
->ptr_bit
;
2320 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2323 gdbarch
->ptr_bit
= ptr_bit
;
2327 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2329 gdb_assert (gdbarch
!= NULL
);
2330 if (gdbarch
->addr_bit
== 0)
2331 internal_error (__FILE__
, __LINE__
,
2332 "gdbarch: gdbarch_addr_bit invalid");
2333 if (gdbarch_debug
>= 2)
2334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2335 return gdbarch
->addr_bit
;
2339 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2342 gdbarch
->addr_bit
= addr_bit
;
2346 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2348 gdb_assert (gdbarch
!= NULL
);
2349 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2350 if (gdbarch_debug
>= 2)
2351 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2352 return gdbarch
->bfd_vma_bit
;
2356 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2359 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2363 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2365 gdb_assert (gdbarch
!= NULL
);
2366 if (gdbarch
->char_signed
== -1)
2367 internal_error (__FILE__
, __LINE__
,
2368 "gdbarch: gdbarch_char_signed invalid");
2369 if (gdbarch_debug
>= 2)
2370 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2371 return gdbarch
->char_signed
;
2375 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2378 gdbarch
->char_signed
= char_signed
;
2382 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2384 gdb_assert (gdbarch
!= NULL
);
2385 if (gdbarch
->read_pc
== 0)
2386 internal_error (__FILE__
, __LINE__
,
2387 "gdbarch: gdbarch_read_pc invalid");
2388 if (gdbarch_debug
>= 2)
2389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2390 return gdbarch
->read_pc (ptid
);
2394 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2395 gdbarch_read_pc_ftype read_pc
)
2397 gdbarch
->read_pc
= read_pc
;
2401 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2403 gdb_assert (gdbarch
!= NULL
);
2404 if (gdbarch
->write_pc
== 0)
2405 internal_error (__FILE__
, __LINE__
,
2406 "gdbarch: gdbarch_write_pc invalid");
2407 if (gdbarch_debug
>= 2)
2408 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2409 gdbarch
->write_pc (val
, ptid
);
2413 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2414 gdbarch_write_pc_ftype write_pc
)
2416 gdbarch
->write_pc
= write_pc
;
2420 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2422 gdb_assert (gdbarch
!= NULL
);
2423 if (gdbarch
->read_fp
== 0)
2424 internal_error (__FILE__
, __LINE__
,
2425 "gdbarch: gdbarch_read_fp invalid");
2426 if (gdbarch_debug
>= 2)
2427 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2428 return gdbarch
->read_fp ();
2432 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2433 gdbarch_read_fp_ftype read_fp
)
2435 gdbarch
->read_fp
= read_fp
;
2439 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2441 gdb_assert (gdbarch
!= NULL
);
2442 if (gdbarch
->read_sp
== 0)
2443 internal_error (__FILE__
, __LINE__
,
2444 "gdbarch: gdbarch_read_sp invalid");
2445 if (gdbarch_debug
>= 2)
2446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2447 return gdbarch
->read_sp ();
2451 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2452 gdbarch_read_sp_ftype read_sp
)
2454 gdbarch
->read_sp
= read_sp
;
2458 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2460 gdb_assert (gdbarch
!= NULL
);
2461 if (gdbarch
->write_sp
== 0)
2462 internal_error (__FILE__
, __LINE__
,
2463 "gdbarch: gdbarch_write_sp invalid");
2464 if (gdbarch_debug
>= 2)
2465 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2466 gdbarch
->write_sp (val
);
2470 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2471 gdbarch_write_sp_ftype write_sp
)
2473 gdbarch
->write_sp
= write_sp
;
2477 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2479 gdb_assert (gdbarch
!= NULL
);
2480 if (gdbarch
->virtual_frame_pointer
== 0)
2481 internal_error (__FILE__
, __LINE__
,
2482 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2483 if (gdbarch_debug
>= 2)
2484 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2485 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2489 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2490 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2492 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2496 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2498 gdb_assert (gdbarch
!= NULL
);
2499 return gdbarch
->register_read
!= 0;
2503 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2505 gdb_assert (gdbarch
!= NULL
);
2506 if (gdbarch
->register_read
== 0)
2507 internal_error (__FILE__
, __LINE__
,
2508 "gdbarch: gdbarch_register_read invalid");
2509 if (gdbarch_debug
>= 2)
2510 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2511 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2515 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2516 gdbarch_register_read_ftype register_read
)
2518 gdbarch
->register_read
= register_read
;
2522 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2524 gdb_assert (gdbarch
!= NULL
);
2525 return gdbarch
->register_write
!= 0;
2529 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2531 gdb_assert (gdbarch
!= NULL
);
2532 if (gdbarch
->register_write
== 0)
2533 internal_error (__FILE__
, __LINE__
,
2534 "gdbarch: gdbarch_register_write invalid");
2535 if (gdbarch_debug
>= 2)
2536 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2537 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2541 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2542 gdbarch_register_write_ftype register_write
)
2544 gdbarch
->register_write
= register_write
;
2548 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2550 gdb_assert (gdbarch
!= NULL
);
2551 if (gdbarch
->num_regs
== -1)
2552 internal_error (__FILE__
, __LINE__
,
2553 "gdbarch: gdbarch_num_regs invalid");
2554 if (gdbarch_debug
>= 2)
2555 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2556 return gdbarch
->num_regs
;
2560 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2563 gdbarch
->num_regs
= num_regs
;
2567 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2569 gdb_assert (gdbarch
!= NULL
);
2570 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2571 if (gdbarch_debug
>= 2)
2572 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2573 return gdbarch
->num_pseudo_regs
;
2577 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2578 int num_pseudo_regs
)
2580 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2584 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2586 gdb_assert (gdbarch
!= NULL
);
2587 /* Skip verify of sp_regnum, invalid_p == 0 */
2588 if (gdbarch_debug
>= 2)
2589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2590 return gdbarch
->sp_regnum
;
2594 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2597 gdbarch
->sp_regnum
= sp_regnum
;
2601 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2603 gdb_assert (gdbarch
!= NULL
);
2604 /* Skip verify of fp_regnum, invalid_p == 0 */
2605 if (gdbarch_debug
>= 2)
2606 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2607 return gdbarch
->fp_regnum
;
2611 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2614 gdbarch
->fp_regnum
= fp_regnum
;
2618 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2620 gdb_assert (gdbarch
!= NULL
);
2621 /* Skip verify of pc_regnum, invalid_p == 0 */
2622 if (gdbarch_debug
>= 2)
2623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2624 return gdbarch
->pc_regnum
;
2628 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2631 gdbarch
->pc_regnum
= pc_regnum
;
2635 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2637 gdb_assert (gdbarch
!= NULL
);
2638 /* Skip verify of ps_regnum, invalid_p == 0 */
2639 if (gdbarch_debug
>= 2)
2640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2641 return gdbarch
->ps_regnum
;
2645 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2648 gdbarch
->ps_regnum
= ps_regnum
;
2652 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2654 gdb_assert (gdbarch
!= NULL
);
2655 /* Skip verify of fp0_regnum, invalid_p == 0 */
2656 if (gdbarch_debug
>= 2)
2657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2658 return gdbarch
->fp0_regnum
;
2662 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2665 gdbarch
->fp0_regnum
= fp0_regnum
;
2669 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2671 gdb_assert (gdbarch
!= NULL
);
2672 /* Skip verify of npc_regnum, invalid_p == 0 */
2673 if (gdbarch_debug
>= 2)
2674 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2675 return gdbarch
->npc_regnum
;
2679 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2682 gdbarch
->npc_regnum
= npc_regnum
;
2686 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2688 gdb_assert (gdbarch
!= NULL
);
2689 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2690 if (gdbarch_debug
>= 2)
2691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2692 return gdbarch
->nnpc_regnum
;
2696 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2699 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2703 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2705 gdb_assert (gdbarch
!= NULL
);
2706 if (gdbarch
->stab_reg_to_regnum
== 0)
2707 internal_error (__FILE__
, __LINE__
,
2708 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2709 if (gdbarch_debug
>= 2)
2710 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2711 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2715 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2716 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2718 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2722 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2724 gdb_assert (gdbarch
!= NULL
);
2725 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2726 internal_error (__FILE__
, __LINE__
,
2727 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2728 if (gdbarch_debug
>= 2)
2729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2730 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2734 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2735 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2737 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2741 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2743 gdb_assert (gdbarch
!= NULL
);
2744 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2745 internal_error (__FILE__
, __LINE__
,
2746 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2747 if (gdbarch_debug
>= 2)
2748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2749 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2753 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2754 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2756 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2760 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2762 gdb_assert (gdbarch
!= NULL
);
2763 if (gdbarch
->sdb_reg_to_regnum
== 0)
2764 internal_error (__FILE__
, __LINE__
,
2765 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2766 if (gdbarch_debug
>= 2)
2767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2768 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2772 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2773 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2775 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2779 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2781 gdb_assert (gdbarch
!= NULL
);
2782 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2783 internal_error (__FILE__
, __LINE__
,
2784 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2785 if (gdbarch_debug
>= 2)
2786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2787 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2791 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2792 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2794 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2798 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2800 gdb_assert (gdbarch
!= NULL
);
2801 if (gdbarch
->register_name
== 0)
2802 internal_error (__FILE__
, __LINE__
,
2803 "gdbarch: gdbarch_register_name invalid");
2804 if (gdbarch_debug
>= 2)
2805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2806 return gdbarch
->register_name (regnr
);
2810 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2811 gdbarch_register_name_ftype register_name
)
2813 gdbarch
->register_name
= register_name
;
2817 gdbarch_register_size (struct gdbarch
*gdbarch
)
2819 gdb_assert (gdbarch
!= NULL
);
2820 if (gdbarch
->register_size
== -1)
2821 internal_error (__FILE__
, __LINE__
,
2822 "gdbarch: gdbarch_register_size invalid");
2823 if (gdbarch_debug
>= 2)
2824 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2825 return gdbarch
->register_size
;
2829 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2832 gdbarch
->register_size
= register_size
;
2836 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2838 gdb_assert (gdbarch
!= NULL
);
2839 if (gdbarch
->register_bytes
== -1)
2840 internal_error (__FILE__
, __LINE__
,
2841 "gdbarch: gdbarch_register_bytes invalid");
2842 if (gdbarch_debug
>= 2)
2843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2844 return gdbarch
->register_bytes
;
2848 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2851 gdbarch
->register_bytes
= register_bytes
;
2855 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2857 gdb_assert (gdbarch
!= NULL
);
2858 if (gdbarch
->register_byte
== 0)
2859 internal_error (__FILE__
, __LINE__
,
2860 "gdbarch: gdbarch_register_byte invalid");
2861 if (gdbarch_debug
>= 2)
2862 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2863 return gdbarch
->register_byte (reg_nr
);
2867 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2868 gdbarch_register_byte_ftype register_byte
)
2870 gdbarch
->register_byte
= register_byte
;
2874 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2876 gdb_assert (gdbarch
!= NULL
);
2877 if (gdbarch
->register_raw_size
== 0)
2878 internal_error (__FILE__
, __LINE__
,
2879 "gdbarch: gdbarch_register_raw_size invalid");
2880 if (gdbarch_debug
>= 2)
2881 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2882 return gdbarch
->register_raw_size (reg_nr
);
2886 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2887 gdbarch_register_raw_size_ftype register_raw_size
)
2889 gdbarch
->register_raw_size
= register_raw_size
;
2893 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2895 gdb_assert (gdbarch
!= NULL
);
2896 if (gdbarch
->max_register_raw_size
== -1)
2897 internal_error (__FILE__
, __LINE__
,
2898 "gdbarch: gdbarch_max_register_raw_size invalid");
2899 if (gdbarch_debug
>= 2)
2900 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2901 return gdbarch
->max_register_raw_size
;
2905 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2906 int max_register_raw_size
)
2908 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2912 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2914 gdb_assert (gdbarch
!= NULL
);
2915 if (gdbarch
->register_virtual_size
== 0)
2916 internal_error (__FILE__
, __LINE__
,
2917 "gdbarch: gdbarch_register_virtual_size invalid");
2918 if (gdbarch_debug
>= 2)
2919 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2920 return gdbarch
->register_virtual_size (reg_nr
);
2924 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2925 gdbarch_register_virtual_size_ftype register_virtual_size
)
2927 gdbarch
->register_virtual_size
= register_virtual_size
;
2931 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2933 gdb_assert (gdbarch
!= NULL
);
2934 if (gdbarch
->max_register_virtual_size
== -1)
2935 internal_error (__FILE__
, __LINE__
,
2936 "gdbarch: gdbarch_max_register_virtual_size invalid");
2937 if (gdbarch_debug
>= 2)
2938 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2939 return gdbarch
->max_register_virtual_size
;
2943 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2944 int max_register_virtual_size
)
2946 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2950 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2952 gdb_assert (gdbarch
!= NULL
);
2953 if (gdbarch
->register_virtual_type
== 0)
2954 internal_error (__FILE__
, __LINE__
,
2955 "gdbarch: gdbarch_register_virtual_type invalid");
2956 if (gdbarch_debug
>= 2)
2957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2958 return gdbarch
->register_virtual_type (reg_nr
);
2962 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2963 gdbarch_register_virtual_type_ftype register_virtual_type
)
2965 gdbarch
->register_virtual_type
= register_virtual_type
;
2969 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2971 gdb_assert (gdbarch
!= NULL
);
2972 if (gdbarch
->do_registers_info
== 0)
2973 internal_error (__FILE__
, __LINE__
,
2974 "gdbarch: gdbarch_do_registers_info invalid");
2975 if (gdbarch_debug
>= 2)
2976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2977 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2981 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2982 gdbarch_do_registers_info_ftype do_registers_info
)
2984 gdbarch
->do_registers_info
= do_registers_info
;
2988 gdbarch_print_float_info (struct gdbarch
*gdbarch
)
2990 gdb_assert (gdbarch
!= NULL
);
2991 if (gdbarch
->print_float_info
== 0)
2992 internal_error (__FILE__
, __LINE__
,
2993 "gdbarch: gdbarch_print_float_info invalid");
2994 if (gdbarch_debug
>= 2)
2995 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2996 gdbarch
->print_float_info ();
3000 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3001 gdbarch_print_float_info_ftype print_float_info
)
3003 gdbarch
->print_float_info
= print_float_info
;
3007 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3009 gdb_assert (gdbarch
!= NULL
);
3010 if (gdbarch
->register_sim_regno
== 0)
3011 internal_error (__FILE__
, __LINE__
,
3012 "gdbarch: gdbarch_register_sim_regno invalid");
3013 if (gdbarch_debug
>= 2)
3014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3015 return gdbarch
->register_sim_regno (reg_nr
);
3019 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3020 gdbarch_register_sim_regno_ftype register_sim_regno
)
3022 gdbarch
->register_sim_regno
= register_sim_regno
;
3026 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3028 gdb_assert (gdbarch
!= NULL
);
3029 return gdbarch
->register_bytes_ok
!= 0;
3033 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3035 gdb_assert (gdbarch
!= NULL
);
3036 if (gdbarch
->register_bytes_ok
== 0)
3037 internal_error (__FILE__
, __LINE__
,
3038 "gdbarch: gdbarch_register_bytes_ok invalid");
3039 if (gdbarch_debug
>= 2)
3040 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3041 return gdbarch
->register_bytes_ok (nr_bytes
);
3045 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3046 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3048 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3052 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3054 gdb_assert (gdbarch
!= NULL
);
3055 if (gdbarch
->cannot_fetch_register
== 0)
3056 internal_error (__FILE__
, __LINE__
,
3057 "gdbarch: gdbarch_cannot_fetch_register invalid");
3058 if (gdbarch_debug
>= 2)
3059 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3060 return gdbarch
->cannot_fetch_register (regnum
);
3064 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3065 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3067 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3071 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3073 gdb_assert (gdbarch
!= NULL
);
3074 if (gdbarch
->cannot_store_register
== 0)
3075 internal_error (__FILE__
, __LINE__
,
3076 "gdbarch: gdbarch_cannot_store_register invalid");
3077 if (gdbarch_debug
>= 2)
3078 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3079 return gdbarch
->cannot_store_register (regnum
);
3083 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3084 gdbarch_cannot_store_register_ftype cannot_store_register
)
3086 gdbarch
->cannot_store_register
= cannot_store_register
;
3090 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3092 gdb_assert (gdbarch
!= NULL
);
3093 return gdbarch
->get_longjmp_target
!= 0;
3097 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3099 gdb_assert (gdbarch
!= NULL
);
3100 if (gdbarch
->get_longjmp_target
== 0)
3101 internal_error (__FILE__
, __LINE__
,
3102 "gdbarch: gdbarch_get_longjmp_target invalid");
3103 if (gdbarch_debug
>= 2)
3104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3105 return gdbarch
->get_longjmp_target (pc
);
3109 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3110 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3112 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3116 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3118 gdb_assert (gdbarch
!= NULL
);
3119 if (gdbarch
->use_generic_dummy_frames
== -1)
3120 internal_error (__FILE__
, __LINE__
,
3121 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3122 if (gdbarch_debug
>= 2)
3123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3124 return gdbarch
->use_generic_dummy_frames
;
3128 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3129 int use_generic_dummy_frames
)
3131 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3135 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3137 gdb_assert (gdbarch
!= NULL
);
3138 if (gdbarch
->call_dummy_location
== 0)
3139 internal_error (__FILE__
, __LINE__
,
3140 "gdbarch: gdbarch_call_dummy_location invalid");
3141 if (gdbarch_debug
>= 2)
3142 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3143 return gdbarch
->call_dummy_location
;
3147 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3148 int call_dummy_location
)
3150 gdbarch
->call_dummy_location
= call_dummy_location
;
3154 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3156 gdb_assert (gdbarch
!= NULL
);
3157 if (gdbarch
->call_dummy_address
== 0)
3158 internal_error (__FILE__
, __LINE__
,
3159 "gdbarch: gdbarch_call_dummy_address invalid");
3160 if (gdbarch_debug
>= 2)
3161 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3162 return gdbarch
->call_dummy_address ();
3166 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3167 gdbarch_call_dummy_address_ftype call_dummy_address
)
3169 gdbarch
->call_dummy_address
= call_dummy_address
;
3173 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3175 gdb_assert (gdbarch
!= NULL
);
3176 if (gdbarch
->call_dummy_start_offset
== -1)
3177 internal_error (__FILE__
, __LINE__
,
3178 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3179 if (gdbarch_debug
>= 2)
3180 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3181 return gdbarch
->call_dummy_start_offset
;
3185 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3186 CORE_ADDR call_dummy_start_offset
)
3188 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3192 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3194 gdb_assert (gdbarch
!= NULL
);
3195 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3196 internal_error (__FILE__
, __LINE__
,
3197 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3198 if (gdbarch_debug
>= 2)
3199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3200 return gdbarch
->call_dummy_breakpoint_offset
;
3204 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3205 CORE_ADDR call_dummy_breakpoint_offset
)
3207 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3211 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3213 gdb_assert (gdbarch
!= NULL
);
3214 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3215 internal_error (__FILE__
, __LINE__
,
3216 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3217 if (gdbarch_debug
>= 2)
3218 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3219 return gdbarch
->call_dummy_breakpoint_offset_p
;
3223 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3224 int call_dummy_breakpoint_offset_p
)
3226 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3230 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3232 gdb_assert (gdbarch
!= NULL
);
3233 if (gdbarch
->call_dummy_length
== -1)
3234 internal_error (__FILE__
, __LINE__
,
3235 "gdbarch: gdbarch_call_dummy_length invalid");
3236 if (gdbarch_debug
>= 2)
3237 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3238 return gdbarch
->call_dummy_length
;
3242 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3243 int call_dummy_length
)
3245 gdbarch
->call_dummy_length
= call_dummy_length
;
3249 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3251 gdb_assert (gdbarch
!= NULL
);
3252 if (gdbarch
->pc_in_call_dummy
== 0)
3253 internal_error (__FILE__
, __LINE__
,
3254 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3255 if (gdbarch_debug
>= 2)
3256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3257 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3261 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3262 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3264 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3268 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3270 gdb_assert (gdbarch
!= NULL
);
3271 if (gdbarch
->call_dummy_p
== -1)
3272 internal_error (__FILE__
, __LINE__
,
3273 "gdbarch: gdbarch_call_dummy_p invalid");
3274 if (gdbarch_debug
>= 2)
3275 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3276 return gdbarch
->call_dummy_p
;
3280 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3283 gdbarch
->call_dummy_p
= call_dummy_p
;
3287 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3289 gdb_assert (gdbarch
!= NULL
);
3290 /* Skip verify of call_dummy_words, invalid_p == 0 */
3291 if (gdbarch_debug
>= 2)
3292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3293 return gdbarch
->call_dummy_words
;
3297 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3298 LONGEST
* call_dummy_words
)
3300 gdbarch
->call_dummy_words
= call_dummy_words
;
3304 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3306 gdb_assert (gdbarch
!= NULL
);
3307 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3308 if (gdbarch_debug
>= 2)
3309 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3310 return gdbarch
->sizeof_call_dummy_words
;
3314 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3315 int sizeof_call_dummy_words
)
3317 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3321 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3323 gdb_assert (gdbarch
!= NULL
);
3324 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3325 internal_error (__FILE__
, __LINE__
,
3326 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3327 if (gdbarch_debug
>= 2)
3328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3329 return gdbarch
->call_dummy_stack_adjust_p
;
3333 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3334 int call_dummy_stack_adjust_p
)
3336 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3340 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3342 gdb_assert (gdbarch
!= NULL
);
3343 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3344 internal_error (__FILE__
, __LINE__
,
3345 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3346 if (gdbarch_debug
>= 2)
3347 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3348 return gdbarch
->call_dummy_stack_adjust
;
3352 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3353 int call_dummy_stack_adjust
)
3355 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3359 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
)
3361 gdb_assert (gdbarch
!= NULL
);
3362 if (gdbarch
->fix_call_dummy
== 0)
3363 internal_error (__FILE__
, __LINE__
,
3364 "gdbarch: gdbarch_fix_call_dummy invalid");
3365 if (gdbarch_debug
>= 2)
3366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3367 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3371 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3372 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3374 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3378 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3380 gdb_assert (gdbarch
!= NULL
);
3381 if (gdbarch
->init_frame_pc_first
== 0)
3382 internal_error (__FILE__
, __LINE__
,
3383 "gdbarch: gdbarch_init_frame_pc_first invalid");
3384 if (gdbarch_debug
>= 2)
3385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3386 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3390 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3391 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3393 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3397 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3399 gdb_assert (gdbarch
!= NULL
);
3400 if (gdbarch
->init_frame_pc
== 0)
3401 internal_error (__FILE__
, __LINE__
,
3402 "gdbarch: gdbarch_init_frame_pc invalid");
3403 if (gdbarch_debug
>= 2)
3404 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3405 gdbarch
->init_frame_pc (fromleaf
, prev
);
3409 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3410 gdbarch_init_frame_pc_ftype init_frame_pc
)
3412 gdbarch
->init_frame_pc
= init_frame_pc
;
3416 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3418 gdb_assert (gdbarch
!= NULL
);
3419 if (gdbarch_debug
>= 2)
3420 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3421 return gdbarch
->believe_pcc_promotion
;
3425 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3426 int believe_pcc_promotion
)
3428 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3432 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3434 gdb_assert (gdbarch
!= NULL
);
3435 if (gdbarch_debug
>= 2)
3436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3437 return gdbarch
->believe_pcc_promotion_type
;
3441 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3442 int believe_pcc_promotion_type
)
3444 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3448 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3450 gdb_assert (gdbarch
!= NULL
);
3451 if (gdbarch
->coerce_float_to_double
== 0)
3452 internal_error (__FILE__
, __LINE__
,
3453 "gdbarch: gdbarch_coerce_float_to_double invalid");
3454 if (gdbarch_debug
>= 2)
3455 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3456 return gdbarch
->coerce_float_to_double (formal
, actual
);
3460 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3461 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3463 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3467 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
)
3469 gdb_assert (gdbarch
!= NULL
);
3470 if (gdbarch
->get_saved_register
== 0)
3471 internal_error (__FILE__
, __LINE__
,
3472 "gdbarch: gdbarch_get_saved_register invalid");
3473 if (gdbarch_debug
>= 2)
3474 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3475 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3479 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3480 gdbarch_get_saved_register_ftype get_saved_register
)
3482 gdbarch
->get_saved_register
= get_saved_register
;
3486 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3488 gdb_assert (gdbarch
!= NULL
);
3489 if (gdbarch
->register_convertible
== 0)
3490 internal_error (__FILE__
, __LINE__
,
3491 "gdbarch: gdbarch_register_convertible invalid");
3492 if (gdbarch_debug
>= 2)
3493 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3494 return gdbarch
->register_convertible (nr
);
3498 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3499 gdbarch_register_convertible_ftype register_convertible
)
3501 gdbarch
->register_convertible
= register_convertible
;
3505 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3507 gdb_assert (gdbarch
!= NULL
);
3508 if (gdbarch
->register_convert_to_virtual
== 0)
3509 internal_error (__FILE__
, __LINE__
,
3510 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3511 if (gdbarch_debug
>= 2)
3512 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3513 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3517 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3518 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3520 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3524 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3526 gdb_assert (gdbarch
!= NULL
);
3527 if (gdbarch
->register_convert_to_raw
== 0)
3528 internal_error (__FILE__
, __LINE__
,
3529 "gdbarch: gdbarch_register_convert_to_raw invalid");
3530 if (gdbarch_debug
>= 2)
3531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3532 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3536 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3537 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3539 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3543 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3545 gdb_assert (gdbarch
!= NULL
);
3546 return gdbarch
->fetch_pseudo_register
!= 0;
3550 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3552 gdb_assert (gdbarch
!= NULL
);
3553 if (gdbarch
->fetch_pseudo_register
== 0)
3554 internal_error (__FILE__
, __LINE__
,
3555 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3556 if (gdbarch_debug
>= 2)
3557 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3558 gdbarch
->fetch_pseudo_register (regnum
);
3562 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3563 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3565 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3569 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3571 gdb_assert (gdbarch
!= NULL
);
3572 return gdbarch
->store_pseudo_register
!= 0;
3576 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3578 gdb_assert (gdbarch
!= NULL
);
3579 if (gdbarch
->store_pseudo_register
== 0)
3580 internal_error (__FILE__
, __LINE__
,
3581 "gdbarch: gdbarch_store_pseudo_register invalid");
3582 if (gdbarch_debug
>= 2)
3583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3584 gdbarch
->store_pseudo_register (regnum
);
3588 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3589 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3591 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3595 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3597 gdb_assert (gdbarch
!= NULL
);
3598 if (gdbarch
->pointer_to_address
== 0)
3599 internal_error (__FILE__
, __LINE__
,
3600 "gdbarch: gdbarch_pointer_to_address invalid");
3601 if (gdbarch_debug
>= 2)
3602 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3603 return gdbarch
->pointer_to_address (type
, buf
);
3607 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3608 gdbarch_pointer_to_address_ftype pointer_to_address
)
3610 gdbarch
->pointer_to_address
= pointer_to_address
;
3614 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3616 gdb_assert (gdbarch
!= NULL
);
3617 if (gdbarch
->address_to_pointer
== 0)
3618 internal_error (__FILE__
, __LINE__
,
3619 "gdbarch: gdbarch_address_to_pointer invalid");
3620 if (gdbarch_debug
>= 2)
3621 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3622 gdbarch
->address_to_pointer (type
, buf
, addr
);
3626 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3627 gdbarch_address_to_pointer_ftype address_to_pointer
)
3629 gdbarch
->address_to_pointer
= address_to_pointer
;
3633 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3635 gdb_assert (gdbarch
!= NULL
);
3636 return gdbarch
->integer_to_address
!= 0;
3640 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3642 gdb_assert (gdbarch
!= NULL
);
3643 if (gdbarch
->integer_to_address
== 0)
3644 internal_error (__FILE__
, __LINE__
,
3645 "gdbarch: gdbarch_integer_to_address invalid");
3646 if (gdbarch_debug
>= 2)
3647 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3648 return gdbarch
->integer_to_address (type
, buf
);
3652 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3653 gdbarch_integer_to_address_ftype integer_to_address
)
3655 gdbarch
->integer_to_address
= integer_to_address
;
3659 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3661 gdb_assert (gdbarch
!= NULL
);
3662 if (gdbarch
->return_value_on_stack
== 0)
3663 internal_error (__FILE__
, __LINE__
,
3664 "gdbarch: gdbarch_return_value_on_stack invalid");
3665 if (gdbarch_debug
>= 2)
3666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3667 return gdbarch
->return_value_on_stack (type
);
3671 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3672 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3674 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3678 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3680 gdb_assert (gdbarch
!= NULL
);
3681 if (gdbarch
->extract_return_value
== 0)
3682 internal_error (__FILE__
, __LINE__
,
3683 "gdbarch: gdbarch_extract_return_value invalid");
3684 if (gdbarch_debug
>= 2)
3685 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3686 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3690 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3691 gdbarch_extract_return_value_ftype extract_return_value
)
3693 gdbarch
->extract_return_value
= extract_return_value
;
3697 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3699 gdb_assert (gdbarch
!= NULL
);
3700 if (gdbarch
->push_arguments
== 0)
3701 internal_error (__FILE__
, __LINE__
,
3702 "gdbarch: gdbarch_push_arguments invalid");
3703 if (gdbarch_debug
>= 2)
3704 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3705 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3709 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3710 gdbarch_push_arguments_ftype push_arguments
)
3712 gdbarch
->push_arguments
= push_arguments
;
3716 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3718 gdb_assert (gdbarch
!= NULL
);
3719 if (gdbarch
->push_dummy_frame
== 0)
3720 internal_error (__FILE__
, __LINE__
,
3721 "gdbarch: gdbarch_push_dummy_frame invalid");
3722 if (gdbarch_debug
>= 2)
3723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3724 gdbarch
->push_dummy_frame ();
3728 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3729 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3731 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3735 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3737 gdb_assert (gdbarch
!= NULL
);
3738 return gdbarch
->push_return_address
!= 0;
3742 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3744 gdb_assert (gdbarch
!= NULL
);
3745 if (gdbarch
->push_return_address
== 0)
3746 internal_error (__FILE__
, __LINE__
,
3747 "gdbarch: gdbarch_push_return_address invalid");
3748 if (gdbarch_debug
>= 2)
3749 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3750 return gdbarch
->push_return_address (pc
, sp
);
3754 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3755 gdbarch_push_return_address_ftype push_return_address
)
3757 gdbarch
->push_return_address
= push_return_address
;
3761 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3763 gdb_assert (gdbarch
!= NULL
);
3764 if (gdbarch
->pop_frame
== 0)
3765 internal_error (__FILE__
, __LINE__
,
3766 "gdbarch: gdbarch_pop_frame invalid");
3767 if (gdbarch_debug
>= 2)
3768 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3769 gdbarch
->pop_frame ();
3773 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3774 gdbarch_pop_frame_ftype pop_frame
)
3776 gdbarch
->pop_frame
= pop_frame
;
3780 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3782 gdb_assert (gdbarch
!= NULL
);
3783 if (gdbarch
->store_struct_return
== 0)
3784 internal_error (__FILE__
, __LINE__
,
3785 "gdbarch: gdbarch_store_struct_return invalid");
3786 if (gdbarch_debug
>= 2)
3787 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3788 gdbarch
->store_struct_return (addr
, sp
);
3792 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3793 gdbarch_store_struct_return_ftype store_struct_return
)
3795 gdbarch
->store_struct_return
= store_struct_return
;
3799 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3801 gdb_assert (gdbarch
!= NULL
);
3802 if (gdbarch
->store_return_value
== 0)
3803 internal_error (__FILE__
, __LINE__
,
3804 "gdbarch: gdbarch_store_return_value invalid");
3805 if (gdbarch_debug
>= 2)
3806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3807 gdbarch
->store_return_value (type
, valbuf
);
3811 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3812 gdbarch_store_return_value_ftype store_return_value
)
3814 gdbarch
->store_return_value
= store_return_value
;
3818 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3820 gdb_assert (gdbarch
!= NULL
);
3821 return gdbarch
->extract_struct_value_address
!= 0;
3825 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3827 gdb_assert (gdbarch
!= NULL
);
3828 if (gdbarch
->extract_struct_value_address
== 0)
3829 internal_error (__FILE__
, __LINE__
,
3830 "gdbarch: gdbarch_extract_struct_value_address invalid");
3831 if (gdbarch_debug
>= 2)
3832 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3833 return gdbarch
->extract_struct_value_address (regbuf
);
3837 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3838 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3840 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3844 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3846 gdb_assert (gdbarch
!= NULL
);
3847 if (gdbarch
->use_struct_convention
== 0)
3848 internal_error (__FILE__
, __LINE__
,
3849 "gdbarch: gdbarch_use_struct_convention invalid");
3850 if (gdbarch_debug
>= 2)
3851 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3852 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3856 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3857 gdbarch_use_struct_convention_ftype use_struct_convention
)
3859 gdbarch
->use_struct_convention
= use_struct_convention
;
3863 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3865 gdb_assert (gdbarch
!= NULL
);
3866 if (gdbarch
->frame_init_saved_regs
== 0)
3867 internal_error (__FILE__
, __LINE__
,
3868 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3869 if (gdbarch_debug
>= 2)
3870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3871 gdbarch
->frame_init_saved_regs (frame
);
3875 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3876 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3878 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3882 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3884 gdb_assert (gdbarch
!= NULL
);
3885 return gdbarch
->init_extra_frame_info
!= 0;
3889 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3891 gdb_assert (gdbarch
!= NULL
);
3892 if (gdbarch
->init_extra_frame_info
== 0)
3893 internal_error (__FILE__
, __LINE__
,
3894 "gdbarch: gdbarch_init_extra_frame_info invalid");
3895 if (gdbarch_debug
>= 2)
3896 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3897 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3901 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3902 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3904 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3908 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3910 gdb_assert (gdbarch
!= NULL
);
3911 if (gdbarch
->skip_prologue
== 0)
3912 internal_error (__FILE__
, __LINE__
,
3913 "gdbarch: gdbarch_skip_prologue invalid");
3914 if (gdbarch_debug
>= 2)
3915 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3916 return gdbarch
->skip_prologue (ip
);
3920 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3921 gdbarch_skip_prologue_ftype skip_prologue
)
3923 gdbarch
->skip_prologue
= skip_prologue
;
3927 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3929 gdb_assert (gdbarch
!= NULL
);
3930 if (gdbarch
->prologue_frameless_p
== 0)
3931 internal_error (__FILE__
, __LINE__
,
3932 "gdbarch: gdbarch_prologue_frameless_p invalid");
3933 if (gdbarch_debug
>= 2)
3934 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3935 return gdbarch
->prologue_frameless_p (ip
);
3939 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3940 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3942 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3946 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3948 gdb_assert (gdbarch
!= NULL
);
3949 if (gdbarch
->inner_than
== 0)
3950 internal_error (__FILE__
, __LINE__
,
3951 "gdbarch: gdbarch_inner_than invalid");
3952 if (gdbarch_debug
>= 2)
3953 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3954 return gdbarch
->inner_than (lhs
, rhs
);
3958 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3959 gdbarch_inner_than_ftype inner_than
)
3961 gdbarch
->inner_than
= inner_than
;
3964 const unsigned char *
3965 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3967 gdb_assert (gdbarch
!= NULL
);
3968 if (gdbarch
->breakpoint_from_pc
== 0)
3969 internal_error (__FILE__
, __LINE__
,
3970 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3971 if (gdbarch_debug
>= 2)
3972 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3973 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3977 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3978 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3980 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3984 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3986 gdb_assert (gdbarch
!= NULL
);
3987 if (gdbarch
->memory_insert_breakpoint
== 0)
3988 internal_error (__FILE__
, __LINE__
,
3989 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3990 if (gdbarch_debug
>= 2)
3991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3992 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3996 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3997 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3999 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4003 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4005 gdb_assert (gdbarch
!= NULL
);
4006 if (gdbarch
->memory_remove_breakpoint
== 0)
4007 internal_error (__FILE__
, __LINE__
,
4008 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4009 if (gdbarch_debug
>= 2)
4010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4011 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4015 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4016 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4018 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4022 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4024 gdb_assert (gdbarch
!= NULL
);
4025 if (gdbarch
->decr_pc_after_break
== -1)
4026 internal_error (__FILE__
, __LINE__
,
4027 "gdbarch: gdbarch_decr_pc_after_break invalid");
4028 if (gdbarch_debug
>= 2)
4029 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4030 return gdbarch
->decr_pc_after_break
;
4034 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4035 CORE_ADDR decr_pc_after_break
)
4037 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4041 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4043 gdb_assert (gdbarch
!= NULL
);
4044 if (gdbarch
->prepare_to_proceed
== 0)
4045 internal_error (__FILE__
, __LINE__
,
4046 "gdbarch: gdbarch_prepare_to_proceed invalid");
4047 if (gdbarch_debug
>= 2)
4048 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4049 return gdbarch
->prepare_to_proceed (select_it
);
4053 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4054 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4056 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4060 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4062 gdb_assert (gdbarch
!= NULL
);
4063 if (gdbarch
->function_start_offset
== -1)
4064 internal_error (__FILE__
, __LINE__
,
4065 "gdbarch: gdbarch_function_start_offset invalid");
4066 if (gdbarch_debug
>= 2)
4067 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4068 return gdbarch
->function_start_offset
;
4072 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4073 CORE_ADDR function_start_offset
)
4075 gdbarch
->function_start_offset
= function_start_offset
;
4079 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4081 gdb_assert (gdbarch
!= NULL
);
4082 if (gdbarch
->remote_translate_xfer_address
== 0)
4083 internal_error (__FILE__
, __LINE__
,
4084 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4085 if (gdbarch_debug
>= 2)
4086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4087 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4091 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4092 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4094 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4098 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4100 gdb_assert (gdbarch
!= NULL
);
4101 if (gdbarch
->frame_args_skip
== -1)
4102 internal_error (__FILE__
, __LINE__
,
4103 "gdbarch: gdbarch_frame_args_skip invalid");
4104 if (gdbarch_debug
>= 2)
4105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4106 return gdbarch
->frame_args_skip
;
4110 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4111 CORE_ADDR frame_args_skip
)
4113 gdbarch
->frame_args_skip
= frame_args_skip
;
4117 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4119 gdb_assert (gdbarch
!= NULL
);
4120 if (gdbarch
->frameless_function_invocation
== 0)
4121 internal_error (__FILE__
, __LINE__
,
4122 "gdbarch: gdbarch_frameless_function_invocation invalid");
4123 if (gdbarch_debug
>= 2)
4124 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4125 return gdbarch
->frameless_function_invocation (fi
);
4129 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4130 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4132 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4136 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4138 gdb_assert (gdbarch
!= NULL
);
4139 if (gdbarch
->frame_chain
== 0)
4140 internal_error (__FILE__
, __LINE__
,
4141 "gdbarch: gdbarch_frame_chain invalid");
4142 if (gdbarch_debug
>= 2)
4143 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4144 return gdbarch
->frame_chain (frame
);
4148 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4149 gdbarch_frame_chain_ftype frame_chain
)
4151 gdbarch
->frame_chain
= frame_chain
;
4155 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4157 gdb_assert (gdbarch
!= NULL
);
4158 if (gdbarch
->frame_chain_valid
== 0)
4159 internal_error (__FILE__
, __LINE__
,
4160 "gdbarch: gdbarch_frame_chain_valid invalid");
4161 if (gdbarch_debug
>= 2)
4162 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4163 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4167 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4168 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4170 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4174 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4176 gdb_assert (gdbarch
!= NULL
);
4177 if (gdbarch
->frame_saved_pc
== 0)
4178 internal_error (__FILE__
, __LINE__
,
4179 "gdbarch: gdbarch_frame_saved_pc invalid");
4180 if (gdbarch_debug
>= 2)
4181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4182 return gdbarch
->frame_saved_pc (fi
);
4186 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4187 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4189 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4193 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4195 gdb_assert (gdbarch
!= NULL
);
4196 if (gdbarch
->frame_args_address
== 0)
4197 internal_error (__FILE__
, __LINE__
,
4198 "gdbarch: gdbarch_frame_args_address invalid");
4199 if (gdbarch_debug
>= 2)
4200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4201 return gdbarch
->frame_args_address (fi
);
4205 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4206 gdbarch_frame_args_address_ftype frame_args_address
)
4208 gdbarch
->frame_args_address
= frame_args_address
;
4212 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4214 gdb_assert (gdbarch
!= NULL
);
4215 if (gdbarch
->frame_locals_address
== 0)
4216 internal_error (__FILE__
, __LINE__
,
4217 "gdbarch: gdbarch_frame_locals_address invalid");
4218 if (gdbarch_debug
>= 2)
4219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4220 return gdbarch
->frame_locals_address (fi
);
4224 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4225 gdbarch_frame_locals_address_ftype frame_locals_address
)
4227 gdbarch
->frame_locals_address
= frame_locals_address
;
4231 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4233 gdb_assert (gdbarch
!= NULL
);
4234 if (gdbarch
->saved_pc_after_call
== 0)
4235 internal_error (__FILE__
, __LINE__
,
4236 "gdbarch: gdbarch_saved_pc_after_call invalid");
4237 if (gdbarch_debug
>= 2)
4238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4239 return gdbarch
->saved_pc_after_call (frame
);
4243 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4244 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4246 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4250 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4252 gdb_assert (gdbarch
!= NULL
);
4253 if (gdbarch
->frame_num_args
== 0)
4254 internal_error (__FILE__
, __LINE__
,
4255 "gdbarch: gdbarch_frame_num_args invalid");
4256 if (gdbarch_debug
>= 2)
4257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4258 return gdbarch
->frame_num_args (frame
);
4262 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4263 gdbarch_frame_num_args_ftype frame_num_args
)
4265 gdbarch
->frame_num_args
= frame_num_args
;
4269 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4271 gdb_assert (gdbarch
!= NULL
);
4272 return gdbarch
->stack_align
!= 0;
4276 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4278 gdb_assert (gdbarch
!= NULL
);
4279 if (gdbarch
->stack_align
== 0)
4280 internal_error (__FILE__
, __LINE__
,
4281 "gdbarch: gdbarch_stack_align invalid");
4282 if (gdbarch_debug
>= 2)
4283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4284 return gdbarch
->stack_align (sp
);
4288 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4289 gdbarch_stack_align_ftype stack_align
)
4291 gdbarch
->stack_align
= stack_align
;
4295 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4297 gdb_assert (gdbarch
!= NULL
);
4298 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4299 if (gdbarch_debug
>= 2)
4300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4301 return gdbarch
->extra_stack_alignment_needed
;
4305 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4306 int extra_stack_alignment_needed
)
4308 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4312 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4314 gdb_assert (gdbarch
!= NULL
);
4315 return gdbarch
->reg_struct_has_addr
!= 0;
4319 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4321 gdb_assert (gdbarch
!= NULL
);
4322 if (gdbarch
->reg_struct_has_addr
== 0)
4323 internal_error (__FILE__
, __LINE__
,
4324 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4325 if (gdbarch_debug
>= 2)
4326 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4327 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4331 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4332 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4334 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4338 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4340 gdb_assert (gdbarch
!= NULL
);
4341 return gdbarch
->save_dummy_frame_tos
!= 0;
4345 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4347 gdb_assert (gdbarch
!= NULL
);
4348 if (gdbarch
->save_dummy_frame_tos
== 0)
4349 internal_error (__FILE__
, __LINE__
,
4350 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4351 if (gdbarch_debug
>= 2)
4352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4353 gdbarch
->save_dummy_frame_tos (sp
);
4357 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4358 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4360 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4364 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4366 gdb_assert (gdbarch
!= NULL
);
4367 if (gdbarch_debug
>= 2)
4368 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4369 return gdbarch
->parm_boundary
;
4373 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4376 gdbarch
->parm_boundary
= parm_boundary
;
4379 const struct floatformat
*
4380 gdbarch_float_format (struct gdbarch
*gdbarch
)
4382 gdb_assert (gdbarch
!= NULL
);
4383 if (gdbarch_debug
>= 2)
4384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4385 return gdbarch
->float_format
;
4389 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4390 const struct floatformat
* float_format
)
4392 gdbarch
->float_format
= float_format
;
4395 const struct floatformat
*
4396 gdbarch_double_format (struct gdbarch
*gdbarch
)
4398 gdb_assert (gdbarch
!= NULL
);
4399 if (gdbarch_debug
>= 2)
4400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4401 return gdbarch
->double_format
;
4405 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4406 const struct floatformat
* double_format
)
4408 gdbarch
->double_format
= double_format
;
4411 const struct floatformat
*
4412 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4414 gdb_assert (gdbarch
!= NULL
);
4415 if (gdbarch_debug
>= 2)
4416 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4417 return gdbarch
->long_double_format
;
4421 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4422 const struct floatformat
* long_double_format
)
4424 gdbarch
->long_double_format
= long_double_format
;
4428 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4430 gdb_assert (gdbarch
!= NULL
);
4431 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4432 internal_error (__FILE__
, __LINE__
,
4433 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4434 if (gdbarch_debug
>= 2)
4435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4436 return gdbarch
->convert_from_func_ptr_addr (addr
);
4440 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4441 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4443 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4447 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4449 gdb_assert (gdbarch
!= NULL
);
4450 if (gdbarch
->addr_bits_remove
== 0)
4451 internal_error (__FILE__
, __LINE__
,
4452 "gdbarch: gdbarch_addr_bits_remove invalid");
4453 if (gdbarch_debug
>= 2)
4454 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4455 return gdbarch
->addr_bits_remove (addr
);
4459 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4460 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4462 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4466 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4468 gdb_assert (gdbarch
!= NULL
);
4469 if (gdbarch
->smash_text_address
== 0)
4470 internal_error (__FILE__
, __LINE__
,
4471 "gdbarch: gdbarch_smash_text_address invalid");
4472 if (gdbarch_debug
>= 2)
4473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4474 return gdbarch
->smash_text_address (addr
);
4478 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4479 gdbarch_smash_text_address_ftype smash_text_address
)
4481 gdbarch
->smash_text_address
= smash_text_address
;
4485 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4487 gdb_assert (gdbarch
!= NULL
);
4488 return gdbarch
->software_single_step
!= 0;
4492 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4494 gdb_assert (gdbarch
!= NULL
);
4495 if (gdbarch
->software_single_step
== 0)
4496 internal_error (__FILE__
, __LINE__
,
4497 "gdbarch: gdbarch_software_single_step invalid");
4498 if (gdbarch_debug
>= 2)
4499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4500 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4504 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4505 gdbarch_software_single_step_ftype software_single_step
)
4507 gdbarch
->software_single_step
= software_single_step
;
4511 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4513 gdb_assert (gdbarch
!= NULL
);
4514 if (gdbarch
->print_insn
== 0)
4515 internal_error (__FILE__
, __LINE__
,
4516 "gdbarch: gdbarch_print_insn invalid");
4517 if (gdbarch_debug
>= 2)
4518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4519 return gdbarch
->print_insn (vma
, info
);
4523 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4524 gdbarch_print_insn_ftype print_insn
)
4526 gdbarch
->print_insn
= print_insn
;
4530 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4532 gdb_assert (gdbarch
!= NULL
);
4533 if (gdbarch
->skip_trampoline_code
== 0)
4534 internal_error (__FILE__
, __LINE__
,
4535 "gdbarch: gdbarch_skip_trampoline_code invalid");
4536 if (gdbarch_debug
>= 2)
4537 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4538 return gdbarch
->skip_trampoline_code (pc
);
4542 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4543 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4545 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4549 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4551 gdb_assert (gdbarch
!= NULL
);
4552 if (gdbarch
->in_solib_call_trampoline
== 0)
4553 internal_error (__FILE__
, __LINE__
,
4554 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4555 if (gdbarch_debug
>= 2)
4556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4557 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4561 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4562 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4564 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4568 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4570 gdb_assert (gdbarch
!= NULL
);
4571 if (gdbarch
->pc_in_sigtramp
== 0)
4572 internal_error (__FILE__
, __LINE__
,
4573 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4574 if (gdbarch_debug
>= 2)
4575 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4576 return gdbarch
->pc_in_sigtramp (pc
, name
);
4580 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4581 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4583 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4587 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4589 gdb_assert (gdbarch
!= NULL
);
4590 if (gdbarch
->in_function_epilogue_p
== 0)
4591 internal_error (__FILE__
, __LINE__
,
4592 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4593 if (gdbarch_debug
>= 2)
4594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4595 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4599 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4600 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4602 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4606 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4608 gdb_assert (gdbarch
!= NULL
);
4609 if (gdbarch
->construct_inferior_arguments
== 0)
4610 internal_error (__FILE__
, __LINE__
,
4611 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4612 if (gdbarch_debug
>= 2)
4613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4614 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4618 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4619 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4621 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4625 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4627 gdb_assert (gdbarch
!= NULL
);
4628 return gdbarch
->dwarf2_build_frame_info
!= 0;
4632 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4634 gdb_assert (gdbarch
!= NULL
);
4635 if (gdbarch
->dwarf2_build_frame_info
== 0)
4636 internal_error (__FILE__
, __LINE__
,
4637 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4638 if (gdbarch_debug
>= 2)
4639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4640 gdbarch
->dwarf2_build_frame_info (objfile
);
4644 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4645 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4647 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4651 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4653 gdb_assert (gdbarch
!= NULL
);
4654 if (gdbarch
->elf_make_msymbol_special
== 0)
4655 internal_error (__FILE__
, __LINE__
,
4656 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4657 if (gdbarch_debug
>= 2)
4658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4659 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4663 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4664 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4666 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4670 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4672 gdb_assert (gdbarch
!= NULL
);
4673 if (gdbarch
->coff_make_msymbol_special
== 0)
4674 internal_error (__FILE__
, __LINE__
,
4675 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4676 if (gdbarch_debug
>= 2)
4677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4678 gdbarch
->coff_make_msymbol_special (val
, msym
);
4682 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4683 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4685 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4689 /* Keep a registry of per-architecture data-pointers required by GDB
4695 gdbarch_data_init_ftype
*init
;
4696 gdbarch_data_free_ftype
*free
;
4699 struct gdbarch_data_registration
4701 struct gdbarch_data
*data
;
4702 struct gdbarch_data_registration
*next
;
4705 struct gdbarch_data_registry
4708 struct gdbarch_data_registration
*registrations
;
4711 struct gdbarch_data_registry gdbarch_data_registry
=
4716 struct gdbarch_data
*
4717 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4718 gdbarch_data_free_ftype
*free
)
4720 struct gdbarch_data_registration
**curr
;
4721 for (curr
= &gdbarch_data_registry
.registrations
;
4723 curr
= &(*curr
)->next
);
4724 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4725 (*curr
)->next
= NULL
;
4726 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4727 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4728 (*curr
)->data
->init
= init
;
4729 (*curr
)->data
->free
= free
;
4730 return (*curr
)->data
;
4734 /* Walk through all the registered users initializing each in turn. */
4737 init_gdbarch_data (struct gdbarch
*gdbarch
)
4739 struct gdbarch_data_registration
*rego
;
4740 for (rego
= gdbarch_data_registry
.registrations
;
4744 struct gdbarch_data
*data
= rego
->data
;
4745 gdb_assert (data
->index
< gdbarch
->nr_data
);
4746 if (data
->init
!= NULL
)
4748 void *pointer
= data
->init (gdbarch
);
4749 set_gdbarch_data (gdbarch
, data
, pointer
);
4754 /* Create/delete the gdbarch data vector. */
4757 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4759 gdb_assert (gdbarch
->data
== NULL
);
4760 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4761 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4765 free_gdbarch_data (struct gdbarch
*gdbarch
)
4767 struct gdbarch_data_registration
*rego
;
4768 gdb_assert (gdbarch
->data
!= NULL
);
4769 for (rego
= gdbarch_data_registry
.registrations
;
4773 struct gdbarch_data
*data
= rego
->data
;
4774 gdb_assert (data
->index
< gdbarch
->nr_data
);
4775 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4777 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4778 gdbarch
->data
[data
->index
] = NULL
;
4781 xfree (gdbarch
->data
);
4782 gdbarch
->data
= NULL
;
4786 /* Initialize the current value of thee specified per-architecture
4790 set_gdbarch_data (struct gdbarch
*gdbarch
,
4791 struct gdbarch_data
*data
,
4794 gdb_assert (data
->index
< gdbarch
->nr_data
);
4795 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4796 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4797 gdbarch
->data
[data
->index
] = pointer
;
4800 /* Return the current value of the specified per-architecture
4804 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4806 gdb_assert (data
->index
< gdbarch
->nr_data
);
4807 return gdbarch
->data
[data
->index
];
4812 /* Keep a registry of swapped data required by GDB modules. */
4817 struct gdbarch_swap_registration
*source
;
4818 struct gdbarch_swap
*next
;
4821 struct gdbarch_swap_registration
4824 unsigned long sizeof_data
;
4825 gdbarch_swap_ftype
*init
;
4826 struct gdbarch_swap_registration
*next
;
4829 struct gdbarch_swap_registry
4832 struct gdbarch_swap_registration
*registrations
;
4835 struct gdbarch_swap_registry gdbarch_swap_registry
=
4841 register_gdbarch_swap (void *data
,
4842 unsigned long sizeof_data
,
4843 gdbarch_swap_ftype
*init
)
4845 struct gdbarch_swap_registration
**rego
;
4846 for (rego
= &gdbarch_swap_registry
.registrations
;
4848 rego
= &(*rego
)->next
);
4849 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4850 (*rego
)->next
= NULL
;
4851 (*rego
)->init
= init
;
4852 (*rego
)->data
= data
;
4853 (*rego
)->sizeof_data
= sizeof_data
;
4857 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
4859 struct gdbarch_swap
*curr
;
4860 for (curr
= gdbarch
->swap
;
4864 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
4869 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4871 struct gdbarch_swap_registration
*rego
;
4872 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4873 for (rego
= gdbarch_swap_registry
.registrations
;
4877 if (rego
->data
!= NULL
)
4879 (*curr
) = XMALLOC (struct gdbarch_swap
);
4880 (*curr
)->source
= rego
;
4881 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4882 (*curr
)->next
= NULL
;
4883 curr
= &(*curr
)->next
;
4885 if (rego
->init
!= NULL
)
4891 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4893 struct gdbarch_swap
*curr
;
4894 for (curr
= gdbarch
->swap
;
4897 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4901 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4903 struct gdbarch_swap
*curr
;
4904 for (curr
= gdbarch
->swap
;
4907 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4911 /* Keep a registry of the architectures known by GDB. */
4913 struct gdbarch_registration
4915 enum bfd_architecture bfd_architecture
;
4916 gdbarch_init_ftype
*init
;
4917 gdbarch_dump_tdep_ftype
*dump_tdep
;
4918 struct gdbarch_list
*arches
;
4919 struct gdbarch_registration
*next
;
4922 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4925 append_name (const char ***buf
, int *nr
, const char *name
)
4927 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4933 gdbarch_printable_names (void)
4937 /* Accumulate a list of names based on the registed list of
4939 enum bfd_architecture a
;
4941 const char **arches
= NULL
;
4942 struct gdbarch_registration
*rego
;
4943 for (rego
= gdbarch_registry
;
4947 const struct bfd_arch_info
*ap
;
4948 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4950 internal_error (__FILE__
, __LINE__
,
4951 "gdbarch_architecture_names: multi-arch unknown");
4954 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4959 append_name (&arches
, &nr_arches
, NULL
);
4963 /* Just return all the architectures that BFD knows. Assume that
4964 the legacy architecture framework supports them. */
4965 return bfd_arch_list ();
4970 gdbarch_register (enum bfd_architecture bfd_architecture
,
4971 gdbarch_init_ftype
*init
,
4972 gdbarch_dump_tdep_ftype
*dump_tdep
)
4974 struct gdbarch_registration
**curr
;
4975 const struct bfd_arch_info
*bfd_arch_info
;
4976 /* Check that BFD recognizes this architecture */
4977 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4978 if (bfd_arch_info
== NULL
)
4980 internal_error (__FILE__
, __LINE__
,
4981 "gdbarch: Attempt to register unknown architecture (%d)",
4984 /* Check that we haven't seen this architecture before */
4985 for (curr
= &gdbarch_registry
;
4987 curr
= &(*curr
)->next
)
4989 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4990 internal_error (__FILE__
, __LINE__
,
4991 "gdbarch: Duplicate registraration of architecture (%s)",
4992 bfd_arch_info
->printable_name
);
4996 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4997 bfd_arch_info
->printable_name
,
5000 (*curr
) = XMALLOC (struct gdbarch_registration
);
5001 (*curr
)->bfd_architecture
= bfd_architecture
;
5002 (*curr
)->init
= init
;
5003 (*curr
)->dump_tdep
= dump_tdep
;
5004 (*curr
)->arches
= NULL
;
5005 (*curr
)->next
= NULL
;
5006 /* When non- multi-arch, install whatever target dump routine we've
5007 been provided - hopefully that routine has been written correctly
5008 and works regardless of multi-arch. */
5009 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5010 && startup_gdbarch
.dump_tdep
== NULL
)
5011 startup_gdbarch
.dump_tdep
= dump_tdep
;
5015 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5016 gdbarch_init_ftype
*init
)
5018 gdbarch_register (bfd_architecture
, init
, NULL
);
5022 /* Look for an architecture using gdbarch_info. Base search on only
5023 BFD_ARCH_INFO and BYTE_ORDER. */
5025 struct gdbarch_list
*
5026 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5027 const struct gdbarch_info
*info
)
5029 for (; arches
!= NULL
; arches
= arches
->next
)
5031 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5033 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5041 /* Update the current architecture. Return ZERO if the update request
5045 gdbarch_update_p (struct gdbarch_info info
)
5047 struct gdbarch
*new_gdbarch
;
5048 struct gdbarch
*old_gdbarch
;
5049 struct gdbarch_registration
*rego
;
5051 /* Fill in missing parts of the INFO struct using a number of
5052 sources: ``set ...''; INFOabfd supplied; existing target. */
5054 /* ``(gdb) set architecture ...'' */
5055 if (info
.bfd_arch_info
== NULL
5056 && !TARGET_ARCHITECTURE_AUTO
)
5057 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5058 if (info
.bfd_arch_info
== NULL
5059 && info
.abfd
!= NULL
5060 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5061 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5062 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5063 if (info
.bfd_arch_info
== NULL
)
5064 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5066 /* ``(gdb) set byte-order ...'' */
5067 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5068 && !TARGET_BYTE_ORDER_AUTO
)
5069 info
.byte_order
= TARGET_BYTE_ORDER
;
5070 /* From the INFO struct. */
5071 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5072 && info
.abfd
!= NULL
)
5073 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5074 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5075 : BFD_ENDIAN_UNKNOWN
);
5076 /* From the current target. */
5077 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5078 info
.byte_order
= TARGET_BYTE_ORDER
;
5080 /* Must have found some sort of architecture. */
5081 gdb_assert (info
.bfd_arch_info
!= NULL
);
5085 fprintf_unfiltered (gdb_stdlog
,
5086 "gdbarch_update: info.bfd_arch_info %s\n",
5087 (info
.bfd_arch_info
!= NULL
5088 ? info
.bfd_arch_info
->printable_name
5090 fprintf_unfiltered (gdb_stdlog
,
5091 "gdbarch_update: info.byte_order %d (%s)\n",
5093 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5094 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5096 fprintf_unfiltered (gdb_stdlog
,
5097 "gdbarch_update: info.abfd 0x%lx\n",
5099 fprintf_unfiltered (gdb_stdlog
,
5100 "gdbarch_update: info.tdep_info 0x%lx\n",
5101 (long) info
.tdep_info
);
5104 /* Find the target that knows about this architecture. */
5105 for (rego
= gdbarch_registry
;
5108 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5113 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5117 /* Swap the data belonging to the old target out setting the
5118 installed data to zero. This stops the ->init() function trying
5119 to refer to the previous architecture's global data structures. */
5120 swapout_gdbarch_swap (current_gdbarch
);
5121 clear_gdbarch_swap (current_gdbarch
);
5123 /* Save the previously selected architecture, setting the global to
5124 NULL. This stops ->init() trying to use the previous
5125 architecture's configuration. The previous architecture may not
5126 even be of the same architecture family. The most recent
5127 architecture of the same family is found at the head of the
5128 rego->arches list. */
5129 old_gdbarch
= current_gdbarch
;
5130 current_gdbarch
= NULL
;
5132 /* Ask the target for a replacement architecture. */
5133 new_gdbarch
= rego
->init (info
, rego
->arches
);
5135 /* Did the target like it? No. Reject the change and revert to the
5136 old architecture. */
5137 if (new_gdbarch
== NULL
)
5140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5141 swapin_gdbarch_swap (old_gdbarch
);
5142 current_gdbarch
= old_gdbarch
;
5146 /* Did the architecture change? No. Oops, put the old architecture
5148 if (old_gdbarch
== new_gdbarch
)
5151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5153 new_gdbarch
->bfd_arch_info
->printable_name
);
5154 swapin_gdbarch_swap (old_gdbarch
);
5155 current_gdbarch
= old_gdbarch
;
5159 /* Is this a pre-existing architecture? Yes. Move it to the front
5160 of the list of architectures (keeping the list sorted Most
5161 Recently Used) and then copy it in. */
5163 struct gdbarch_list
**list
;
5164 for (list
= ®o
->arches
;
5166 list
= &(*list
)->next
)
5168 if ((*list
)->gdbarch
== new_gdbarch
)
5170 struct gdbarch_list
*this;
5172 fprintf_unfiltered (gdb_stdlog
,
5173 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5175 new_gdbarch
->bfd_arch_info
->printable_name
);
5178 (*list
) = this->next
;
5179 /* Insert in the front. */
5180 this->next
= rego
->arches
;
5181 rego
->arches
= this;
5182 /* Copy the new architecture in. */
5183 current_gdbarch
= new_gdbarch
;
5184 swapin_gdbarch_swap (new_gdbarch
);
5185 architecture_changed_event ();
5191 /* Prepend this new architecture to the architecture list (keep the
5192 list sorted Most Recently Used). */
5194 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5195 this->next
= rego
->arches
;
5196 this->gdbarch
= new_gdbarch
;
5197 rego
->arches
= this;
5200 /* Switch to this new architecture. Dump it out. */
5201 current_gdbarch
= new_gdbarch
;
5204 fprintf_unfiltered (gdb_stdlog
,
5205 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5207 new_gdbarch
->bfd_arch_info
->printable_name
);
5210 /* Check that the newly installed architecture is valid. Plug in
5211 any post init values. */
5212 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5213 verify_gdbarch (new_gdbarch
);
5215 /* Initialize the per-architecture memory (swap) areas.
5216 CURRENT_GDBARCH must be update before these modules are
5218 init_gdbarch_swap (new_gdbarch
);
5220 /* Initialize the per-architecture data-pointer of all parties that
5221 registered an interest in this architecture. CURRENT_GDBARCH
5222 must be updated before these modules are called. */
5223 init_gdbarch_data (new_gdbarch
);
5224 architecture_changed_event ();
5227 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5235 /* Pointer to the target-dependent disassembly function. */
5236 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5237 disassemble_info tm_print_insn_info
;
5240 extern void _initialize_gdbarch (void);
5243 _initialize_gdbarch (void)
5245 struct cmd_list_element
*c
;
5247 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5248 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5249 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5250 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5251 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5253 add_show_from_set (add_set_cmd ("arch",
5256 (char *)&gdbarch_debug
,
5257 "Set architecture debugging.\n\
5258 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5260 c
= add_set_cmd ("archdebug",
5263 (char *)&gdbarch_debug
,
5264 "Set architecture debugging.\n\
5265 When non-zero, architecture debugging is enabled.", &setlist
);
5267 deprecate_cmd (c
, "set debug arch");
5268 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");