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_convert_register_p_ftype
*convert_register_p
;
204 gdbarch_register_to_value_ftype
*register_to_value
;
205 gdbarch_value_to_register_ftype
*value_to_register
;
206 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
207 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
208 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
209 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
210 gdbarch_integer_to_address_ftype
*integer_to_address
;
211 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
212 gdbarch_extract_return_value_ftype
*extract_return_value
;
213 gdbarch_push_arguments_ftype
*push_arguments
;
214 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
215 gdbarch_push_return_address_ftype
*push_return_address
;
216 gdbarch_pop_frame_ftype
*pop_frame
;
217 gdbarch_store_struct_return_ftype
*store_struct_return
;
218 gdbarch_store_return_value_ftype
*store_return_value
;
219 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
220 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
221 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
222 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
223 gdbarch_skip_prologue_ftype
*skip_prologue
;
224 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
225 gdbarch_inner_than_ftype
*inner_than
;
226 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
227 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
228 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
229 CORE_ADDR decr_pc_after_break
;
230 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
231 CORE_ADDR function_start_offset
;
232 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
233 CORE_ADDR frame_args_skip
;
234 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
235 gdbarch_frame_chain_ftype
*frame_chain
;
236 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
237 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
238 gdbarch_frame_args_address_ftype
*frame_args_address
;
239 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
240 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
241 gdbarch_frame_num_args_ftype
*frame_num_args
;
242 gdbarch_stack_align_ftype
*stack_align
;
243 int extra_stack_alignment_needed
;
244 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
245 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
247 const struct floatformat
* float_format
;
248 const struct floatformat
* double_format
;
249 const struct floatformat
* long_double_format
;
250 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
251 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
252 gdbarch_smash_text_address_ftype
*smash_text_address
;
253 gdbarch_software_single_step_ftype
*software_single_step
;
254 gdbarch_print_insn_ftype
*print_insn
;
255 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
256 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
257 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
258 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
259 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
260 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
261 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
262 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
266 /* The default architecture uses host values (for want of a better
269 extern const struct bfd_arch_info bfd_default_arch_struct
;
271 struct gdbarch startup_gdbarch
=
273 /* basic architecture information */
274 &bfd_default_arch_struct
,
276 /* target specific vector and its dump routine */
278 /*per-architecture data-pointers and swap regions */
280 /* Multi-arch values */
284 8 * sizeof (LONGEST
),
287 8 * sizeof (long double),
318 generic_register_size
,
320 generic_register_size
,
349 generic_get_saved_register
,
408 generic_in_function_epilogue_p
,
409 construct_inferior_arguments
,
413 /* startup_gdbarch() */
416 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
418 /* Do any initialization needed for a non-multiarch configuration
419 after the _initialize_MODULE functions have been run. */
421 initialize_non_multiarch ()
423 alloc_gdbarch_data (&startup_gdbarch
);
424 /* Ensure that all swap areas are zeroed so that they again think
425 they are starting from scratch. */
426 clear_gdbarch_swap (&startup_gdbarch
);
427 init_gdbarch_swap (&startup_gdbarch
);
428 init_gdbarch_data (&startup_gdbarch
);
432 /* Create a new ``struct gdbarch'' based on information provided by
433 ``struct gdbarch_info''. */
436 gdbarch_alloc (const struct gdbarch_info
*info
,
437 struct gdbarch_tdep
*tdep
)
439 /* NOTE: The new architecture variable is named ``current_gdbarch''
440 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
441 the current local architecture and not the previous global
442 architecture. This ensures that the new architectures initial
443 values are not influenced by the previous architecture. Once
444 everything is parameterised with gdbarch, this will go away. */
445 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
446 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
448 alloc_gdbarch_data (current_gdbarch
);
450 current_gdbarch
->tdep
= tdep
;
452 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
453 current_gdbarch
->byte_order
= info
->byte_order
;
455 /* Force the explicit initialization of these. */
456 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
457 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
458 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
459 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
460 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
461 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
462 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
463 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
464 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
465 current_gdbarch
->char_signed
= -1;
466 current_gdbarch
->read_pc
= generic_target_read_pc
;
467 current_gdbarch
->write_pc
= generic_target_write_pc
;
468 current_gdbarch
->read_fp
= generic_target_read_fp
;
469 current_gdbarch
->read_sp
= generic_target_read_sp
;
470 current_gdbarch
->write_sp
= generic_target_write_sp
;
471 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
472 current_gdbarch
->num_regs
= -1;
473 current_gdbarch
->sp_regnum
= -1;
474 current_gdbarch
->fp_regnum
= -1;
475 current_gdbarch
->pc_regnum
= -1;
476 current_gdbarch
->ps_regnum
= -1;
477 current_gdbarch
->fp0_regnum
= -1;
478 current_gdbarch
->npc_regnum
= -1;
479 current_gdbarch
->nnpc_regnum
= -1;
480 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
481 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
482 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
483 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
484 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
485 current_gdbarch
->register_name
= legacy_register_name
;
486 current_gdbarch
->register_size
= -1;
487 current_gdbarch
->register_bytes
= -1;
488 current_gdbarch
->register_raw_size
= generic_register_size
;
489 current_gdbarch
->max_register_raw_size
= -1;
490 current_gdbarch
->register_virtual_size
= generic_register_size
;
491 current_gdbarch
->max_register_virtual_size
= -1;
492 current_gdbarch
->do_registers_info
= do_registers_info
;
493 current_gdbarch
->print_float_info
= default_print_float_info
;
494 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
495 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
496 current_gdbarch
->cannot_store_register
= cannot_register_not
;
497 current_gdbarch
->use_generic_dummy_frames
= -1;
498 current_gdbarch
->call_dummy_start_offset
= -1;
499 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
500 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
501 current_gdbarch
->call_dummy_length
= -1;
502 current_gdbarch
->call_dummy_p
= -1;
503 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
504 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
505 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
506 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
507 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
508 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
509 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
510 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
511 current_gdbarch
->register_to_value
= legacy_register_to_value
;
512 current_gdbarch
->value_to_register
= legacy_value_to_register
;
513 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
514 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
515 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
516 current_gdbarch
->push_arguments
= default_push_arguments
;
517 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
518 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
519 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
520 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
521 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
522 current_gdbarch
->decr_pc_after_break
= -1;
523 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
524 current_gdbarch
->function_start_offset
= -1;
525 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
526 current_gdbarch
->frame_args_skip
= -1;
527 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
528 current_gdbarch
->frame_chain_valid
= func_frame_chain_valid
;
529 current_gdbarch
->extra_stack_alignment_needed
= 1;
530 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
531 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
532 current_gdbarch
->smash_text_address
= core_addr_identity
;
533 current_gdbarch
->print_insn
= legacy_print_insn
;
534 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
535 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
536 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
537 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
538 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
539 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
540 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
541 /* gdbarch_alloc() */
543 return current_gdbarch
;
547 /* Free a gdbarch struct. This should never happen in normal
548 operation --- once you've created a gdbarch, you keep it around.
549 However, if an architecture's init function encounters an error
550 building the structure, it may need to clean up a partially
551 constructed gdbarch. */
554 gdbarch_free (struct gdbarch
*arch
)
556 gdb_assert (arch
!= NULL
);
557 free_gdbarch_data (arch
);
562 /* Ensure that all values in a GDBARCH are reasonable. */
565 verify_gdbarch (struct gdbarch
*gdbarch
)
568 struct cleanup
*cleanups
;
571 /* Only perform sanity checks on a multi-arch target. */
574 log
= mem_fileopen ();
575 cleanups
= make_cleanup_ui_file_delete (log
);
577 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
578 fprintf_unfiltered (log
, "\n\tbyte-order");
579 if (gdbarch
->bfd_arch_info
== NULL
)
580 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
581 /* Check those that need to be defined for the given multi-arch level. */
582 /* Skip verify of short_bit, invalid_p == 0 */
583 /* Skip verify of int_bit, invalid_p == 0 */
584 /* Skip verify of long_bit, invalid_p == 0 */
585 /* Skip verify of long_long_bit, invalid_p == 0 */
586 /* Skip verify of float_bit, invalid_p == 0 */
587 /* Skip verify of double_bit, invalid_p == 0 */
588 /* Skip verify of long_double_bit, invalid_p == 0 */
589 /* Skip verify of ptr_bit, invalid_p == 0 */
590 if (gdbarch
->addr_bit
== 0)
591 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
592 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
593 if (gdbarch
->char_signed
== -1)
594 gdbarch
->char_signed
= 1;
595 /* Skip verify of read_pc, invalid_p == 0 */
596 /* Skip verify of write_pc, invalid_p == 0 */
597 /* Skip verify of read_fp, invalid_p == 0 */
598 /* Skip verify of read_sp, invalid_p == 0 */
599 /* Skip verify of write_sp, invalid_p == 0 */
600 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
601 /* Skip verify of register_read, has predicate */
602 /* Skip verify of register_write, has predicate */
603 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
604 && (gdbarch
->num_regs
== -1))
605 fprintf_unfiltered (log
, "\n\tnum_regs");
606 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
607 /* Skip verify of sp_regnum, invalid_p == 0 */
608 /* Skip verify of fp_regnum, invalid_p == 0 */
609 /* Skip verify of pc_regnum, invalid_p == 0 */
610 /* Skip verify of ps_regnum, invalid_p == 0 */
611 /* Skip verify of fp0_regnum, invalid_p == 0 */
612 /* Skip verify of npc_regnum, invalid_p == 0 */
613 /* Skip verify of nnpc_regnum, invalid_p == 0 */
614 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
615 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
616 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
617 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
618 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
619 /* Skip verify of register_name, invalid_p == 0 */
620 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
621 && (gdbarch
->register_size
== -1))
622 fprintf_unfiltered (log
, "\n\tregister_size");
623 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
624 && (gdbarch
->register_bytes
== -1))
625 fprintf_unfiltered (log
, "\n\tregister_bytes");
626 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
627 && (gdbarch
->register_byte
== 0))
628 fprintf_unfiltered (log
, "\n\tregister_byte");
629 /* Skip verify of register_raw_size, invalid_p == 0 */
630 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
631 && (gdbarch
->max_register_raw_size
== -1))
632 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
633 /* Skip verify of register_virtual_size, invalid_p == 0 */
634 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
635 && (gdbarch
->max_register_virtual_size
== -1))
636 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
637 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
638 && (gdbarch
->register_virtual_type
== 0))
639 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
640 /* Skip verify of do_registers_info, invalid_p == 0 */
641 /* Skip verify of print_float_info, invalid_p == 0 */
642 /* Skip verify of register_sim_regno, invalid_p == 0 */
643 /* Skip verify of register_bytes_ok, has predicate */
644 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
645 /* Skip verify of cannot_store_register, invalid_p == 0 */
646 /* Skip verify of get_longjmp_target, has predicate */
647 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
648 && (gdbarch
->use_generic_dummy_frames
== -1))
649 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
650 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
651 && (gdbarch
->call_dummy_location
== 0))
652 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
653 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
654 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
655 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
656 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
657 && (gdbarch
->call_dummy_start_offset
== -1))
658 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
659 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
660 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
661 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
662 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
663 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
664 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
665 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
666 && (gdbarch
->call_dummy_length
== -1))
667 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
668 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
669 && (gdbarch
->pc_in_call_dummy
== 0))
670 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
671 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
672 && (gdbarch
->call_dummy_p
== -1))
673 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
674 /* Skip verify of call_dummy_words, invalid_p == 0 */
675 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
676 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
677 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
678 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
679 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
680 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
681 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
682 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
683 && (gdbarch
->fix_call_dummy
== 0))
684 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
685 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
686 /* Skip verify of init_frame_pc, invalid_p == 0 */
687 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
688 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
689 && (gdbarch
->get_saved_register
== 0))
690 fprintf_unfiltered (log
, "\n\tget_saved_register");
691 /* Skip verify of register_convertible, invalid_p == 0 */
692 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
693 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
694 /* Skip verify of convert_register_p, invalid_p == 0 */
695 /* Skip verify of register_to_value, invalid_p == 0 */
696 /* Skip verify of value_to_register, invalid_p == 0 */
697 /* Skip verify of fetch_pseudo_register, has predicate */
698 /* Skip verify of store_pseudo_register, has predicate */
699 /* Skip verify of pointer_to_address, invalid_p == 0 */
700 /* Skip verify of address_to_pointer, invalid_p == 0 */
701 /* Skip verify of integer_to_address, has predicate */
702 /* Skip verify of return_value_on_stack, invalid_p == 0 */
703 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
704 && (gdbarch
->extract_return_value
== 0))
705 fprintf_unfiltered (log
, "\n\textract_return_value");
706 /* Skip verify of push_arguments, invalid_p == 0 */
707 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
708 && (gdbarch
->push_dummy_frame
== 0))
709 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
710 /* Skip verify of push_return_address, has predicate */
711 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
712 && (gdbarch
->pop_frame
== 0))
713 fprintf_unfiltered (log
, "\n\tpop_frame");
714 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
715 && (gdbarch
->store_struct_return
== 0))
716 fprintf_unfiltered (log
, "\n\tstore_struct_return");
717 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
718 && (gdbarch
->store_return_value
== 0))
719 fprintf_unfiltered (log
, "\n\tstore_return_value");
720 /* Skip verify of extract_struct_value_address, has predicate */
721 /* Skip verify of use_struct_convention, invalid_p == 0 */
722 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
723 && (gdbarch
->frame_init_saved_regs
== 0))
724 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
725 /* Skip verify of init_extra_frame_info, has predicate */
726 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
727 && (gdbarch
->skip_prologue
== 0))
728 fprintf_unfiltered (log
, "\n\tskip_prologue");
729 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
730 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
731 && (gdbarch
->inner_than
== 0))
732 fprintf_unfiltered (log
, "\n\tinner_than");
733 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
734 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
735 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
737 && (gdbarch
->decr_pc_after_break
== -1))
738 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
739 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
740 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
741 && (gdbarch
->function_start_offset
== -1))
742 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
743 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
744 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
745 && (gdbarch
->frame_args_skip
== -1))
746 fprintf_unfiltered (log
, "\n\tframe_args_skip");
747 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
748 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
749 && (gdbarch
->frame_chain
== 0))
750 fprintf_unfiltered (log
, "\n\tframe_chain");
751 /* Skip verify of frame_chain_valid, invalid_p == 0 */
752 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
753 && (gdbarch
->frame_saved_pc
== 0))
754 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
755 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
756 && (gdbarch
->frame_args_address
== 0))
757 fprintf_unfiltered (log
, "\n\tframe_args_address");
758 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
759 && (gdbarch
->frame_locals_address
== 0))
760 fprintf_unfiltered (log
, "\n\tframe_locals_address");
761 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
762 && (gdbarch
->saved_pc_after_call
== 0))
763 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
764 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
765 && (gdbarch
->frame_num_args
== 0))
766 fprintf_unfiltered (log
, "\n\tframe_num_args");
767 /* Skip verify of stack_align, has predicate */
768 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
769 /* Skip verify of reg_struct_has_addr, has predicate */
770 /* Skip verify of save_dummy_frame_tos, has predicate */
771 if (gdbarch
->float_format
== 0)
772 gdbarch
->float_format
= default_float_format (gdbarch
);
773 if (gdbarch
->double_format
== 0)
774 gdbarch
->double_format
= default_double_format (gdbarch
);
775 if (gdbarch
->long_double_format
== 0)
776 gdbarch
->long_double_format
= default_double_format (gdbarch
);
777 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
778 /* Skip verify of addr_bits_remove, invalid_p == 0 */
779 /* Skip verify of smash_text_address, invalid_p == 0 */
780 /* Skip verify of software_single_step, has predicate */
781 /* Skip verify of print_insn, invalid_p == 0 */
782 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
783 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
784 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
785 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
786 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
787 /* Skip verify of dwarf2_build_frame_info, has predicate */
788 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
789 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
790 buf
= ui_file_xstrdup (log
, &dummy
);
791 make_cleanup (xfree
, buf
);
792 if (strlen (buf
) > 0)
793 internal_error (__FILE__
, __LINE__
,
794 "verify_gdbarch: the following are invalid ...%s",
796 do_cleanups (cleanups
);
800 /* Print out the details of the current architecture. */
802 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
803 just happens to match the global variable ``current_gdbarch''. That
804 way macros refering to that variable get the local and not the global
805 version - ulgh. Once everything is parameterised with gdbarch, this
809 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
817 (long) current_gdbarch
->in_function_epilogue_p
);
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: register_read = 0x%08lx\n",
821 (long) current_gdbarch
->register_read
);
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: register_write = 0x%08lx\n",
825 (long) current_gdbarch
->register_write
);
826 #ifdef ADDRESS_TO_POINTER
828 /* Macro might contain `[{}]' when not multi-arch */
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: %s # %s\n",
831 "ADDRESS_TO_POINTER(type, buf, addr)",
832 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
837 (long) current_gdbarch
->address_to_pointer
838 /*ADDRESS_TO_POINTER ()*/);
840 #ifdef ADDR_BITS_REMOVE
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: %s # %s\n",
843 "ADDR_BITS_REMOVE(addr)",
844 XSTRING (ADDR_BITS_REMOVE (addr
)));
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
848 (long) current_gdbarch
->addr_bits_remove
849 /*ADDR_BITS_REMOVE ()*/);
851 #ifdef BELIEVE_PCC_PROMOTION
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
854 XSTRING (BELIEVE_PCC_PROMOTION
));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
857 BELIEVE_PCC_PROMOTION
);
859 #ifdef BELIEVE_PCC_PROMOTION_TYPE
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
862 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
865 BELIEVE_PCC_PROMOTION_TYPE
);
867 #ifdef BREAKPOINT_FROM_PC
868 fprintf_unfiltered (file
,
869 "gdbarch_dump: %s # %s\n",
870 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
871 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
873 fprintf_unfiltered (file
,
874 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
875 (long) current_gdbarch
->breakpoint_from_pc
876 /*BREAKPOINT_FROM_PC ()*/);
878 #ifdef CALL_DUMMY_ADDRESS
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: %s # %s\n",
881 "CALL_DUMMY_ADDRESS()",
882 XSTRING (CALL_DUMMY_ADDRESS ()));
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
886 (long) current_gdbarch
->call_dummy_address
887 /*CALL_DUMMY_ADDRESS ()*/);
889 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
892 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
893 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
896 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
898 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
901 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
904 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
906 #ifdef CALL_DUMMY_LENGTH
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
909 XSTRING (CALL_DUMMY_LENGTH
));
910 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
915 #ifdef CALL_DUMMY_LOCATION
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
918 XSTRING (CALL_DUMMY_LOCATION
));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
921 CALL_DUMMY_LOCATION
);
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: CALL_DUMMY_P # %s\n",
926 XSTRING (CALL_DUMMY_P
));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: CALL_DUMMY_P = %d\n",
931 #ifdef CALL_DUMMY_STACK_ADJUST
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
934 XSTRING (CALL_DUMMY_STACK_ADJUST
));
935 if (CALL_DUMMY_STACK_ADJUST_P
)
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
938 (long) CALL_DUMMY_STACK_ADJUST
);
940 #ifdef CALL_DUMMY_STACK_ADJUST_P
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
943 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
946 (long) CALL_DUMMY_STACK_ADJUST_P
);
948 #ifdef CALL_DUMMY_START_OFFSET
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
951 XSTRING (CALL_DUMMY_START_OFFSET
));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
954 (long) CALL_DUMMY_START_OFFSET
);
956 #ifdef CALL_DUMMY_WORDS
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
959 XSTRING (CALL_DUMMY_WORDS
));
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
962 (long) CALL_DUMMY_WORDS
);
964 #ifdef CANNOT_FETCH_REGISTER
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: %s # %s\n",
967 "CANNOT_FETCH_REGISTER(regnum)",
968 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
972 (long) current_gdbarch
->cannot_fetch_register
973 /*CANNOT_FETCH_REGISTER ()*/);
975 #ifdef CANNOT_STORE_REGISTER
976 fprintf_unfiltered (file
,
977 "gdbarch_dump: %s # %s\n",
978 "CANNOT_STORE_REGISTER(regnum)",
979 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
983 (long) current_gdbarch
->cannot_store_register
984 /*CANNOT_STORE_REGISTER ()*/);
986 #ifdef COERCE_FLOAT_TO_DOUBLE
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: %s # %s\n",
989 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
990 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
994 (long) current_gdbarch
->coerce_float_to_double
995 /*COERCE_FLOAT_TO_DOUBLE ()*/);
997 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
999 /* Macro might contain `[{}]' when not multi-arch */
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: %s # %s\n",
1002 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1003 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1008 (long) current_gdbarch
->coff_make_msymbol_special
1009 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1014 (long) current_gdbarch
->construct_inferior_arguments
);
1015 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: %s # %s\n",
1018 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1019 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1021 fprintf_unfiltered (file
,
1022 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1023 (long) current_gdbarch
->convert_from_func_ptr_addr
1024 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1026 #ifdef CONVERT_REGISTER_P
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: %s # %s\n",
1029 "CONVERT_REGISTER_P(regnum)",
1030 XSTRING (CONVERT_REGISTER_P (regnum
)));
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1034 (long) current_gdbarch
->convert_register_p
1035 /*CONVERT_REGISTER_P ()*/);
1037 #ifdef DECR_PC_AFTER_BREAK
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1040 XSTRING (DECR_PC_AFTER_BREAK
));
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1043 (long) DECR_PC_AFTER_BREAK
);
1045 #ifdef DO_REGISTERS_INFO
1047 /* Macro might contain `[{}]' when not multi-arch */
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: %s # %s\n",
1050 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1051 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1056 (long) current_gdbarch
->do_registers_info
1057 /*DO_REGISTERS_INFO ()*/);
1059 #ifdef DWARF2_BUILD_FRAME_INFO
1061 /* Macro might contain `[{}]' when not multi-arch */
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: %s # %s\n",
1064 "DWARF2_BUILD_FRAME_INFO(objfile)",
1065 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1070 (long) current_gdbarch
->dwarf2_build_frame_info
1071 /*DWARF2_BUILD_FRAME_INFO ()*/);
1073 #ifdef DWARF2_REG_TO_REGNUM
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: %s # %s\n",
1076 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1077 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1079 fprintf_unfiltered (file
,
1080 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1081 (long) current_gdbarch
->dwarf2_reg_to_regnum
1082 /*DWARF2_REG_TO_REGNUM ()*/);
1084 #ifdef DWARF_REG_TO_REGNUM
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: %s # %s\n",
1087 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1088 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1092 (long) current_gdbarch
->dwarf_reg_to_regnum
1093 /*DWARF_REG_TO_REGNUM ()*/);
1095 #ifdef ECOFF_REG_TO_REGNUM
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: %s # %s\n",
1098 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1099 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1103 (long) current_gdbarch
->ecoff_reg_to_regnum
1104 /*ECOFF_REG_TO_REGNUM ()*/);
1106 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1108 /* Macro might contain `[{}]' when not multi-arch */
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: %s # %s\n",
1111 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1112 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1117 (long) current_gdbarch
->elf_make_msymbol_special
1118 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1120 #ifdef EXTRACT_RETURN_VALUE
1122 /* Macro might contain `[{}]' when not multi-arch */
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: %s # %s\n",
1125 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1126 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1131 (long) current_gdbarch
->extract_return_value
1132 /*EXTRACT_RETURN_VALUE ()*/);
1134 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: %s # %s\n",
1137 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1138 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1140 fprintf_unfiltered (file
,
1141 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1142 (long) current_gdbarch
->extract_struct_value_address
1143 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1145 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1148 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1151 EXTRA_STACK_ALIGNMENT_NEEDED
);
1153 #ifdef FETCH_PSEUDO_REGISTER
1155 /* Macro might contain `[{}]' when not multi-arch */
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: %s # %s\n",
1158 "FETCH_PSEUDO_REGISTER(regnum)",
1159 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1164 (long) current_gdbarch
->fetch_pseudo_register
1165 /*FETCH_PSEUDO_REGISTER ()*/);
1167 #ifdef FIX_CALL_DUMMY
1169 /* Macro might contain `[{}]' when not multi-arch */
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: %s # %s\n",
1172 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1173 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1176 fprintf_unfiltered (file
,
1177 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1178 (long) current_gdbarch
->fix_call_dummy
1179 /*FIX_CALL_DUMMY ()*/);
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: FP0_REGNUM # %s\n",
1184 XSTRING (FP0_REGNUM
));
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: FP0_REGNUM = %d\n",
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: FP_REGNUM # %s\n",
1192 XSTRING (FP_REGNUM
));
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: FP_REGNUM = %d\n",
1197 #ifdef FRAMELESS_FUNCTION_INVOCATION
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: %s # %s\n",
1200 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1201 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1205 (long) current_gdbarch
->frameless_function_invocation
1206 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1208 #ifdef FRAME_ARGS_ADDRESS
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: %s # %s\n",
1211 "FRAME_ARGS_ADDRESS(fi)",
1212 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1216 (long) current_gdbarch
->frame_args_address
1217 /*FRAME_ARGS_ADDRESS ()*/);
1219 #ifdef FRAME_ARGS_SKIP
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1222 XSTRING (FRAME_ARGS_SKIP
));
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1225 (long) FRAME_ARGS_SKIP
);
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: %s # %s\n",
1230 "FRAME_CHAIN(frame)",
1231 XSTRING (FRAME_CHAIN (frame
)));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1235 (long) current_gdbarch
->frame_chain
1236 /*FRAME_CHAIN ()*/);
1238 #ifdef FRAME_CHAIN_VALID
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: %s # %s\n",
1241 "FRAME_CHAIN_VALID(chain, thisframe)",
1242 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1246 (long) current_gdbarch
->frame_chain_valid
1247 /*FRAME_CHAIN_VALID ()*/);
1249 #ifdef FRAME_INIT_SAVED_REGS
1251 /* Macro might contain `[{}]' when not multi-arch */
1252 fprintf_unfiltered (file
,
1253 "gdbarch_dump: %s # %s\n",
1254 "FRAME_INIT_SAVED_REGS(frame)",
1255 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1260 (long) current_gdbarch
->frame_init_saved_regs
1261 /*FRAME_INIT_SAVED_REGS ()*/);
1263 #ifdef FRAME_LOCALS_ADDRESS
1264 fprintf_unfiltered (file
,
1265 "gdbarch_dump: %s # %s\n",
1266 "FRAME_LOCALS_ADDRESS(fi)",
1267 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1269 fprintf_unfiltered (file
,
1270 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1271 (long) current_gdbarch
->frame_locals_address
1272 /*FRAME_LOCALS_ADDRESS ()*/);
1274 #ifdef FRAME_NUM_ARGS
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: %s # %s\n",
1277 "FRAME_NUM_ARGS(frame)",
1278 XSTRING (FRAME_NUM_ARGS (frame
)));
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1282 (long) current_gdbarch
->frame_num_args
1283 /*FRAME_NUM_ARGS ()*/);
1285 #ifdef FRAME_SAVED_PC
1286 fprintf_unfiltered (file
,
1287 "gdbarch_dump: %s # %s\n",
1288 "FRAME_SAVED_PC(fi)",
1289 XSTRING (FRAME_SAVED_PC (fi
)));
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1293 (long) current_gdbarch
->frame_saved_pc
1294 /*FRAME_SAVED_PC ()*/);
1296 #ifdef FUNCTION_START_OFFSET
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1299 XSTRING (FUNCTION_START_OFFSET
));
1300 fprintf_unfiltered (file
,
1301 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1302 (long) FUNCTION_START_OFFSET
);
1304 #ifdef GET_LONGJMP_TARGET
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "GET_LONGJMP_TARGET(pc)",
1308 XSTRING (GET_LONGJMP_TARGET (pc
)));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1312 (long) current_gdbarch
->get_longjmp_target
1313 /*GET_LONGJMP_TARGET ()*/);
1315 #ifdef GET_SAVED_REGISTER
1317 /* Macro might contain `[{}]' when not multi-arch */
1318 fprintf_unfiltered (file
,
1319 "gdbarch_dump: %s # %s\n",
1320 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1321 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1326 (long) current_gdbarch
->get_saved_register
1327 /*GET_SAVED_REGISTER ()*/);
1329 #ifdef INIT_EXTRA_FRAME_INFO
1331 /* Macro might contain `[{}]' when not multi-arch */
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: %s # %s\n",
1334 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1335 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1340 (long) current_gdbarch
->init_extra_frame_info
1341 /*INIT_EXTRA_FRAME_INFO ()*/);
1343 #ifdef INIT_FRAME_PC
1345 /* Macro might contain `[{}]' when not multi-arch */
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: %s # %s\n",
1348 "INIT_FRAME_PC(fromleaf, prev)",
1349 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1354 (long) current_gdbarch
->init_frame_pc
1355 /*INIT_FRAME_PC ()*/);
1357 #ifdef INIT_FRAME_PC_FIRST
1359 /* Macro might contain `[{}]' when not multi-arch */
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: %s # %s\n",
1362 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1363 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1366 fprintf_unfiltered (file
,
1367 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1368 (long) current_gdbarch
->init_frame_pc_first
1369 /*INIT_FRAME_PC_FIRST ()*/);
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: %s # %s\n",
1374 "INNER_THAN(lhs, rhs)",
1375 XSTRING (INNER_THAN (lhs
, rhs
)));
1377 fprintf_unfiltered (file
,
1378 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1379 (long) current_gdbarch
->inner_than
1382 #ifdef INTEGER_TO_ADDRESS
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: %s # %s\n",
1385 "INTEGER_TO_ADDRESS(type, buf)",
1386 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1390 (long) current_gdbarch
->integer_to_address
1391 /*INTEGER_TO_ADDRESS ()*/);
1393 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: %s # %s\n",
1396 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1397 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1401 (long) current_gdbarch
->in_solib_call_trampoline
1402 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1404 #ifdef MAX_REGISTER_RAW_SIZE
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1407 XSTRING (MAX_REGISTER_RAW_SIZE
));
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1410 MAX_REGISTER_RAW_SIZE
);
1412 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1415 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1418 MAX_REGISTER_VIRTUAL_SIZE
);
1420 #ifdef MEMORY_INSERT_BREAKPOINT
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: %s # %s\n",
1423 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1424 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1428 (long) current_gdbarch
->memory_insert_breakpoint
1429 /*MEMORY_INSERT_BREAKPOINT ()*/);
1431 #ifdef MEMORY_REMOVE_BREAKPOINT
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: %s # %s\n",
1434 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1435 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1439 (long) current_gdbarch
->memory_remove_breakpoint
1440 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: NNPC_REGNUM # %s\n",
1445 XSTRING (NNPC_REGNUM
));
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: NNPC_REGNUM = %d\n",
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: NPC_REGNUM # %s\n",
1453 XSTRING (NPC_REGNUM
));
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: NPC_REGNUM = %d\n",
1458 #ifdef NUM_PSEUDO_REGS
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1461 XSTRING (NUM_PSEUDO_REGS
));
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: NUM_REGS # %s\n",
1469 XSTRING (NUM_REGS
));
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: NUM_REGS = %d\n",
1474 #ifdef PARM_BOUNDARY
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1477 XSTRING (PARM_BOUNDARY
));
1478 fprintf_unfiltered (file
,
1479 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1482 #ifdef PC_IN_CALL_DUMMY
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: %s # %s\n",
1485 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1486 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1488 fprintf_unfiltered (file
,
1489 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1490 (long) current_gdbarch
->pc_in_call_dummy
1491 /*PC_IN_CALL_DUMMY ()*/);
1493 #ifdef PC_IN_SIGTRAMP
1494 fprintf_unfiltered (file
,
1495 "gdbarch_dump: %s # %s\n",
1496 "PC_IN_SIGTRAMP(pc, name)",
1497 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1501 (long) current_gdbarch
->pc_in_sigtramp
1502 /*PC_IN_SIGTRAMP ()*/);
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: PC_REGNUM # %s\n",
1507 XSTRING (PC_REGNUM
));
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: PC_REGNUM = %d\n",
1512 #ifdef POINTER_TO_ADDRESS
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: %s # %s\n",
1515 "POINTER_TO_ADDRESS(type, buf)",
1516 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1520 (long) current_gdbarch
->pointer_to_address
1521 /*POINTER_TO_ADDRESS ()*/);
1525 /* Macro might contain `[{}]' when not multi-arch */
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: %s # %s\n",
1529 XSTRING (POP_FRAME (-)));
1532 fprintf_unfiltered (file
,
1533 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1534 (long) current_gdbarch
->pop_frame
1537 #ifdef PREPARE_TO_PROCEED
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: %s # %s\n",
1540 "PREPARE_TO_PROCEED(select_it)",
1541 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1545 (long) current_gdbarch
->prepare_to_proceed
1546 /*PREPARE_TO_PROCEED ()*/);
1548 #ifdef PRINT_FLOAT_INFO
1550 /* Macro might contain `[{}]' when not multi-arch */
1551 fprintf_unfiltered (file
,
1552 "gdbarch_dump: %s # %s\n",
1553 "PRINT_FLOAT_INFO()",
1554 XSTRING (PRINT_FLOAT_INFO ()));
1557 fprintf_unfiltered (file
,
1558 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1559 (long) current_gdbarch
->print_float_info
1560 /*PRINT_FLOAT_INFO ()*/);
1562 #ifdef PROLOGUE_FRAMELESS_P
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: %s # %s\n",
1565 "PROLOGUE_FRAMELESS_P(ip)",
1566 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1568 fprintf_unfiltered (file
,
1569 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1570 (long) current_gdbarch
->prologue_frameless_p
1571 /*PROLOGUE_FRAMELESS_P ()*/);
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: PS_REGNUM # %s\n",
1576 XSTRING (PS_REGNUM
));
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: PS_REGNUM = %d\n",
1581 #ifdef PUSH_ARGUMENTS
1582 fprintf_unfiltered (file
,
1583 "gdbarch_dump: %s # %s\n",
1584 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1585 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1589 (long) current_gdbarch
->push_arguments
1590 /*PUSH_ARGUMENTS ()*/);
1592 #ifdef PUSH_DUMMY_FRAME
1594 /* Macro might contain `[{}]' when not multi-arch */
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: %s # %s\n",
1597 "PUSH_DUMMY_FRAME(-)",
1598 XSTRING (PUSH_DUMMY_FRAME (-)));
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1603 (long) current_gdbarch
->push_dummy_frame
1604 /*PUSH_DUMMY_FRAME ()*/);
1606 #ifdef PUSH_RETURN_ADDRESS
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: %s # %s\n",
1609 "PUSH_RETURN_ADDRESS(pc, sp)",
1610 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1614 (long) current_gdbarch
->push_return_address
1615 /*PUSH_RETURN_ADDRESS ()*/);
1617 #ifdef REGISTER_BYTE
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: %s # %s\n",
1620 "REGISTER_BYTE(reg_nr)",
1621 XSTRING (REGISTER_BYTE (reg_nr
)));
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1625 (long) current_gdbarch
->register_byte
1626 /*REGISTER_BYTE ()*/);
1628 #ifdef REGISTER_BYTES
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: REGISTER_BYTES # %s\n",
1631 XSTRING (REGISTER_BYTES
));
1632 fprintf_unfiltered (file
,
1633 "gdbarch_dump: REGISTER_BYTES = %d\n",
1636 #ifdef REGISTER_BYTES_OK
1637 fprintf_unfiltered (file
,
1638 "gdbarch_dump: %s # %s\n",
1639 "REGISTER_BYTES_OK(nr_bytes)",
1640 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1642 fprintf_unfiltered (file
,
1643 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1644 (long) current_gdbarch
->register_bytes_ok
1645 /*REGISTER_BYTES_OK ()*/);
1647 #ifdef REGISTER_CONVERTIBLE
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: %s # %s\n",
1650 "REGISTER_CONVERTIBLE(nr)",
1651 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1655 (long) current_gdbarch
->register_convertible
1656 /*REGISTER_CONVERTIBLE ()*/);
1658 #ifdef REGISTER_CONVERT_TO_RAW
1660 /* Macro might contain `[{}]' when not multi-arch */
1661 fprintf_unfiltered (file
,
1662 "gdbarch_dump: %s # %s\n",
1663 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1664 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1669 (long) current_gdbarch
->register_convert_to_raw
1670 /*REGISTER_CONVERT_TO_RAW ()*/);
1672 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1674 /* Macro might contain `[{}]' when not multi-arch */
1675 fprintf_unfiltered (file
,
1676 "gdbarch_dump: %s # %s\n",
1677 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1678 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1681 fprintf_unfiltered (file
,
1682 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1683 (long) current_gdbarch
->register_convert_to_virtual
1684 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1686 #ifdef REGISTER_NAME
1687 fprintf_unfiltered (file
,
1688 "gdbarch_dump: %s # %s\n",
1689 "REGISTER_NAME(regnr)",
1690 XSTRING (REGISTER_NAME (regnr
)));
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1694 (long) current_gdbarch
->register_name
1695 /*REGISTER_NAME ()*/);
1697 #ifdef REGISTER_RAW_SIZE
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: %s # %s\n",
1700 "REGISTER_RAW_SIZE(reg_nr)",
1701 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1705 (long) current_gdbarch
->register_raw_size
1706 /*REGISTER_RAW_SIZE ()*/);
1708 #ifdef REGISTER_SIM_REGNO
1709 fprintf_unfiltered (file
,
1710 "gdbarch_dump: %s # %s\n",
1711 "REGISTER_SIM_REGNO(reg_nr)",
1712 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1716 (long) current_gdbarch
->register_sim_regno
1717 /*REGISTER_SIM_REGNO ()*/);
1719 #ifdef REGISTER_SIZE
1720 fprintf_unfiltered (file
,
1721 "gdbarch_dump: REGISTER_SIZE # %s\n",
1722 XSTRING (REGISTER_SIZE
));
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: REGISTER_SIZE = %d\n",
1727 #ifdef REGISTER_TO_VALUE
1729 /* Macro might contain `[{}]' when not multi-arch */
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: %s # %s\n",
1732 "REGISTER_TO_VALUE(regnum, type, from, to)",
1733 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1736 fprintf_unfiltered (file
,
1737 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1738 (long) current_gdbarch
->register_to_value
1739 /*REGISTER_TO_VALUE ()*/);
1741 #ifdef REGISTER_VIRTUAL_SIZE
1742 fprintf_unfiltered (file
,
1743 "gdbarch_dump: %s # %s\n",
1744 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1745 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1749 (long) current_gdbarch
->register_virtual_size
1750 /*REGISTER_VIRTUAL_SIZE ()*/);
1752 #ifdef REGISTER_VIRTUAL_TYPE
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: %s # %s\n",
1755 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1756 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1758 fprintf_unfiltered (file
,
1759 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1760 (long) current_gdbarch
->register_virtual_type
1761 /*REGISTER_VIRTUAL_TYPE ()*/);
1763 #ifdef REG_STRUCT_HAS_ADDR
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: %s # %s\n",
1766 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1767 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1771 (long) current_gdbarch
->reg_struct_has_addr
1772 /*REG_STRUCT_HAS_ADDR ()*/);
1774 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1776 /* Macro might contain `[{}]' when not multi-arch */
1777 fprintf_unfiltered (file
,
1778 "gdbarch_dump: %s # %s\n",
1779 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1780 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1785 (long) current_gdbarch
->remote_translate_xfer_address
1786 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1788 #ifdef RETURN_VALUE_ON_STACK
1789 fprintf_unfiltered (file
,
1790 "gdbarch_dump: %s # %s\n",
1791 "RETURN_VALUE_ON_STACK(type)",
1792 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1796 (long) current_gdbarch
->return_value_on_stack
1797 /*RETURN_VALUE_ON_STACK ()*/);
1799 #ifdef SAVED_PC_AFTER_CALL
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: %s # %s\n",
1802 "SAVED_PC_AFTER_CALL(frame)",
1803 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1805 fprintf_unfiltered (file
,
1806 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1807 (long) current_gdbarch
->saved_pc_after_call
1808 /*SAVED_PC_AFTER_CALL ()*/);
1810 #ifdef SAVE_DUMMY_FRAME_TOS
1812 /* Macro might contain `[{}]' when not multi-arch */
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: %s # %s\n",
1815 "SAVE_DUMMY_FRAME_TOS(sp)",
1816 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1821 (long) current_gdbarch
->save_dummy_frame_tos
1822 /*SAVE_DUMMY_FRAME_TOS ()*/);
1824 #ifdef SDB_REG_TO_REGNUM
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: %s # %s\n",
1827 "SDB_REG_TO_REGNUM(sdb_regnr)",
1828 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1832 (long) current_gdbarch
->sdb_reg_to_regnum
1833 /*SDB_REG_TO_REGNUM ()*/);
1835 #ifdef SIZEOF_CALL_DUMMY_WORDS
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1838 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1841 (long) SIZEOF_CALL_DUMMY_WORDS
);
1843 #ifdef SKIP_PROLOGUE
1844 fprintf_unfiltered (file
,
1845 "gdbarch_dump: %s # %s\n",
1846 "SKIP_PROLOGUE(ip)",
1847 XSTRING (SKIP_PROLOGUE (ip
)));
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1851 (long) current_gdbarch
->skip_prologue
1852 /*SKIP_PROLOGUE ()*/);
1854 #ifdef SKIP_TRAMPOLINE_CODE
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: %s # %s\n",
1857 "SKIP_TRAMPOLINE_CODE(pc)",
1858 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1862 (long) current_gdbarch
->skip_trampoline_code
1863 /*SKIP_TRAMPOLINE_CODE ()*/);
1865 #ifdef SMASH_TEXT_ADDRESS
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: %s # %s\n",
1868 "SMASH_TEXT_ADDRESS(addr)",
1869 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1873 (long) current_gdbarch
->smash_text_address
1874 /*SMASH_TEXT_ADDRESS ()*/);
1876 #ifdef SOFTWARE_SINGLE_STEP
1878 /* Macro might contain `[{}]' when not multi-arch */
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: %s # %s\n",
1881 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1882 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1885 fprintf_unfiltered (file
,
1886 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1887 (long) current_gdbarch
->software_single_step
1888 /*SOFTWARE_SINGLE_STEP ()*/);
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: SP_REGNUM # %s\n",
1893 XSTRING (SP_REGNUM
));
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: SP_REGNUM = %d\n",
1898 #ifdef STAB_REG_TO_REGNUM
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: %s # %s\n",
1901 "STAB_REG_TO_REGNUM(stab_regnr)",
1902 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1906 (long) current_gdbarch
->stab_reg_to_regnum
1907 /*STAB_REG_TO_REGNUM ()*/);
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: %s # %s\n",
1913 XSTRING (STACK_ALIGN (sp
)));
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1917 (long) current_gdbarch
->stack_align
1918 /*STACK_ALIGN ()*/);
1920 #ifdef STORE_PSEUDO_REGISTER
1922 /* Macro might contain `[{}]' when not multi-arch */
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: %s # %s\n",
1925 "STORE_PSEUDO_REGISTER(regnum)",
1926 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1931 (long) current_gdbarch
->store_pseudo_register
1932 /*STORE_PSEUDO_REGISTER ()*/);
1934 #ifdef STORE_RETURN_VALUE
1936 /* Macro might contain `[{}]' when not multi-arch */
1937 fprintf_unfiltered (file
,
1938 "gdbarch_dump: %s # %s\n",
1939 "STORE_RETURN_VALUE(type, valbuf)",
1940 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1945 (long) current_gdbarch
->store_return_value
1946 /*STORE_RETURN_VALUE ()*/);
1948 #ifdef STORE_STRUCT_RETURN
1950 /* Macro might contain `[{}]' when not multi-arch */
1951 fprintf_unfiltered (file
,
1952 "gdbarch_dump: %s # %s\n",
1953 "STORE_STRUCT_RETURN(addr, sp)",
1954 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1959 (long) current_gdbarch
->store_struct_return
1960 /*STORE_STRUCT_RETURN ()*/);
1962 #ifdef TARGET_ADDR_BIT
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1965 XSTRING (TARGET_ADDR_BIT
));
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1970 #ifdef TARGET_ARCHITECTURE
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1973 XSTRING (TARGET_ARCHITECTURE
));
1974 if (TARGET_ARCHITECTURE
!= NULL
)
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1977 TARGET_ARCHITECTURE
->printable_name
);
1979 #ifdef TARGET_BFD_VMA_BIT
1980 fprintf_unfiltered (file
,
1981 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1982 XSTRING (TARGET_BFD_VMA_BIT
));
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1985 TARGET_BFD_VMA_BIT
);
1987 #ifdef TARGET_BYTE_ORDER
1988 fprintf_unfiltered (file
,
1989 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1990 XSTRING (TARGET_BYTE_ORDER
));
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1993 (long) TARGET_BYTE_ORDER
);
1995 #ifdef TARGET_CHAR_SIGNED
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1998 XSTRING (TARGET_CHAR_SIGNED
));
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2001 TARGET_CHAR_SIGNED
);
2003 #ifdef TARGET_DOUBLE_BIT
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2006 XSTRING (TARGET_DOUBLE_BIT
));
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2011 #ifdef TARGET_DOUBLE_FORMAT
2012 fprintf_unfiltered (file
,
2013 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2014 XSTRING (TARGET_DOUBLE_FORMAT
));
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2017 (long) TARGET_DOUBLE_FORMAT
);
2019 #ifdef TARGET_FLOAT_BIT
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2022 XSTRING (TARGET_FLOAT_BIT
));
2023 fprintf_unfiltered (file
,
2024 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2027 #ifdef TARGET_FLOAT_FORMAT
2028 fprintf_unfiltered (file
,
2029 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2030 XSTRING (TARGET_FLOAT_FORMAT
));
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2033 (long) TARGET_FLOAT_FORMAT
);
2035 #ifdef TARGET_INT_BIT
2036 fprintf_unfiltered (file
,
2037 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2038 XSTRING (TARGET_INT_BIT
));
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2043 #ifdef TARGET_LONG_BIT
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2046 XSTRING (TARGET_LONG_BIT
));
2047 fprintf_unfiltered (file
,
2048 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2051 #ifdef TARGET_LONG_DOUBLE_BIT
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2054 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2057 TARGET_LONG_DOUBLE_BIT
);
2059 #ifdef TARGET_LONG_DOUBLE_FORMAT
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2062 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2065 (long) TARGET_LONG_DOUBLE_FORMAT
);
2067 #ifdef TARGET_LONG_LONG_BIT
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2070 XSTRING (TARGET_LONG_LONG_BIT
));
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2073 TARGET_LONG_LONG_BIT
);
2075 #ifdef TARGET_PRINT_INSN
2076 fprintf_unfiltered (file
,
2077 "gdbarch_dump: %s # %s\n",
2078 "TARGET_PRINT_INSN(vma, info)",
2079 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2083 (long) current_gdbarch
->print_insn
2084 /*TARGET_PRINT_INSN ()*/);
2086 #ifdef TARGET_PTR_BIT
2087 fprintf_unfiltered (file
,
2088 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2089 XSTRING (TARGET_PTR_BIT
));
2090 fprintf_unfiltered (file
,
2091 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2094 #ifdef TARGET_READ_FP
2095 fprintf_unfiltered (file
,
2096 "gdbarch_dump: %s # %s\n",
2098 XSTRING (TARGET_READ_FP ()));
2100 fprintf_unfiltered (file
,
2101 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2102 (long) current_gdbarch
->read_fp
2103 /*TARGET_READ_FP ()*/);
2105 #ifdef TARGET_READ_PC
2106 fprintf_unfiltered (file
,
2107 "gdbarch_dump: %s # %s\n",
2108 "TARGET_READ_PC(ptid)",
2109 XSTRING (TARGET_READ_PC (ptid
)));
2111 fprintf_unfiltered (file
,
2112 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2113 (long) current_gdbarch
->read_pc
2114 /*TARGET_READ_PC ()*/);
2116 #ifdef TARGET_READ_SP
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: %s # %s\n",
2120 XSTRING (TARGET_READ_SP ()));
2122 fprintf_unfiltered (file
,
2123 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2124 (long) current_gdbarch
->read_sp
2125 /*TARGET_READ_SP ()*/);
2127 #ifdef TARGET_SHORT_BIT
2128 fprintf_unfiltered (file
,
2129 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2130 XSTRING (TARGET_SHORT_BIT
));
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2135 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2137 /* Macro might contain `[{}]' when not multi-arch */
2138 fprintf_unfiltered (file
,
2139 "gdbarch_dump: %s # %s\n",
2140 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2141 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2146 (long) current_gdbarch
->virtual_frame_pointer
2147 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2149 #ifdef TARGET_WRITE_PC
2151 /* Macro might contain `[{}]' when not multi-arch */
2152 fprintf_unfiltered (file
,
2153 "gdbarch_dump: %s # %s\n",
2154 "TARGET_WRITE_PC(val, ptid)",
2155 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2158 fprintf_unfiltered (file
,
2159 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2160 (long) current_gdbarch
->write_pc
2161 /*TARGET_WRITE_PC ()*/);
2163 #ifdef TARGET_WRITE_SP
2165 /* Macro might contain `[{}]' when not multi-arch */
2166 fprintf_unfiltered (file
,
2167 "gdbarch_dump: %s # %s\n",
2168 "TARGET_WRITE_SP(val)",
2169 XSTRING (TARGET_WRITE_SP (val
)));
2172 fprintf_unfiltered (file
,
2173 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2174 (long) current_gdbarch
->write_sp
2175 /*TARGET_WRITE_SP ()*/);
2177 #ifdef USE_GENERIC_DUMMY_FRAMES
2178 fprintf_unfiltered (file
,
2179 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2180 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2181 fprintf_unfiltered (file
,
2182 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2183 USE_GENERIC_DUMMY_FRAMES
);
2185 #ifdef USE_STRUCT_CONVENTION
2186 fprintf_unfiltered (file
,
2187 "gdbarch_dump: %s # %s\n",
2188 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2189 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2191 fprintf_unfiltered (file
,
2192 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2193 (long) current_gdbarch
->use_struct_convention
2194 /*USE_STRUCT_CONVENTION ()*/);
2196 #ifdef VALUE_TO_REGISTER
2198 /* Macro might contain `[{}]' when not multi-arch */
2199 fprintf_unfiltered (file
,
2200 "gdbarch_dump: %s # %s\n",
2201 "VALUE_TO_REGISTER(type, regnum, from, to)",
2202 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2205 fprintf_unfiltered (file
,
2206 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2207 (long) current_gdbarch
->value_to_register
2208 /*VALUE_TO_REGISTER ()*/);
2210 if (current_gdbarch
->dump_tdep
!= NULL
)
2211 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2214 struct gdbarch_tdep
*
2215 gdbarch_tdep (struct gdbarch
*gdbarch
)
2217 if (gdbarch_debug
>= 2)
2218 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2219 return gdbarch
->tdep
;
2223 const struct bfd_arch_info
*
2224 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2226 gdb_assert (gdbarch
!= NULL
);
2227 if (gdbarch_debug
>= 2)
2228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2229 return gdbarch
->bfd_arch_info
;
2233 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2235 gdb_assert (gdbarch
!= NULL
);
2236 if (gdbarch_debug
>= 2)
2237 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2238 return gdbarch
->byte_order
;
2242 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2244 gdb_assert (gdbarch
!= NULL
);
2245 /* Skip verify of short_bit, invalid_p == 0 */
2246 if (gdbarch_debug
>= 2)
2247 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2248 return gdbarch
->short_bit
;
2252 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2255 gdbarch
->short_bit
= short_bit
;
2259 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2261 gdb_assert (gdbarch
!= NULL
);
2262 /* Skip verify of int_bit, invalid_p == 0 */
2263 if (gdbarch_debug
>= 2)
2264 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2265 return gdbarch
->int_bit
;
2269 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2272 gdbarch
->int_bit
= int_bit
;
2276 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2278 gdb_assert (gdbarch
!= NULL
);
2279 /* Skip verify of long_bit, invalid_p == 0 */
2280 if (gdbarch_debug
>= 2)
2281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2282 return gdbarch
->long_bit
;
2286 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2289 gdbarch
->long_bit
= long_bit
;
2293 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2295 gdb_assert (gdbarch
!= NULL
);
2296 /* Skip verify of long_long_bit, invalid_p == 0 */
2297 if (gdbarch_debug
>= 2)
2298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2299 return gdbarch
->long_long_bit
;
2303 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2306 gdbarch
->long_long_bit
= long_long_bit
;
2310 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2312 gdb_assert (gdbarch
!= NULL
);
2313 /* Skip verify of float_bit, invalid_p == 0 */
2314 if (gdbarch_debug
>= 2)
2315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2316 return gdbarch
->float_bit
;
2320 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2323 gdbarch
->float_bit
= float_bit
;
2327 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2329 gdb_assert (gdbarch
!= NULL
);
2330 /* Skip verify of double_bit, invalid_p == 0 */
2331 if (gdbarch_debug
>= 2)
2332 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2333 return gdbarch
->double_bit
;
2337 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2340 gdbarch
->double_bit
= double_bit
;
2344 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2346 gdb_assert (gdbarch
!= NULL
);
2347 /* Skip verify of long_double_bit, invalid_p == 0 */
2348 if (gdbarch_debug
>= 2)
2349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2350 return gdbarch
->long_double_bit
;
2354 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2355 int long_double_bit
)
2357 gdbarch
->long_double_bit
= long_double_bit
;
2361 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2363 gdb_assert (gdbarch
!= NULL
);
2364 /* Skip verify of ptr_bit, invalid_p == 0 */
2365 if (gdbarch_debug
>= 2)
2366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2367 return gdbarch
->ptr_bit
;
2371 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2374 gdbarch
->ptr_bit
= ptr_bit
;
2378 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2380 gdb_assert (gdbarch
!= NULL
);
2381 if (gdbarch
->addr_bit
== 0)
2382 internal_error (__FILE__
, __LINE__
,
2383 "gdbarch: gdbarch_addr_bit invalid");
2384 if (gdbarch_debug
>= 2)
2385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2386 return gdbarch
->addr_bit
;
2390 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2393 gdbarch
->addr_bit
= addr_bit
;
2397 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2399 gdb_assert (gdbarch
!= NULL
);
2400 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2401 if (gdbarch_debug
>= 2)
2402 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2403 return gdbarch
->bfd_vma_bit
;
2407 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2410 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2414 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2416 gdb_assert (gdbarch
!= NULL
);
2417 if (gdbarch
->char_signed
== -1)
2418 internal_error (__FILE__
, __LINE__
,
2419 "gdbarch: gdbarch_char_signed invalid");
2420 if (gdbarch_debug
>= 2)
2421 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2422 return gdbarch
->char_signed
;
2426 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2429 gdbarch
->char_signed
= char_signed
;
2433 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2435 gdb_assert (gdbarch
!= NULL
);
2436 if (gdbarch
->read_pc
== 0)
2437 internal_error (__FILE__
, __LINE__
,
2438 "gdbarch: gdbarch_read_pc invalid");
2439 if (gdbarch_debug
>= 2)
2440 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2441 return gdbarch
->read_pc (ptid
);
2445 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2446 gdbarch_read_pc_ftype read_pc
)
2448 gdbarch
->read_pc
= read_pc
;
2452 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2454 gdb_assert (gdbarch
!= NULL
);
2455 if (gdbarch
->write_pc
== 0)
2456 internal_error (__FILE__
, __LINE__
,
2457 "gdbarch: gdbarch_write_pc invalid");
2458 if (gdbarch_debug
>= 2)
2459 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2460 gdbarch
->write_pc (val
, ptid
);
2464 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2465 gdbarch_write_pc_ftype write_pc
)
2467 gdbarch
->write_pc
= write_pc
;
2471 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2473 gdb_assert (gdbarch
!= NULL
);
2474 if (gdbarch
->read_fp
== 0)
2475 internal_error (__FILE__
, __LINE__
,
2476 "gdbarch: gdbarch_read_fp invalid");
2477 if (gdbarch_debug
>= 2)
2478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2479 return gdbarch
->read_fp ();
2483 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2484 gdbarch_read_fp_ftype read_fp
)
2486 gdbarch
->read_fp
= read_fp
;
2490 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2492 gdb_assert (gdbarch
!= NULL
);
2493 if (gdbarch
->read_sp
== 0)
2494 internal_error (__FILE__
, __LINE__
,
2495 "gdbarch: gdbarch_read_sp invalid");
2496 if (gdbarch_debug
>= 2)
2497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2498 return gdbarch
->read_sp ();
2502 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2503 gdbarch_read_sp_ftype read_sp
)
2505 gdbarch
->read_sp
= read_sp
;
2509 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2511 gdb_assert (gdbarch
!= NULL
);
2512 if (gdbarch
->write_sp
== 0)
2513 internal_error (__FILE__
, __LINE__
,
2514 "gdbarch: gdbarch_write_sp invalid");
2515 if (gdbarch_debug
>= 2)
2516 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2517 gdbarch
->write_sp (val
);
2521 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2522 gdbarch_write_sp_ftype write_sp
)
2524 gdbarch
->write_sp
= write_sp
;
2528 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2530 gdb_assert (gdbarch
!= NULL
);
2531 if (gdbarch
->virtual_frame_pointer
== 0)
2532 internal_error (__FILE__
, __LINE__
,
2533 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2534 if (gdbarch_debug
>= 2)
2535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2536 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2540 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2541 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2543 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2547 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2549 gdb_assert (gdbarch
!= NULL
);
2550 return gdbarch
->register_read
!= 0;
2554 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2556 gdb_assert (gdbarch
!= NULL
);
2557 if (gdbarch
->register_read
== 0)
2558 internal_error (__FILE__
, __LINE__
,
2559 "gdbarch: gdbarch_register_read invalid");
2560 if (gdbarch_debug
>= 2)
2561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2562 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2566 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2567 gdbarch_register_read_ftype register_read
)
2569 gdbarch
->register_read
= register_read
;
2573 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2575 gdb_assert (gdbarch
!= NULL
);
2576 return gdbarch
->register_write
!= 0;
2580 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2582 gdb_assert (gdbarch
!= NULL
);
2583 if (gdbarch
->register_write
== 0)
2584 internal_error (__FILE__
, __LINE__
,
2585 "gdbarch: gdbarch_register_write invalid");
2586 if (gdbarch_debug
>= 2)
2587 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2588 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2592 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2593 gdbarch_register_write_ftype register_write
)
2595 gdbarch
->register_write
= register_write
;
2599 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2601 gdb_assert (gdbarch
!= NULL
);
2602 if (gdbarch
->num_regs
== -1)
2603 internal_error (__FILE__
, __LINE__
,
2604 "gdbarch: gdbarch_num_regs invalid");
2605 if (gdbarch_debug
>= 2)
2606 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2607 return gdbarch
->num_regs
;
2611 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2614 gdbarch
->num_regs
= num_regs
;
2618 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2620 gdb_assert (gdbarch
!= NULL
);
2621 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2622 if (gdbarch_debug
>= 2)
2623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2624 return gdbarch
->num_pseudo_regs
;
2628 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2629 int num_pseudo_regs
)
2631 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2635 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2637 gdb_assert (gdbarch
!= NULL
);
2638 /* Skip verify of sp_regnum, invalid_p == 0 */
2639 if (gdbarch_debug
>= 2)
2640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2641 return gdbarch
->sp_regnum
;
2645 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2648 gdbarch
->sp_regnum
= sp_regnum
;
2652 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2654 gdb_assert (gdbarch
!= NULL
);
2655 /* Skip verify of fp_regnum, invalid_p == 0 */
2656 if (gdbarch_debug
>= 2)
2657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2658 return gdbarch
->fp_regnum
;
2662 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2665 gdbarch
->fp_regnum
= fp_regnum
;
2669 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2671 gdb_assert (gdbarch
!= NULL
);
2672 /* Skip verify of pc_regnum, invalid_p == 0 */
2673 if (gdbarch_debug
>= 2)
2674 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2675 return gdbarch
->pc_regnum
;
2679 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2682 gdbarch
->pc_regnum
= pc_regnum
;
2686 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2688 gdb_assert (gdbarch
!= NULL
);
2689 /* Skip verify of ps_regnum, invalid_p == 0 */
2690 if (gdbarch_debug
>= 2)
2691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2692 return gdbarch
->ps_regnum
;
2696 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2699 gdbarch
->ps_regnum
= ps_regnum
;
2703 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2705 gdb_assert (gdbarch
!= NULL
);
2706 /* Skip verify of fp0_regnum, invalid_p == 0 */
2707 if (gdbarch_debug
>= 2)
2708 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2709 return gdbarch
->fp0_regnum
;
2713 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2716 gdbarch
->fp0_regnum
= fp0_regnum
;
2720 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2722 gdb_assert (gdbarch
!= NULL
);
2723 /* Skip verify of npc_regnum, invalid_p == 0 */
2724 if (gdbarch_debug
>= 2)
2725 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2726 return gdbarch
->npc_regnum
;
2730 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2733 gdbarch
->npc_regnum
= npc_regnum
;
2737 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2739 gdb_assert (gdbarch
!= NULL
);
2740 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2741 if (gdbarch_debug
>= 2)
2742 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2743 return gdbarch
->nnpc_regnum
;
2747 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2750 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2754 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2756 gdb_assert (gdbarch
!= NULL
);
2757 if (gdbarch
->stab_reg_to_regnum
== 0)
2758 internal_error (__FILE__
, __LINE__
,
2759 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2760 if (gdbarch_debug
>= 2)
2761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2762 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2766 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2767 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2769 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2773 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2775 gdb_assert (gdbarch
!= NULL
);
2776 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2777 internal_error (__FILE__
, __LINE__
,
2778 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2779 if (gdbarch_debug
>= 2)
2780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2781 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2785 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2786 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2788 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2792 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2794 gdb_assert (gdbarch
!= NULL
);
2795 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2796 internal_error (__FILE__
, __LINE__
,
2797 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2798 if (gdbarch_debug
>= 2)
2799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2800 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2804 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2805 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2807 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2811 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2813 gdb_assert (gdbarch
!= NULL
);
2814 if (gdbarch
->sdb_reg_to_regnum
== 0)
2815 internal_error (__FILE__
, __LINE__
,
2816 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2817 if (gdbarch_debug
>= 2)
2818 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2819 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2823 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2824 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2826 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2830 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2832 gdb_assert (gdbarch
!= NULL
);
2833 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2834 internal_error (__FILE__
, __LINE__
,
2835 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2836 if (gdbarch_debug
>= 2)
2837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2838 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2842 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2843 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2845 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2849 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2851 gdb_assert (gdbarch
!= NULL
);
2852 if (gdbarch
->register_name
== 0)
2853 internal_error (__FILE__
, __LINE__
,
2854 "gdbarch: gdbarch_register_name invalid");
2855 if (gdbarch_debug
>= 2)
2856 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2857 return gdbarch
->register_name (regnr
);
2861 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2862 gdbarch_register_name_ftype register_name
)
2864 gdbarch
->register_name
= register_name
;
2868 gdbarch_register_size (struct gdbarch
*gdbarch
)
2870 gdb_assert (gdbarch
!= NULL
);
2871 if (gdbarch
->register_size
== -1)
2872 internal_error (__FILE__
, __LINE__
,
2873 "gdbarch: gdbarch_register_size invalid");
2874 if (gdbarch_debug
>= 2)
2875 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2876 return gdbarch
->register_size
;
2880 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2883 gdbarch
->register_size
= register_size
;
2887 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2889 gdb_assert (gdbarch
!= NULL
);
2890 if (gdbarch
->register_bytes
== -1)
2891 internal_error (__FILE__
, __LINE__
,
2892 "gdbarch: gdbarch_register_bytes invalid");
2893 if (gdbarch_debug
>= 2)
2894 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2895 return gdbarch
->register_bytes
;
2899 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2902 gdbarch
->register_bytes
= register_bytes
;
2906 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2908 gdb_assert (gdbarch
!= NULL
);
2909 if (gdbarch
->register_byte
== 0)
2910 internal_error (__FILE__
, __LINE__
,
2911 "gdbarch: gdbarch_register_byte invalid");
2912 if (gdbarch_debug
>= 2)
2913 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2914 return gdbarch
->register_byte (reg_nr
);
2918 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2919 gdbarch_register_byte_ftype register_byte
)
2921 gdbarch
->register_byte
= register_byte
;
2925 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2927 gdb_assert (gdbarch
!= NULL
);
2928 if (gdbarch
->register_raw_size
== 0)
2929 internal_error (__FILE__
, __LINE__
,
2930 "gdbarch: gdbarch_register_raw_size invalid");
2931 if (gdbarch_debug
>= 2)
2932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2933 return gdbarch
->register_raw_size (reg_nr
);
2937 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2938 gdbarch_register_raw_size_ftype register_raw_size
)
2940 gdbarch
->register_raw_size
= register_raw_size
;
2944 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2946 gdb_assert (gdbarch
!= NULL
);
2947 if (gdbarch
->max_register_raw_size
== -1)
2948 internal_error (__FILE__
, __LINE__
,
2949 "gdbarch: gdbarch_max_register_raw_size invalid");
2950 if (gdbarch_debug
>= 2)
2951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2952 return gdbarch
->max_register_raw_size
;
2956 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2957 int max_register_raw_size
)
2959 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2963 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2965 gdb_assert (gdbarch
!= NULL
);
2966 if (gdbarch
->register_virtual_size
== 0)
2967 internal_error (__FILE__
, __LINE__
,
2968 "gdbarch: gdbarch_register_virtual_size invalid");
2969 if (gdbarch_debug
>= 2)
2970 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2971 return gdbarch
->register_virtual_size (reg_nr
);
2975 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2976 gdbarch_register_virtual_size_ftype register_virtual_size
)
2978 gdbarch
->register_virtual_size
= register_virtual_size
;
2982 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2984 gdb_assert (gdbarch
!= NULL
);
2985 if (gdbarch
->max_register_virtual_size
== -1)
2986 internal_error (__FILE__
, __LINE__
,
2987 "gdbarch: gdbarch_max_register_virtual_size invalid");
2988 if (gdbarch_debug
>= 2)
2989 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2990 return gdbarch
->max_register_virtual_size
;
2994 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2995 int max_register_virtual_size
)
2997 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
3001 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3003 gdb_assert (gdbarch
!= NULL
);
3004 if (gdbarch
->register_virtual_type
== 0)
3005 internal_error (__FILE__
, __LINE__
,
3006 "gdbarch: gdbarch_register_virtual_type invalid");
3007 if (gdbarch_debug
>= 2)
3008 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3009 return gdbarch
->register_virtual_type (reg_nr
);
3013 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3014 gdbarch_register_virtual_type_ftype register_virtual_type
)
3016 gdbarch
->register_virtual_type
= register_virtual_type
;
3020 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3022 gdb_assert (gdbarch
!= NULL
);
3023 if (gdbarch
->do_registers_info
== 0)
3024 internal_error (__FILE__
, __LINE__
,
3025 "gdbarch: gdbarch_do_registers_info invalid");
3026 if (gdbarch_debug
>= 2)
3027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
3028 gdbarch
->do_registers_info (reg_nr
, fpregs
);
3032 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
3033 gdbarch_do_registers_info_ftype do_registers_info
)
3035 gdbarch
->do_registers_info
= do_registers_info
;
3039 gdbarch_print_float_info (struct gdbarch
*gdbarch
)
3041 gdb_assert (gdbarch
!= NULL
);
3042 if (gdbarch
->print_float_info
== 0)
3043 internal_error (__FILE__
, __LINE__
,
3044 "gdbarch: gdbarch_print_float_info invalid");
3045 if (gdbarch_debug
>= 2)
3046 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3047 gdbarch
->print_float_info ();
3051 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3052 gdbarch_print_float_info_ftype print_float_info
)
3054 gdbarch
->print_float_info
= print_float_info
;
3058 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3060 gdb_assert (gdbarch
!= NULL
);
3061 if (gdbarch
->register_sim_regno
== 0)
3062 internal_error (__FILE__
, __LINE__
,
3063 "gdbarch: gdbarch_register_sim_regno invalid");
3064 if (gdbarch_debug
>= 2)
3065 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3066 return gdbarch
->register_sim_regno (reg_nr
);
3070 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3071 gdbarch_register_sim_regno_ftype register_sim_regno
)
3073 gdbarch
->register_sim_regno
= register_sim_regno
;
3077 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3079 gdb_assert (gdbarch
!= NULL
);
3080 return gdbarch
->register_bytes_ok
!= 0;
3084 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3086 gdb_assert (gdbarch
!= NULL
);
3087 if (gdbarch
->register_bytes_ok
== 0)
3088 internal_error (__FILE__
, __LINE__
,
3089 "gdbarch: gdbarch_register_bytes_ok invalid");
3090 if (gdbarch_debug
>= 2)
3091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3092 return gdbarch
->register_bytes_ok (nr_bytes
);
3096 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3097 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3099 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3103 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3105 gdb_assert (gdbarch
!= NULL
);
3106 if (gdbarch
->cannot_fetch_register
== 0)
3107 internal_error (__FILE__
, __LINE__
,
3108 "gdbarch: gdbarch_cannot_fetch_register invalid");
3109 if (gdbarch_debug
>= 2)
3110 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3111 return gdbarch
->cannot_fetch_register (regnum
);
3115 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3116 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3118 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3122 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3124 gdb_assert (gdbarch
!= NULL
);
3125 if (gdbarch
->cannot_store_register
== 0)
3126 internal_error (__FILE__
, __LINE__
,
3127 "gdbarch: gdbarch_cannot_store_register invalid");
3128 if (gdbarch_debug
>= 2)
3129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3130 return gdbarch
->cannot_store_register (regnum
);
3134 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3135 gdbarch_cannot_store_register_ftype cannot_store_register
)
3137 gdbarch
->cannot_store_register
= cannot_store_register
;
3141 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3143 gdb_assert (gdbarch
!= NULL
);
3144 return gdbarch
->get_longjmp_target
!= 0;
3148 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3150 gdb_assert (gdbarch
!= NULL
);
3151 if (gdbarch
->get_longjmp_target
== 0)
3152 internal_error (__FILE__
, __LINE__
,
3153 "gdbarch: gdbarch_get_longjmp_target invalid");
3154 if (gdbarch_debug
>= 2)
3155 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3156 return gdbarch
->get_longjmp_target (pc
);
3160 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3161 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3163 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3167 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3169 gdb_assert (gdbarch
!= NULL
);
3170 if (gdbarch
->use_generic_dummy_frames
== -1)
3171 internal_error (__FILE__
, __LINE__
,
3172 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3173 if (gdbarch_debug
>= 2)
3174 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3175 return gdbarch
->use_generic_dummy_frames
;
3179 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3180 int use_generic_dummy_frames
)
3182 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3186 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3188 gdb_assert (gdbarch
!= NULL
);
3189 if (gdbarch
->call_dummy_location
== 0)
3190 internal_error (__FILE__
, __LINE__
,
3191 "gdbarch: gdbarch_call_dummy_location invalid");
3192 if (gdbarch_debug
>= 2)
3193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3194 return gdbarch
->call_dummy_location
;
3198 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3199 int call_dummy_location
)
3201 gdbarch
->call_dummy_location
= call_dummy_location
;
3205 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3207 gdb_assert (gdbarch
!= NULL
);
3208 if (gdbarch
->call_dummy_address
== 0)
3209 internal_error (__FILE__
, __LINE__
,
3210 "gdbarch: gdbarch_call_dummy_address invalid");
3211 if (gdbarch_debug
>= 2)
3212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3213 return gdbarch
->call_dummy_address ();
3217 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3218 gdbarch_call_dummy_address_ftype call_dummy_address
)
3220 gdbarch
->call_dummy_address
= call_dummy_address
;
3224 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3226 gdb_assert (gdbarch
!= NULL
);
3227 if (gdbarch
->call_dummy_start_offset
== -1)
3228 internal_error (__FILE__
, __LINE__
,
3229 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3230 if (gdbarch_debug
>= 2)
3231 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3232 return gdbarch
->call_dummy_start_offset
;
3236 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3237 CORE_ADDR call_dummy_start_offset
)
3239 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3243 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3245 gdb_assert (gdbarch
!= NULL
);
3246 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3247 internal_error (__FILE__
, __LINE__
,
3248 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3249 if (gdbarch_debug
>= 2)
3250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3251 return gdbarch
->call_dummy_breakpoint_offset
;
3255 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3256 CORE_ADDR call_dummy_breakpoint_offset
)
3258 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3262 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3264 gdb_assert (gdbarch
!= NULL
);
3265 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3266 internal_error (__FILE__
, __LINE__
,
3267 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3268 if (gdbarch_debug
>= 2)
3269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3270 return gdbarch
->call_dummy_breakpoint_offset_p
;
3274 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3275 int call_dummy_breakpoint_offset_p
)
3277 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3281 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3283 gdb_assert (gdbarch
!= NULL
);
3284 if (gdbarch
->call_dummy_length
== -1)
3285 internal_error (__FILE__
, __LINE__
,
3286 "gdbarch: gdbarch_call_dummy_length invalid");
3287 if (gdbarch_debug
>= 2)
3288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3289 return gdbarch
->call_dummy_length
;
3293 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3294 int call_dummy_length
)
3296 gdbarch
->call_dummy_length
= call_dummy_length
;
3300 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3302 gdb_assert (gdbarch
!= NULL
);
3303 if (gdbarch
->pc_in_call_dummy
== 0)
3304 internal_error (__FILE__
, __LINE__
,
3305 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3306 if (gdbarch_debug
>= 2)
3307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3308 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3312 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3313 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3315 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3319 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3321 gdb_assert (gdbarch
!= NULL
);
3322 if (gdbarch
->call_dummy_p
== -1)
3323 internal_error (__FILE__
, __LINE__
,
3324 "gdbarch: gdbarch_call_dummy_p invalid");
3325 if (gdbarch_debug
>= 2)
3326 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3327 return gdbarch
->call_dummy_p
;
3331 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3334 gdbarch
->call_dummy_p
= call_dummy_p
;
3338 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3340 gdb_assert (gdbarch
!= NULL
);
3341 /* Skip verify of call_dummy_words, invalid_p == 0 */
3342 if (gdbarch_debug
>= 2)
3343 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3344 return gdbarch
->call_dummy_words
;
3348 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3349 LONGEST
* call_dummy_words
)
3351 gdbarch
->call_dummy_words
= call_dummy_words
;
3355 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3357 gdb_assert (gdbarch
!= NULL
);
3358 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3359 if (gdbarch_debug
>= 2)
3360 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3361 return gdbarch
->sizeof_call_dummy_words
;
3365 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3366 int sizeof_call_dummy_words
)
3368 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3372 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3374 gdb_assert (gdbarch
!= NULL
);
3375 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3376 internal_error (__FILE__
, __LINE__
,
3377 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3378 if (gdbarch_debug
>= 2)
3379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3380 return gdbarch
->call_dummy_stack_adjust_p
;
3384 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3385 int call_dummy_stack_adjust_p
)
3387 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3391 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3393 gdb_assert (gdbarch
!= NULL
);
3394 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3395 internal_error (__FILE__
, __LINE__
,
3396 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3397 if (gdbarch_debug
>= 2)
3398 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3399 return gdbarch
->call_dummy_stack_adjust
;
3403 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3404 int call_dummy_stack_adjust
)
3406 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3410 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
)
3412 gdb_assert (gdbarch
!= NULL
);
3413 if (gdbarch
->fix_call_dummy
== 0)
3414 internal_error (__FILE__
, __LINE__
,
3415 "gdbarch: gdbarch_fix_call_dummy invalid");
3416 if (gdbarch_debug
>= 2)
3417 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3418 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3422 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3423 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3425 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3429 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3431 gdb_assert (gdbarch
!= NULL
);
3432 if (gdbarch
->init_frame_pc_first
== 0)
3433 internal_error (__FILE__
, __LINE__
,
3434 "gdbarch: gdbarch_init_frame_pc_first invalid");
3435 if (gdbarch_debug
>= 2)
3436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3437 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3441 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3442 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3444 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3448 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3450 gdb_assert (gdbarch
!= NULL
);
3451 if (gdbarch
->init_frame_pc
== 0)
3452 internal_error (__FILE__
, __LINE__
,
3453 "gdbarch: gdbarch_init_frame_pc invalid");
3454 if (gdbarch_debug
>= 2)
3455 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3456 gdbarch
->init_frame_pc (fromleaf
, prev
);
3460 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3461 gdbarch_init_frame_pc_ftype init_frame_pc
)
3463 gdbarch
->init_frame_pc
= init_frame_pc
;
3467 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3469 gdb_assert (gdbarch
!= NULL
);
3470 if (gdbarch_debug
>= 2)
3471 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3472 return gdbarch
->believe_pcc_promotion
;
3476 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3477 int believe_pcc_promotion
)
3479 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3483 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3485 gdb_assert (gdbarch
!= NULL
);
3486 if (gdbarch_debug
>= 2)
3487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3488 return gdbarch
->believe_pcc_promotion_type
;
3492 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3493 int believe_pcc_promotion_type
)
3495 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3499 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3501 gdb_assert (gdbarch
!= NULL
);
3502 if (gdbarch
->coerce_float_to_double
== 0)
3503 internal_error (__FILE__
, __LINE__
,
3504 "gdbarch: gdbarch_coerce_float_to_double invalid");
3505 if (gdbarch_debug
>= 2)
3506 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3507 return gdbarch
->coerce_float_to_double (formal
, actual
);
3511 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3512 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3514 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3518 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
)
3520 gdb_assert (gdbarch
!= NULL
);
3521 if (gdbarch
->get_saved_register
== 0)
3522 internal_error (__FILE__
, __LINE__
,
3523 "gdbarch: gdbarch_get_saved_register invalid");
3524 if (gdbarch_debug
>= 2)
3525 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3526 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3530 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3531 gdbarch_get_saved_register_ftype get_saved_register
)
3533 gdbarch
->get_saved_register
= get_saved_register
;
3537 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3539 gdb_assert (gdbarch
!= NULL
);
3540 if (gdbarch
->register_convertible
== 0)
3541 internal_error (__FILE__
, __LINE__
,
3542 "gdbarch: gdbarch_register_convertible invalid");
3543 if (gdbarch_debug
>= 2)
3544 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3545 return gdbarch
->register_convertible (nr
);
3549 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3550 gdbarch_register_convertible_ftype register_convertible
)
3552 gdbarch
->register_convertible
= register_convertible
;
3556 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3558 gdb_assert (gdbarch
!= NULL
);
3559 if (gdbarch
->register_convert_to_virtual
== 0)
3560 internal_error (__FILE__
, __LINE__
,
3561 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3562 if (gdbarch_debug
>= 2)
3563 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3564 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3568 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3569 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3571 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3575 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3577 gdb_assert (gdbarch
!= NULL
);
3578 if (gdbarch
->register_convert_to_raw
== 0)
3579 internal_error (__FILE__
, __LINE__
,
3580 "gdbarch: gdbarch_register_convert_to_raw invalid");
3581 if (gdbarch_debug
>= 2)
3582 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3583 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3587 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3588 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3590 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3594 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3596 gdb_assert (gdbarch
!= NULL
);
3597 if (gdbarch
->convert_register_p
== 0)
3598 internal_error (__FILE__
, __LINE__
,
3599 "gdbarch: gdbarch_convert_register_p invalid");
3600 if (gdbarch_debug
>= 2)
3601 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3602 return gdbarch
->convert_register_p (regnum
);
3606 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3607 gdbarch_convert_register_p_ftype convert_register_p
)
3609 gdbarch
->convert_register_p
= convert_register_p
;
3613 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3615 gdb_assert (gdbarch
!= NULL
);
3616 if (gdbarch
->register_to_value
== 0)
3617 internal_error (__FILE__
, __LINE__
,
3618 "gdbarch: gdbarch_register_to_value invalid");
3619 if (gdbarch_debug
>= 2)
3620 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3621 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3625 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3626 gdbarch_register_to_value_ftype register_to_value
)
3628 gdbarch
->register_to_value
= register_to_value
;
3632 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3634 gdb_assert (gdbarch
!= NULL
);
3635 if (gdbarch
->value_to_register
== 0)
3636 internal_error (__FILE__
, __LINE__
,
3637 "gdbarch: gdbarch_value_to_register invalid");
3638 if (gdbarch_debug
>= 2)
3639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3640 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3644 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3645 gdbarch_value_to_register_ftype value_to_register
)
3647 gdbarch
->value_to_register
= value_to_register
;
3651 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3653 gdb_assert (gdbarch
!= NULL
);
3654 return gdbarch
->fetch_pseudo_register
!= 0;
3658 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3660 gdb_assert (gdbarch
!= NULL
);
3661 if (gdbarch
->fetch_pseudo_register
== 0)
3662 internal_error (__FILE__
, __LINE__
,
3663 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3664 if (gdbarch_debug
>= 2)
3665 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3666 gdbarch
->fetch_pseudo_register (regnum
);
3670 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3671 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3673 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3677 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3679 gdb_assert (gdbarch
!= NULL
);
3680 return gdbarch
->store_pseudo_register
!= 0;
3684 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3686 gdb_assert (gdbarch
!= NULL
);
3687 if (gdbarch
->store_pseudo_register
== 0)
3688 internal_error (__FILE__
, __LINE__
,
3689 "gdbarch: gdbarch_store_pseudo_register invalid");
3690 if (gdbarch_debug
>= 2)
3691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3692 gdbarch
->store_pseudo_register (regnum
);
3696 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3697 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3699 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3703 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3705 gdb_assert (gdbarch
!= NULL
);
3706 if (gdbarch
->pointer_to_address
== 0)
3707 internal_error (__FILE__
, __LINE__
,
3708 "gdbarch: gdbarch_pointer_to_address invalid");
3709 if (gdbarch_debug
>= 2)
3710 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3711 return gdbarch
->pointer_to_address (type
, buf
);
3715 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3716 gdbarch_pointer_to_address_ftype pointer_to_address
)
3718 gdbarch
->pointer_to_address
= pointer_to_address
;
3722 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3724 gdb_assert (gdbarch
!= NULL
);
3725 if (gdbarch
->address_to_pointer
== 0)
3726 internal_error (__FILE__
, __LINE__
,
3727 "gdbarch: gdbarch_address_to_pointer invalid");
3728 if (gdbarch_debug
>= 2)
3729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3730 gdbarch
->address_to_pointer (type
, buf
, addr
);
3734 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3735 gdbarch_address_to_pointer_ftype address_to_pointer
)
3737 gdbarch
->address_to_pointer
= address_to_pointer
;
3741 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3743 gdb_assert (gdbarch
!= NULL
);
3744 return gdbarch
->integer_to_address
!= 0;
3748 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3750 gdb_assert (gdbarch
!= NULL
);
3751 if (gdbarch
->integer_to_address
== 0)
3752 internal_error (__FILE__
, __LINE__
,
3753 "gdbarch: gdbarch_integer_to_address invalid");
3754 if (gdbarch_debug
>= 2)
3755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3756 return gdbarch
->integer_to_address (type
, buf
);
3760 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3761 gdbarch_integer_to_address_ftype integer_to_address
)
3763 gdbarch
->integer_to_address
= integer_to_address
;
3767 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3769 gdb_assert (gdbarch
!= NULL
);
3770 if (gdbarch
->return_value_on_stack
== 0)
3771 internal_error (__FILE__
, __LINE__
,
3772 "gdbarch: gdbarch_return_value_on_stack invalid");
3773 if (gdbarch_debug
>= 2)
3774 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3775 return gdbarch
->return_value_on_stack (type
);
3779 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3780 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3782 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3786 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3788 gdb_assert (gdbarch
!= NULL
);
3789 if (gdbarch
->extract_return_value
== 0)
3790 internal_error (__FILE__
, __LINE__
,
3791 "gdbarch: gdbarch_extract_return_value invalid");
3792 if (gdbarch_debug
>= 2)
3793 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3794 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3798 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3799 gdbarch_extract_return_value_ftype extract_return_value
)
3801 gdbarch
->extract_return_value
= extract_return_value
;
3805 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3807 gdb_assert (gdbarch
!= NULL
);
3808 if (gdbarch
->push_arguments
== 0)
3809 internal_error (__FILE__
, __LINE__
,
3810 "gdbarch: gdbarch_push_arguments invalid");
3811 if (gdbarch_debug
>= 2)
3812 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3813 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3817 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3818 gdbarch_push_arguments_ftype push_arguments
)
3820 gdbarch
->push_arguments
= push_arguments
;
3824 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3826 gdb_assert (gdbarch
!= NULL
);
3827 if (gdbarch
->push_dummy_frame
== 0)
3828 internal_error (__FILE__
, __LINE__
,
3829 "gdbarch: gdbarch_push_dummy_frame invalid");
3830 if (gdbarch_debug
>= 2)
3831 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3832 gdbarch
->push_dummy_frame ();
3836 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3837 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3839 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3843 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3845 gdb_assert (gdbarch
!= NULL
);
3846 return gdbarch
->push_return_address
!= 0;
3850 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3852 gdb_assert (gdbarch
!= NULL
);
3853 if (gdbarch
->push_return_address
== 0)
3854 internal_error (__FILE__
, __LINE__
,
3855 "gdbarch: gdbarch_push_return_address invalid");
3856 if (gdbarch_debug
>= 2)
3857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3858 return gdbarch
->push_return_address (pc
, sp
);
3862 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3863 gdbarch_push_return_address_ftype push_return_address
)
3865 gdbarch
->push_return_address
= push_return_address
;
3869 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3871 gdb_assert (gdbarch
!= NULL
);
3872 if (gdbarch
->pop_frame
== 0)
3873 internal_error (__FILE__
, __LINE__
,
3874 "gdbarch: gdbarch_pop_frame invalid");
3875 if (gdbarch_debug
>= 2)
3876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3877 gdbarch
->pop_frame ();
3881 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3882 gdbarch_pop_frame_ftype pop_frame
)
3884 gdbarch
->pop_frame
= pop_frame
;
3888 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3890 gdb_assert (gdbarch
!= NULL
);
3891 if (gdbarch
->store_struct_return
== 0)
3892 internal_error (__FILE__
, __LINE__
,
3893 "gdbarch: gdbarch_store_struct_return invalid");
3894 if (gdbarch_debug
>= 2)
3895 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3896 gdbarch
->store_struct_return (addr
, sp
);
3900 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3901 gdbarch_store_struct_return_ftype store_struct_return
)
3903 gdbarch
->store_struct_return
= store_struct_return
;
3907 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3909 gdb_assert (gdbarch
!= NULL
);
3910 if (gdbarch
->store_return_value
== 0)
3911 internal_error (__FILE__
, __LINE__
,
3912 "gdbarch: gdbarch_store_return_value invalid");
3913 if (gdbarch_debug
>= 2)
3914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3915 gdbarch
->store_return_value (type
, valbuf
);
3919 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3920 gdbarch_store_return_value_ftype store_return_value
)
3922 gdbarch
->store_return_value
= store_return_value
;
3926 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3928 gdb_assert (gdbarch
!= NULL
);
3929 return gdbarch
->extract_struct_value_address
!= 0;
3933 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3935 gdb_assert (gdbarch
!= NULL
);
3936 if (gdbarch
->extract_struct_value_address
== 0)
3937 internal_error (__FILE__
, __LINE__
,
3938 "gdbarch: gdbarch_extract_struct_value_address invalid");
3939 if (gdbarch_debug
>= 2)
3940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3941 return gdbarch
->extract_struct_value_address (regbuf
);
3945 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3946 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3948 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3952 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3954 gdb_assert (gdbarch
!= NULL
);
3955 if (gdbarch
->use_struct_convention
== 0)
3956 internal_error (__FILE__
, __LINE__
,
3957 "gdbarch: gdbarch_use_struct_convention invalid");
3958 if (gdbarch_debug
>= 2)
3959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3960 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3964 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3965 gdbarch_use_struct_convention_ftype use_struct_convention
)
3967 gdbarch
->use_struct_convention
= use_struct_convention
;
3971 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3973 gdb_assert (gdbarch
!= NULL
);
3974 if (gdbarch
->frame_init_saved_regs
== 0)
3975 internal_error (__FILE__
, __LINE__
,
3976 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3977 if (gdbarch_debug
>= 2)
3978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3979 gdbarch
->frame_init_saved_regs (frame
);
3983 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3984 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3986 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3990 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3992 gdb_assert (gdbarch
!= NULL
);
3993 return gdbarch
->init_extra_frame_info
!= 0;
3997 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3999 gdb_assert (gdbarch
!= NULL
);
4000 if (gdbarch
->init_extra_frame_info
== 0)
4001 internal_error (__FILE__
, __LINE__
,
4002 "gdbarch: gdbarch_init_extra_frame_info invalid");
4003 if (gdbarch_debug
>= 2)
4004 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
4005 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4009 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4010 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4012 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4016 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4018 gdb_assert (gdbarch
!= NULL
);
4019 if (gdbarch
->skip_prologue
== 0)
4020 internal_error (__FILE__
, __LINE__
,
4021 "gdbarch: gdbarch_skip_prologue invalid");
4022 if (gdbarch_debug
>= 2)
4023 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4024 return gdbarch
->skip_prologue (ip
);
4028 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4029 gdbarch_skip_prologue_ftype skip_prologue
)
4031 gdbarch
->skip_prologue
= skip_prologue
;
4035 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4037 gdb_assert (gdbarch
!= NULL
);
4038 if (gdbarch
->prologue_frameless_p
== 0)
4039 internal_error (__FILE__
, __LINE__
,
4040 "gdbarch: gdbarch_prologue_frameless_p invalid");
4041 if (gdbarch_debug
>= 2)
4042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4043 return gdbarch
->prologue_frameless_p (ip
);
4047 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4048 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4050 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4054 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4056 gdb_assert (gdbarch
!= NULL
);
4057 if (gdbarch
->inner_than
== 0)
4058 internal_error (__FILE__
, __LINE__
,
4059 "gdbarch: gdbarch_inner_than invalid");
4060 if (gdbarch_debug
>= 2)
4061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4062 return gdbarch
->inner_than (lhs
, rhs
);
4066 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4067 gdbarch_inner_than_ftype inner_than
)
4069 gdbarch
->inner_than
= inner_than
;
4072 const unsigned char *
4073 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4075 gdb_assert (gdbarch
!= NULL
);
4076 if (gdbarch
->breakpoint_from_pc
== 0)
4077 internal_error (__FILE__
, __LINE__
,
4078 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4079 if (gdbarch_debug
>= 2)
4080 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4081 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4085 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4086 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4088 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4092 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4094 gdb_assert (gdbarch
!= NULL
);
4095 if (gdbarch
->memory_insert_breakpoint
== 0)
4096 internal_error (__FILE__
, __LINE__
,
4097 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4098 if (gdbarch_debug
>= 2)
4099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4100 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4104 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4105 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4107 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4111 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4113 gdb_assert (gdbarch
!= NULL
);
4114 if (gdbarch
->memory_remove_breakpoint
== 0)
4115 internal_error (__FILE__
, __LINE__
,
4116 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4117 if (gdbarch_debug
>= 2)
4118 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4119 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4123 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4124 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4126 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4130 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4132 gdb_assert (gdbarch
!= NULL
);
4133 if (gdbarch
->decr_pc_after_break
== -1)
4134 internal_error (__FILE__
, __LINE__
,
4135 "gdbarch: gdbarch_decr_pc_after_break invalid");
4136 if (gdbarch_debug
>= 2)
4137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4138 return gdbarch
->decr_pc_after_break
;
4142 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4143 CORE_ADDR decr_pc_after_break
)
4145 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4149 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4151 gdb_assert (gdbarch
!= NULL
);
4152 if (gdbarch
->prepare_to_proceed
== 0)
4153 internal_error (__FILE__
, __LINE__
,
4154 "gdbarch: gdbarch_prepare_to_proceed invalid");
4155 if (gdbarch_debug
>= 2)
4156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4157 return gdbarch
->prepare_to_proceed (select_it
);
4161 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4162 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4164 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4168 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4170 gdb_assert (gdbarch
!= NULL
);
4171 if (gdbarch
->function_start_offset
== -1)
4172 internal_error (__FILE__
, __LINE__
,
4173 "gdbarch: gdbarch_function_start_offset invalid");
4174 if (gdbarch_debug
>= 2)
4175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4176 return gdbarch
->function_start_offset
;
4180 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4181 CORE_ADDR function_start_offset
)
4183 gdbarch
->function_start_offset
= function_start_offset
;
4187 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4189 gdb_assert (gdbarch
!= NULL
);
4190 if (gdbarch
->remote_translate_xfer_address
== 0)
4191 internal_error (__FILE__
, __LINE__
,
4192 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4193 if (gdbarch_debug
>= 2)
4194 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4195 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4199 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4200 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4202 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4206 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4208 gdb_assert (gdbarch
!= NULL
);
4209 if (gdbarch
->frame_args_skip
== -1)
4210 internal_error (__FILE__
, __LINE__
,
4211 "gdbarch: gdbarch_frame_args_skip invalid");
4212 if (gdbarch_debug
>= 2)
4213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4214 return gdbarch
->frame_args_skip
;
4218 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4219 CORE_ADDR frame_args_skip
)
4221 gdbarch
->frame_args_skip
= frame_args_skip
;
4225 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4227 gdb_assert (gdbarch
!= NULL
);
4228 if (gdbarch
->frameless_function_invocation
== 0)
4229 internal_error (__FILE__
, __LINE__
,
4230 "gdbarch: gdbarch_frameless_function_invocation invalid");
4231 if (gdbarch_debug
>= 2)
4232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4233 return gdbarch
->frameless_function_invocation (fi
);
4237 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4238 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4240 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4244 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4246 gdb_assert (gdbarch
!= NULL
);
4247 if (gdbarch
->frame_chain
== 0)
4248 internal_error (__FILE__
, __LINE__
,
4249 "gdbarch: gdbarch_frame_chain invalid");
4250 if (gdbarch_debug
>= 2)
4251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4252 return gdbarch
->frame_chain (frame
);
4256 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4257 gdbarch_frame_chain_ftype frame_chain
)
4259 gdbarch
->frame_chain
= frame_chain
;
4263 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4265 gdb_assert (gdbarch
!= NULL
);
4266 if (gdbarch
->frame_chain_valid
== 0)
4267 internal_error (__FILE__
, __LINE__
,
4268 "gdbarch: gdbarch_frame_chain_valid invalid");
4269 if (gdbarch_debug
>= 2)
4270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4271 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4275 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4276 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4278 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4282 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4284 gdb_assert (gdbarch
!= NULL
);
4285 if (gdbarch
->frame_saved_pc
== 0)
4286 internal_error (__FILE__
, __LINE__
,
4287 "gdbarch: gdbarch_frame_saved_pc invalid");
4288 if (gdbarch_debug
>= 2)
4289 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4290 return gdbarch
->frame_saved_pc (fi
);
4294 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4295 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4297 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4301 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4303 gdb_assert (gdbarch
!= NULL
);
4304 if (gdbarch
->frame_args_address
== 0)
4305 internal_error (__FILE__
, __LINE__
,
4306 "gdbarch: gdbarch_frame_args_address invalid");
4307 if (gdbarch_debug
>= 2)
4308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4309 return gdbarch
->frame_args_address (fi
);
4313 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4314 gdbarch_frame_args_address_ftype frame_args_address
)
4316 gdbarch
->frame_args_address
= frame_args_address
;
4320 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4322 gdb_assert (gdbarch
!= NULL
);
4323 if (gdbarch
->frame_locals_address
== 0)
4324 internal_error (__FILE__
, __LINE__
,
4325 "gdbarch: gdbarch_frame_locals_address invalid");
4326 if (gdbarch_debug
>= 2)
4327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4328 return gdbarch
->frame_locals_address (fi
);
4332 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4333 gdbarch_frame_locals_address_ftype frame_locals_address
)
4335 gdbarch
->frame_locals_address
= frame_locals_address
;
4339 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4341 gdb_assert (gdbarch
!= NULL
);
4342 if (gdbarch
->saved_pc_after_call
== 0)
4343 internal_error (__FILE__
, __LINE__
,
4344 "gdbarch: gdbarch_saved_pc_after_call invalid");
4345 if (gdbarch_debug
>= 2)
4346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4347 return gdbarch
->saved_pc_after_call (frame
);
4351 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4352 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4354 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4358 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4360 gdb_assert (gdbarch
!= NULL
);
4361 if (gdbarch
->frame_num_args
== 0)
4362 internal_error (__FILE__
, __LINE__
,
4363 "gdbarch: gdbarch_frame_num_args invalid");
4364 if (gdbarch_debug
>= 2)
4365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4366 return gdbarch
->frame_num_args (frame
);
4370 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4371 gdbarch_frame_num_args_ftype frame_num_args
)
4373 gdbarch
->frame_num_args
= frame_num_args
;
4377 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4379 gdb_assert (gdbarch
!= NULL
);
4380 return gdbarch
->stack_align
!= 0;
4384 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4386 gdb_assert (gdbarch
!= NULL
);
4387 if (gdbarch
->stack_align
== 0)
4388 internal_error (__FILE__
, __LINE__
,
4389 "gdbarch: gdbarch_stack_align invalid");
4390 if (gdbarch_debug
>= 2)
4391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4392 return gdbarch
->stack_align (sp
);
4396 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4397 gdbarch_stack_align_ftype stack_align
)
4399 gdbarch
->stack_align
= stack_align
;
4403 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4405 gdb_assert (gdbarch
!= NULL
);
4406 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4407 if (gdbarch_debug
>= 2)
4408 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4409 return gdbarch
->extra_stack_alignment_needed
;
4413 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4414 int extra_stack_alignment_needed
)
4416 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4420 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4422 gdb_assert (gdbarch
!= NULL
);
4423 return gdbarch
->reg_struct_has_addr
!= 0;
4427 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4429 gdb_assert (gdbarch
!= NULL
);
4430 if (gdbarch
->reg_struct_has_addr
== 0)
4431 internal_error (__FILE__
, __LINE__
,
4432 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4433 if (gdbarch_debug
>= 2)
4434 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4435 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4439 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4440 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4442 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4446 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4448 gdb_assert (gdbarch
!= NULL
);
4449 return gdbarch
->save_dummy_frame_tos
!= 0;
4453 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4455 gdb_assert (gdbarch
!= NULL
);
4456 if (gdbarch
->save_dummy_frame_tos
== 0)
4457 internal_error (__FILE__
, __LINE__
,
4458 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4459 if (gdbarch_debug
>= 2)
4460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4461 gdbarch
->save_dummy_frame_tos (sp
);
4465 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4466 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4468 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4472 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4474 gdb_assert (gdbarch
!= NULL
);
4475 if (gdbarch_debug
>= 2)
4476 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4477 return gdbarch
->parm_boundary
;
4481 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4484 gdbarch
->parm_boundary
= parm_boundary
;
4487 const struct floatformat
*
4488 gdbarch_float_format (struct gdbarch
*gdbarch
)
4490 gdb_assert (gdbarch
!= NULL
);
4491 if (gdbarch_debug
>= 2)
4492 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4493 return gdbarch
->float_format
;
4497 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4498 const struct floatformat
* float_format
)
4500 gdbarch
->float_format
= float_format
;
4503 const struct floatformat
*
4504 gdbarch_double_format (struct gdbarch
*gdbarch
)
4506 gdb_assert (gdbarch
!= NULL
);
4507 if (gdbarch_debug
>= 2)
4508 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4509 return gdbarch
->double_format
;
4513 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4514 const struct floatformat
* double_format
)
4516 gdbarch
->double_format
= double_format
;
4519 const struct floatformat
*
4520 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4522 gdb_assert (gdbarch
!= NULL
);
4523 if (gdbarch_debug
>= 2)
4524 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4525 return gdbarch
->long_double_format
;
4529 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4530 const struct floatformat
* long_double_format
)
4532 gdbarch
->long_double_format
= long_double_format
;
4536 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4538 gdb_assert (gdbarch
!= NULL
);
4539 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4540 internal_error (__FILE__
, __LINE__
,
4541 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4542 if (gdbarch_debug
>= 2)
4543 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4544 return gdbarch
->convert_from_func_ptr_addr (addr
);
4548 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4549 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4551 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4555 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4557 gdb_assert (gdbarch
!= NULL
);
4558 if (gdbarch
->addr_bits_remove
== 0)
4559 internal_error (__FILE__
, __LINE__
,
4560 "gdbarch: gdbarch_addr_bits_remove invalid");
4561 if (gdbarch_debug
>= 2)
4562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4563 return gdbarch
->addr_bits_remove (addr
);
4567 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4568 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4570 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4574 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4576 gdb_assert (gdbarch
!= NULL
);
4577 if (gdbarch
->smash_text_address
== 0)
4578 internal_error (__FILE__
, __LINE__
,
4579 "gdbarch: gdbarch_smash_text_address invalid");
4580 if (gdbarch_debug
>= 2)
4581 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4582 return gdbarch
->smash_text_address (addr
);
4586 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4587 gdbarch_smash_text_address_ftype smash_text_address
)
4589 gdbarch
->smash_text_address
= smash_text_address
;
4593 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4595 gdb_assert (gdbarch
!= NULL
);
4596 return gdbarch
->software_single_step
!= 0;
4600 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4602 gdb_assert (gdbarch
!= NULL
);
4603 if (gdbarch
->software_single_step
== 0)
4604 internal_error (__FILE__
, __LINE__
,
4605 "gdbarch: gdbarch_software_single_step invalid");
4606 if (gdbarch_debug
>= 2)
4607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4608 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4612 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4613 gdbarch_software_single_step_ftype software_single_step
)
4615 gdbarch
->software_single_step
= software_single_step
;
4619 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4621 gdb_assert (gdbarch
!= NULL
);
4622 if (gdbarch
->print_insn
== 0)
4623 internal_error (__FILE__
, __LINE__
,
4624 "gdbarch: gdbarch_print_insn invalid");
4625 if (gdbarch_debug
>= 2)
4626 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4627 return gdbarch
->print_insn (vma
, info
);
4631 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4632 gdbarch_print_insn_ftype print_insn
)
4634 gdbarch
->print_insn
= print_insn
;
4638 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4640 gdb_assert (gdbarch
!= NULL
);
4641 if (gdbarch
->skip_trampoline_code
== 0)
4642 internal_error (__FILE__
, __LINE__
,
4643 "gdbarch: gdbarch_skip_trampoline_code invalid");
4644 if (gdbarch_debug
>= 2)
4645 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4646 return gdbarch
->skip_trampoline_code (pc
);
4650 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4651 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4653 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4657 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4659 gdb_assert (gdbarch
!= NULL
);
4660 if (gdbarch
->in_solib_call_trampoline
== 0)
4661 internal_error (__FILE__
, __LINE__
,
4662 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4663 if (gdbarch_debug
>= 2)
4664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4665 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4669 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4670 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4672 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4676 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4678 gdb_assert (gdbarch
!= NULL
);
4679 if (gdbarch
->pc_in_sigtramp
== 0)
4680 internal_error (__FILE__
, __LINE__
,
4681 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4682 if (gdbarch_debug
>= 2)
4683 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4684 return gdbarch
->pc_in_sigtramp (pc
, name
);
4688 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4689 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4691 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4695 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4697 gdb_assert (gdbarch
!= NULL
);
4698 if (gdbarch
->in_function_epilogue_p
== 0)
4699 internal_error (__FILE__
, __LINE__
,
4700 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4701 if (gdbarch_debug
>= 2)
4702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4703 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4707 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4708 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4710 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4714 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4716 gdb_assert (gdbarch
!= NULL
);
4717 if (gdbarch
->construct_inferior_arguments
== 0)
4718 internal_error (__FILE__
, __LINE__
,
4719 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4720 if (gdbarch_debug
>= 2)
4721 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4722 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4726 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4727 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4729 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4733 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4735 gdb_assert (gdbarch
!= NULL
);
4736 return gdbarch
->dwarf2_build_frame_info
!= 0;
4740 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4742 gdb_assert (gdbarch
!= NULL
);
4743 if (gdbarch
->dwarf2_build_frame_info
== 0)
4744 internal_error (__FILE__
, __LINE__
,
4745 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4746 if (gdbarch_debug
>= 2)
4747 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4748 gdbarch
->dwarf2_build_frame_info (objfile
);
4752 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4753 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4755 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4759 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4761 gdb_assert (gdbarch
!= NULL
);
4762 if (gdbarch
->elf_make_msymbol_special
== 0)
4763 internal_error (__FILE__
, __LINE__
,
4764 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4765 if (gdbarch_debug
>= 2)
4766 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4767 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4771 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4772 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4774 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4778 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4780 gdb_assert (gdbarch
!= NULL
);
4781 if (gdbarch
->coff_make_msymbol_special
== 0)
4782 internal_error (__FILE__
, __LINE__
,
4783 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4784 if (gdbarch_debug
>= 2)
4785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4786 gdbarch
->coff_make_msymbol_special (val
, msym
);
4790 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4791 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4793 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4797 /* Keep a registry of per-architecture data-pointers required by GDB
4803 gdbarch_data_init_ftype
*init
;
4804 gdbarch_data_free_ftype
*free
;
4807 struct gdbarch_data_registration
4809 struct gdbarch_data
*data
;
4810 struct gdbarch_data_registration
*next
;
4813 struct gdbarch_data_registry
4816 struct gdbarch_data_registration
*registrations
;
4819 struct gdbarch_data_registry gdbarch_data_registry
=
4824 struct gdbarch_data
*
4825 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4826 gdbarch_data_free_ftype
*free
)
4828 struct gdbarch_data_registration
**curr
;
4829 for (curr
= &gdbarch_data_registry
.registrations
;
4831 curr
= &(*curr
)->next
);
4832 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4833 (*curr
)->next
= NULL
;
4834 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4835 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4836 (*curr
)->data
->init
= init
;
4837 (*curr
)->data
->free
= free
;
4838 return (*curr
)->data
;
4842 /* Walk through all the registered users initializing each in turn. */
4845 init_gdbarch_data (struct gdbarch
*gdbarch
)
4847 struct gdbarch_data_registration
*rego
;
4848 for (rego
= gdbarch_data_registry
.registrations
;
4852 struct gdbarch_data
*data
= rego
->data
;
4853 gdb_assert (data
->index
< gdbarch
->nr_data
);
4854 if (data
->init
!= NULL
)
4856 void *pointer
= data
->init (gdbarch
);
4857 set_gdbarch_data (gdbarch
, data
, pointer
);
4862 /* Create/delete the gdbarch data vector. */
4865 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4867 gdb_assert (gdbarch
->data
== NULL
);
4868 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4869 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4873 free_gdbarch_data (struct gdbarch
*gdbarch
)
4875 struct gdbarch_data_registration
*rego
;
4876 gdb_assert (gdbarch
->data
!= NULL
);
4877 for (rego
= gdbarch_data_registry
.registrations
;
4881 struct gdbarch_data
*data
= rego
->data
;
4882 gdb_assert (data
->index
< gdbarch
->nr_data
);
4883 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4885 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4886 gdbarch
->data
[data
->index
] = NULL
;
4889 xfree (gdbarch
->data
);
4890 gdbarch
->data
= NULL
;
4894 /* Initialize the current value of thee specified per-architecture
4898 set_gdbarch_data (struct gdbarch
*gdbarch
,
4899 struct gdbarch_data
*data
,
4902 gdb_assert (data
->index
< gdbarch
->nr_data
);
4903 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4904 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4905 gdbarch
->data
[data
->index
] = pointer
;
4908 /* Return the current value of the specified per-architecture
4912 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4914 gdb_assert (data
->index
< gdbarch
->nr_data
);
4915 return gdbarch
->data
[data
->index
];
4920 /* Keep a registry of swapped data required by GDB modules. */
4925 struct gdbarch_swap_registration
*source
;
4926 struct gdbarch_swap
*next
;
4929 struct gdbarch_swap_registration
4932 unsigned long sizeof_data
;
4933 gdbarch_swap_ftype
*init
;
4934 struct gdbarch_swap_registration
*next
;
4937 struct gdbarch_swap_registry
4940 struct gdbarch_swap_registration
*registrations
;
4943 struct gdbarch_swap_registry gdbarch_swap_registry
=
4949 register_gdbarch_swap (void *data
,
4950 unsigned long sizeof_data
,
4951 gdbarch_swap_ftype
*init
)
4953 struct gdbarch_swap_registration
**rego
;
4954 for (rego
= &gdbarch_swap_registry
.registrations
;
4956 rego
= &(*rego
)->next
);
4957 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4958 (*rego
)->next
= NULL
;
4959 (*rego
)->init
= init
;
4960 (*rego
)->data
= data
;
4961 (*rego
)->sizeof_data
= sizeof_data
;
4965 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
4967 struct gdbarch_swap
*curr
;
4968 for (curr
= gdbarch
->swap
;
4972 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
4977 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4979 struct gdbarch_swap_registration
*rego
;
4980 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4981 for (rego
= gdbarch_swap_registry
.registrations
;
4985 if (rego
->data
!= NULL
)
4987 (*curr
) = XMALLOC (struct gdbarch_swap
);
4988 (*curr
)->source
= rego
;
4989 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4990 (*curr
)->next
= NULL
;
4991 curr
= &(*curr
)->next
;
4993 if (rego
->init
!= NULL
)
4999 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5001 struct gdbarch_swap
*curr
;
5002 for (curr
= gdbarch
->swap
;
5005 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5009 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5011 struct gdbarch_swap
*curr
;
5012 for (curr
= gdbarch
->swap
;
5015 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5019 /* Keep a registry of the architectures known by GDB. */
5021 struct gdbarch_registration
5023 enum bfd_architecture bfd_architecture
;
5024 gdbarch_init_ftype
*init
;
5025 gdbarch_dump_tdep_ftype
*dump_tdep
;
5026 struct gdbarch_list
*arches
;
5027 struct gdbarch_registration
*next
;
5030 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5033 append_name (const char ***buf
, int *nr
, const char *name
)
5035 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5041 gdbarch_printable_names (void)
5045 /* Accumulate a list of names based on the registed list of
5047 enum bfd_architecture a
;
5049 const char **arches
= NULL
;
5050 struct gdbarch_registration
*rego
;
5051 for (rego
= gdbarch_registry
;
5055 const struct bfd_arch_info
*ap
;
5056 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5058 internal_error (__FILE__
, __LINE__
,
5059 "gdbarch_architecture_names: multi-arch unknown");
5062 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5067 append_name (&arches
, &nr_arches
, NULL
);
5071 /* Just return all the architectures that BFD knows. Assume that
5072 the legacy architecture framework supports them. */
5073 return bfd_arch_list ();
5078 gdbarch_register (enum bfd_architecture bfd_architecture
,
5079 gdbarch_init_ftype
*init
,
5080 gdbarch_dump_tdep_ftype
*dump_tdep
)
5082 struct gdbarch_registration
**curr
;
5083 const struct bfd_arch_info
*bfd_arch_info
;
5084 /* Check that BFD recognizes this architecture */
5085 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5086 if (bfd_arch_info
== NULL
)
5088 internal_error (__FILE__
, __LINE__
,
5089 "gdbarch: Attempt to register unknown architecture (%d)",
5092 /* Check that we haven't seen this architecture before */
5093 for (curr
= &gdbarch_registry
;
5095 curr
= &(*curr
)->next
)
5097 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5098 internal_error (__FILE__
, __LINE__
,
5099 "gdbarch: Duplicate registraration of architecture (%s)",
5100 bfd_arch_info
->printable_name
);
5104 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5105 bfd_arch_info
->printable_name
,
5108 (*curr
) = XMALLOC (struct gdbarch_registration
);
5109 (*curr
)->bfd_architecture
= bfd_architecture
;
5110 (*curr
)->init
= init
;
5111 (*curr
)->dump_tdep
= dump_tdep
;
5112 (*curr
)->arches
= NULL
;
5113 (*curr
)->next
= NULL
;
5114 /* When non- multi-arch, install whatever target dump routine we've
5115 been provided - hopefully that routine has been written correctly
5116 and works regardless of multi-arch. */
5117 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5118 && startup_gdbarch
.dump_tdep
== NULL
)
5119 startup_gdbarch
.dump_tdep
= dump_tdep
;
5123 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5124 gdbarch_init_ftype
*init
)
5126 gdbarch_register (bfd_architecture
, init
, NULL
);
5130 /* Look for an architecture using gdbarch_info. Base search on only
5131 BFD_ARCH_INFO and BYTE_ORDER. */
5133 struct gdbarch_list
*
5134 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5135 const struct gdbarch_info
*info
)
5137 for (; arches
!= NULL
; arches
= arches
->next
)
5139 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5141 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5149 /* Update the current architecture. Return ZERO if the update request
5153 gdbarch_update_p (struct gdbarch_info info
)
5155 struct gdbarch
*new_gdbarch
;
5156 struct gdbarch
*old_gdbarch
;
5157 struct gdbarch_registration
*rego
;
5159 /* Fill in missing parts of the INFO struct using a number of
5160 sources: ``set ...''; INFOabfd supplied; existing target. */
5162 /* ``(gdb) set architecture ...'' */
5163 if (info
.bfd_arch_info
== NULL
5164 && !TARGET_ARCHITECTURE_AUTO
)
5165 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5166 if (info
.bfd_arch_info
== NULL
5167 && info
.abfd
!= NULL
5168 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5169 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5170 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5171 if (info
.bfd_arch_info
== NULL
)
5172 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5174 /* ``(gdb) set byte-order ...'' */
5175 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5176 && !TARGET_BYTE_ORDER_AUTO
)
5177 info
.byte_order
= TARGET_BYTE_ORDER
;
5178 /* From the INFO struct. */
5179 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5180 && info
.abfd
!= NULL
)
5181 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5182 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5183 : BFD_ENDIAN_UNKNOWN
);
5184 /* From the current target. */
5185 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5186 info
.byte_order
= TARGET_BYTE_ORDER
;
5188 /* Must have found some sort of architecture. */
5189 gdb_assert (info
.bfd_arch_info
!= NULL
);
5193 fprintf_unfiltered (gdb_stdlog
,
5194 "gdbarch_update: info.bfd_arch_info %s\n",
5195 (info
.bfd_arch_info
!= NULL
5196 ? info
.bfd_arch_info
->printable_name
5198 fprintf_unfiltered (gdb_stdlog
,
5199 "gdbarch_update: info.byte_order %d (%s)\n",
5201 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5202 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5204 fprintf_unfiltered (gdb_stdlog
,
5205 "gdbarch_update: info.abfd 0x%lx\n",
5207 fprintf_unfiltered (gdb_stdlog
,
5208 "gdbarch_update: info.tdep_info 0x%lx\n",
5209 (long) info
.tdep_info
);
5212 /* Find the target that knows about this architecture. */
5213 for (rego
= gdbarch_registry
;
5216 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5225 /* Swap the data belonging to the old target out setting the
5226 installed data to zero. This stops the ->init() function trying
5227 to refer to the previous architecture's global data structures. */
5228 swapout_gdbarch_swap (current_gdbarch
);
5229 clear_gdbarch_swap (current_gdbarch
);
5231 /* Save the previously selected architecture, setting the global to
5232 NULL. This stops ->init() trying to use the previous
5233 architecture's configuration. The previous architecture may not
5234 even be of the same architecture family. The most recent
5235 architecture of the same family is found at the head of the
5236 rego->arches list. */
5237 old_gdbarch
= current_gdbarch
;
5238 current_gdbarch
= NULL
;
5240 /* Ask the target for a replacement architecture. */
5241 new_gdbarch
= rego
->init (info
, rego
->arches
);
5243 /* Did the target like it? No. Reject the change and revert to the
5244 old architecture. */
5245 if (new_gdbarch
== NULL
)
5248 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5249 swapin_gdbarch_swap (old_gdbarch
);
5250 current_gdbarch
= old_gdbarch
;
5254 /* Did the architecture change? No. Oops, put the old architecture
5256 if (old_gdbarch
== new_gdbarch
)
5259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5261 new_gdbarch
->bfd_arch_info
->printable_name
);
5262 swapin_gdbarch_swap (old_gdbarch
);
5263 current_gdbarch
= old_gdbarch
;
5267 /* Is this a pre-existing architecture? Yes. Move it to the front
5268 of the list of architectures (keeping the list sorted Most
5269 Recently Used) and then copy it in. */
5271 struct gdbarch_list
**list
;
5272 for (list
= ®o
->arches
;
5274 list
= &(*list
)->next
)
5276 if ((*list
)->gdbarch
== new_gdbarch
)
5278 struct gdbarch_list
*this;
5280 fprintf_unfiltered (gdb_stdlog
,
5281 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5283 new_gdbarch
->bfd_arch_info
->printable_name
);
5286 (*list
) = this->next
;
5287 /* Insert in the front. */
5288 this->next
= rego
->arches
;
5289 rego
->arches
= this;
5290 /* Copy the new architecture in. */
5291 current_gdbarch
= new_gdbarch
;
5292 swapin_gdbarch_swap (new_gdbarch
);
5293 architecture_changed_event ();
5299 /* Prepend this new architecture to the architecture list (keep the
5300 list sorted Most Recently Used). */
5302 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5303 this->next
= rego
->arches
;
5304 this->gdbarch
= new_gdbarch
;
5305 rego
->arches
= this;
5308 /* Switch to this new architecture. Dump it out. */
5309 current_gdbarch
= new_gdbarch
;
5312 fprintf_unfiltered (gdb_stdlog
,
5313 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5315 new_gdbarch
->bfd_arch_info
->printable_name
);
5318 /* Check that the newly installed architecture is valid. Plug in
5319 any post init values. */
5320 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5321 verify_gdbarch (new_gdbarch
);
5323 /* Initialize the per-architecture memory (swap) areas.
5324 CURRENT_GDBARCH must be update before these modules are
5326 init_gdbarch_swap (new_gdbarch
);
5328 /* Initialize the per-architecture data-pointer of all parties that
5329 registered an interest in this architecture. CURRENT_GDBARCH
5330 must be updated before these modules are called. */
5331 init_gdbarch_data (new_gdbarch
);
5332 architecture_changed_event ();
5335 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5343 /* Pointer to the target-dependent disassembly function. */
5344 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5345 disassemble_info tm_print_insn_info
;
5348 extern void _initialize_gdbarch (void);
5351 _initialize_gdbarch (void)
5353 struct cmd_list_element
*c
;
5355 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5356 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5357 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5358 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5359 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5361 add_show_from_set (add_set_cmd ("arch",
5364 (char *)&gdbarch_debug
,
5365 "Set architecture debugging.\n\
5366 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5368 c
= add_set_cmd ("archdebug",
5371 (char *)&gdbarch_debug
,
5372 "Set architecture debugging.\n\
5373 When non-zero, architecture debugging is enabled.", &setlist
);
5375 deprecate_cmd (c
, "set debug arch");
5376 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");