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_raw_size
,
317 generic_register_virtual_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
->max_register_raw_size
= -1;
483 current_gdbarch
->max_register_virtual_size
= -1;
484 current_gdbarch
->do_registers_info
= do_registers_info
;
485 current_gdbarch
->print_float_info
= default_print_float_info
;
486 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
487 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
488 current_gdbarch
->cannot_store_register
= cannot_register_not
;
489 current_gdbarch
->use_generic_dummy_frames
= -1;
490 current_gdbarch
->call_dummy_start_offset
= -1;
491 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
492 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
493 current_gdbarch
->call_dummy_length
= -1;
494 current_gdbarch
->call_dummy_p
= -1;
495 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
496 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
497 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
498 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
499 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
500 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
501 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
502 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
503 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
504 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
505 current_gdbarch
->push_arguments
= default_push_arguments
;
506 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
507 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
508 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
509 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
510 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
511 current_gdbarch
->decr_pc_after_break
= -1;
512 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
513 current_gdbarch
->function_start_offset
= -1;
514 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
515 current_gdbarch
->frame_args_skip
= -1;
516 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
517 current_gdbarch
->frame_chain_valid
= func_frame_chain_valid
;
518 current_gdbarch
->extra_stack_alignment_needed
= 1;
519 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
520 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
521 current_gdbarch
->smash_text_address
= core_addr_identity
;
522 current_gdbarch
->print_insn
= legacy_print_insn
;
523 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
524 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
525 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
526 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
527 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
528 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
529 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
530 /* gdbarch_alloc() */
532 return current_gdbarch
;
536 /* Free a gdbarch struct. This should never happen in normal
537 operation --- once you've created a gdbarch, you keep it around.
538 However, if an architecture's init function encounters an error
539 building the structure, it may need to clean up a partially
540 constructed gdbarch. */
543 gdbarch_free (struct gdbarch
*arch
)
545 gdb_assert (arch
!= NULL
);
546 free_gdbarch_data (arch
);
551 /* Ensure that all values in a GDBARCH are reasonable. */
554 verify_gdbarch (struct gdbarch
*gdbarch
)
557 struct cleanup
*cleanups
;
560 /* Only perform sanity checks on a multi-arch target. */
563 log
= mem_fileopen ();
564 cleanups
= make_cleanup_ui_file_delete (log
);
566 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
567 fprintf_unfiltered (log
, "\n\tbyte-order");
568 if (gdbarch
->bfd_arch_info
== NULL
)
569 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
570 /* Check those that need to be defined for the given multi-arch level. */
571 /* Skip verify of short_bit, invalid_p == 0 */
572 /* Skip verify of int_bit, invalid_p == 0 */
573 /* Skip verify of long_bit, invalid_p == 0 */
574 /* Skip verify of long_long_bit, invalid_p == 0 */
575 /* Skip verify of float_bit, invalid_p == 0 */
576 /* Skip verify of double_bit, invalid_p == 0 */
577 /* Skip verify of long_double_bit, invalid_p == 0 */
578 /* Skip verify of ptr_bit, invalid_p == 0 */
579 if (gdbarch
->addr_bit
== 0)
580 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
581 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
582 if (gdbarch
->char_signed
== -1)
583 gdbarch
->char_signed
= 1;
584 /* Skip verify of read_pc, invalid_p == 0 */
585 /* Skip verify of write_pc, invalid_p == 0 */
586 /* Skip verify of read_fp, invalid_p == 0 */
587 /* Skip verify of read_sp, invalid_p == 0 */
588 /* Skip verify of write_sp, invalid_p == 0 */
589 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
590 /* Skip verify of register_read, has predicate */
591 /* Skip verify of register_write, has predicate */
592 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
593 && (gdbarch
->num_regs
== -1))
594 fprintf_unfiltered (log
, "\n\tnum_regs");
595 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
596 /* Skip verify of sp_regnum, invalid_p == 0 */
597 /* Skip verify of fp_regnum, invalid_p == 0 */
598 /* Skip verify of pc_regnum, invalid_p == 0 */
599 /* Skip verify of ps_regnum, invalid_p == 0 */
600 /* Skip verify of fp0_regnum, invalid_p == 0 */
601 /* Skip verify of npc_regnum, invalid_p == 0 */
602 /* Skip verify of nnpc_regnum, invalid_p == 0 */
603 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
604 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
605 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
606 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
607 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
608 /* Skip verify of register_name, invalid_p == 0 */
609 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
610 && (gdbarch
->register_size
== -1))
611 fprintf_unfiltered (log
, "\n\tregister_size");
612 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
613 && (gdbarch
->register_bytes
== -1))
614 fprintf_unfiltered (log
, "\n\tregister_bytes");
615 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
616 && (gdbarch
->register_byte
== 0))
617 fprintf_unfiltered (log
, "\n\tregister_byte");
618 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
619 && (gdbarch
->register_raw_size
== 0))
620 fprintf_unfiltered (log
, "\n\tregister_raw_size");
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 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
625 && (gdbarch
->register_virtual_size
== 0))
626 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
627 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
628 && (gdbarch
->max_register_virtual_size
== -1))
629 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
630 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
631 && (gdbarch
->register_virtual_type
== 0))
632 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
633 /* Skip verify of do_registers_info, invalid_p == 0 */
634 /* Skip verify of print_float_info, invalid_p == 0 */
635 /* Skip verify of register_sim_regno, invalid_p == 0 */
636 /* Skip verify of register_bytes_ok, has predicate */
637 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
638 /* Skip verify of cannot_store_register, invalid_p == 0 */
639 /* Skip verify of get_longjmp_target, has predicate */
640 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
641 && (gdbarch
->use_generic_dummy_frames
== -1))
642 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
643 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
644 && (gdbarch
->call_dummy_location
== 0))
645 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
646 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
647 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
648 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
649 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
650 && (gdbarch
->call_dummy_start_offset
== -1))
651 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
652 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
653 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
654 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
655 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
656 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
657 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
658 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
659 && (gdbarch
->call_dummy_length
== -1))
660 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
661 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
662 && (gdbarch
->pc_in_call_dummy
== 0))
663 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
664 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
665 && (gdbarch
->call_dummy_p
== -1))
666 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
667 /* Skip verify of call_dummy_words, invalid_p == 0 */
668 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
669 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
670 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
671 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
672 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
673 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
674 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
675 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
676 && (gdbarch
->fix_call_dummy
== 0))
677 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
678 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
679 /* Skip verify of init_frame_pc, invalid_p == 0 */
680 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
681 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
682 && (gdbarch
->get_saved_register
== 0))
683 fprintf_unfiltered (log
, "\n\tget_saved_register");
684 /* Skip verify of register_convertible, invalid_p == 0 */
685 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
686 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
687 /* Skip verify of fetch_pseudo_register, has predicate */
688 /* Skip verify of store_pseudo_register, has predicate */
689 /* Skip verify of pointer_to_address, invalid_p == 0 */
690 /* Skip verify of address_to_pointer, invalid_p == 0 */
691 /* Skip verify of integer_to_address, has predicate */
692 /* Skip verify of return_value_on_stack, invalid_p == 0 */
693 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
694 && (gdbarch
->extract_return_value
== 0))
695 fprintf_unfiltered (log
, "\n\textract_return_value");
696 /* Skip verify of push_arguments, invalid_p == 0 */
697 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
698 && (gdbarch
->push_dummy_frame
== 0))
699 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
700 /* Skip verify of push_return_address, has predicate */
701 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
702 && (gdbarch
->pop_frame
== 0))
703 fprintf_unfiltered (log
, "\n\tpop_frame");
704 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
705 && (gdbarch
->store_struct_return
== 0))
706 fprintf_unfiltered (log
, "\n\tstore_struct_return");
707 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
708 && (gdbarch
->store_return_value
== 0))
709 fprintf_unfiltered (log
, "\n\tstore_return_value");
710 /* Skip verify of extract_struct_value_address, has predicate */
711 /* Skip verify of use_struct_convention, invalid_p == 0 */
712 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
713 && (gdbarch
->frame_init_saved_regs
== 0))
714 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
715 /* Skip verify of init_extra_frame_info, has predicate */
716 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
717 && (gdbarch
->skip_prologue
== 0))
718 fprintf_unfiltered (log
, "\n\tskip_prologue");
719 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
720 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
721 && (gdbarch
->inner_than
== 0))
722 fprintf_unfiltered (log
, "\n\tinner_than");
723 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
724 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
725 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
726 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
727 && (gdbarch
->decr_pc_after_break
== -1))
728 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
729 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
730 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
731 && (gdbarch
->function_start_offset
== -1))
732 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
733 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
734 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
735 && (gdbarch
->frame_args_skip
== -1))
736 fprintf_unfiltered (log
, "\n\tframe_args_skip");
737 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
738 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
739 && (gdbarch
->frame_chain
== 0))
740 fprintf_unfiltered (log
, "\n\tframe_chain");
741 /* Skip verify of frame_chain_valid, invalid_p == 0 */
742 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
743 && (gdbarch
->frame_saved_pc
== 0))
744 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
745 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
746 && (gdbarch
->frame_args_address
== 0))
747 fprintf_unfiltered (log
, "\n\tframe_args_address");
748 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
749 && (gdbarch
->frame_locals_address
== 0))
750 fprintf_unfiltered (log
, "\n\tframe_locals_address");
751 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
752 && (gdbarch
->saved_pc_after_call
== 0))
753 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
754 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
755 && (gdbarch
->frame_num_args
== 0))
756 fprintf_unfiltered (log
, "\n\tframe_num_args");
757 /* Skip verify of stack_align, has predicate */
758 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
759 /* Skip verify of reg_struct_has_addr, has predicate */
760 /* Skip verify of save_dummy_frame_tos, has predicate */
761 if (gdbarch
->float_format
== 0)
762 gdbarch
->float_format
= default_float_format (gdbarch
);
763 if (gdbarch
->double_format
== 0)
764 gdbarch
->double_format
= default_double_format (gdbarch
);
765 if (gdbarch
->long_double_format
== 0)
766 gdbarch
->long_double_format
= default_double_format (gdbarch
);
767 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
768 /* Skip verify of addr_bits_remove, invalid_p == 0 */
769 /* Skip verify of smash_text_address, invalid_p == 0 */
770 /* Skip verify of software_single_step, has predicate */
771 /* Skip verify of print_insn, invalid_p == 0 */
772 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
773 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
774 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
775 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
776 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
777 /* Skip verify of dwarf2_build_frame_info, has predicate */
778 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
779 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
780 buf
= ui_file_xstrdup (log
, &dummy
);
781 make_cleanup (xfree
, buf
);
782 if (strlen (buf
) > 0)
783 internal_error (__FILE__
, __LINE__
,
784 "verify_gdbarch: the following are invalid ...%s",
786 do_cleanups (cleanups
);
790 /* Print out the details of the current architecture. */
792 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
793 just happens to match the global variable ``current_gdbarch''. That
794 way macros refering to that variable get the local and not the global
795 version - ulgh. Once everything is parameterised with gdbarch, this
799 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
807 (long) current_gdbarch
->in_function_epilogue_p
);
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: register_read = 0x%08lx\n",
811 (long) current_gdbarch
->register_read
);
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: register_write = 0x%08lx\n",
815 (long) current_gdbarch
->register_write
);
816 #ifdef ADDRESS_TO_POINTER
818 /* Macro might contain `[{}]' when not multi-arch */
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: %s # %s\n",
821 "ADDRESS_TO_POINTER(type, buf, addr)",
822 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
827 (long) current_gdbarch
->address_to_pointer
828 /*ADDRESS_TO_POINTER ()*/);
830 #ifdef ADDR_BITS_REMOVE
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: %s # %s\n",
833 "ADDR_BITS_REMOVE(addr)",
834 XSTRING (ADDR_BITS_REMOVE (addr
)));
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
838 (long) current_gdbarch
->addr_bits_remove
839 /*ADDR_BITS_REMOVE ()*/);
841 #ifdef BELIEVE_PCC_PROMOTION
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
844 XSTRING (BELIEVE_PCC_PROMOTION
));
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
847 BELIEVE_PCC_PROMOTION
);
849 #ifdef BELIEVE_PCC_PROMOTION_TYPE
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
852 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
855 BELIEVE_PCC_PROMOTION_TYPE
);
857 #ifdef BREAKPOINT_FROM_PC
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: %s # %s\n",
860 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
861 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
865 (long) current_gdbarch
->breakpoint_from_pc
866 /*BREAKPOINT_FROM_PC ()*/);
868 #ifdef CALL_DUMMY_ADDRESS
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: %s # %s\n",
871 "CALL_DUMMY_ADDRESS()",
872 XSTRING (CALL_DUMMY_ADDRESS ()));
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
876 (long) current_gdbarch
->call_dummy_address
877 /*CALL_DUMMY_ADDRESS ()*/);
879 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
882 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
883 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
886 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
888 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
891 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
894 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
896 #ifdef CALL_DUMMY_LENGTH
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
899 XSTRING (CALL_DUMMY_LENGTH
));
900 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
905 #ifdef CALL_DUMMY_LOCATION
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
908 XSTRING (CALL_DUMMY_LOCATION
));
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
911 CALL_DUMMY_LOCATION
);
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: CALL_DUMMY_P # %s\n",
916 XSTRING (CALL_DUMMY_P
));
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: CALL_DUMMY_P = %d\n",
921 #ifdef CALL_DUMMY_STACK_ADJUST
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
924 XSTRING (CALL_DUMMY_STACK_ADJUST
));
925 if (CALL_DUMMY_STACK_ADJUST_P
)
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
928 (long) CALL_DUMMY_STACK_ADJUST
);
930 #ifdef CALL_DUMMY_STACK_ADJUST_P
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
933 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
936 (long) CALL_DUMMY_STACK_ADJUST_P
);
938 #ifdef CALL_DUMMY_START_OFFSET
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
941 XSTRING (CALL_DUMMY_START_OFFSET
));
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
944 (long) CALL_DUMMY_START_OFFSET
);
946 #ifdef CALL_DUMMY_WORDS
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
949 XSTRING (CALL_DUMMY_WORDS
));
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
952 (long) CALL_DUMMY_WORDS
);
954 #ifdef CANNOT_FETCH_REGISTER
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: %s # %s\n",
957 "CANNOT_FETCH_REGISTER(regnum)",
958 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
962 (long) current_gdbarch
->cannot_fetch_register
963 /*CANNOT_FETCH_REGISTER ()*/);
965 #ifdef CANNOT_STORE_REGISTER
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: %s # %s\n",
968 "CANNOT_STORE_REGISTER(regnum)",
969 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
973 (long) current_gdbarch
->cannot_store_register
974 /*CANNOT_STORE_REGISTER ()*/);
976 #ifdef COERCE_FLOAT_TO_DOUBLE
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: %s # %s\n",
979 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
980 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
984 (long) current_gdbarch
->coerce_float_to_double
985 /*COERCE_FLOAT_TO_DOUBLE ()*/);
987 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
989 /* Macro might contain `[{}]' when not multi-arch */
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: %s # %s\n",
992 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
993 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
998 (long) current_gdbarch
->coff_make_msymbol_special
999 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1004 (long) current_gdbarch
->construct_inferior_arguments
);
1005 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: %s # %s\n",
1008 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1009 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1013 (long) current_gdbarch
->convert_from_func_ptr_addr
1014 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1016 #ifdef DECR_PC_AFTER_BREAK
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1019 XSTRING (DECR_PC_AFTER_BREAK
));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1022 (long) DECR_PC_AFTER_BREAK
);
1024 #ifdef DO_REGISTERS_INFO
1026 /* Macro might contain `[{}]' when not multi-arch */
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: %s # %s\n",
1029 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1030 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1035 (long) current_gdbarch
->do_registers_info
1036 /*DO_REGISTERS_INFO ()*/);
1038 #ifdef DWARF2_BUILD_FRAME_INFO
1040 /* Macro might contain `[{}]' when not multi-arch */
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: %s # %s\n",
1043 "DWARF2_BUILD_FRAME_INFO(objfile)",
1044 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1049 (long) current_gdbarch
->dwarf2_build_frame_info
1050 /*DWARF2_BUILD_FRAME_INFO ()*/);
1052 #ifdef DWARF2_REG_TO_REGNUM
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: %s # %s\n",
1055 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1056 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1060 (long) current_gdbarch
->dwarf2_reg_to_regnum
1061 /*DWARF2_REG_TO_REGNUM ()*/);
1063 #ifdef DWARF_REG_TO_REGNUM
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: %s # %s\n",
1066 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1067 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1071 (long) current_gdbarch
->dwarf_reg_to_regnum
1072 /*DWARF_REG_TO_REGNUM ()*/);
1074 #ifdef ECOFF_REG_TO_REGNUM
1075 fprintf_unfiltered (file
,
1076 "gdbarch_dump: %s # %s\n",
1077 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1078 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1082 (long) current_gdbarch
->ecoff_reg_to_regnum
1083 /*ECOFF_REG_TO_REGNUM ()*/);
1085 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1087 /* Macro might contain `[{}]' when not multi-arch */
1088 fprintf_unfiltered (file
,
1089 "gdbarch_dump: %s # %s\n",
1090 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1091 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1096 (long) current_gdbarch
->elf_make_msymbol_special
1097 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1099 #ifdef EXTRACT_RETURN_VALUE
1101 /* Macro might contain `[{}]' when not multi-arch */
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: %s # %s\n",
1104 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1105 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1110 (long) current_gdbarch
->extract_return_value
1111 /*EXTRACT_RETURN_VALUE ()*/);
1113 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1114 fprintf_unfiltered (file
,
1115 "gdbarch_dump: %s # %s\n",
1116 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1117 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1121 (long) current_gdbarch
->extract_struct_value_address
1122 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1124 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1127 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1130 EXTRA_STACK_ALIGNMENT_NEEDED
);
1132 #ifdef FETCH_PSEUDO_REGISTER
1134 /* Macro might contain `[{}]' when not multi-arch */
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: %s # %s\n",
1137 "FETCH_PSEUDO_REGISTER(regnum)",
1138 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1143 (long) current_gdbarch
->fetch_pseudo_register
1144 /*FETCH_PSEUDO_REGISTER ()*/);
1146 #ifdef FIX_CALL_DUMMY
1148 /* Macro might contain `[{}]' when not multi-arch */
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: %s # %s\n",
1151 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1152 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1157 (long) current_gdbarch
->fix_call_dummy
1158 /*FIX_CALL_DUMMY ()*/);
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: FP0_REGNUM # %s\n",
1163 XSTRING (FP0_REGNUM
));
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: FP0_REGNUM = %d\n",
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: FP_REGNUM # %s\n",
1171 XSTRING (FP_REGNUM
));
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: FP_REGNUM = %d\n",
1176 #ifdef FRAMELESS_FUNCTION_INVOCATION
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: %s # %s\n",
1179 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1180 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1184 (long) current_gdbarch
->frameless_function_invocation
1185 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1187 #ifdef FRAME_ARGS_ADDRESS
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: %s # %s\n",
1190 "FRAME_ARGS_ADDRESS(fi)",
1191 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1195 (long) current_gdbarch
->frame_args_address
1196 /*FRAME_ARGS_ADDRESS ()*/);
1198 #ifdef FRAME_ARGS_SKIP
1199 fprintf_unfiltered (file
,
1200 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1201 XSTRING (FRAME_ARGS_SKIP
));
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1204 (long) FRAME_ARGS_SKIP
);
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: %s # %s\n",
1209 "FRAME_CHAIN(frame)",
1210 XSTRING (FRAME_CHAIN (frame
)));
1212 fprintf_unfiltered (file
,
1213 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1214 (long) current_gdbarch
->frame_chain
1215 /*FRAME_CHAIN ()*/);
1217 #ifdef FRAME_CHAIN_VALID
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: %s # %s\n",
1220 "FRAME_CHAIN_VALID(chain, thisframe)",
1221 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1225 (long) current_gdbarch
->frame_chain_valid
1226 /*FRAME_CHAIN_VALID ()*/);
1228 #ifdef FRAME_INIT_SAVED_REGS
1230 /* Macro might contain `[{}]' when not multi-arch */
1231 fprintf_unfiltered (file
,
1232 "gdbarch_dump: %s # %s\n",
1233 "FRAME_INIT_SAVED_REGS(frame)",
1234 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1239 (long) current_gdbarch
->frame_init_saved_regs
1240 /*FRAME_INIT_SAVED_REGS ()*/);
1242 #ifdef FRAME_LOCALS_ADDRESS
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: %s # %s\n",
1245 "FRAME_LOCALS_ADDRESS(fi)",
1246 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1250 (long) current_gdbarch
->frame_locals_address
1251 /*FRAME_LOCALS_ADDRESS ()*/);
1253 #ifdef FRAME_NUM_ARGS
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: %s # %s\n",
1256 "FRAME_NUM_ARGS(frame)",
1257 XSTRING (FRAME_NUM_ARGS (frame
)));
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1261 (long) current_gdbarch
->frame_num_args
1262 /*FRAME_NUM_ARGS ()*/);
1264 #ifdef FRAME_SAVED_PC
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: %s # %s\n",
1267 "FRAME_SAVED_PC(fi)",
1268 XSTRING (FRAME_SAVED_PC (fi
)));
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1272 (long) current_gdbarch
->frame_saved_pc
1273 /*FRAME_SAVED_PC ()*/);
1275 #ifdef FUNCTION_START_OFFSET
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1278 XSTRING (FUNCTION_START_OFFSET
));
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1281 (long) FUNCTION_START_OFFSET
);
1283 #ifdef GET_LONGJMP_TARGET
1284 fprintf_unfiltered (file
,
1285 "gdbarch_dump: %s # %s\n",
1286 "GET_LONGJMP_TARGET(pc)",
1287 XSTRING (GET_LONGJMP_TARGET (pc
)));
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1291 (long) current_gdbarch
->get_longjmp_target
1292 /*GET_LONGJMP_TARGET ()*/);
1294 #ifdef GET_SAVED_REGISTER
1296 /* Macro might contain `[{}]' when not multi-arch */
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: %s # %s\n",
1299 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1300 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1305 (long) current_gdbarch
->get_saved_register
1306 /*GET_SAVED_REGISTER ()*/);
1308 #ifdef INIT_EXTRA_FRAME_INFO
1310 /* Macro might contain `[{}]' when not multi-arch */
1311 fprintf_unfiltered (file
,
1312 "gdbarch_dump: %s # %s\n",
1313 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1314 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1319 (long) current_gdbarch
->init_extra_frame_info
1320 /*INIT_EXTRA_FRAME_INFO ()*/);
1322 #ifdef INIT_FRAME_PC
1324 /* Macro might contain `[{}]' when not multi-arch */
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: %s # %s\n",
1327 "INIT_FRAME_PC(fromleaf, prev)",
1328 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1331 fprintf_unfiltered (file
,
1332 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1333 (long) current_gdbarch
->init_frame_pc
1334 /*INIT_FRAME_PC ()*/);
1336 #ifdef INIT_FRAME_PC_FIRST
1338 /* Macro might contain `[{}]' when not multi-arch */
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: %s # %s\n",
1341 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1342 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1345 fprintf_unfiltered (file
,
1346 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1347 (long) current_gdbarch
->init_frame_pc_first
1348 /*INIT_FRAME_PC_FIRST ()*/);
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: %s # %s\n",
1353 "INNER_THAN(lhs, rhs)",
1354 XSTRING (INNER_THAN (lhs
, rhs
)));
1356 fprintf_unfiltered (file
,
1357 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1358 (long) current_gdbarch
->inner_than
1361 #ifdef INTEGER_TO_ADDRESS
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: %s # %s\n",
1364 "INTEGER_TO_ADDRESS(type, buf)",
1365 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1369 (long) current_gdbarch
->integer_to_address
1370 /*INTEGER_TO_ADDRESS ()*/);
1372 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: %s # %s\n",
1375 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1376 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1380 (long) current_gdbarch
->in_solib_call_trampoline
1381 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1383 #ifdef MAX_REGISTER_RAW_SIZE
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1386 XSTRING (MAX_REGISTER_RAW_SIZE
));
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1389 MAX_REGISTER_RAW_SIZE
);
1391 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1394 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1397 MAX_REGISTER_VIRTUAL_SIZE
);
1399 #ifdef MEMORY_INSERT_BREAKPOINT
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: %s # %s\n",
1402 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1403 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1407 (long) current_gdbarch
->memory_insert_breakpoint
1408 /*MEMORY_INSERT_BREAKPOINT ()*/);
1410 #ifdef MEMORY_REMOVE_BREAKPOINT
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: %s # %s\n",
1413 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1414 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1418 (long) current_gdbarch
->memory_remove_breakpoint
1419 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1422 fprintf_unfiltered (file
,
1423 "gdbarch_dump: NNPC_REGNUM # %s\n",
1424 XSTRING (NNPC_REGNUM
));
1425 fprintf_unfiltered (file
,
1426 "gdbarch_dump: NNPC_REGNUM = %d\n",
1430 fprintf_unfiltered (file
,
1431 "gdbarch_dump: NPC_REGNUM # %s\n",
1432 XSTRING (NPC_REGNUM
));
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: NPC_REGNUM = %d\n",
1437 #ifdef NUM_PSEUDO_REGS
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1440 XSTRING (NUM_PSEUDO_REGS
));
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: NUM_REGS # %s\n",
1448 XSTRING (NUM_REGS
));
1449 fprintf_unfiltered (file
,
1450 "gdbarch_dump: NUM_REGS = %d\n",
1453 #ifdef PARM_BOUNDARY
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1456 XSTRING (PARM_BOUNDARY
));
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1461 #ifdef PC_IN_CALL_DUMMY
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: %s # %s\n",
1464 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1465 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1469 (long) current_gdbarch
->pc_in_call_dummy
1470 /*PC_IN_CALL_DUMMY ()*/);
1472 #ifdef PC_IN_SIGTRAMP
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: %s # %s\n",
1475 "PC_IN_SIGTRAMP(pc, name)",
1476 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1478 fprintf_unfiltered (file
,
1479 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1480 (long) current_gdbarch
->pc_in_sigtramp
1481 /*PC_IN_SIGTRAMP ()*/);
1484 fprintf_unfiltered (file
,
1485 "gdbarch_dump: PC_REGNUM # %s\n",
1486 XSTRING (PC_REGNUM
));
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: PC_REGNUM = %d\n",
1491 #ifdef POINTER_TO_ADDRESS
1492 fprintf_unfiltered (file
,
1493 "gdbarch_dump: %s # %s\n",
1494 "POINTER_TO_ADDRESS(type, buf)",
1495 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1497 fprintf_unfiltered (file
,
1498 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1499 (long) current_gdbarch
->pointer_to_address
1500 /*POINTER_TO_ADDRESS ()*/);
1504 /* Macro might contain `[{}]' when not multi-arch */
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: %s # %s\n",
1508 XSTRING (POP_FRAME (-)));
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1513 (long) current_gdbarch
->pop_frame
1516 #ifdef PREPARE_TO_PROCEED
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: %s # %s\n",
1519 "PREPARE_TO_PROCEED(select_it)",
1520 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1524 (long) current_gdbarch
->prepare_to_proceed
1525 /*PREPARE_TO_PROCEED ()*/);
1527 #ifdef PRINT_FLOAT_INFO
1529 /* Macro might contain `[{}]' when not multi-arch */
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: %s # %s\n",
1532 "PRINT_FLOAT_INFO()",
1533 XSTRING (PRINT_FLOAT_INFO ()));
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1538 (long) current_gdbarch
->print_float_info
1539 /*PRINT_FLOAT_INFO ()*/);
1541 #ifdef PROLOGUE_FRAMELESS_P
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: %s # %s\n",
1544 "PROLOGUE_FRAMELESS_P(ip)",
1545 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1547 fprintf_unfiltered (file
,
1548 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1549 (long) current_gdbarch
->prologue_frameless_p
1550 /*PROLOGUE_FRAMELESS_P ()*/);
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: PS_REGNUM # %s\n",
1555 XSTRING (PS_REGNUM
));
1556 fprintf_unfiltered (file
,
1557 "gdbarch_dump: PS_REGNUM = %d\n",
1560 #ifdef PUSH_ARGUMENTS
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: %s # %s\n",
1563 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1564 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1566 fprintf_unfiltered (file
,
1567 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1568 (long) current_gdbarch
->push_arguments
1569 /*PUSH_ARGUMENTS ()*/);
1571 #ifdef PUSH_DUMMY_FRAME
1573 /* Macro might contain `[{}]' when not multi-arch */
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: %s # %s\n",
1576 "PUSH_DUMMY_FRAME(-)",
1577 XSTRING (PUSH_DUMMY_FRAME (-)));
1580 fprintf_unfiltered (file
,
1581 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1582 (long) current_gdbarch
->push_dummy_frame
1583 /*PUSH_DUMMY_FRAME ()*/);
1585 #ifdef PUSH_RETURN_ADDRESS
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: %s # %s\n",
1588 "PUSH_RETURN_ADDRESS(pc, sp)",
1589 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1593 (long) current_gdbarch
->push_return_address
1594 /*PUSH_RETURN_ADDRESS ()*/);
1596 #ifdef REGISTER_BYTE
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: %s # %s\n",
1599 "REGISTER_BYTE(reg_nr)",
1600 XSTRING (REGISTER_BYTE (reg_nr
)));
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1604 (long) current_gdbarch
->register_byte
1605 /*REGISTER_BYTE ()*/);
1607 #ifdef REGISTER_BYTES
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: REGISTER_BYTES # %s\n",
1610 XSTRING (REGISTER_BYTES
));
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: REGISTER_BYTES = %d\n",
1615 #ifdef REGISTER_BYTES_OK
1616 fprintf_unfiltered (file
,
1617 "gdbarch_dump: %s # %s\n",
1618 "REGISTER_BYTES_OK(nr_bytes)",
1619 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1621 fprintf_unfiltered (file
,
1622 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1623 (long) current_gdbarch
->register_bytes_ok
1624 /*REGISTER_BYTES_OK ()*/);
1626 #ifdef REGISTER_CONVERTIBLE
1627 fprintf_unfiltered (file
,
1628 "gdbarch_dump: %s # %s\n",
1629 "REGISTER_CONVERTIBLE(nr)",
1630 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1632 fprintf_unfiltered (file
,
1633 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1634 (long) current_gdbarch
->register_convertible
1635 /*REGISTER_CONVERTIBLE ()*/);
1637 #ifdef REGISTER_CONVERT_TO_RAW
1639 /* Macro might contain `[{}]' when not multi-arch */
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: %s # %s\n",
1642 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1643 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1646 fprintf_unfiltered (file
,
1647 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1648 (long) current_gdbarch
->register_convert_to_raw
1649 /*REGISTER_CONVERT_TO_RAW ()*/);
1651 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1653 /* Macro might contain `[{}]' when not multi-arch */
1654 fprintf_unfiltered (file
,
1655 "gdbarch_dump: %s # %s\n",
1656 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1657 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1662 (long) current_gdbarch
->register_convert_to_virtual
1663 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1665 #ifdef REGISTER_NAME
1666 fprintf_unfiltered (file
,
1667 "gdbarch_dump: %s # %s\n",
1668 "REGISTER_NAME(regnr)",
1669 XSTRING (REGISTER_NAME (regnr
)));
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1673 (long) current_gdbarch
->register_name
1674 /*REGISTER_NAME ()*/);
1676 #ifdef REGISTER_RAW_SIZE
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: %s # %s\n",
1679 "REGISTER_RAW_SIZE(reg_nr)",
1680 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1682 fprintf_unfiltered (file
,
1683 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1684 (long) current_gdbarch
->register_raw_size
1685 /*REGISTER_RAW_SIZE ()*/);
1687 #ifdef REGISTER_SIM_REGNO
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: %s # %s\n",
1690 "REGISTER_SIM_REGNO(reg_nr)",
1691 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1695 (long) current_gdbarch
->register_sim_regno
1696 /*REGISTER_SIM_REGNO ()*/);
1698 #ifdef REGISTER_SIZE
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: REGISTER_SIZE # %s\n",
1701 XSTRING (REGISTER_SIZE
));
1702 fprintf_unfiltered (file
,
1703 "gdbarch_dump: REGISTER_SIZE = %d\n",
1706 #ifdef REGISTER_VIRTUAL_SIZE
1707 fprintf_unfiltered (file
,
1708 "gdbarch_dump: %s # %s\n",
1709 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1710 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1712 fprintf_unfiltered (file
,
1713 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1714 (long) current_gdbarch
->register_virtual_size
1715 /*REGISTER_VIRTUAL_SIZE ()*/);
1717 #ifdef REGISTER_VIRTUAL_TYPE
1718 fprintf_unfiltered (file
,
1719 "gdbarch_dump: %s # %s\n",
1720 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1721 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1725 (long) current_gdbarch
->register_virtual_type
1726 /*REGISTER_VIRTUAL_TYPE ()*/);
1728 #ifdef REG_STRUCT_HAS_ADDR
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: %s # %s\n",
1731 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1732 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1736 (long) current_gdbarch
->reg_struct_has_addr
1737 /*REG_STRUCT_HAS_ADDR ()*/);
1739 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1741 /* Macro might contain `[{}]' when not multi-arch */
1742 fprintf_unfiltered (file
,
1743 "gdbarch_dump: %s # %s\n",
1744 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1745 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1748 fprintf_unfiltered (file
,
1749 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1750 (long) current_gdbarch
->remote_translate_xfer_address
1751 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1753 #ifdef RETURN_VALUE_ON_STACK
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: %s # %s\n",
1756 "RETURN_VALUE_ON_STACK(type)",
1757 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1761 (long) current_gdbarch
->return_value_on_stack
1762 /*RETURN_VALUE_ON_STACK ()*/);
1764 #ifdef SAVED_PC_AFTER_CALL
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: %s # %s\n",
1767 "SAVED_PC_AFTER_CALL(frame)",
1768 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1770 fprintf_unfiltered (file
,
1771 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1772 (long) current_gdbarch
->saved_pc_after_call
1773 /*SAVED_PC_AFTER_CALL ()*/);
1775 #ifdef SAVE_DUMMY_FRAME_TOS
1777 /* Macro might contain `[{}]' when not multi-arch */
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: %s # %s\n",
1780 "SAVE_DUMMY_FRAME_TOS(sp)",
1781 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1786 (long) current_gdbarch
->save_dummy_frame_tos
1787 /*SAVE_DUMMY_FRAME_TOS ()*/);
1789 #ifdef SDB_REG_TO_REGNUM
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: %s # %s\n",
1792 "SDB_REG_TO_REGNUM(sdb_regnr)",
1793 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1797 (long) current_gdbarch
->sdb_reg_to_regnum
1798 /*SDB_REG_TO_REGNUM ()*/);
1800 #ifdef SIZEOF_CALL_DUMMY_WORDS
1801 fprintf_unfiltered (file
,
1802 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1803 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1806 (long) SIZEOF_CALL_DUMMY_WORDS
);
1808 #ifdef SKIP_PROLOGUE
1809 fprintf_unfiltered (file
,
1810 "gdbarch_dump: %s # %s\n",
1811 "SKIP_PROLOGUE(ip)",
1812 XSTRING (SKIP_PROLOGUE (ip
)));
1814 fprintf_unfiltered (file
,
1815 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1816 (long) current_gdbarch
->skip_prologue
1817 /*SKIP_PROLOGUE ()*/);
1819 #ifdef SKIP_TRAMPOLINE_CODE
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: %s # %s\n",
1822 "SKIP_TRAMPOLINE_CODE(pc)",
1823 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1827 (long) current_gdbarch
->skip_trampoline_code
1828 /*SKIP_TRAMPOLINE_CODE ()*/);
1830 #ifdef SMASH_TEXT_ADDRESS
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: %s # %s\n",
1833 "SMASH_TEXT_ADDRESS(addr)",
1834 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1838 (long) current_gdbarch
->smash_text_address
1839 /*SMASH_TEXT_ADDRESS ()*/);
1841 #ifdef SOFTWARE_SINGLE_STEP
1843 /* Macro might contain `[{}]' when not multi-arch */
1844 fprintf_unfiltered (file
,
1845 "gdbarch_dump: %s # %s\n",
1846 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1847 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1852 (long) current_gdbarch
->software_single_step
1853 /*SOFTWARE_SINGLE_STEP ()*/);
1856 fprintf_unfiltered (file
,
1857 "gdbarch_dump: SP_REGNUM # %s\n",
1858 XSTRING (SP_REGNUM
));
1859 fprintf_unfiltered (file
,
1860 "gdbarch_dump: SP_REGNUM = %d\n",
1863 #ifdef STAB_REG_TO_REGNUM
1864 fprintf_unfiltered (file
,
1865 "gdbarch_dump: %s # %s\n",
1866 "STAB_REG_TO_REGNUM(stab_regnr)",
1867 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1869 fprintf_unfiltered (file
,
1870 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1871 (long) current_gdbarch
->stab_reg_to_regnum
1872 /*STAB_REG_TO_REGNUM ()*/);
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: %s # %s\n",
1878 XSTRING (STACK_ALIGN (sp
)));
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1882 (long) current_gdbarch
->stack_align
1883 /*STACK_ALIGN ()*/);
1885 #ifdef STORE_PSEUDO_REGISTER
1887 /* Macro might contain `[{}]' when not multi-arch */
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: %s # %s\n",
1890 "STORE_PSEUDO_REGISTER(regnum)",
1891 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1896 (long) current_gdbarch
->store_pseudo_register
1897 /*STORE_PSEUDO_REGISTER ()*/);
1899 #ifdef STORE_RETURN_VALUE
1901 /* Macro might contain `[{}]' when not multi-arch */
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: %s # %s\n",
1904 "STORE_RETURN_VALUE(type, valbuf)",
1905 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1910 (long) current_gdbarch
->store_return_value
1911 /*STORE_RETURN_VALUE ()*/);
1913 #ifdef STORE_STRUCT_RETURN
1915 /* Macro might contain `[{}]' when not multi-arch */
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: %s # %s\n",
1918 "STORE_STRUCT_RETURN(addr, sp)",
1919 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1924 (long) current_gdbarch
->store_struct_return
1925 /*STORE_STRUCT_RETURN ()*/);
1927 #ifdef TARGET_ADDR_BIT
1928 fprintf_unfiltered (file
,
1929 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1930 XSTRING (TARGET_ADDR_BIT
));
1931 fprintf_unfiltered (file
,
1932 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1935 #ifdef TARGET_ARCHITECTURE
1936 fprintf_unfiltered (file
,
1937 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1938 XSTRING (TARGET_ARCHITECTURE
));
1939 if (TARGET_ARCHITECTURE
!= NULL
)
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1942 TARGET_ARCHITECTURE
->printable_name
);
1944 #ifdef TARGET_BFD_VMA_BIT
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1947 XSTRING (TARGET_BFD_VMA_BIT
));
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1950 TARGET_BFD_VMA_BIT
);
1952 #ifdef TARGET_BYTE_ORDER
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1955 XSTRING (TARGET_BYTE_ORDER
));
1956 fprintf_unfiltered (file
,
1957 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1958 (long) TARGET_BYTE_ORDER
);
1960 #ifdef TARGET_CHAR_SIGNED
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1963 XSTRING (TARGET_CHAR_SIGNED
));
1964 fprintf_unfiltered (file
,
1965 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1966 TARGET_CHAR_SIGNED
);
1968 #ifdef TARGET_DOUBLE_BIT
1969 fprintf_unfiltered (file
,
1970 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1971 XSTRING (TARGET_DOUBLE_BIT
));
1972 fprintf_unfiltered (file
,
1973 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1976 #ifdef TARGET_DOUBLE_FORMAT
1977 fprintf_unfiltered (file
,
1978 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1979 XSTRING (TARGET_DOUBLE_FORMAT
));
1980 fprintf_unfiltered (file
,
1981 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1982 (long) TARGET_DOUBLE_FORMAT
);
1984 #ifdef TARGET_FLOAT_BIT
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1987 XSTRING (TARGET_FLOAT_BIT
));
1988 fprintf_unfiltered (file
,
1989 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1992 #ifdef TARGET_FLOAT_FORMAT
1993 fprintf_unfiltered (file
,
1994 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1995 XSTRING (TARGET_FLOAT_FORMAT
));
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1998 (long) TARGET_FLOAT_FORMAT
);
2000 #ifdef TARGET_INT_BIT
2001 fprintf_unfiltered (file
,
2002 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2003 XSTRING (TARGET_INT_BIT
));
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2008 #ifdef TARGET_LONG_BIT
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2011 XSTRING (TARGET_LONG_BIT
));
2012 fprintf_unfiltered (file
,
2013 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2016 #ifdef TARGET_LONG_DOUBLE_BIT
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2019 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2022 TARGET_LONG_DOUBLE_BIT
);
2024 #ifdef TARGET_LONG_DOUBLE_FORMAT
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2027 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2028 fprintf_unfiltered (file
,
2029 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2030 (long) TARGET_LONG_DOUBLE_FORMAT
);
2032 #ifdef TARGET_LONG_LONG_BIT
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2035 XSTRING (TARGET_LONG_LONG_BIT
));
2036 fprintf_unfiltered (file
,
2037 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2038 TARGET_LONG_LONG_BIT
);
2040 #ifdef TARGET_PRINT_INSN
2041 fprintf_unfiltered (file
,
2042 "gdbarch_dump: %s # %s\n",
2043 "TARGET_PRINT_INSN(vma, info)",
2044 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2048 (long) current_gdbarch
->print_insn
2049 /*TARGET_PRINT_INSN ()*/);
2051 #ifdef TARGET_PTR_BIT
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2054 XSTRING (TARGET_PTR_BIT
));
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2059 #ifdef TARGET_READ_FP
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: %s # %s\n",
2063 XSTRING (TARGET_READ_FP ()));
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2067 (long) current_gdbarch
->read_fp
2068 /*TARGET_READ_FP ()*/);
2070 #ifdef TARGET_READ_PC
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: %s # %s\n",
2073 "TARGET_READ_PC(ptid)",
2074 XSTRING (TARGET_READ_PC (ptid
)));
2076 fprintf_unfiltered (file
,
2077 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2078 (long) current_gdbarch
->read_pc
2079 /*TARGET_READ_PC ()*/);
2081 #ifdef TARGET_READ_SP
2082 fprintf_unfiltered (file
,
2083 "gdbarch_dump: %s # %s\n",
2085 XSTRING (TARGET_READ_SP ()));
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2089 (long) current_gdbarch
->read_sp
2090 /*TARGET_READ_SP ()*/);
2092 #ifdef TARGET_SHORT_BIT
2093 fprintf_unfiltered (file
,
2094 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2095 XSTRING (TARGET_SHORT_BIT
));
2096 fprintf_unfiltered (file
,
2097 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2100 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2102 /* Macro might contain `[{}]' when not multi-arch */
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: %s # %s\n",
2105 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2106 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2111 (long) current_gdbarch
->virtual_frame_pointer
2112 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2114 #ifdef TARGET_WRITE_PC
2116 /* Macro might contain `[{}]' when not multi-arch */
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: %s # %s\n",
2119 "TARGET_WRITE_PC(val, ptid)",
2120 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2125 (long) current_gdbarch
->write_pc
2126 /*TARGET_WRITE_PC ()*/);
2128 #ifdef TARGET_WRITE_SP
2130 /* Macro might contain `[{}]' when not multi-arch */
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: %s # %s\n",
2133 "TARGET_WRITE_SP(val)",
2134 XSTRING (TARGET_WRITE_SP (val
)));
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2139 (long) current_gdbarch
->write_sp
2140 /*TARGET_WRITE_SP ()*/);
2142 #ifdef USE_GENERIC_DUMMY_FRAMES
2143 fprintf_unfiltered (file
,
2144 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2145 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2146 fprintf_unfiltered (file
,
2147 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2148 USE_GENERIC_DUMMY_FRAMES
);
2150 #ifdef USE_STRUCT_CONVENTION
2151 fprintf_unfiltered (file
,
2152 "gdbarch_dump: %s # %s\n",
2153 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2154 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2156 fprintf_unfiltered (file
,
2157 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2158 (long) current_gdbarch
->use_struct_convention
2159 /*USE_STRUCT_CONVENTION ()*/);
2161 if (current_gdbarch
->dump_tdep
!= NULL
)
2162 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2165 struct gdbarch_tdep
*
2166 gdbarch_tdep (struct gdbarch
*gdbarch
)
2168 if (gdbarch_debug
>= 2)
2169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2170 return gdbarch
->tdep
;
2174 const struct bfd_arch_info
*
2175 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2177 gdb_assert (gdbarch
!= NULL
);
2178 if (gdbarch_debug
>= 2)
2179 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2180 return gdbarch
->bfd_arch_info
;
2184 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2186 gdb_assert (gdbarch
!= NULL
);
2187 if (gdbarch_debug
>= 2)
2188 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2189 return gdbarch
->byte_order
;
2193 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2195 gdb_assert (gdbarch
!= NULL
);
2196 /* Skip verify of short_bit, invalid_p == 0 */
2197 if (gdbarch_debug
>= 2)
2198 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2199 return gdbarch
->short_bit
;
2203 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2206 gdbarch
->short_bit
= short_bit
;
2210 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2212 gdb_assert (gdbarch
!= NULL
);
2213 /* Skip verify of int_bit, invalid_p == 0 */
2214 if (gdbarch_debug
>= 2)
2215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2216 return gdbarch
->int_bit
;
2220 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2223 gdbarch
->int_bit
= int_bit
;
2227 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2229 gdb_assert (gdbarch
!= NULL
);
2230 /* Skip verify of long_bit, invalid_p == 0 */
2231 if (gdbarch_debug
>= 2)
2232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2233 return gdbarch
->long_bit
;
2237 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2240 gdbarch
->long_bit
= long_bit
;
2244 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2246 gdb_assert (gdbarch
!= NULL
);
2247 /* Skip verify of long_long_bit, invalid_p == 0 */
2248 if (gdbarch_debug
>= 2)
2249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2250 return gdbarch
->long_long_bit
;
2254 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2257 gdbarch
->long_long_bit
= long_long_bit
;
2261 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2263 gdb_assert (gdbarch
!= NULL
);
2264 /* Skip verify of float_bit, invalid_p == 0 */
2265 if (gdbarch_debug
>= 2)
2266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2267 return gdbarch
->float_bit
;
2271 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2274 gdbarch
->float_bit
= float_bit
;
2278 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2280 gdb_assert (gdbarch
!= NULL
);
2281 /* Skip verify of double_bit, invalid_p == 0 */
2282 if (gdbarch_debug
>= 2)
2283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2284 return gdbarch
->double_bit
;
2288 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2291 gdbarch
->double_bit
= double_bit
;
2295 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2297 gdb_assert (gdbarch
!= NULL
);
2298 /* Skip verify of long_double_bit, invalid_p == 0 */
2299 if (gdbarch_debug
>= 2)
2300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2301 return gdbarch
->long_double_bit
;
2305 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2306 int long_double_bit
)
2308 gdbarch
->long_double_bit
= long_double_bit
;
2312 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2314 gdb_assert (gdbarch
!= NULL
);
2315 /* Skip verify of ptr_bit, invalid_p == 0 */
2316 if (gdbarch_debug
>= 2)
2317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2318 return gdbarch
->ptr_bit
;
2322 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2325 gdbarch
->ptr_bit
= ptr_bit
;
2329 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2331 gdb_assert (gdbarch
!= NULL
);
2332 if (gdbarch
->addr_bit
== 0)
2333 internal_error (__FILE__
, __LINE__
,
2334 "gdbarch: gdbarch_addr_bit invalid");
2335 if (gdbarch_debug
>= 2)
2336 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2337 return gdbarch
->addr_bit
;
2341 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2344 gdbarch
->addr_bit
= addr_bit
;
2348 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2350 gdb_assert (gdbarch
!= NULL
);
2351 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2352 if (gdbarch_debug
>= 2)
2353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2354 return gdbarch
->bfd_vma_bit
;
2358 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2361 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2365 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2367 gdb_assert (gdbarch
!= NULL
);
2368 if (gdbarch
->char_signed
== -1)
2369 internal_error (__FILE__
, __LINE__
,
2370 "gdbarch: gdbarch_char_signed invalid");
2371 if (gdbarch_debug
>= 2)
2372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2373 return gdbarch
->char_signed
;
2377 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2380 gdbarch
->char_signed
= char_signed
;
2384 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2386 gdb_assert (gdbarch
!= NULL
);
2387 if (gdbarch
->read_pc
== 0)
2388 internal_error (__FILE__
, __LINE__
,
2389 "gdbarch: gdbarch_read_pc invalid");
2390 if (gdbarch_debug
>= 2)
2391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2392 return gdbarch
->read_pc (ptid
);
2396 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2397 gdbarch_read_pc_ftype read_pc
)
2399 gdbarch
->read_pc
= read_pc
;
2403 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2405 gdb_assert (gdbarch
!= NULL
);
2406 if (gdbarch
->write_pc
== 0)
2407 internal_error (__FILE__
, __LINE__
,
2408 "gdbarch: gdbarch_write_pc invalid");
2409 if (gdbarch_debug
>= 2)
2410 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2411 gdbarch
->write_pc (val
, ptid
);
2415 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2416 gdbarch_write_pc_ftype write_pc
)
2418 gdbarch
->write_pc
= write_pc
;
2422 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2424 gdb_assert (gdbarch
!= NULL
);
2425 if (gdbarch
->read_fp
== 0)
2426 internal_error (__FILE__
, __LINE__
,
2427 "gdbarch: gdbarch_read_fp invalid");
2428 if (gdbarch_debug
>= 2)
2429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2430 return gdbarch
->read_fp ();
2434 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2435 gdbarch_read_fp_ftype read_fp
)
2437 gdbarch
->read_fp
= read_fp
;
2441 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2443 gdb_assert (gdbarch
!= NULL
);
2444 if (gdbarch
->read_sp
== 0)
2445 internal_error (__FILE__
, __LINE__
,
2446 "gdbarch: gdbarch_read_sp invalid");
2447 if (gdbarch_debug
>= 2)
2448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2449 return gdbarch
->read_sp ();
2453 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2454 gdbarch_read_sp_ftype read_sp
)
2456 gdbarch
->read_sp
= read_sp
;
2460 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2462 gdb_assert (gdbarch
!= NULL
);
2463 if (gdbarch
->write_sp
== 0)
2464 internal_error (__FILE__
, __LINE__
,
2465 "gdbarch: gdbarch_write_sp invalid");
2466 if (gdbarch_debug
>= 2)
2467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2468 gdbarch
->write_sp (val
);
2472 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2473 gdbarch_write_sp_ftype write_sp
)
2475 gdbarch
->write_sp
= write_sp
;
2479 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2481 gdb_assert (gdbarch
!= NULL
);
2482 if (gdbarch
->virtual_frame_pointer
== 0)
2483 internal_error (__FILE__
, __LINE__
,
2484 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2485 if (gdbarch_debug
>= 2)
2486 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2487 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2491 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2492 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2494 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2498 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2500 gdb_assert (gdbarch
!= NULL
);
2501 return gdbarch
->register_read
!= 0;
2505 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2507 gdb_assert (gdbarch
!= NULL
);
2508 if (gdbarch
->register_read
== 0)
2509 internal_error (__FILE__
, __LINE__
,
2510 "gdbarch: gdbarch_register_read invalid");
2511 if (gdbarch_debug
>= 2)
2512 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2513 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2517 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2518 gdbarch_register_read_ftype register_read
)
2520 gdbarch
->register_read
= register_read
;
2524 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2526 gdb_assert (gdbarch
!= NULL
);
2527 return gdbarch
->register_write
!= 0;
2531 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2533 gdb_assert (gdbarch
!= NULL
);
2534 if (gdbarch
->register_write
== 0)
2535 internal_error (__FILE__
, __LINE__
,
2536 "gdbarch: gdbarch_register_write invalid");
2537 if (gdbarch_debug
>= 2)
2538 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2539 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2543 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2544 gdbarch_register_write_ftype register_write
)
2546 gdbarch
->register_write
= register_write
;
2550 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2552 gdb_assert (gdbarch
!= NULL
);
2553 if (gdbarch
->num_regs
== -1)
2554 internal_error (__FILE__
, __LINE__
,
2555 "gdbarch: gdbarch_num_regs invalid");
2556 if (gdbarch_debug
>= 2)
2557 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2558 return gdbarch
->num_regs
;
2562 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2565 gdbarch
->num_regs
= num_regs
;
2569 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2571 gdb_assert (gdbarch
!= NULL
);
2572 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2573 if (gdbarch_debug
>= 2)
2574 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2575 return gdbarch
->num_pseudo_regs
;
2579 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2580 int num_pseudo_regs
)
2582 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2586 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2588 gdb_assert (gdbarch
!= NULL
);
2589 /* Skip verify of sp_regnum, invalid_p == 0 */
2590 if (gdbarch_debug
>= 2)
2591 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2592 return gdbarch
->sp_regnum
;
2596 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2599 gdbarch
->sp_regnum
= sp_regnum
;
2603 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2605 gdb_assert (gdbarch
!= NULL
);
2606 /* Skip verify of fp_regnum, invalid_p == 0 */
2607 if (gdbarch_debug
>= 2)
2608 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2609 return gdbarch
->fp_regnum
;
2613 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2616 gdbarch
->fp_regnum
= fp_regnum
;
2620 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2622 gdb_assert (gdbarch
!= NULL
);
2623 /* Skip verify of pc_regnum, invalid_p == 0 */
2624 if (gdbarch_debug
>= 2)
2625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2626 return gdbarch
->pc_regnum
;
2630 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2633 gdbarch
->pc_regnum
= pc_regnum
;
2637 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2639 gdb_assert (gdbarch
!= NULL
);
2640 /* Skip verify of ps_regnum, invalid_p == 0 */
2641 if (gdbarch_debug
>= 2)
2642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2643 return gdbarch
->ps_regnum
;
2647 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2650 gdbarch
->ps_regnum
= ps_regnum
;
2654 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2656 gdb_assert (gdbarch
!= NULL
);
2657 /* Skip verify of fp0_regnum, invalid_p == 0 */
2658 if (gdbarch_debug
>= 2)
2659 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2660 return gdbarch
->fp0_regnum
;
2664 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2667 gdbarch
->fp0_regnum
= fp0_regnum
;
2671 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2673 gdb_assert (gdbarch
!= NULL
);
2674 /* Skip verify of npc_regnum, invalid_p == 0 */
2675 if (gdbarch_debug
>= 2)
2676 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2677 return gdbarch
->npc_regnum
;
2681 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2684 gdbarch
->npc_regnum
= npc_regnum
;
2688 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2690 gdb_assert (gdbarch
!= NULL
);
2691 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2692 if (gdbarch_debug
>= 2)
2693 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2694 return gdbarch
->nnpc_regnum
;
2698 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2701 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2705 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2707 gdb_assert (gdbarch
!= NULL
);
2708 if (gdbarch
->stab_reg_to_regnum
== 0)
2709 internal_error (__FILE__
, __LINE__
,
2710 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2711 if (gdbarch_debug
>= 2)
2712 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2713 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2717 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2718 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2720 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2724 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2726 gdb_assert (gdbarch
!= NULL
);
2727 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2728 internal_error (__FILE__
, __LINE__
,
2729 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2730 if (gdbarch_debug
>= 2)
2731 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2732 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2736 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2737 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2739 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2743 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2745 gdb_assert (gdbarch
!= NULL
);
2746 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2747 internal_error (__FILE__
, __LINE__
,
2748 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2749 if (gdbarch_debug
>= 2)
2750 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2751 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2755 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2756 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2758 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2762 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2764 gdb_assert (gdbarch
!= NULL
);
2765 if (gdbarch
->sdb_reg_to_regnum
== 0)
2766 internal_error (__FILE__
, __LINE__
,
2767 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2768 if (gdbarch_debug
>= 2)
2769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2770 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2774 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2775 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2777 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2781 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2783 gdb_assert (gdbarch
!= NULL
);
2784 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2785 internal_error (__FILE__
, __LINE__
,
2786 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2787 if (gdbarch_debug
>= 2)
2788 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2789 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2793 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2794 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2796 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2800 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2802 gdb_assert (gdbarch
!= NULL
);
2803 if (gdbarch
->register_name
== 0)
2804 internal_error (__FILE__
, __LINE__
,
2805 "gdbarch: gdbarch_register_name invalid");
2806 if (gdbarch_debug
>= 2)
2807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2808 return gdbarch
->register_name (regnr
);
2812 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2813 gdbarch_register_name_ftype register_name
)
2815 gdbarch
->register_name
= register_name
;
2819 gdbarch_register_size (struct gdbarch
*gdbarch
)
2821 gdb_assert (gdbarch
!= NULL
);
2822 if (gdbarch
->register_size
== -1)
2823 internal_error (__FILE__
, __LINE__
,
2824 "gdbarch: gdbarch_register_size invalid");
2825 if (gdbarch_debug
>= 2)
2826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2827 return gdbarch
->register_size
;
2831 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2834 gdbarch
->register_size
= register_size
;
2838 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2840 gdb_assert (gdbarch
!= NULL
);
2841 if (gdbarch
->register_bytes
== -1)
2842 internal_error (__FILE__
, __LINE__
,
2843 "gdbarch: gdbarch_register_bytes invalid");
2844 if (gdbarch_debug
>= 2)
2845 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2846 return gdbarch
->register_bytes
;
2850 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2853 gdbarch
->register_bytes
= register_bytes
;
2857 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2859 gdb_assert (gdbarch
!= NULL
);
2860 if (gdbarch
->register_byte
== 0)
2861 internal_error (__FILE__
, __LINE__
,
2862 "gdbarch: gdbarch_register_byte invalid");
2863 if (gdbarch_debug
>= 2)
2864 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2865 return gdbarch
->register_byte (reg_nr
);
2869 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2870 gdbarch_register_byte_ftype register_byte
)
2872 gdbarch
->register_byte
= register_byte
;
2876 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2878 gdb_assert (gdbarch
!= NULL
);
2879 if (gdbarch
->register_raw_size
== 0)
2880 internal_error (__FILE__
, __LINE__
,
2881 "gdbarch: gdbarch_register_raw_size invalid");
2882 if (gdbarch_debug
>= 2)
2883 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2884 return gdbarch
->register_raw_size (reg_nr
);
2888 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2889 gdbarch_register_raw_size_ftype register_raw_size
)
2891 gdbarch
->register_raw_size
= register_raw_size
;
2895 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2897 gdb_assert (gdbarch
!= NULL
);
2898 if (gdbarch
->max_register_raw_size
== -1)
2899 internal_error (__FILE__
, __LINE__
,
2900 "gdbarch: gdbarch_max_register_raw_size invalid");
2901 if (gdbarch_debug
>= 2)
2902 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2903 return gdbarch
->max_register_raw_size
;
2907 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2908 int max_register_raw_size
)
2910 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2914 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2916 gdb_assert (gdbarch
!= NULL
);
2917 if (gdbarch
->register_virtual_size
== 0)
2918 internal_error (__FILE__
, __LINE__
,
2919 "gdbarch: gdbarch_register_virtual_size invalid");
2920 if (gdbarch_debug
>= 2)
2921 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2922 return gdbarch
->register_virtual_size (reg_nr
);
2926 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2927 gdbarch_register_virtual_size_ftype register_virtual_size
)
2929 gdbarch
->register_virtual_size
= register_virtual_size
;
2933 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2935 gdb_assert (gdbarch
!= NULL
);
2936 if (gdbarch
->max_register_virtual_size
== -1)
2937 internal_error (__FILE__
, __LINE__
,
2938 "gdbarch: gdbarch_max_register_virtual_size invalid");
2939 if (gdbarch_debug
>= 2)
2940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2941 return gdbarch
->max_register_virtual_size
;
2945 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2946 int max_register_virtual_size
)
2948 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2952 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2954 gdb_assert (gdbarch
!= NULL
);
2955 if (gdbarch
->register_virtual_type
== 0)
2956 internal_error (__FILE__
, __LINE__
,
2957 "gdbarch: gdbarch_register_virtual_type invalid");
2958 if (gdbarch_debug
>= 2)
2959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2960 return gdbarch
->register_virtual_type (reg_nr
);
2964 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2965 gdbarch_register_virtual_type_ftype register_virtual_type
)
2967 gdbarch
->register_virtual_type
= register_virtual_type
;
2971 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2973 gdb_assert (gdbarch
!= NULL
);
2974 if (gdbarch
->do_registers_info
== 0)
2975 internal_error (__FILE__
, __LINE__
,
2976 "gdbarch: gdbarch_do_registers_info invalid");
2977 if (gdbarch_debug
>= 2)
2978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2979 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2983 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2984 gdbarch_do_registers_info_ftype do_registers_info
)
2986 gdbarch
->do_registers_info
= do_registers_info
;
2990 gdbarch_print_float_info (struct gdbarch
*gdbarch
)
2992 gdb_assert (gdbarch
!= NULL
);
2993 if (gdbarch
->print_float_info
== 0)
2994 internal_error (__FILE__
, __LINE__
,
2995 "gdbarch: gdbarch_print_float_info invalid");
2996 if (gdbarch_debug
>= 2)
2997 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2998 gdbarch
->print_float_info ();
3002 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3003 gdbarch_print_float_info_ftype print_float_info
)
3005 gdbarch
->print_float_info
= print_float_info
;
3009 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3011 gdb_assert (gdbarch
!= NULL
);
3012 if (gdbarch
->register_sim_regno
== 0)
3013 internal_error (__FILE__
, __LINE__
,
3014 "gdbarch: gdbarch_register_sim_regno invalid");
3015 if (gdbarch_debug
>= 2)
3016 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3017 return gdbarch
->register_sim_regno (reg_nr
);
3021 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3022 gdbarch_register_sim_regno_ftype register_sim_regno
)
3024 gdbarch
->register_sim_regno
= register_sim_regno
;
3028 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3030 gdb_assert (gdbarch
!= NULL
);
3031 return gdbarch
->register_bytes_ok
!= 0;
3035 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3037 gdb_assert (gdbarch
!= NULL
);
3038 if (gdbarch
->register_bytes_ok
== 0)
3039 internal_error (__FILE__
, __LINE__
,
3040 "gdbarch: gdbarch_register_bytes_ok invalid");
3041 if (gdbarch_debug
>= 2)
3042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3043 return gdbarch
->register_bytes_ok (nr_bytes
);
3047 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3048 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3050 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3054 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3056 gdb_assert (gdbarch
!= NULL
);
3057 if (gdbarch
->cannot_fetch_register
== 0)
3058 internal_error (__FILE__
, __LINE__
,
3059 "gdbarch: gdbarch_cannot_fetch_register invalid");
3060 if (gdbarch_debug
>= 2)
3061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3062 return gdbarch
->cannot_fetch_register (regnum
);
3066 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3067 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3069 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3073 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3075 gdb_assert (gdbarch
!= NULL
);
3076 if (gdbarch
->cannot_store_register
== 0)
3077 internal_error (__FILE__
, __LINE__
,
3078 "gdbarch: gdbarch_cannot_store_register invalid");
3079 if (gdbarch_debug
>= 2)
3080 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3081 return gdbarch
->cannot_store_register (regnum
);
3085 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3086 gdbarch_cannot_store_register_ftype cannot_store_register
)
3088 gdbarch
->cannot_store_register
= cannot_store_register
;
3092 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3094 gdb_assert (gdbarch
!= NULL
);
3095 return gdbarch
->get_longjmp_target
!= 0;
3099 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3101 gdb_assert (gdbarch
!= NULL
);
3102 if (gdbarch
->get_longjmp_target
== 0)
3103 internal_error (__FILE__
, __LINE__
,
3104 "gdbarch: gdbarch_get_longjmp_target invalid");
3105 if (gdbarch_debug
>= 2)
3106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3107 return gdbarch
->get_longjmp_target (pc
);
3111 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3112 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3114 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3118 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3120 gdb_assert (gdbarch
!= NULL
);
3121 if (gdbarch
->use_generic_dummy_frames
== -1)
3122 internal_error (__FILE__
, __LINE__
,
3123 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3124 if (gdbarch_debug
>= 2)
3125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3126 return gdbarch
->use_generic_dummy_frames
;
3130 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3131 int use_generic_dummy_frames
)
3133 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3137 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3139 gdb_assert (gdbarch
!= NULL
);
3140 if (gdbarch
->call_dummy_location
== 0)
3141 internal_error (__FILE__
, __LINE__
,
3142 "gdbarch: gdbarch_call_dummy_location invalid");
3143 if (gdbarch_debug
>= 2)
3144 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3145 return gdbarch
->call_dummy_location
;
3149 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3150 int call_dummy_location
)
3152 gdbarch
->call_dummy_location
= call_dummy_location
;
3156 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3158 gdb_assert (gdbarch
!= NULL
);
3159 if (gdbarch
->call_dummy_address
== 0)
3160 internal_error (__FILE__
, __LINE__
,
3161 "gdbarch: gdbarch_call_dummy_address invalid");
3162 if (gdbarch_debug
>= 2)
3163 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3164 return gdbarch
->call_dummy_address ();
3168 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3169 gdbarch_call_dummy_address_ftype call_dummy_address
)
3171 gdbarch
->call_dummy_address
= call_dummy_address
;
3175 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3177 gdb_assert (gdbarch
!= NULL
);
3178 if (gdbarch
->call_dummy_start_offset
== -1)
3179 internal_error (__FILE__
, __LINE__
,
3180 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3181 if (gdbarch_debug
>= 2)
3182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3183 return gdbarch
->call_dummy_start_offset
;
3187 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3188 CORE_ADDR call_dummy_start_offset
)
3190 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3194 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3196 gdb_assert (gdbarch
!= NULL
);
3197 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3198 internal_error (__FILE__
, __LINE__
,
3199 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3200 if (gdbarch_debug
>= 2)
3201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3202 return gdbarch
->call_dummy_breakpoint_offset
;
3206 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3207 CORE_ADDR call_dummy_breakpoint_offset
)
3209 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3213 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3215 gdb_assert (gdbarch
!= NULL
);
3216 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3217 internal_error (__FILE__
, __LINE__
,
3218 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3219 if (gdbarch_debug
>= 2)
3220 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3221 return gdbarch
->call_dummy_breakpoint_offset_p
;
3225 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3226 int call_dummy_breakpoint_offset_p
)
3228 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3232 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3234 gdb_assert (gdbarch
!= NULL
);
3235 if (gdbarch
->call_dummy_length
== -1)
3236 internal_error (__FILE__
, __LINE__
,
3237 "gdbarch: gdbarch_call_dummy_length invalid");
3238 if (gdbarch_debug
>= 2)
3239 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3240 return gdbarch
->call_dummy_length
;
3244 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3245 int call_dummy_length
)
3247 gdbarch
->call_dummy_length
= call_dummy_length
;
3251 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3253 gdb_assert (gdbarch
!= NULL
);
3254 if (gdbarch
->pc_in_call_dummy
== 0)
3255 internal_error (__FILE__
, __LINE__
,
3256 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3257 if (gdbarch_debug
>= 2)
3258 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3259 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3263 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3264 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3266 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3270 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3272 gdb_assert (gdbarch
!= NULL
);
3273 if (gdbarch
->call_dummy_p
== -1)
3274 internal_error (__FILE__
, __LINE__
,
3275 "gdbarch: gdbarch_call_dummy_p invalid");
3276 if (gdbarch_debug
>= 2)
3277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3278 return gdbarch
->call_dummy_p
;
3282 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3285 gdbarch
->call_dummy_p
= call_dummy_p
;
3289 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3291 gdb_assert (gdbarch
!= NULL
);
3292 /* Skip verify of call_dummy_words, invalid_p == 0 */
3293 if (gdbarch_debug
>= 2)
3294 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3295 return gdbarch
->call_dummy_words
;
3299 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3300 LONGEST
* call_dummy_words
)
3302 gdbarch
->call_dummy_words
= call_dummy_words
;
3306 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3308 gdb_assert (gdbarch
!= NULL
);
3309 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3310 if (gdbarch_debug
>= 2)
3311 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3312 return gdbarch
->sizeof_call_dummy_words
;
3316 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3317 int sizeof_call_dummy_words
)
3319 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3323 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3325 gdb_assert (gdbarch
!= NULL
);
3326 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3327 internal_error (__FILE__
, __LINE__
,
3328 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3329 if (gdbarch_debug
>= 2)
3330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3331 return gdbarch
->call_dummy_stack_adjust_p
;
3335 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3336 int call_dummy_stack_adjust_p
)
3338 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3342 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3344 gdb_assert (gdbarch
!= NULL
);
3345 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3346 internal_error (__FILE__
, __LINE__
,
3347 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3348 if (gdbarch_debug
>= 2)
3349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3350 return gdbarch
->call_dummy_stack_adjust
;
3354 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3355 int call_dummy_stack_adjust
)
3357 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3361 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
)
3363 gdb_assert (gdbarch
!= NULL
);
3364 if (gdbarch
->fix_call_dummy
== 0)
3365 internal_error (__FILE__
, __LINE__
,
3366 "gdbarch: gdbarch_fix_call_dummy invalid");
3367 if (gdbarch_debug
>= 2)
3368 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3369 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3373 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3374 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3376 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3380 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3382 gdb_assert (gdbarch
!= NULL
);
3383 if (gdbarch
->init_frame_pc_first
== 0)
3384 internal_error (__FILE__
, __LINE__
,
3385 "gdbarch: gdbarch_init_frame_pc_first invalid");
3386 if (gdbarch_debug
>= 2)
3387 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3388 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3392 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3393 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3395 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3399 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3401 gdb_assert (gdbarch
!= NULL
);
3402 if (gdbarch
->init_frame_pc
== 0)
3403 internal_error (__FILE__
, __LINE__
,
3404 "gdbarch: gdbarch_init_frame_pc invalid");
3405 if (gdbarch_debug
>= 2)
3406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3407 gdbarch
->init_frame_pc (fromleaf
, prev
);
3411 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3412 gdbarch_init_frame_pc_ftype init_frame_pc
)
3414 gdbarch
->init_frame_pc
= init_frame_pc
;
3418 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3420 gdb_assert (gdbarch
!= NULL
);
3421 if (gdbarch_debug
>= 2)
3422 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3423 return gdbarch
->believe_pcc_promotion
;
3427 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3428 int believe_pcc_promotion
)
3430 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3434 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3436 gdb_assert (gdbarch
!= NULL
);
3437 if (gdbarch_debug
>= 2)
3438 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3439 return gdbarch
->believe_pcc_promotion_type
;
3443 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3444 int believe_pcc_promotion_type
)
3446 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3450 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3452 gdb_assert (gdbarch
!= NULL
);
3453 if (gdbarch
->coerce_float_to_double
== 0)
3454 internal_error (__FILE__
, __LINE__
,
3455 "gdbarch: gdbarch_coerce_float_to_double invalid");
3456 if (gdbarch_debug
>= 2)
3457 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3458 return gdbarch
->coerce_float_to_double (formal
, actual
);
3462 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3463 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3465 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3469 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
)
3471 gdb_assert (gdbarch
!= NULL
);
3472 if (gdbarch
->get_saved_register
== 0)
3473 internal_error (__FILE__
, __LINE__
,
3474 "gdbarch: gdbarch_get_saved_register invalid");
3475 if (gdbarch_debug
>= 2)
3476 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3477 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3481 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3482 gdbarch_get_saved_register_ftype get_saved_register
)
3484 gdbarch
->get_saved_register
= get_saved_register
;
3488 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3490 gdb_assert (gdbarch
!= NULL
);
3491 if (gdbarch
->register_convertible
== 0)
3492 internal_error (__FILE__
, __LINE__
,
3493 "gdbarch: gdbarch_register_convertible invalid");
3494 if (gdbarch_debug
>= 2)
3495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3496 return gdbarch
->register_convertible (nr
);
3500 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3501 gdbarch_register_convertible_ftype register_convertible
)
3503 gdbarch
->register_convertible
= register_convertible
;
3507 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3509 gdb_assert (gdbarch
!= NULL
);
3510 if (gdbarch
->register_convert_to_virtual
== 0)
3511 internal_error (__FILE__
, __LINE__
,
3512 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3513 if (gdbarch_debug
>= 2)
3514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3515 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3519 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3520 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3522 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3526 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3528 gdb_assert (gdbarch
!= NULL
);
3529 if (gdbarch
->register_convert_to_raw
== 0)
3530 internal_error (__FILE__
, __LINE__
,
3531 "gdbarch: gdbarch_register_convert_to_raw invalid");
3532 if (gdbarch_debug
>= 2)
3533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3534 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3538 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3539 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3541 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3545 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3547 gdb_assert (gdbarch
!= NULL
);
3548 return gdbarch
->fetch_pseudo_register
!= 0;
3552 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3554 gdb_assert (gdbarch
!= NULL
);
3555 if (gdbarch
->fetch_pseudo_register
== 0)
3556 internal_error (__FILE__
, __LINE__
,
3557 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3558 if (gdbarch_debug
>= 2)
3559 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3560 gdbarch
->fetch_pseudo_register (regnum
);
3564 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3565 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3567 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3571 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3573 gdb_assert (gdbarch
!= NULL
);
3574 return gdbarch
->store_pseudo_register
!= 0;
3578 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3580 gdb_assert (gdbarch
!= NULL
);
3581 if (gdbarch
->store_pseudo_register
== 0)
3582 internal_error (__FILE__
, __LINE__
,
3583 "gdbarch: gdbarch_store_pseudo_register invalid");
3584 if (gdbarch_debug
>= 2)
3585 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3586 gdbarch
->store_pseudo_register (regnum
);
3590 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3591 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3593 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3597 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3599 gdb_assert (gdbarch
!= NULL
);
3600 if (gdbarch
->pointer_to_address
== 0)
3601 internal_error (__FILE__
, __LINE__
,
3602 "gdbarch: gdbarch_pointer_to_address invalid");
3603 if (gdbarch_debug
>= 2)
3604 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3605 return gdbarch
->pointer_to_address (type
, buf
);
3609 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3610 gdbarch_pointer_to_address_ftype pointer_to_address
)
3612 gdbarch
->pointer_to_address
= pointer_to_address
;
3616 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3618 gdb_assert (gdbarch
!= NULL
);
3619 if (gdbarch
->address_to_pointer
== 0)
3620 internal_error (__FILE__
, __LINE__
,
3621 "gdbarch: gdbarch_address_to_pointer invalid");
3622 if (gdbarch_debug
>= 2)
3623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3624 gdbarch
->address_to_pointer (type
, buf
, addr
);
3628 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3629 gdbarch_address_to_pointer_ftype address_to_pointer
)
3631 gdbarch
->address_to_pointer
= address_to_pointer
;
3635 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3637 gdb_assert (gdbarch
!= NULL
);
3638 return gdbarch
->integer_to_address
!= 0;
3642 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3644 gdb_assert (gdbarch
!= NULL
);
3645 if (gdbarch
->integer_to_address
== 0)
3646 internal_error (__FILE__
, __LINE__
,
3647 "gdbarch: gdbarch_integer_to_address invalid");
3648 if (gdbarch_debug
>= 2)
3649 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3650 return gdbarch
->integer_to_address (type
, buf
);
3654 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3655 gdbarch_integer_to_address_ftype integer_to_address
)
3657 gdbarch
->integer_to_address
= integer_to_address
;
3661 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3663 gdb_assert (gdbarch
!= NULL
);
3664 if (gdbarch
->return_value_on_stack
== 0)
3665 internal_error (__FILE__
, __LINE__
,
3666 "gdbarch: gdbarch_return_value_on_stack invalid");
3667 if (gdbarch_debug
>= 2)
3668 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3669 return gdbarch
->return_value_on_stack (type
);
3673 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3674 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3676 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3680 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3682 gdb_assert (gdbarch
!= NULL
);
3683 if (gdbarch
->extract_return_value
== 0)
3684 internal_error (__FILE__
, __LINE__
,
3685 "gdbarch: gdbarch_extract_return_value invalid");
3686 if (gdbarch_debug
>= 2)
3687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3688 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3692 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3693 gdbarch_extract_return_value_ftype extract_return_value
)
3695 gdbarch
->extract_return_value
= extract_return_value
;
3699 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3701 gdb_assert (gdbarch
!= NULL
);
3702 if (gdbarch
->push_arguments
== 0)
3703 internal_error (__FILE__
, __LINE__
,
3704 "gdbarch: gdbarch_push_arguments invalid");
3705 if (gdbarch_debug
>= 2)
3706 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3707 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3711 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3712 gdbarch_push_arguments_ftype push_arguments
)
3714 gdbarch
->push_arguments
= push_arguments
;
3718 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3720 gdb_assert (gdbarch
!= NULL
);
3721 if (gdbarch
->push_dummy_frame
== 0)
3722 internal_error (__FILE__
, __LINE__
,
3723 "gdbarch: gdbarch_push_dummy_frame invalid");
3724 if (gdbarch_debug
>= 2)
3725 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3726 gdbarch
->push_dummy_frame ();
3730 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3731 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3733 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3737 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3739 gdb_assert (gdbarch
!= NULL
);
3740 return gdbarch
->push_return_address
!= 0;
3744 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3746 gdb_assert (gdbarch
!= NULL
);
3747 if (gdbarch
->push_return_address
== 0)
3748 internal_error (__FILE__
, __LINE__
,
3749 "gdbarch: gdbarch_push_return_address invalid");
3750 if (gdbarch_debug
>= 2)
3751 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3752 return gdbarch
->push_return_address (pc
, sp
);
3756 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3757 gdbarch_push_return_address_ftype push_return_address
)
3759 gdbarch
->push_return_address
= push_return_address
;
3763 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3765 gdb_assert (gdbarch
!= NULL
);
3766 if (gdbarch
->pop_frame
== 0)
3767 internal_error (__FILE__
, __LINE__
,
3768 "gdbarch: gdbarch_pop_frame invalid");
3769 if (gdbarch_debug
>= 2)
3770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3771 gdbarch
->pop_frame ();
3775 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3776 gdbarch_pop_frame_ftype pop_frame
)
3778 gdbarch
->pop_frame
= pop_frame
;
3782 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3784 gdb_assert (gdbarch
!= NULL
);
3785 if (gdbarch
->store_struct_return
== 0)
3786 internal_error (__FILE__
, __LINE__
,
3787 "gdbarch: gdbarch_store_struct_return invalid");
3788 if (gdbarch_debug
>= 2)
3789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3790 gdbarch
->store_struct_return (addr
, sp
);
3794 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3795 gdbarch_store_struct_return_ftype store_struct_return
)
3797 gdbarch
->store_struct_return
= store_struct_return
;
3801 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3803 gdb_assert (gdbarch
!= NULL
);
3804 if (gdbarch
->store_return_value
== 0)
3805 internal_error (__FILE__
, __LINE__
,
3806 "gdbarch: gdbarch_store_return_value invalid");
3807 if (gdbarch_debug
>= 2)
3808 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3809 gdbarch
->store_return_value (type
, valbuf
);
3813 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3814 gdbarch_store_return_value_ftype store_return_value
)
3816 gdbarch
->store_return_value
= store_return_value
;
3820 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3822 gdb_assert (gdbarch
!= NULL
);
3823 return gdbarch
->extract_struct_value_address
!= 0;
3827 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3829 gdb_assert (gdbarch
!= NULL
);
3830 if (gdbarch
->extract_struct_value_address
== 0)
3831 internal_error (__FILE__
, __LINE__
,
3832 "gdbarch: gdbarch_extract_struct_value_address invalid");
3833 if (gdbarch_debug
>= 2)
3834 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3835 return gdbarch
->extract_struct_value_address (regbuf
);
3839 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3840 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3842 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3846 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3848 gdb_assert (gdbarch
!= NULL
);
3849 if (gdbarch
->use_struct_convention
== 0)
3850 internal_error (__FILE__
, __LINE__
,
3851 "gdbarch: gdbarch_use_struct_convention invalid");
3852 if (gdbarch_debug
>= 2)
3853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3854 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3858 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3859 gdbarch_use_struct_convention_ftype use_struct_convention
)
3861 gdbarch
->use_struct_convention
= use_struct_convention
;
3865 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3867 gdb_assert (gdbarch
!= NULL
);
3868 if (gdbarch
->frame_init_saved_regs
== 0)
3869 internal_error (__FILE__
, __LINE__
,
3870 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3871 if (gdbarch_debug
>= 2)
3872 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3873 gdbarch
->frame_init_saved_regs (frame
);
3877 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3878 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3880 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3884 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3886 gdb_assert (gdbarch
!= NULL
);
3887 return gdbarch
->init_extra_frame_info
!= 0;
3891 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3893 gdb_assert (gdbarch
!= NULL
);
3894 if (gdbarch
->init_extra_frame_info
== 0)
3895 internal_error (__FILE__
, __LINE__
,
3896 "gdbarch: gdbarch_init_extra_frame_info invalid");
3897 if (gdbarch_debug
>= 2)
3898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3899 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3903 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3904 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3906 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3910 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3912 gdb_assert (gdbarch
!= NULL
);
3913 if (gdbarch
->skip_prologue
== 0)
3914 internal_error (__FILE__
, __LINE__
,
3915 "gdbarch: gdbarch_skip_prologue invalid");
3916 if (gdbarch_debug
>= 2)
3917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3918 return gdbarch
->skip_prologue (ip
);
3922 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3923 gdbarch_skip_prologue_ftype skip_prologue
)
3925 gdbarch
->skip_prologue
= skip_prologue
;
3929 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3931 gdb_assert (gdbarch
!= NULL
);
3932 if (gdbarch
->prologue_frameless_p
== 0)
3933 internal_error (__FILE__
, __LINE__
,
3934 "gdbarch: gdbarch_prologue_frameless_p invalid");
3935 if (gdbarch_debug
>= 2)
3936 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3937 return gdbarch
->prologue_frameless_p (ip
);
3941 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3942 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3944 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3948 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3950 gdb_assert (gdbarch
!= NULL
);
3951 if (gdbarch
->inner_than
== 0)
3952 internal_error (__FILE__
, __LINE__
,
3953 "gdbarch: gdbarch_inner_than invalid");
3954 if (gdbarch_debug
>= 2)
3955 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3956 return gdbarch
->inner_than (lhs
, rhs
);
3960 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3961 gdbarch_inner_than_ftype inner_than
)
3963 gdbarch
->inner_than
= inner_than
;
3966 const unsigned char *
3967 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3969 gdb_assert (gdbarch
!= NULL
);
3970 if (gdbarch
->breakpoint_from_pc
== 0)
3971 internal_error (__FILE__
, __LINE__
,
3972 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3973 if (gdbarch_debug
>= 2)
3974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3975 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3979 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3980 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3982 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3986 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3988 gdb_assert (gdbarch
!= NULL
);
3989 if (gdbarch
->memory_insert_breakpoint
== 0)
3990 internal_error (__FILE__
, __LINE__
,
3991 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3992 if (gdbarch_debug
>= 2)
3993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3994 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3998 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3999 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4001 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4005 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4007 gdb_assert (gdbarch
!= NULL
);
4008 if (gdbarch
->memory_remove_breakpoint
== 0)
4009 internal_error (__FILE__
, __LINE__
,
4010 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4011 if (gdbarch_debug
>= 2)
4012 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4013 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4017 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4018 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4020 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4024 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4026 gdb_assert (gdbarch
!= NULL
);
4027 if (gdbarch
->decr_pc_after_break
== -1)
4028 internal_error (__FILE__
, __LINE__
,
4029 "gdbarch: gdbarch_decr_pc_after_break invalid");
4030 if (gdbarch_debug
>= 2)
4031 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4032 return gdbarch
->decr_pc_after_break
;
4036 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4037 CORE_ADDR decr_pc_after_break
)
4039 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4043 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4045 gdb_assert (gdbarch
!= NULL
);
4046 if (gdbarch
->prepare_to_proceed
== 0)
4047 internal_error (__FILE__
, __LINE__
,
4048 "gdbarch: gdbarch_prepare_to_proceed invalid");
4049 if (gdbarch_debug
>= 2)
4050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4051 return gdbarch
->prepare_to_proceed (select_it
);
4055 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4056 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4058 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4062 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4064 gdb_assert (gdbarch
!= NULL
);
4065 if (gdbarch
->function_start_offset
== -1)
4066 internal_error (__FILE__
, __LINE__
,
4067 "gdbarch: gdbarch_function_start_offset invalid");
4068 if (gdbarch_debug
>= 2)
4069 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4070 return gdbarch
->function_start_offset
;
4074 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4075 CORE_ADDR function_start_offset
)
4077 gdbarch
->function_start_offset
= function_start_offset
;
4081 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4083 gdb_assert (gdbarch
!= NULL
);
4084 if (gdbarch
->remote_translate_xfer_address
== 0)
4085 internal_error (__FILE__
, __LINE__
,
4086 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4087 if (gdbarch_debug
>= 2)
4088 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4089 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4093 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4094 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4096 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4100 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4102 gdb_assert (gdbarch
!= NULL
);
4103 if (gdbarch
->frame_args_skip
== -1)
4104 internal_error (__FILE__
, __LINE__
,
4105 "gdbarch: gdbarch_frame_args_skip invalid");
4106 if (gdbarch_debug
>= 2)
4107 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4108 return gdbarch
->frame_args_skip
;
4112 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4113 CORE_ADDR frame_args_skip
)
4115 gdbarch
->frame_args_skip
= frame_args_skip
;
4119 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4121 gdb_assert (gdbarch
!= NULL
);
4122 if (gdbarch
->frameless_function_invocation
== 0)
4123 internal_error (__FILE__
, __LINE__
,
4124 "gdbarch: gdbarch_frameless_function_invocation invalid");
4125 if (gdbarch_debug
>= 2)
4126 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4127 return gdbarch
->frameless_function_invocation (fi
);
4131 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4132 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4134 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4138 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4140 gdb_assert (gdbarch
!= NULL
);
4141 if (gdbarch
->frame_chain
== 0)
4142 internal_error (__FILE__
, __LINE__
,
4143 "gdbarch: gdbarch_frame_chain invalid");
4144 if (gdbarch_debug
>= 2)
4145 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4146 return gdbarch
->frame_chain (frame
);
4150 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4151 gdbarch_frame_chain_ftype frame_chain
)
4153 gdbarch
->frame_chain
= frame_chain
;
4157 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4159 gdb_assert (gdbarch
!= NULL
);
4160 if (gdbarch
->frame_chain_valid
== 0)
4161 internal_error (__FILE__
, __LINE__
,
4162 "gdbarch: gdbarch_frame_chain_valid invalid");
4163 if (gdbarch_debug
>= 2)
4164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4165 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4169 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4170 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4172 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4176 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4178 gdb_assert (gdbarch
!= NULL
);
4179 if (gdbarch
->frame_saved_pc
== 0)
4180 internal_error (__FILE__
, __LINE__
,
4181 "gdbarch: gdbarch_frame_saved_pc invalid");
4182 if (gdbarch_debug
>= 2)
4183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4184 return gdbarch
->frame_saved_pc (fi
);
4188 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4189 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4191 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4195 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4197 gdb_assert (gdbarch
!= NULL
);
4198 if (gdbarch
->frame_args_address
== 0)
4199 internal_error (__FILE__
, __LINE__
,
4200 "gdbarch: gdbarch_frame_args_address invalid");
4201 if (gdbarch_debug
>= 2)
4202 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4203 return gdbarch
->frame_args_address (fi
);
4207 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4208 gdbarch_frame_args_address_ftype frame_args_address
)
4210 gdbarch
->frame_args_address
= frame_args_address
;
4214 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4216 gdb_assert (gdbarch
!= NULL
);
4217 if (gdbarch
->frame_locals_address
== 0)
4218 internal_error (__FILE__
, __LINE__
,
4219 "gdbarch: gdbarch_frame_locals_address invalid");
4220 if (gdbarch_debug
>= 2)
4221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4222 return gdbarch
->frame_locals_address (fi
);
4226 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4227 gdbarch_frame_locals_address_ftype frame_locals_address
)
4229 gdbarch
->frame_locals_address
= frame_locals_address
;
4233 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4235 gdb_assert (gdbarch
!= NULL
);
4236 if (gdbarch
->saved_pc_after_call
== 0)
4237 internal_error (__FILE__
, __LINE__
,
4238 "gdbarch: gdbarch_saved_pc_after_call invalid");
4239 if (gdbarch_debug
>= 2)
4240 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4241 return gdbarch
->saved_pc_after_call (frame
);
4245 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4246 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4248 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4252 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4254 gdb_assert (gdbarch
!= NULL
);
4255 if (gdbarch
->frame_num_args
== 0)
4256 internal_error (__FILE__
, __LINE__
,
4257 "gdbarch: gdbarch_frame_num_args invalid");
4258 if (gdbarch_debug
>= 2)
4259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4260 return gdbarch
->frame_num_args (frame
);
4264 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4265 gdbarch_frame_num_args_ftype frame_num_args
)
4267 gdbarch
->frame_num_args
= frame_num_args
;
4271 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4273 gdb_assert (gdbarch
!= NULL
);
4274 return gdbarch
->stack_align
!= 0;
4278 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4280 gdb_assert (gdbarch
!= NULL
);
4281 if (gdbarch
->stack_align
== 0)
4282 internal_error (__FILE__
, __LINE__
,
4283 "gdbarch: gdbarch_stack_align invalid");
4284 if (gdbarch_debug
>= 2)
4285 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4286 return gdbarch
->stack_align (sp
);
4290 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4291 gdbarch_stack_align_ftype stack_align
)
4293 gdbarch
->stack_align
= stack_align
;
4297 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4299 gdb_assert (gdbarch
!= NULL
);
4300 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4301 if (gdbarch_debug
>= 2)
4302 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4303 return gdbarch
->extra_stack_alignment_needed
;
4307 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4308 int extra_stack_alignment_needed
)
4310 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4314 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4316 gdb_assert (gdbarch
!= NULL
);
4317 return gdbarch
->reg_struct_has_addr
!= 0;
4321 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4323 gdb_assert (gdbarch
!= NULL
);
4324 if (gdbarch
->reg_struct_has_addr
== 0)
4325 internal_error (__FILE__
, __LINE__
,
4326 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4327 if (gdbarch_debug
>= 2)
4328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4329 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4333 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4334 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4336 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4340 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4342 gdb_assert (gdbarch
!= NULL
);
4343 return gdbarch
->save_dummy_frame_tos
!= 0;
4347 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4349 gdb_assert (gdbarch
!= NULL
);
4350 if (gdbarch
->save_dummy_frame_tos
== 0)
4351 internal_error (__FILE__
, __LINE__
,
4352 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4353 if (gdbarch_debug
>= 2)
4354 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4355 gdbarch
->save_dummy_frame_tos (sp
);
4359 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4360 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4362 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4366 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4368 gdb_assert (gdbarch
!= NULL
);
4369 if (gdbarch_debug
>= 2)
4370 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4371 return gdbarch
->parm_boundary
;
4375 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4378 gdbarch
->parm_boundary
= parm_boundary
;
4381 const struct floatformat
*
4382 gdbarch_float_format (struct gdbarch
*gdbarch
)
4384 gdb_assert (gdbarch
!= NULL
);
4385 if (gdbarch_debug
>= 2)
4386 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4387 return gdbarch
->float_format
;
4391 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4392 const struct floatformat
* float_format
)
4394 gdbarch
->float_format
= float_format
;
4397 const struct floatformat
*
4398 gdbarch_double_format (struct gdbarch
*gdbarch
)
4400 gdb_assert (gdbarch
!= NULL
);
4401 if (gdbarch_debug
>= 2)
4402 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4403 return gdbarch
->double_format
;
4407 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4408 const struct floatformat
* double_format
)
4410 gdbarch
->double_format
= double_format
;
4413 const struct floatformat
*
4414 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4416 gdb_assert (gdbarch
!= NULL
);
4417 if (gdbarch_debug
>= 2)
4418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4419 return gdbarch
->long_double_format
;
4423 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4424 const struct floatformat
* long_double_format
)
4426 gdbarch
->long_double_format
= long_double_format
;
4430 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4432 gdb_assert (gdbarch
!= NULL
);
4433 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4434 internal_error (__FILE__
, __LINE__
,
4435 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4436 if (gdbarch_debug
>= 2)
4437 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4438 return gdbarch
->convert_from_func_ptr_addr (addr
);
4442 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4443 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4445 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4449 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4451 gdb_assert (gdbarch
!= NULL
);
4452 if (gdbarch
->addr_bits_remove
== 0)
4453 internal_error (__FILE__
, __LINE__
,
4454 "gdbarch: gdbarch_addr_bits_remove invalid");
4455 if (gdbarch_debug
>= 2)
4456 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4457 return gdbarch
->addr_bits_remove (addr
);
4461 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4462 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4464 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4468 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4470 gdb_assert (gdbarch
!= NULL
);
4471 if (gdbarch
->smash_text_address
== 0)
4472 internal_error (__FILE__
, __LINE__
,
4473 "gdbarch: gdbarch_smash_text_address invalid");
4474 if (gdbarch_debug
>= 2)
4475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4476 return gdbarch
->smash_text_address (addr
);
4480 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4481 gdbarch_smash_text_address_ftype smash_text_address
)
4483 gdbarch
->smash_text_address
= smash_text_address
;
4487 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4489 gdb_assert (gdbarch
!= NULL
);
4490 return gdbarch
->software_single_step
!= 0;
4494 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4496 gdb_assert (gdbarch
!= NULL
);
4497 if (gdbarch
->software_single_step
== 0)
4498 internal_error (__FILE__
, __LINE__
,
4499 "gdbarch: gdbarch_software_single_step invalid");
4500 if (gdbarch_debug
>= 2)
4501 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4502 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4506 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4507 gdbarch_software_single_step_ftype software_single_step
)
4509 gdbarch
->software_single_step
= software_single_step
;
4513 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4515 gdb_assert (gdbarch
!= NULL
);
4516 if (gdbarch
->print_insn
== 0)
4517 internal_error (__FILE__
, __LINE__
,
4518 "gdbarch: gdbarch_print_insn invalid");
4519 if (gdbarch_debug
>= 2)
4520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4521 return gdbarch
->print_insn (vma
, info
);
4525 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4526 gdbarch_print_insn_ftype print_insn
)
4528 gdbarch
->print_insn
= print_insn
;
4532 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4534 gdb_assert (gdbarch
!= NULL
);
4535 if (gdbarch
->skip_trampoline_code
== 0)
4536 internal_error (__FILE__
, __LINE__
,
4537 "gdbarch: gdbarch_skip_trampoline_code invalid");
4538 if (gdbarch_debug
>= 2)
4539 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4540 return gdbarch
->skip_trampoline_code (pc
);
4544 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4545 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4547 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4551 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4553 gdb_assert (gdbarch
!= NULL
);
4554 if (gdbarch
->in_solib_call_trampoline
== 0)
4555 internal_error (__FILE__
, __LINE__
,
4556 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4557 if (gdbarch_debug
>= 2)
4558 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4559 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4563 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4564 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4566 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4570 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4572 gdb_assert (gdbarch
!= NULL
);
4573 if (gdbarch
->pc_in_sigtramp
== 0)
4574 internal_error (__FILE__
, __LINE__
,
4575 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4576 if (gdbarch_debug
>= 2)
4577 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4578 return gdbarch
->pc_in_sigtramp (pc
, name
);
4582 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4583 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4585 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4589 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4591 gdb_assert (gdbarch
!= NULL
);
4592 if (gdbarch
->in_function_epilogue_p
== 0)
4593 internal_error (__FILE__
, __LINE__
,
4594 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4595 if (gdbarch_debug
>= 2)
4596 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4597 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4601 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4602 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4604 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4608 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4610 gdb_assert (gdbarch
!= NULL
);
4611 if (gdbarch
->construct_inferior_arguments
== 0)
4612 internal_error (__FILE__
, __LINE__
,
4613 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4614 if (gdbarch_debug
>= 2)
4615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4616 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4620 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4621 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4623 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4627 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4629 gdb_assert (gdbarch
!= NULL
);
4630 return gdbarch
->dwarf2_build_frame_info
!= 0;
4634 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4636 gdb_assert (gdbarch
!= NULL
);
4637 if (gdbarch
->dwarf2_build_frame_info
== 0)
4638 internal_error (__FILE__
, __LINE__
,
4639 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4640 if (gdbarch_debug
>= 2)
4641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4642 gdbarch
->dwarf2_build_frame_info (objfile
);
4646 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4647 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4649 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4653 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4655 gdb_assert (gdbarch
!= NULL
);
4656 if (gdbarch
->elf_make_msymbol_special
== 0)
4657 internal_error (__FILE__
, __LINE__
,
4658 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4659 if (gdbarch_debug
>= 2)
4660 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4661 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4665 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4666 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4668 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4672 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4674 gdb_assert (gdbarch
!= NULL
);
4675 if (gdbarch
->coff_make_msymbol_special
== 0)
4676 internal_error (__FILE__
, __LINE__
,
4677 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4678 if (gdbarch_debug
>= 2)
4679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4680 gdbarch
->coff_make_msymbol_special (val
, msym
);
4684 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4685 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4687 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4691 /* Keep a registry of per-architecture data-pointers required by GDB
4697 gdbarch_data_init_ftype
*init
;
4698 gdbarch_data_free_ftype
*free
;
4701 struct gdbarch_data_registration
4703 struct gdbarch_data
*data
;
4704 struct gdbarch_data_registration
*next
;
4707 struct gdbarch_data_registry
4710 struct gdbarch_data_registration
*registrations
;
4713 struct gdbarch_data_registry gdbarch_data_registry
=
4718 struct gdbarch_data
*
4719 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4720 gdbarch_data_free_ftype
*free
)
4722 struct gdbarch_data_registration
**curr
;
4723 for (curr
= &gdbarch_data_registry
.registrations
;
4725 curr
= &(*curr
)->next
);
4726 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4727 (*curr
)->next
= NULL
;
4728 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4729 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4730 (*curr
)->data
->init
= init
;
4731 (*curr
)->data
->free
= free
;
4732 return (*curr
)->data
;
4736 /* Walk through all the registered users initializing each in turn. */
4739 init_gdbarch_data (struct gdbarch
*gdbarch
)
4741 struct gdbarch_data_registration
*rego
;
4742 for (rego
= gdbarch_data_registry
.registrations
;
4746 struct gdbarch_data
*data
= rego
->data
;
4747 gdb_assert (data
->index
< gdbarch
->nr_data
);
4748 if (data
->init
!= NULL
)
4750 void *pointer
= data
->init (gdbarch
);
4751 set_gdbarch_data (gdbarch
, data
, pointer
);
4756 /* Create/delete the gdbarch data vector. */
4759 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4761 gdb_assert (gdbarch
->data
== NULL
);
4762 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4763 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4767 free_gdbarch_data (struct gdbarch
*gdbarch
)
4769 struct gdbarch_data_registration
*rego
;
4770 gdb_assert (gdbarch
->data
!= NULL
);
4771 for (rego
= gdbarch_data_registry
.registrations
;
4775 struct gdbarch_data
*data
= rego
->data
;
4776 gdb_assert (data
->index
< gdbarch
->nr_data
);
4777 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4779 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4780 gdbarch
->data
[data
->index
] = NULL
;
4783 xfree (gdbarch
->data
);
4784 gdbarch
->data
= NULL
;
4788 /* Initialize the current value of thee specified per-architecture
4792 set_gdbarch_data (struct gdbarch
*gdbarch
,
4793 struct gdbarch_data
*data
,
4796 gdb_assert (data
->index
< gdbarch
->nr_data
);
4797 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4798 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4799 gdbarch
->data
[data
->index
] = pointer
;
4802 /* Return the current value of the specified per-architecture
4806 gdbarch_data (struct gdbarch_data
*data
)
4808 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4809 return current_gdbarch
->data
[data
->index
];
4814 /* Keep a registry of swapped data required by GDB modules. */
4819 struct gdbarch_swap_registration
*source
;
4820 struct gdbarch_swap
*next
;
4823 struct gdbarch_swap_registration
4826 unsigned long sizeof_data
;
4827 gdbarch_swap_ftype
*init
;
4828 struct gdbarch_swap_registration
*next
;
4831 struct gdbarch_swap_registry
4834 struct gdbarch_swap_registration
*registrations
;
4837 struct gdbarch_swap_registry gdbarch_swap_registry
=
4843 register_gdbarch_swap (void *data
,
4844 unsigned long sizeof_data
,
4845 gdbarch_swap_ftype
*init
)
4847 struct gdbarch_swap_registration
**rego
;
4848 for (rego
= &gdbarch_swap_registry
.registrations
;
4850 rego
= &(*rego
)->next
);
4851 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4852 (*rego
)->next
= NULL
;
4853 (*rego
)->init
= init
;
4854 (*rego
)->data
= data
;
4855 (*rego
)->sizeof_data
= sizeof_data
;
4859 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
4861 struct gdbarch_swap
*curr
;
4862 for (curr
= gdbarch
->swap
;
4866 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
4871 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4873 struct gdbarch_swap_registration
*rego
;
4874 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4875 for (rego
= gdbarch_swap_registry
.registrations
;
4879 if (rego
->data
!= NULL
)
4881 (*curr
) = XMALLOC (struct gdbarch_swap
);
4882 (*curr
)->source
= rego
;
4883 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4884 (*curr
)->next
= NULL
;
4885 curr
= &(*curr
)->next
;
4887 if (rego
->init
!= NULL
)
4893 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4895 struct gdbarch_swap
*curr
;
4896 for (curr
= gdbarch
->swap
;
4899 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4903 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4905 struct gdbarch_swap
*curr
;
4906 for (curr
= gdbarch
->swap
;
4909 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4913 /* Keep a registry of the architectures known by GDB. */
4915 struct gdbarch_registration
4917 enum bfd_architecture bfd_architecture
;
4918 gdbarch_init_ftype
*init
;
4919 gdbarch_dump_tdep_ftype
*dump_tdep
;
4920 struct gdbarch_list
*arches
;
4921 struct gdbarch_registration
*next
;
4924 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4927 append_name (const char ***buf
, int *nr
, const char *name
)
4929 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4935 gdbarch_printable_names (void)
4939 /* Accumulate a list of names based on the registed list of
4941 enum bfd_architecture a
;
4943 const char **arches
= NULL
;
4944 struct gdbarch_registration
*rego
;
4945 for (rego
= gdbarch_registry
;
4949 const struct bfd_arch_info
*ap
;
4950 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4952 internal_error (__FILE__
, __LINE__
,
4953 "gdbarch_architecture_names: multi-arch unknown");
4956 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4961 append_name (&arches
, &nr_arches
, NULL
);
4965 /* Just return all the architectures that BFD knows. Assume that
4966 the legacy architecture framework supports them. */
4967 return bfd_arch_list ();
4972 gdbarch_register (enum bfd_architecture bfd_architecture
,
4973 gdbarch_init_ftype
*init
,
4974 gdbarch_dump_tdep_ftype
*dump_tdep
)
4976 struct gdbarch_registration
**curr
;
4977 const struct bfd_arch_info
*bfd_arch_info
;
4978 /* Check that BFD recognizes this architecture */
4979 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4980 if (bfd_arch_info
== NULL
)
4982 internal_error (__FILE__
, __LINE__
,
4983 "gdbarch: Attempt to register unknown architecture (%d)",
4986 /* Check that we haven't seen this architecture before */
4987 for (curr
= &gdbarch_registry
;
4989 curr
= &(*curr
)->next
)
4991 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4992 internal_error (__FILE__
, __LINE__
,
4993 "gdbarch: Duplicate registraration of architecture (%s)",
4994 bfd_arch_info
->printable_name
);
4998 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4999 bfd_arch_info
->printable_name
,
5002 (*curr
) = XMALLOC (struct gdbarch_registration
);
5003 (*curr
)->bfd_architecture
= bfd_architecture
;
5004 (*curr
)->init
= init
;
5005 (*curr
)->dump_tdep
= dump_tdep
;
5006 (*curr
)->arches
= NULL
;
5007 (*curr
)->next
= NULL
;
5008 /* When non- multi-arch, install whatever target dump routine we've
5009 been provided - hopefully that routine has been written correctly
5010 and works regardless of multi-arch. */
5011 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5012 && startup_gdbarch
.dump_tdep
== NULL
)
5013 startup_gdbarch
.dump_tdep
= dump_tdep
;
5017 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5018 gdbarch_init_ftype
*init
)
5020 gdbarch_register (bfd_architecture
, init
, NULL
);
5024 /* Look for an architecture using gdbarch_info. Base search on only
5025 BFD_ARCH_INFO and BYTE_ORDER. */
5027 struct gdbarch_list
*
5028 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5029 const struct gdbarch_info
*info
)
5031 for (; arches
!= NULL
; arches
= arches
->next
)
5033 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5035 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5043 /* Update the current architecture. Return ZERO if the update request
5047 gdbarch_update_p (struct gdbarch_info info
)
5049 struct gdbarch
*new_gdbarch
;
5050 struct gdbarch
*old_gdbarch
;
5051 struct gdbarch_registration
*rego
;
5053 /* Fill in missing parts of the INFO struct using a number of
5054 sources: ``set ...''; INFOabfd supplied; existing target. */
5056 /* ``(gdb) set architecture ...'' */
5057 if (info
.bfd_arch_info
== NULL
5058 && !TARGET_ARCHITECTURE_AUTO
)
5059 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5060 if (info
.bfd_arch_info
== NULL
5061 && info
.abfd
!= NULL
5062 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5063 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5064 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5065 if (info
.bfd_arch_info
== NULL
)
5066 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5068 /* ``(gdb) set byte-order ...'' */
5069 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5070 && !TARGET_BYTE_ORDER_AUTO
)
5071 info
.byte_order
= TARGET_BYTE_ORDER
;
5072 /* From the INFO struct. */
5073 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5074 && info
.abfd
!= NULL
)
5075 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5076 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5077 : BFD_ENDIAN_UNKNOWN
);
5078 /* From the current target. */
5079 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5080 info
.byte_order
= TARGET_BYTE_ORDER
;
5082 /* Must have found some sort of architecture. */
5083 gdb_assert (info
.bfd_arch_info
!= NULL
);
5087 fprintf_unfiltered (gdb_stdlog
,
5088 "gdbarch_update: info.bfd_arch_info %s\n",
5089 (info
.bfd_arch_info
!= NULL
5090 ? info
.bfd_arch_info
->printable_name
5092 fprintf_unfiltered (gdb_stdlog
,
5093 "gdbarch_update: info.byte_order %d (%s)\n",
5095 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5096 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5098 fprintf_unfiltered (gdb_stdlog
,
5099 "gdbarch_update: info.abfd 0x%lx\n",
5101 fprintf_unfiltered (gdb_stdlog
,
5102 "gdbarch_update: info.tdep_info 0x%lx\n",
5103 (long) info
.tdep_info
);
5106 /* Find the target that knows about this architecture. */
5107 for (rego
= gdbarch_registry
;
5110 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5119 /* Swap the data belonging to the old target out setting the
5120 installed data to zero. This stops the ->init() function trying
5121 to refer to the previous architecture's global data structures. */
5122 swapout_gdbarch_swap (current_gdbarch
);
5123 clear_gdbarch_swap (current_gdbarch
);
5125 /* Save the previously selected architecture, setting the global to
5126 NULL. This stops ->init() trying to use the previous
5127 architecture's configuration. The previous architecture may not
5128 even be of the same architecture family. The most recent
5129 architecture of the same family is found at the head of the
5130 rego->arches list. */
5131 old_gdbarch
= current_gdbarch
;
5132 current_gdbarch
= NULL
;
5134 /* Ask the target for a replacement architecture. */
5135 new_gdbarch
= rego
->init (info
, rego
->arches
);
5137 /* Did the target like it? No. Reject the change and revert to the
5138 old architecture. */
5139 if (new_gdbarch
== NULL
)
5142 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5143 swapin_gdbarch_swap (old_gdbarch
);
5144 current_gdbarch
= old_gdbarch
;
5148 /* Did the architecture change? No. Oops, put the old architecture
5150 if (old_gdbarch
== new_gdbarch
)
5153 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5155 new_gdbarch
->bfd_arch_info
->printable_name
);
5156 swapin_gdbarch_swap (old_gdbarch
);
5157 current_gdbarch
= old_gdbarch
;
5161 /* Is this a pre-existing architecture? Yes. Move it to the front
5162 of the list of architectures (keeping the list sorted Most
5163 Recently Used) and then copy it in. */
5165 struct gdbarch_list
**list
;
5166 for (list
= ®o
->arches
;
5168 list
= &(*list
)->next
)
5170 if ((*list
)->gdbarch
== new_gdbarch
)
5172 struct gdbarch_list
*this;
5174 fprintf_unfiltered (gdb_stdlog
,
5175 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5177 new_gdbarch
->bfd_arch_info
->printable_name
);
5180 (*list
) = this->next
;
5181 /* Insert in the front. */
5182 this->next
= rego
->arches
;
5183 rego
->arches
= this;
5184 /* Copy the new architecture in. */
5185 current_gdbarch
= new_gdbarch
;
5186 swapin_gdbarch_swap (new_gdbarch
);
5187 architecture_changed_event ();
5193 /* Prepend this new architecture to the architecture list (keep the
5194 list sorted Most Recently Used). */
5196 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5197 this->next
= rego
->arches
;
5198 this->gdbarch
= new_gdbarch
;
5199 rego
->arches
= this;
5202 /* Switch to this new architecture. Dump it out. */
5203 current_gdbarch
= new_gdbarch
;
5206 fprintf_unfiltered (gdb_stdlog
,
5207 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5209 new_gdbarch
->bfd_arch_info
->printable_name
);
5212 /* Check that the newly installed architecture is valid. Plug in
5213 any post init values. */
5214 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5215 verify_gdbarch (new_gdbarch
);
5217 /* Initialize the per-architecture memory (swap) areas.
5218 CURRENT_GDBARCH must be update before these modules are
5220 init_gdbarch_swap (new_gdbarch
);
5222 /* Initialize the per-architecture data-pointer of all parties that
5223 registered an interest in this architecture. CURRENT_GDBARCH
5224 must be updated before these modules are called. */
5225 init_gdbarch_data (new_gdbarch
);
5226 architecture_changed_event ();
5229 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5237 /* Pointer to the target-dependent disassembly function. */
5238 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5239 disassemble_info tm_print_insn_info
;
5242 extern void _initialize_gdbarch (void);
5245 _initialize_gdbarch (void)
5247 struct cmd_list_element
*c
;
5249 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5250 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5251 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5252 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5253 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5255 add_show_from_set (add_set_cmd ("arch",
5258 (char *)&gdbarch_debug
,
5259 "Set architecture debugging.\n\
5260 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5262 c
= add_set_cmd ("archdebug",
5265 (char *)&gdbarch_debug
,
5266 "Set architecture debugging.\n\
5267 When non-zero, architecture debugging is enabled.", &setlist
);
5269 deprecate_cmd (c
, "set debug arch");
5270 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");