1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
68 /* Static function declarations */
70 static void verify_gdbarch (struct gdbarch
*gdbarch
);
71 static void alloc_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void clear_gdbarch_swap (struct gdbarch
*);
75 static void swapout_gdbarch_swap (struct gdbarch
*);
76 static void swapin_gdbarch_swap (struct gdbarch
*);
78 /* Non-zero if we want to trace architecture code. */
81 #define GDBARCH_DEBUG 0
83 int gdbarch_debug
= GDBARCH_DEBUG
;
86 /* Maintain the struct gdbarch object */
90 /* Has this architecture been fully initialized? */
92 /* basic architectural information */
93 const struct bfd_arch_info
* bfd_arch_info
;
96 /* target specific vector. */
97 struct gdbarch_tdep
*tdep
;
98 gdbarch_dump_tdep_ftype
*dump_tdep
;
100 /* per-architecture data-pointers */
104 /* per-architecture swap-regions */
105 struct gdbarch_swap
*swap
;
107 /* Multi-arch values.
109 When extending this structure you must:
113 Declare set/get functions and define the corresponding
116 gdbarch_alloc(): If zero/NULL is not a suitable default,
117 initialize the new field.
119 verify_gdbarch(): Confirm that the target updated the field
122 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
125 ``startup_gdbarch()'': Append an initial value to the static
126 variable (base values on the host's c-type system).
128 get_gdbarch(): Implement the set/get functions (probably using
129 the macro's as shortcuts).
144 gdbarch_read_pc_ftype
*read_pc
;
145 gdbarch_write_pc_ftype
*write_pc
;
146 gdbarch_read_fp_ftype
*read_fp
;
147 gdbarch_read_sp_ftype
*read_sp
;
148 gdbarch_write_sp_ftype
*write_sp
;
149 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
150 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
151 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
160 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
161 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
162 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
163 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
164 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
165 gdbarch_register_name_ftype
*register_name
;
168 gdbarch_register_byte_ftype
*register_byte
;
169 gdbarch_register_raw_size_ftype
*register_raw_size
;
170 int max_register_raw_size
;
171 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
172 int max_register_virtual_size
;
173 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
174 gdbarch_do_registers_info_ftype
*do_registers_info
;
175 gdbarch_print_float_info_ftype
*print_float_info
;
176 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
177 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
178 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
179 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
180 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
181 int use_generic_dummy_frames
;
182 int call_dummy_location
;
183 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
184 CORE_ADDR call_dummy_start_offset
;
185 CORE_ADDR call_dummy_breakpoint_offset
;
186 int call_dummy_breakpoint_offset_p
;
187 int call_dummy_length
;
188 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
190 LONGEST
* call_dummy_words
;
191 int sizeof_call_dummy_words
;
192 int call_dummy_stack_adjust_p
;
193 int call_dummy_stack_adjust
;
194 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
195 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
196 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
197 int believe_pcc_promotion
;
198 int believe_pcc_promotion_type
;
199 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
200 gdbarch_get_saved_register_ftype
*get_saved_register
;
201 gdbarch_register_convertible_ftype
*register_convertible
;
202 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
203 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
204 gdbarch_convert_register_p_ftype
*convert_register_p
;
205 gdbarch_register_to_value_ftype
*register_to_value
;
206 gdbarch_value_to_register_ftype
*value_to_register
;
207 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
208 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
209 gdbarch_integer_to_address_ftype
*integer_to_address
;
210 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
211 gdbarch_extract_return_value_ftype
*extract_return_value
;
212 gdbarch_deprecated_extract_return_value_ftype
*deprecated_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_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
221 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
222 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
223 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
224 gdbarch_skip_prologue_ftype
*skip_prologue
;
225 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
226 gdbarch_inner_than_ftype
*inner_than
;
227 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
228 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
229 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
230 CORE_ADDR decr_pc_after_break
;
231 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
232 CORE_ADDR function_start_offset
;
233 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
234 CORE_ADDR frame_args_skip
;
235 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
236 gdbarch_frame_chain_ftype
*frame_chain
;
237 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
238 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
239 gdbarch_frame_args_address_ftype
*frame_args_address
;
240 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
241 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
242 gdbarch_frame_num_args_ftype
*frame_num_args
;
243 gdbarch_stack_align_ftype
*stack_align
;
244 int extra_stack_alignment_needed
;
245 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
246 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
248 const struct floatformat
* float_format
;
249 const struct floatformat
* double_format
;
250 const struct floatformat
* long_double_format
;
251 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
252 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
253 gdbarch_smash_text_address_ftype
*smash_text_address
;
254 gdbarch_software_single_step_ftype
*software_single_step
;
255 gdbarch_print_insn_ftype
*print_insn
;
256 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
257 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
258 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
259 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
260 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
261 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
262 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
263 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
267 /* The default architecture uses host values (for want of a better
270 extern const struct bfd_arch_info bfd_default_arch_struct
;
272 struct gdbarch startup_gdbarch
=
274 1, /* Always initialized. */
275 /* basic architecture information */
276 &bfd_default_arch_struct
,
278 /* target specific vector and its dump routine */
280 /*per-architecture data-pointers and swap regions */
282 /* Multi-arch values */
286 8 * sizeof (LONGEST
),
289 8 * sizeof (long double),
318 generic_register_byte
,
319 generic_register_size
,
321 generic_register_size
,
409 generic_in_function_epilogue_p
,
410 construct_inferior_arguments
,
414 /* startup_gdbarch() */
417 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
419 /* Do any initialization needed for a non-multiarch configuration
420 after the _initialize_MODULE functions have been run. */
422 initialize_non_multiarch (void)
424 alloc_gdbarch_data (&startup_gdbarch
);
425 /* Ensure that all swap areas are zeroed so that they again think
426 they are starting from scratch. */
427 clear_gdbarch_swap (&startup_gdbarch
);
428 init_gdbarch_swap (&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
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
480 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
481 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
482 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
483 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
484 current_gdbarch
->register_name
= legacy_register_name
;
485 current_gdbarch
->register_size
= -1;
486 current_gdbarch
->register_bytes
= -1;
487 current_gdbarch
->register_byte
= generic_register_byte
;
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
->register_sim_regno
= legacy_register_sim_regno
;
494 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
495 current_gdbarch
->cannot_store_register
= cannot_register_not
;
496 current_gdbarch
->use_generic_dummy_frames
= -1;
497 current_gdbarch
->call_dummy_start_offset
= -1;
498 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
499 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
500 current_gdbarch
->call_dummy_length
= -1;
501 current_gdbarch
->call_dummy_p
= -1;
502 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
503 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
504 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
505 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
506 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
507 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
508 current_gdbarch
->get_saved_register
= generic_unwind_get_saved_register
;
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
->extract_return_value
= legacy_extract_return_value
;
517 current_gdbarch
->push_arguments
= default_push_arguments
;
518 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
519 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
520 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
521 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
522 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
523 current_gdbarch
->decr_pc_after_break
= -1;
524 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
525 current_gdbarch
->function_start_offset
= -1;
526 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
527 current_gdbarch
->frame_args_skip
= -1;
528 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
529 current_gdbarch
->frame_chain_valid
= generic_func_frame_chain_valid
;
530 current_gdbarch
->extra_stack_alignment_needed
= 1;
531 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
532 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
533 current_gdbarch
->smash_text_address
= core_addr_identity
;
534 current_gdbarch
->print_insn
= legacy_print_insn
;
535 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
536 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
537 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
538 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
539 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
540 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
541 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
542 /* gdbarch_alloc() */
544 return current_gdbarch
;
548 /* Free a gdbarch struct. This should never happen in normal
549 operation --- once you've created a gdbarch, you keep it around.
550 However, if an architecture's init function encounters an error
551 building the structure, it may need to clean up a partially
552 constructed gdbarch. */
555 gdbarch_free (struct gdbarch
*arch
)
557 gdb_assert (arch
!= NULL
);
558 free_gdbarch_data (arch
);
563 /* Ensure that all values in a GDBARCH are reasonable. */
566 verify_gdbarch (struct gdbarch
*gdbarch
)
569 struct cleanup
*cleanups
;
572 /* Only perform sanity checks on a multi-arch target. */
575 log
= mem_fileopen ();
576 cleanups
= make_cleanup_ui_file_delete (log
);
578 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
579 fprintf_unfiltered (log
, "\n\tbyte-order");
580 if (gdbarch
->bfd_arch_info
== NULL
)
581 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
582 /* Check those that need to be defined for the given multi-arch level. */
583 /* Skip verify of short_bit, invalid_p == 0 */
584 /* Skip verify of int_bit, invalid_p == 0 */
585 /* Skip verify of long_bit, invalid_p == 0 */
586 /* Skip verify of long_long_bit, invalid_p == 0 */
587 /* Skip verify of float_bit, invalid_p == 0 */
588 /* Skip verify of double_bit, invalid_p == 0 */
589 /* Skip verify of long_double_bit, invalid_p == 0 */
590 /* Skip verify of ptr_bit, invalid_p == 0 */
591 if (gdbarch
->addr_bit
== 0)
592 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
593 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
594 if (gdbarch
->char_signed
== -1)
595 gdbarch
->char_signed
= 1;
596 /* Skip verify of read_pc, invalid_p == 0 */
597 /* Skip verify of write_pc, invalid_p == 0 */
598 /* Skip verify of read_fp, invalid_p == 0 */
599 /* Skip verify of read_sp, invalid_p == 0 */
600 /* Skip verify of write_sp, invalid_p == 0 */
601 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
602 /* Skip verify of pseudo_register_read, has predicate */
603 /* Skip verify of pseudo_register_write, has predicate */
604 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
605 && (gdbarch
->num_regs
== -1))
606 fprintf_unfiltered (log
, "\n\tnum_regs");
607 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
608 /* Skip verify of sp_regnum, invalid_p == 0 */
609 /* Skip verify of fp_regnum, invalid_p == 0 */
610 /* Skip verify of pc_regnum, invalid_p == 0 */
611 /* Skip verify of ps_regnum, invalid_p == 0 */
612 /* Skip verify of fp0_regnum, invalid_p == 0 */
613 /* Skip verify of npc_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 /* Skip verify of register_byte, invalid_p == 0 */
627 /* Skip verify of register_raw_size, invalid_p == 0 */
628 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
629 && (gdbarch
->max_register_raw_size
== -1))
630 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
631 /* Skip verify of register_virtual_size, invalid_p == 0 */
632 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
633 && (gdbarch
->max_register_virtual_size
== -1))
634 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
635 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
636 && (gdbarch
->register_virtual_type
== 0))
637 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
638 /* Skip verify of do_registers_info, invalid_p == 0 */
639 /* Skip verify of print_float_info, has predicate */
640 /* Skip verify of register_sim_regno, invalid_p == 0 */
641 /* Skip verify of register_bytes_ok, has predicate */
642 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
643 /* Skip verify of cannot_store_register, invalid_p == 0 */
644 /* Skip verify of get_longjmp_target, has predicate */
645 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
646 && (gdbarch
->use_generic_dummy_frames
== -1))
647 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
648 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
649 && (gdbarch
->call_dummy_location
== 0))
650 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
651 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
652 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
653 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
654 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
655 && (gdbarch
->call_dummy_start_offset
== -1))
656 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
657 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
658 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
659 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
660 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
661 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
662 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
663 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
664 && (gdbarch
->call_dummy_length
== -1))
665 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
666 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
667 && (gdbarch
->pc_in_call_dummy
== 0))
668 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
669 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
670 && (gdbarch
->call_dummy_p
== -1))
671 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
672 /* Skip verify of call_dummy_words, invalid_p == 0 */
673 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
674 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
675 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
676 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
677 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
678 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
679 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
680 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
681 && (gdbarch
->fix_call_dummy
== 0))
682 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
683 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
684 /* Skip verify of init_frame_pc, invalid_p == 0 */
685 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
686 /* Skip verify of get_saved_register, invalid_p == 0 */
687 /* Skip verify of register_convertible, invalid_p == 0 */
688 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
689 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
690 /* Skip verify of convert_register_p, invalid_p == 0 */
691 /* Skip verify of register_to_value, invalid_p == 0 */
692 /* Skip verify of value_to_register, invalid_p == 0 */
693 /* Skip verify of pointer_to_address, invalid_p == 0 */
694 /* Skip verify of address_to_pointer, invalid_p == 0 */
695 /* Skip verify of integer_to_address, has predicate */
696 /* Skip verify of return_value_on_stack, invalid_p == 0 */
697 /* Skip verify of extract_return_value, invalid_p == 0 */
698 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
699 && (gdbarch
->deprecated_extract_return_value
== 0))
700 fprintf_unfiltered (log
, "\n\tdeprecated_extract_return_value");
701 /* Skip verify of push_arguments, invalid_p == 0 */
702 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
703 && (gdbarch
->push_dummy_frame
== 0))
704 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
705 /* Skip verify of push_return_address, has predicate */
706 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
707 && (gdbarch
->pop_frame
== 0))
708 fprintf_unfiltered (log
, "\n\tpop_frame");
709 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
710 && (gdbarch
->store_struct_return
== 0))
711 fprintf_unfiltered (log
, "\n\tstore_struct_return");
712 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
713 && (gdbarch
->store_return_value
== 0))
714 fprintf_unfiltered (log
, "\n\tstore_return_value");
715 /* Skip verify of extract_struct_value_address, has predicate */
716 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
717 /* Skip verify of use_struct_convention, invalid_p == 0 */
718 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
719 && (gdbarch
->frame_init_saved_regs
== 0))
720 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
721 /* Skip verify of init_extra_frame_info, has predicate */
722 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
723 && (gdbarch
->skip_prologue
== 0))
724 fprintf_unfiltered (log
, "\n\tskip_prologue");
725 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
726 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
727 && (gdbarch
->inner_than
== 0))
728 fprintf_unfiltered (log
, "\n\tinner_than");
729 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
730 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
731 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
733 && (gdbarch
->decr_pc_after_break
== -1))
734 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
735 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
737 && (gdbarch
->function_start_offset
== -1))
738 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
739 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
740 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
741 && (gdbarch
->frame_args_skip
== -1))
742 fprintf_unfiltered (log
, "\n\tframe_args_skip");
743 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
744 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
745 && (gdbarch
->frame_chain
== 0))
746 fprintf_unfiltered (log
, "\n\tframe_chain");
747 /* Skip verify of frame_chain_valid, invalid_p == 0 */
748 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
749 && (gdbarch
->frame_saved_pc
== 0))
750 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
751 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
752 && (gdbarch
->frame_args_address
== 0))
753 fprintf_unfiltered (log
, "\n\tframe_args_address");
754 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
755 && (gdbarch
->frame_locals_address
== 0))
756 fprintf_unfiltered (log
, "\n\tframe_locals_address");
757 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
758 && (gdbarch
->saved_pc_after_call
== 0))
759 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
760 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
761 && (gdbarch
->frame_num_args
== 0))
762 fprintf_unfiltered (log
, "\n\tframe_num_args");
763 /* Skip verify of stack_align, has predicate */
764 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
765 /* Skip verify of reg_struct_has_addr, has predicate */
766 /* Skip verify of save_dummy_frame_tos, has predicate */
767 if (gdbarch
->float_format
== 0)
768 gdbarch
->float_format
= default_float_format (gdbarch
);
769 if (gdbarch
->double_format
== 0)
770 gdbarch
->double_format
= default_double_format (gdbarch
);
771 if (gdbarch
->long_double_format
== 0)
772 gdbarch
->long_double_format
= default_double_format (gdbarch
);
773 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
774 /* Skip verify of addr_bits_remove, invalid_p == 0 */
775 /* Skip verify of smash_text_address, invalid_p == 0 */
776 /* Skip verify of software_single_step, has predicate */
777 /* Skip verify of print_insn, invalid_p == 0 */
778 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
779 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
780 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
781 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
782 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
783 /* Skip verify of dwarf2_build_frame_info, has predicate */
784 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
785 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
786 buf
= ui_file_xstrdup (log
, &dummy
);
787 make_cleanup (xfree
, buf
);
788 if (strlen (buf
) > 0)
789 internal_error (__FILE__
, __LINE__
,
790 "verify_gdbarch: the following are invalid ...%s",
792 do_cleanups (cleanups
);
796 /* Print out the details of the current architecture. */
798 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
799 just happens to match the global variable ``current_gdbarch''. That
800 way macros refering to that variable get the local and not the global
801 version - ulgh. Once everything is parameterised with gdbarch, this
805 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
813 (long) current_gdbarch
->in_function_epilogue_p
);
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
817 (long) current_gdbarch
->pseudo_register_read
);
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
821 (long) current_gdbarch
->pseudo_register_write
);
822 #ifdef ADDRESS_TO_POINTER
824 /* Macro might contain `[{}]' when not multi-arch */
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: %s # %s\n",
827 "ADDRESS_TO_POINTER(type, buf, addr)",
828 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
833 (long) current_gdbarch
->address_to_pointer
834 /*ADDRESS_TO_POINTER ()*/);
836 #ifdef ADDR_BITS_REMOVE
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: %s # %s\n",
839 "ADDR_BITS_REMOVE(addr)",
840 XSTRING (ADDR_BITS_REMOVE (addr
)));
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
844 (long) current_gdbarch
->addr_bits_remove
845 /*ADDR_BITS_REMOVE ()*/);
847 #ifdef BELIEVE_PCC_PROMOTION
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
850 XSTRING (BELIEVE_PCC_PROMOTION
));
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
853 BELIEVE_PCC_PROMOTION
);
855 #ifdef BELIEVE_PCC_PROMOTION_TYPE
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
858 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
861 BELIEVE_PCC_PROMOTION_TYPE
);
863 #ifdef BREAKPOINT_FROM_PC
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: %s # %s\n",
866 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
867 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
871 (long) current_gdbarch
->breakpoint_from_pc
872 /*BREAKPOINT_FROM_PC ()*/);
874 #ifdef CALL_DUMMY_ADDRESS
875 fprintf_unfiltered (file
,
876 "gdbarch_dump: %s # %s\n",
877 "CALL_DUMMY_ADDRESS()",
878 XSTRING (CALL_DUMMY_ADDRESS ()));
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
882 (long) current_gdbarch
->call_dummy_address
883 /*CALL_DUMMY_ADDRESS ()*/);
885 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
888 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
889 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
892 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
894 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
897 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
900 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
902 #ifdef CALL_DUMMY_LENGTH
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
905 XSTRING (CALL_DUMMY_LENGTH
));
906 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
911 #ifdef CALL_DUMMY_LOCATION
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
914 XSTRING (CALL_DUMMY_LOCATION
));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
917 CALL_DUMMY_LOCATION
);
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_P # %s\n",
922 XSTRING (CALL_DUMMY_P
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_P = %d\n",
927 #ifdef CALL_DUMMY_STACK_ADJUST
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
930 XSTRING (CALL_DUMMY_STACK_ADJUST
));
931 if (CALL_DUMMY_STACK_ADJUST_P
)
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
934 (long) CALL_DUMMY_STACK_ADJUST
);
936 #ifdef CALL_DUMMY_STACK_ADJUST_P
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
939 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
942 (long) CALL_DUMMY_STACK_ADJUST_P
);
944 #ifdef CALL_DUMMY_START_OFFSET
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
947 XSTRING (CALL_DUMMY_START_OFFSET
));
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
950 (long) CALL_DUMMY_START_OFFSET
);
952 #ifdef CALL_DUMMY_WORDS
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
955 XSTRING (CALL_DUMMY_WORDS
));
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
958 (long) CALL_DUMMY_WORDS
);
960 #ifdef CANNOT_FETCH_REGISTER
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: %s # %s\n",
963 "CANNOT_FETCH_REGISTER(regnum)",
964 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
968 (long) current_gdbarch
->cannot_fetch_register
969 /*CANNOT_FETCH_REGISTER ()*/);
971 #ifdef CANNOT_STORE_REGISTER
972 fprintf_unfiltered (file
,
973 "gdbarch_dump: %s # %s\n",
974 "CANNOT_STORE_REGISTER(regnum)",
975 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
979 (long) current_gdbarch
->cannot_store_register
980 /*CANNOT_STORE_REGISTER ()*/);
982 #ifdef COERCE_FLOAT_TO_DOUBLE
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: %s # %s\n",
985 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
986 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
990 (long) current_gdbarch
->coerce_float_to_double
991 /*COERCE_FLOAT_TO_DOUBLE ()*/);
993 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
995 /* Macro might contain `[{}]' when not multi-arch */
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: %s # %s\n",
998 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
999 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1004 (long) current_gdbarch
->coff_make_msymbol_special
1005 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1010 (long) current_gdbarch
->construct_inferior_arguments
);
1011 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: %s # %s\n",
1014 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1015 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1019 (long) current_gdbarch
->convert_from_func_ptr_addr
1020 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1022 #ifdef CONVERT_REGISTER_P
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: %s # %s\n",
1025 "CONVERT_REGISTER_P(regnum)",
1026 XSTRING (CONVERT_REGISTER_P (regnum
)));
1028 fprintf_unfiltered (file
,
1029 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1030 (long) current_gdbarch
->convert_register_p
1031 /*CONVERT_REGISTER_P ()*/);
1033 #ifdef DECR_PC_AFTER_BREAK
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1036 XSTRING (DECR_PC_AFTER_BREAK
));
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1039 (long) DECR_PC_AFTER_BREAK
);
1041 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1043 /* Macro might contain `[{}]' when not multi-arch */
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: %s # %s\n",
1046 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1047 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1052 (long) current_gdbarch
->deprecated_extract_return_value
1053 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1055 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: %s # %s\n",
1058 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1059 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1061 fprintf_unfiltered (file
,
1062 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1063 (long) current_gdbarch
->deprecated_extract_struct_value_address
1064 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1066 #ifdef DO_REGISTERS_INFO
1068 /* Macro might contain `[{}]' when not multi-arch */
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: %s # %s\n",
1071 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1072 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1075 fprintf_unfiltered (file
,
1076 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1077 (long) current_gdbarch
->do_registers_info
1078 /*DO_REGISTERS_INFO ()*/);
1080 #ifdef DWARF2_BUILD_FRAME_INFO
1082 /* Macro might contain `[{}]' when not multi-arch */
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: %s # %s\n",
1085 "DWARF2_BUILD_FRAME_INFO(objfile)",
1086 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1091 (long) current_gdbarch
->dwarf2_build_frame_info
1092 /*DWARF2_BUILD_FRAME_INFO ()*/);
1094 #ifdef DWARF2_REG_TO_REGNUM
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: %s # %s\n",
1097 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1098 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1102 (long) current_gdbarch
->dwarf2_reg_to_regnum
1103 /*DWARF2_REG_TO_REGNUM ()*/);
1105 #ifdef DWARF_REG_TO_REGNUM
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: %s # %s\n",
1108 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1109 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1113 (long) current_gdbarch
->dwarf_reg_to_regnum
1114 /*DWARF_REG_TO_REGNUM ()*/);
1116 #ifdef ECOFF_REG_TO_REGNUM
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: %s # %s\n",
1119 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1120 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1124 (long) current_gdbarch
->ecoff_reg_to_regnum
1125 /*ECOFF_REG_TO_REGNUM ()*/);
1127 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1129 /* Macro might contain `[{}]' when not multi-arch */
1130 fprintf_unfiltered (file
,
1131 "gdbarch_dump: %s # %s\n",
1132 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1133 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1136 fprintf_unfiltered (file
,
1137 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1138 (long) current_gdbarch
->elf_make_msymbol_special
1139 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1141 #ifdef EXTRACT_RETURN_VALUE
1143 /* Macro might contain `[{}]' when not multi-arch */
1144 fprintf_unfiltered (file
,
1145 "gdbarch_dump: %s # %s\n",
1146 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1147 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1152 (long) current_gdbarch
->extract_return_value
1153 /*EXTRACT_RETURN_VALUE ()*/);
1155 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: %s # %s\n",
1158 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1159 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1163 (long) current_gdbarch
->extract_struct_value_address
1164 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1166 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1169 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1172 EXTRA_STACK_ALIGNMENT_NEEDED
);
1174 #ifdef FIX_CALL_DUMMY
1176 /* Macro might contain `[{}]' when not multi-arch */
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: %s # %s\n",
1179 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1180 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1183 fprintf_unfiltered (file
,
1184 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1185 (long) current_gdbarch
->fix_call_dummy
1186 /*FIX_CALL_DUMMY ()*/);
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: FP0_REGNUM # %s\n",
1191 XSTRING (FP0_REGNUM
));
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: FP0_REGNUM = %d\n",
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: FP_REGNUM # %s\n",
1199 XSTRING (FP_REGNUM
));
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: FP_REGNUM = %d\n",
1204 #ifdef FRAMELESS_FUNCTION_INVOCATION
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: %s # %s\n",
1207 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1208 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1212 (long) current_gdbarch
->frameless_function_invocation
1213 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1215 #ifdef FRAME_ARGS_ADDRESS
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: %s # %s\n",
1218 "FRAME_ARGS_ADDRESS(fi)",
1219 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1223 (long) current_gdbarch
->frame_args_address
1224 /*FRAME_ARGS_ADDRESS ()*/);
1226 #ifdef FRAME_ARGS_SKIP
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1229 XSTRING (FRAME_ARGS_SKIP
));
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1232 (long) FRAME_ARGS_SKIP
);
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: %s # %s\n",
1237 "FRAME_CHAIN(frame)",
1238 XSTRING (FRAME_CHAIN (frame
)));
1240 fprintf_unfiltered (file
,
1241 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1242 (long) current_gdbarch
->frame_chain
1243 /*FRAME_CHAIN ()*/);
1245 #ifdef FRAME_CHAIN_VALID
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: %s # %s\n",
1248 "FRAME_CHAIN_VALID(chain, thisframe)",
1249 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1253 (long) current_gdbarch
->frame_chain_valid
1254 /*FRAME_CHAIN_VALID ()*/);
1256 #ifdef FRAME_INIT_SAVED_REGS
1258 /* Macro might contain `[{}]' when not multi-arch */
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: %s # %s\n",
1261 "FRAME_INIT_SAVED_REGS(frame)",
1262 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1267 (long) current_gdbarch
->frame_init_saved_regs
1268 /*FRAME_INIT_SAVED_REGS ()*/);
1270 #ifdef FRAME_LOCALS_ADDRESS
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: %s # %s\n",
1273 "FRAME_LOCALS_ADDRESS(fi)",
1274 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1278 (long) current_gdbarch
->frame_locals_address
1279 /*FRAME_LOCALS_ADDRESS ()*/);
1281 #ifdef FRAME_NUM_ARGS
1282 fprintf_unfiltered (file
,
1283 "gdbarch_dump: %s # %s\n",
1284 "FRAME_NUM_ARGS(frame)",
1285 XSTRING (FRAME_NUM_ARGS (frame
)));
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1289 (long) current_gdbarch
->frame_num_args
1290 /*FRAME_NUM_ARGS ()*/);
1292 #ifdef FRAME_SAVED_PC
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "FRAME_SAVED_PC(fi)",
1296 XSTRING (FRAME_SAVED_PC (fi
)));
1298 fprintf_unfiltered (file
,
1299 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1300 (long) current_gdbarch
->frame_saved_pc
1301 /*FRAME_SAVED_PC ()*/);
1303 #ifdef FUNCTION_START_OFFSET
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1306 XSTRING (FUNCTION_START_OFFSET
));
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1309 (long) FUNCTION_START_OFFSET
);
1311 #ifdef GET_LONGJMP_TARGET
1312 fprintf_unfiltered (file
,
1313 "gdbarch_dump: %s # %s\n",
1314 "GET_LONGJMP_TARGET(pc)",
1315 XSTRING (GET_LONGJMP_TARGET (pc
)));
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1319 (long) current_gdbarch
->get_longjmp_target
1320 /*GET_LONGJMP_TARGET ()*/);
1322 #ifdef GET_SAVED_REGISTER
1324 /* Macro might contain `[{}]' when not multi-arch */
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: %s # %s\n",
1327 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1328 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1331 fprintf_unfiltered (file
,
1332 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1333 (long) current_gdbarch
->get_saved_register
1334 /*GET_SAVED_REGISTER ()*/);
1336 #ifdef INIT_EXTRA_FRAME_INFO
1338 /* Macro might contain `[{}]' when not multi-arch */
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: %s # %s\n",
1341 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1342 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1345 fprintf_unfiltered (file
,
1346 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1347 (long) current_gdbarch
->init_extra_frame_info
1348 /*INIT_EXTRA_FRAME_INFO ()*/);
1350 #ifdef INIT_FRAME_PC
1352 /* Macro might contain `[{}]' when not multi-arch */
1353 fprintf_unfiltered (file
,
1354 "gdbarch_dump: %s # %s\n",
1355 "INIT_FRAME_PC(fromleaf, prev)",
1356 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1361 (long) current_gdbarch
->init_frame_pc
1362 /*INIT_FRAME_PC ()*/);
1364 #ifdef INIT_FRAME_PC_FIRST
1366 /* Macro might contain `[{}]' when not multi-arch */
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: %s # %s\n",
1369 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1370 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1375 (long) current_gdbarch
->init_frame_pc_first
1376 /*INIT_FRAME_PC_FIRST ()*/);
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: %s # %s\n",
1381 "INNER_THAN(lhs, rhs)",
1382 XSTRING (INNER_THAN (lhs
, rhs
)));
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1386 (long) current_gdbarch
->inner_than
1389 #ifdef INTEGER_TO_ADDRESS
1390 fprintf_unfiltered (file
,
1391 "gdbarch_dump: %s # %s\n",
1392 "INTEGER_TO_ADDRESS(type, buf)",
1393 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1397 (long) current_gdbarch
->integer_to_address
1398 /*INTEGER_TO_ADDRESS ()*/);
1400 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: %s # %s\n",
1403 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1404 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1406 fprintf_unfiltered (file
,
1407 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1408 (long) current_gdbarch
->in_solib_call_trampoline
1409 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1411 #ifdef MAX_REGISTER_RAW_SIZE
1412 fprintf_unfiltered (file
,
1413 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1414 XSTRING (MAX_REGISTER_RAW_SIZE
));
1415 fprintf_unfiltered (file
,
1416 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1417 MAX_REGISTER_RAW_SIZE
);
1419 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1422 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1425 MAX_REGISTER_VIRTUAL_SIZE
);
1427 #ifdef MEMORY_INSERT_BREAKPOINT
1428 fprintf_unfiltered (file
,
1429 "gdbarch_dump: %s # %s\n",
1430 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1431 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1435 (long) current_gdbarch
->memory_insert_breakpoint
1436 /*MEMORY_INSERT_BREAKPOINT ()*/);
1438 #ifdef MEMORY_REMOVE_BREAKPOINT
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: %s # %s\n",
1441 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1442 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1444 fprintf_unfiltered (file
,
1445 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1446 (long) current_gdbarch
->memory_remove_breakpoint
1447 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1450 fprintf_unfiltered (file
,
1451 "gdbarch_dump: NPC_REGNUM # %s\n",
1452 XSTRING (NPC_REGNUM
));
1453 fprintf_unfiltered (file
,
1454 "gdbarch_dump: NPC_REGNUM = %d\n",
1457 #ifdef NUM_PSEUDO_REGS
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1460 XSTRING (NUM_PSEUDO_REGS
));
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: NUM_REGS # %s\n",
1468 XSTRING (NUM_REGS
));
1469 fprintf_unfiltered (file
,
1470 "gdbarch_dump: NUM_REGS = %d\n",
1473 #ifdef PARM_BOUNDARY
1474 fprintf_unfiltered (file
,
1475 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1476 XSTRING (PARM_BOUNDARY
));
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1481 #ifdef PC_IN_CALL_DUMMY
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: %s # %s\n",
1484 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1485 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1489 (long) current_gdbarch
->pc_in_call_dummy
1490 /*PC_IN_CALL_DUMMY ()*/);
1492 #ifdef PC_IN_SIGTRAMP
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: %s # %s\n",
1495 "PC_IN_SIGTRAMP(pc, name)",
1496 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1500 (long) current_gdbarch
->pc_in_sigtramp
1501 /*PC_IN_SIGTRAMP ()*/);
1504 fprintf_unfiltered (file
,
1505 "gdbarch_dump: PC_REGNUM # %s\n",
1506 XSTRING (PC_REGNUM
));
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: PC_REGNUM = %d\n",
1511 #ifdef POINTER_TO_ADDRESS
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: %s # %s\n",
1514 "POINTER_TO_ADDRESS(type, buf)",
1515 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1519 (long) current_gdbarch
->pointer_to_address
1520 /*POINTER_TO_ADDRESS ()*/);
1524 /* Macro might contain `[{}]' when not multi-arch */
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: %s # %s\n",
1528 XSTRING (POP_FRAME (-)));
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1533 (long) current_gdbarch
->pop_frame
1536 #ifdef PREPARE_TO_PROCEED
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: %s # %s\n",
1539 "PREPARE_TO_PROCEED(select_it)",
1540 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1544 (long) current_gdbarch
->prepare_to_proceed
1545 /*PREPARE_TO_PROCEED ()*/);
1548 fprintf_unfiltered (file
,
1549 "gdbarch_dump: print_float_info = 0x%08lx\n",
1550 (long) current_gdbarch
->print_float_info
);
1551 #ifdef PROLOGUE_FRAMELESS_P
1552 fprintf_unfiltered (file
,
1553 "gdbarch_dump: %s # %s\n",
1554 "PROLOGUE_FRAMELESS_P(ip)",
1555 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1557 fprintf_unfiltered (file
,
1558 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1559 (long) current_gdbarch
->prologue_frameless_p
1560 /*PROLOGUE_FRAMELESS_P ()*/);
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: PS_REGNUM # %s\n",
1565 XSTRING (PS_REGNUM
));
1566 fprintf_unfiltered (file
,
1567 "gdbarch_dump: PS_REGNUM = %d\n",
1570 #ifdef PUSH_ARGUMENTS
1571 fprintf_unfiltered (file
,
1572 "gdbarch_dump: %s # %s\n",
1573 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1574 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1578 (long) current_gdbarch
->push_arguments
1579 /*PUSH_ARGUMENTS ()*/);
1581 #ifdef PUSH_DUMMY_FRAME
1583 /* Macro might contain `[{}]' when not multi-arch */
1584 fprintf_unfiltered (file
,
1585 "gdbarch_dump: %s # %s\n",
1586 "PUSH_DUMMY_FRAME(-)",
1587 XSTRING (PUSH_DUMMY_FRAME (-)));
1590 fprintf_unfiltered (file
,
1591 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1592 (long) current_gdbarch
->push_dummy_frame
1593 /*PUSH_DUMMY_FRAME ()*/);
1595 #ifdef PUSH_RETURN_ADDRESS
1596 fprintf_unfiltered (file
,
1597 "gdbarch_dump: %s # %s\n",
1598 "PUSH_RETURN_ADDRESS(pc, sp)",
1599 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1603 (long) current_gdbarch
->push_return_address
1604 /*PUSH_RETURN_ADDRESS ()*/);
1606 #ifdef REGISTER_BYTE
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: %s # %s\n",
1609 "REGISTER_BYTE(reg_nr)",
1610 XSTRING (REGISTER_BYTE (reg_nr
)));
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1614 (long) current_gdbarch
->register_byte
1615 /*REGISTER_BYTE ()*/);
1617 #ifdef REGISTER_BYTES
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: REGISTER_BYTES # %s\n",
1620 XSTRING (REGISTER_BYTES
));
1621 fprintf_unfiltered (file
,
1622 "gdbarch_dump: REGISTER_BYTES = %d\n",
1625 #ifdef REGISTER_BYTES_OK
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: %s # %s\n",
1628 "REGISTER_BYTES_OK(nr_bytes)",
1629 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1633 (long) current_gdbarch
->register_bytes_ok
1634 /*REGISTER_BYTES_OK ()*/);
1636 #ifdef REGISTER_CONVERTIBLE
1637 fprintf_unfiltered (file
,
1638 "gdbarch_dump: %s # %s\n",
1639 "REGISTER_CONVERTIBLE(nr)",
1640 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1642 fprintf_unfiltered (file
,
1643 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1644 (long) current_gdbarch
->register_convertible
1645 /*REGISTER_CONVERTIBLE ()*/);
1647 #ifdef REGISTER_CONVERT_TO_RAW
1649 /* Macro might contain `[{}]' when not multi-arch */
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: %s # %s\n",
1652 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1653 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1656 fprintf_unfiltered (file
,
1657 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1658 (long) current_gdbarch
->register_convert_to_raw
1659 /*REGISTER_CONVERT_TO_RAW ()*/);
1661 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1663 /* Macro might contain `[{}]' when not multi-arch */
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: %s # %s\n",
1666 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1667 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1670 fprintf_unfiltered (file
,
1671 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1672 (long) current_gdbarch
->register_convert_to_virtual
1673 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1675 #ifdef REGISTER_NAME
1676 fprintf_unfiltered (file
,
1677 "gdbarch_dump: %s # %s\n",
1678 "REGISTER_NAME(regnr)",
1679 XSTRING (REGISTER_NAME (regnr
)));
1681 fprintf_unfiltered (file
,
1682 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1683 (long) current_gdbarch
->register_name
1684 /*REGISTER_NAME ()*/);
1686 #ifdef REGISTER_RAW_SIZE
1687 fprintf_unfiltered (file
,
1688 "gdbarch_dump: %s # %s\n",
1689 "REGISTER_RAW_SIZE(reg_nr)",
1690 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1694 (long) current_gdbarch
->register_raw_size
1695 /*REGISTER_RAW_SIZE ()*/);
1697 #ifdef REGISTER_SIM_REGNO
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: %s # %s\n",
1700 "REGISTER_SIM_REGNO(reg_nr)",
1701 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1705 (long) current_gdbarch
->register_sim_regno
1706 /*REGISTER_SIM_REGNO ()*/);
1708 #ifdef REGISTER_SIZE
1709 fprintf_unfiltered (file
,
1710 "gdbarch_dump: REGISTER_SIZE # %s\n",
1711 XSTRING (REGISTER_SIZE
));
1712 fprintf_unfiltered (file
,
1713 "gdbarch_dump: REGISTER_SIZE = %d\n",
1716 #ifdef REGISTER_TO_VALUE
1718 /* Macro might contain `[{}]' when not multi-arch */
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: %s # %s\n",
1721 "REGISTER_TO_VALUE(regnum, type, from, to)",
1722 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1725 fprintf_unfiltered (file
,
1726 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1727 (long) current_gdbarch
->register_to_value
1728 /*REGISTER_TO_VALUE ()*/);
1730 #ifdef REGISTER_VIRTUAL_SIZE
1731 fprintf_unfiltered (file
,
1732 "gdbarch_dump: %s # %s\n",
1733 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1734 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1736 fprintf_unfiltered (file
,
1737 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1738 (long) current_gdbarch
->register_virtual_size
1739 /*REGISTER_VIRTUAL_SIZE ()*/);
1741 #ifdef REGISTER_VIRTUAL_TYPE
1742 fprintf_unfiltered (file
,
1743 "gdbarch_dump: %s # %s\n",
1744 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1745 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1749 (long) current_gdbarch
->register_virtual_type
1750 /*REGISTER_VIRTUAL_TYPE ()*/);
1752 #ifdef REG_STRUCT_HAS_ADDR
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: %s # %s\n",
1755 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1756 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1758 fprintf_unfiltered (file
,
1759 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1760 (long) current_gdbarch
->reg_struct_has_addr
1761 /*REG_STRUCT_HAS_ADDR ()*/);
1763 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1765 /* Macro might contain `[{}]' when not multi-arch */
1766 fprintf_unfiltered (file
,
1767 "gdbarch_dump: %s # %s\n",
1768 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1769 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1772 fprintf_unfiltered (file
,
1773 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1774 (long) current_gdbarch
->remote_translate_xfer_address
1775 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1777 #ifdef RETURN_VALUE_ON_STACK
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: %s # %s\n",
1780 "RETURN_VALUE_ON_STACK(type)",
1781 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1785 (long) current_gdbarch
->return_value_on_stack
1786 /*RETURN_VALUE_ON_STACK ()*/);
1788 #ifdef SAVED_PC_AFTER_CALL
1789 fprintf_unfiltered (file
,
1790 "gdbarch_dump: %s # %s\n",
1791 "SAVED_PC_AFTER_CALL(frame)",
1792 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1796 (long) current_gdbarch
->saved_pc_after_call
1797 /*SAVED_PC_AFTER_CALL ()*/);
1799 #ifdef SAVE_DUMMY_FRAME_TOS
1801 /* Macro might contain `[{}]' when not multi-arch */
1802 fprintf_unfiltered (file
,
1803 "gdbarch_dump: %s # %s\n",
1804 "SAVE_DUMMY_FRAME_TOS(sp)",
1805 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1808 fprintf_unfiltered (file
,
1809 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1810 (long) current_gdbarch
->save_dummy_frame_tos
1811 /*SAVE_DUMMY_FRAME_TOS ()*/);
1813 #ifdef SDB_REG_TO_REGNUM
1814 fprintf_unfiltered (file
,
1815 "gdbarch_dump: %s # %s\n",
1816 "SDB_REG_TO_REGNUM(sdb_regnr)",
1817 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1821 (long) current_gdbarch
->sdb_reg_to_regnum
1822 /*SDB_REG_TO_REGNUM ()*/);
1824 #ifdef SIZEOF_CALL_DUMMY_WORDS
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1827 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1830 (long) SIZEOF_CALL_DUMMY_WORDS
);
1832 #ifdef SKIP_PROLOGUE
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: %s # %s\n",
1835 "SKIP_PROLOGUE(ip)",
1836 XSTRING (SKIP_PROLOGUE (ip
)));
1838 fprintf_unfiltered (file
,
1839 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1840 (long) current_gdbarch
->skip_prologue
1841 /*SKIP_PROLOGUE ()*/);
1843 #ifdef SKIP_TRAMPOLINE_CODE
1844 fprintf_unfiltered (file
,
1845 "gdbarch_dump: %s # %s\n",
1846 "SKIP_TRAMPOLINE_CODE(pc)",
1847 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1851 (long) current_gdbarch
->skip_trampoline_code
1852 /*SKIP_TRAMPOLINE_CODE ()*/);
1854 #ifdef SMASH_TEXT_ADDRESS
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: %s # %s\n",
1857 "SMASH_TEXT_ADDRESS(addr)",
1858 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1862 (long) current_gdbarch
->smash_text_address
1863 /*SMASH_TEXT_ADDRESS ()*/);
1865 #ifdef SOFTWARE_SINGLE_STEP
1867 /* Macro might contain `[{}]' when not multi-arch */
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: %s # %s\n",
1870 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1871 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1876 (long) current_gdbarch
->software_single_step
1877 /*SOFTWARE_SINGLE_STEP ()*/);
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: SP_REGNUM # %s\n",
1882 XSTRING (SP_REGNUM
));
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: SP_REGNUM = %d\n",
1887 #ifdef STAB_REG_TO_REGNUM
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: %s # %s\n",
1890 "STAB_REG_TO_REGNUM(stab_regnr)",
1891 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1893 fprintf_unfiltered (file
,
1894 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1895 (long) current_gdbarch
->stab_reg_to_regnum
1896 /*STAB_REG_TO_REGNUM ()*/);
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: %s # %s\n",
1902 XSTRING (STACK_ALIGN (sp
)));
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1906 (long) current_gdbarch
->stack_align
1907 /*STACK_ALIGN ()*/);
1909 #ifdef STORE_RETURN_VALUE
1911 /* Macro might contain `[{}]' when not multi-arch */
1912 fprintf_unfiltered (file
,
1913 "gdbarch_dump: %s # %s\n",
1914 "STORE_RETURN_VALUE(type, valbuf)",
1915 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1920 (long) current_gdbarch
->store_return_value
1921 /*STORE_RETURN_VALUE ()*/);
1923 #ifdef STORE_STRUCT_RETURN
1925 /* Macro might contain `[{}]' when not multi-arch */
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: %s # %s\n",
1928 "STORE_STRUCT_RETURN(addr, sp)",
1929 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1934 (long) current_gdbarch
->store_struct_return
1935 /*STORE_STRUCT_RETURN ()*/);
1937 #ifdef TARGET_ADDR_BIT
1938 fprintf_unfiltered (file
,
1939 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1940 XSTRING (TARGET_ADDR_BIT
));
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1945 #ifdef TARGET_ARCHITECTURE
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1948 XSTRING (TARGET_ARCHITECTURE
));
1949 if (TARGET_ARCHITECTURE
!= NULL
)
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1952 TARGET_ARCHITECTURE
->printable_name
);
1954 #ifdef TARGET_BFD_VMA_BIT
1955 fprintf_unfiltered (file
,
1956 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1957 XSTRING (TARGET_BFD_VMA_BIT
));
1958 fprintf_unfiltered (file
,
1959 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1960 TARGET_BFD_VMA_BIT
);
1962 #ifdef TARGET_BYTE_ORDER
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1965 XSTRING (TARGET_BYTE_ORDER
));
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1968 (long) TARGET_BYTE_ORDER
);
1970 #ifdef TARGET_CHAR_SIGNED
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1973 XSTRING (TARGET_CHAR_SIGNED
));
1974 fprintf_unfiltered (file
,
1975 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1976 TARGET_CHAR_SIGNED
);
1978 #ifdef TARGET_DOUBLE_BIT
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1981 XSTRING (TARGET_DOUBLE_BIT
));
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1986 #ifdef TARGET_DOUBLE_FORMAT
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1989 XSTRING (TARGET_DOUBLE_FORMAT
));
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1992 (long) TARGET_DOUBLE_FORMAT
);
1994 #ifdef TARGET_FLOAT_BIT
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1997 XSTRING (TARGET_FLOAT_BIT
));
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2002 #ifdef TARGET_FLOAT_FORMAT
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2005 XSTRING (TARGET_FLOAT_FORMAT
));
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2008 (long) TARGET_FLOAT_FORMAT
);
2010 #ifdef TARGET_INT_BIT
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2013 XSTRING (TARGET_INT_BIT
));
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2018 #ifdef TARGET_LONG_BIT
2019 fprintf_unfiltered (file
,
2020 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2021 XSTRING (TARGET_LONG_BIT
));
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2026 #ifdef TARGET_LONG_DOUBLE_BIT
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2029 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2030 fprintf_unfiltered (file
,
2031 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2032 TARGET_LONG_DOUBLE_BIT
);
2034 #ifdef TARGET_LONG_DOUBLE_FORMAT
2035 fprintf_unfiltered (file
,
2036 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2037 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2040 (long) TARGET_LONG_DOUBLE_FORMAT
);
2042 #ifdef TARGET_LONG_LONG_BIT
2043 fprintf_unfiltered (file
,
2044 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2045 XSTRING (TARGET_LONG_LONG_BIT
));
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2048 TARGET_LONG_LONG_BIT
);
2050 #ifdef TARGET_PRINT_INSN
2051 fprintf_unfiltered (file
,
2052 "gdbarch_dump: %s # %s\n",
2053 "TARGET_PRINT_INSN(vma, info)",
2054 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2058 (long) current_gdbarch
->print_insn
2059 /*TARGET_PRINT_INSN ()*/);
2061 #ifdef TARGET_PTR_BIT
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2064 XSTRING (TARGET_PTR_BIT
));
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2069 #ifdef TARGET_READ_FP
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: %s # %s\n",
2073 XSTRING (TARGET_READ_FP ()));
2075 fprintf_unfiltered (file
,
2076 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2077 (long) current_gdbarch
->read_fp
2078 /*TARGET_READ_FP ()*/);
2080 #ifdef TARGET_READ_PC
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: %s # %s\n",
2083 "TARGET_READ_PC(ptid)",
2084 XSTRING (TARGET_READ_PC (ptid
)));
2086 fprintf_unfiltered (file
,
2087 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2088 (long) current_gdbarch
->read_pc
2089 /*TARGET_READ_PC ()*/);
2091 #ifdef TARGET_READ_SP
2092 fprintf_unfiltered (file
,
2093 "gdbarch_dump: %s # %s\n",
2095 XSTRING (TARGET_READ_SP ()));
2097 fprintf_unfiltered (file
,
2098 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2099 (long) current_gdbarch
->read_sp
2100 /*TARGET_READ_SP ()*/);
2102 #ifdef TARGET_SHORT_BIT
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2105 XSTRING (TARGET_SHORT_BIT
));
2106 fprintf_unfiltered (file
,
2107 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2110 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2112 /* Macro might contain `[{}]' when not multi-arch */
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: %s # %s\n",
2115 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2116 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2119 fprintf_unfiltered (file
,
2120 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2121 (long) current_gdbarch
->virtual_frame_pointer
2122 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2124 #ifdef TARGET_WRITE_PC
2126 /* Macro might contain `[{}]' when not multi-arch */
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: %s # %s\n",
2129 "TARGET_WRITE_PC(val, ptid)",
2130 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2133 fprintf_unfiltered (file
,
2134 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2135 (long) current_gdbarch
->write_pc
2136 /*TARGET_WRITE_PC ()*/);
2138 #ifdef TARGET_WRITE_SP
2140 /* Macro might contain `[{}]' when not multi-arch */
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: %s # %s\n",
2143 "TARGET_WRITE_SP(val)",
2144 XSTRING (TARGET_WRITE_SP (val
)));
2147 fprintf_unfiltered (file
,
2148 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2149 (long) current_gdbarch
->write_sp
2150 /*TARGET_WRITE_SP ()*/);
2152 #ifdef USE_GENERIC_DUMMY_FRAMES
2153 fprintf_unfiltered (file
,
2154 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2155 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2156 fprintf_unfiltered (file
,
2157 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2158 USE_GENERIC_DUMMY_FRAMES
);
2160 #ifdef USE_STRUCT_CONVENTION
2161 fprintf_unfiltered (file
,
2162 "gdbarch_dump: %s # %s\n",
2163 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2164 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2166 fprintf_unfiltered (file
,
2167 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2168 (long) current_gdbarch
->use_struct_convention
2169 /*USE_STRUCT_CONVENTION ()*/);
2171 #ifdef VALUE_TO_REGISTER
2173 /* Macro might contain `[{}]' when not multi-arch */
2174 fprintf_unfiltered (file
,
2175 "gdbarch_dump: %s # %s\n",
2176 "VALUE_TO_REGISTER(type, regnum, from, to)",
2177 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2180 fprintf_unfiltered (file
,
2181 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2182 (long) current_gdbarch
->value_to_register
2183 /*VALUE_TO_REGISTER ()*/);
2185 if (current_gdbarch
->dump_tdep
!= NULL
)
2186 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2189 struct gdbarch_tdep
*
2190 gdbarch_tdep (struct gdbarch
*gdbarch
)
2192 if (gdbarch_debug
>= 2)
2193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2194 return gdbarch
->tdep
;
2198 const struct bfd_arch_info
*
2199 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2201 gdb_assert (gdbarch
!= NULL
);
2202 if (gdbarch_debug
>= 2)
2203 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2204 return gdbarch
->bfd_arch_info
;
2208 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2210 gdb_assert (gdbarch
!= NULL
);
2211 if (gdbarch_debug
>= 2)
2212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2213 return gdbarch
->byte_order
;
2217 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2219 gdb_assert (gdbarch
!= NULL
);
2220 /* Skip verify of short_bit, invalid_p == 0 */
2221 if (gdbarch_debug
>= 2)
2222 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2223 return gdbarch
->short_bit
;
2227 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2230 gdbarch
->short_bit
= short_bit
;
2234 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2236 gdb_assert (gdbarch
!= NULL
);
2237 /* Skip verify of int_bit, invalid_p == 0 */
2238 if (gdbarch_debug
>= 2)
2239 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2240 return gdbarch
->int_bit
;
2244 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2247 gdbarch
->int_bit
= int_bit
;
2251 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2253 gdb_assert (gdbarch
!= NULL
);
2254 /* Skip verify of long_bit, invalid_p == 0 */
2255 if (gdbarch_debug
>= 2)
2256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2257 return gdbarch
->long_bit
;
2261 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2264 gdbarch
->long_bit
= long_bit
;
2268 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2270 gdb_assert (gdbarch
!= NULL
);
2271 /* Skip verify of long_long_bit, invalid_p == 0 */
2272 if (gdbarch_debug
>= 2)
2273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2274 return gdbarch
->long_long_bit
;
2278 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2281 gdbarch
->long_long_bit
= long_long_bit
;
2285 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2287 gdb_assert (gdbarch
!= NULL
);
2288 /* Skip verify of float_bit, invalid_p == 0 */
2289 if (gdbarch_debug
>= 2)
2290 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2291 return gdbarch
->float_bit
;
2295 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2298 gdbarch
->float_bit
= float_bit
;
2302 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2304 gdb_assert (gdbarch
!= NULL
);
2305 /* Skip verify of double_bit, invalid_p == 0 */
2306 if (gdbarch_debug
>= 2)
2307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2308 return gdbarch
->double_bit
;
2312 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2315 gdbarch
->double_bit
= double_bit
;
2319 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2321 gdb_assert (gdbarch
!= NULL
);
2322 /* Skip verify of long_double_bit, invalid_p == 0 */
2323 if (gdbarch_debug
>= 2)
2324 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2325 return gdbarch
->long_double_bit
;
2329 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2330 int long_double_bit
)
2332 gdbarch
->long_double_bit
= long_double_bit
;
2336 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2338 gdb_assert (gdbarch
!= NULL
);
2339 /* Skip verify of ptr_bit, invalid_p == 0 */
2340 if (gdbarch_debug
>= 2)
2341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2342 return gdbarch
->ptr_bit
;
2346 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2349 gdbarch
->ptr_bit
= ptr_bit
;
2353 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2355 gdb_assert (gdbarch
!= NULL
);
2356 if (gdbarch
->addr_bit
== 0)
2357 internal_error (__FILE__
, __LINE__
,
2358 "gdbarch: gdbarch_addr_bit invalid");
2359 if (gdbarch_debug
>= 2)
2360 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2361 return gdbarch
->addr_bit
;
2365 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2368 gdbarch
->addr_bit
= addr_bit
;
2372 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2374 gdb_assert (gdbarch
!= NULL
);
2375 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2376 if (gdbarch_debug
>= 2)
2377 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2378 return gdbarch
->bfd_vma_bit
;
2382 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2385 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2389 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2391 gdb_assert (gdbarch
!= NULL
);
2392 if (gdbarch
->char_signed
== -1)
2393 internal_error (__FILE__
, __LINE__
,
2394 "gdbarch: gdbarch_char_signed invalid");
2395 if (gdbarch_debug
>= 2)
2396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2397 return gdbarch
->char_signed
;
2401 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2404 gdbarch
->char_signed
= char_signed
;
2408 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2410 gdb_assert (gdbarch
!= NULL
);
2411 if (gdbarch
->read_pc
== 0)
2412 internal_error (__FILE__
, __LINE__
,
2413 "gdbarch: gdbarch_read_pc invalid");
2414 if (gdbarch_debug
>= 2)
2415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2416 return gdbarch
->read_pc (ptid
);
2420 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2421 gdbarch_read_pc_ftype read_pc
)
2423 gdbarch
->read_pc
= read_pc
;
2427 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2429 gdb_assert (gdbarch
!= NULL
);
2430 if (gdbarch
->write_pc
== 0)
2431 internal_error (__FILE__
, __LINE__
,
2432 "gdbarch: gdbarch_write_pc invalid");
2433 if (gdbarch_debug
>= 2)
2434 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2435 gdbarch
->write_pc (val
, ptid
);
2439 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2440 gdbarch_write_pc_ftype write_pc
)
2442 gdbarch
->write_pc
= write_pc
;
2446 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2448 gdb_assert (gdbarch
!= NULL
);
2449 if (gdbarch
->read_fp
== 0)
2450 internal_error (__FILE__
, __LINE__
,
2451 "gdbarch: gdbarch_read_fp invalid");
2452 if (gdbarch_debug
>= 2)
2453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2454 return gdbarch
->read_fp ();
2458 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2459 gdbarch_read_fp_ftype read_fp
)
2461 gdbarch
->read_fp
= read_fp
;
2465 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2467 gdb_assert (gdbarch
!= NULL
);
2468 if (gdbarch
->read_sp
== 0)
2469 internal_error (__FILE__
, __LINE__
,
2470 "gdbarch: gdbarch_read_sp invalid");
2471 if (gdbarch_debug
>= 2)
2472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2473 return gdbarch
->read_sp ();
2477 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2478 gdbarch_read_sp_ftype read_sp
)
2480 gdbarch
->read_sp
= read_sp
;
2484 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2486 gdb_assert (gdbarch
!= NULL
);
2487 if (gdbarch
->write_sp
== 0)
2488 internal_error (__FILE__
, __LINE__
,
2489 "gdbarch: gdbarch_write_sp invalid");
2490 if (gdbarch_debug
>= 2)
2491 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2492 gdbarch
->write_sp (val
);
2496 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2497 gdbarch_write_sp_ftype write_sp
)
2499 gdbarch
->write_sp
= write_sp
;
2503 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2505 gdb_assert (gdbarch
!= NULL
);
2506 if (gdbarch
->virtual_frame_pointer
== 0)
2507 internal_error (__FILE__
, __LINE__
,
2508 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2509 if (gdbarch_debug
>= 2)
2510 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2511 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2515 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2516 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2518 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2522 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2524 gdb_assert (gdbarch
!= NULL
);
2525 return gdbarch
->pseudo_register_read
!= 0;
2529 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2531 gdb_assert (gdbarch
!= NULL
);
2532 if (gdbarch
->pseudo_register_read
== 0)
2533 internal_error (__FILE__
, __LINE__
,
2534 "gdbarch: gdbarch_pseudo_register_read invalid");
2535 if (gdbarch_debug
>= 2)
2536 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2537 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2541 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2542 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2544 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2548 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2550 gdb_assert (gdbarch
!= NULL
);
2551 return gdbarch
->pseudo_register_write
!= 0;
2555 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2557 gdb_assert (gdbarch
!= NULL
);
2558 if (gdbarch
->pseudo_register_write
== 0)
2559 internal_error (__FILE__
, __LINE__
,
2560 "gdbarch: gdbarch_pseudo_register_write invalid");
2561 if (gdbarch_debug
>= 2)
2562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2563 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2567 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2568 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2570 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2574 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2576 gdb_assert (gdbarch
!= NULL
);
2577 if (gdbarch
->num_regs
== -1)
2578 internal_error (__FILE__
, __LINE__
,
2579 "gdbarch: gdbarch_num_regs invalid");
2580 if (gdbarch_debug
>= 2)
2581 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2582 return gdbarch
->num_regs
;
2586 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2589 gdbarch
->num_regs
= num_regs
;
2593 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2595 gdb_assert (gdbarch
!= NULL
);
2596 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2597 if (gdbarch_debug
>= 2)
2598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2599 return gdbarch
->num_pseudo_regs
;
2603 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2604 int num_pseudo_regs
)
2606 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2610 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2612 gdb_assert (gdbarch
!= NULL
);
2613 /* Skip verify of sp_regnum, invalid_p == 0 */
2614 if (gdbarch_debug
>= 2)
2615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2616 return gdbarch
->sp_regnum
;
2620 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2623 gdbarch
->sp_regnum
= sp_regnum
;
2627 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2629 gdb_assert (gdbarch
!= NULL
);
2630 /* Skip verify of fp_regnum, invalid_p == 0 */
2631 if (gdbarch_debug
>= 2)
2632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2633 return gdbarch
->fp_regnum
;
2637 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2640 gdbarch
->fp_regnum
= fp_regnum
;
2644 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2646 gdb_assert (gdbarch
!= NULL
);
2647 /* Skip verify of pc_regnum, invalid_p == 0 */
2648 if (gdbarch_debug
>= 2)
2649 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2650 return gdbarch
->pc_regnum
;
2654 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2657 gdbarch
->pc_regnum
= pc_regnum
;
2661 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2663 gdb_assert (gdbarch
!= NULL
);
2664 /* Skip verify of ps_regnum, invalid_p == 0 */
2665 if (gdbarch_debug
>= 2)
2666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2667 return gdbarch
->ps_regnum
;
2671 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2674 gdbarch
->ps_regnum
= ps_regnum
;
2678 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2680 gdb_assert (gdbarch
!= NULL
);
2681 /* Skip verify of fp0_regnum, invalid_p == 0 */
2682 if (gdbarch_debug
>= 2)
2683 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2684 return gdbarch
->fp0_regnum
;
2688 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2691 gdbarch
->fp0_regnum
= fp0_regnum
;
2695 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2697 gdb_assert (gdbarch
!= NULL
);
2698 /* Skip verify of npc_regnum, invalid_p == 0 */
2699 if (gdbarch_debug
>= 2)
2700 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2701 return gdbarch
->npc_regnum
;
2705 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2708 gdbarch
->npc_regnum
= npc_regnum
;
2712 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2714 gdb_assert (gdbarch
!= NULL
);
2715 if (gdbarch
->stab_reg_to_regnum
== 0)
2716 internal_error (__FILE__
, __LINE__
,
2717 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2718 if (gdbarch_debug
>= 2)
2719 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2720 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2724 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2725 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2727 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2731 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2733 gdb_assert (gdbarch
!= NULL
);
2734 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2735 internal_error (__FILE__
, __LINE__
,
2736 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2737 if (gdbarch_debug
>= 2)
2738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2739 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2743 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2744 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2746 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2750 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2752 gdb_assert (gdbarch
!= NULL
);
2753 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2754 internal_error (__FILE__
, __LINE__
,
2755 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2756 if (gdbarch_debug
>= 2)
2757 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2758 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2762 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2763 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2765 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2769 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2771 gdb_assert (gdbarch
!= NULL
);
2772 if (gdbarch
->sdb_reg_to_regnum
== 0)
2773 internal_error (__FILE__
, __LINE__
,
2774 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2775 if (gdbarch_debug
>= 2)
2776 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2777 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2781 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2782 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2784 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2788 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2790 gdb_assert (gdbarch
!= NULL
);
2791 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2792 internal_error (__FILE__
, __LINE__
,
2793 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2794 if (gdbarch_debug
>= 2)
2795 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2796 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2800 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2801 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2803 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2807 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2809 gdb_assert (gdbarch
!= NULL
);
2810 if (gdbarch
->register_name
== 0)
2811 internal_error (__FILE__
, __LINE__
,
2812 "gdbarch: gdbarch_register_name invalid");
2813 if (gdbarch_debug
>= 2)
2814 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2815 return gdbarch
->register_name (regnr
);
2819 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2820 gdbarch_register_name_ftype register_name
)
2822 gdbarch
->register_name
= register_name
;
2826 gdbarch_register_size (struct gdbarch
*gdbarch
)
2828 gdb_assert (gdbarch
!= NULL
);
2829 if (gdbarch
->register_size
== -1)
2830 internal_error (__FILE__
, __LINE__
,
2831 "gdbarch: gdbarch_register_size invalid");
2832 if (gdbarch_debug
>= 2)
2833 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2834 return gdbarch
->register_size
;
2838 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2841 gdbarch
->register_size
= register_size
;
2845 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2847 gdb_assert (gdbarch
!= NULL
);
2848 if (gdbarch
->register_bytes
== -1)
2849 internal_error (__FILE__
, __LINE__
,
2850 "gdbarch: gdbarch_register_bytes invalid");
2851 if (gdbarch_debug
>= 2)
2852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2853 return gdbarch
->register_bytes
;
2857 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2860 gdbarch
->register_bytes
= register_bytes
;
2864 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2866 gdb_assert (gdbarch
!= NULL
);
2867 if (gdbarch
->register_byte
== 0)
2868 internal_error (__FILE__
, __LINE__
,
2869 "gdbarch: gdbarch_register_byte invalid");
2870 if (gdbarch_debug
>= 2)
2871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2872 return gdbarch
->register_byte (reg_nr
);
2876 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2877 gdbarch_register_byte_ftype register_byte
)
2879 gdbarch
->register_byte
= register_byte
;
2883 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2885 gdb_assert (gdbarch
!= NULL
);
2886 if (gdbarch
->register_raw_size
== 0)
2887 internal_error (__FILE__
, __LINE__
,
2888 "gdbarch: gdbarch_register_raw_size invalid");
2889 if (gdbarch_debug
>= 2)
2890 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2891 return gdbarch
->register_raw_size (reg_nr
);
2895 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2896 gdbarch_register_raw_size_ftype register_raw_size
)
2898 gdbarch
->register_raw_size
= register_raw_size
;
2902 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2904 gdb_assert (gdbarch
!= NULL
);
2905 if (gdbarch
->max_register_raw_size
== -1)
2906 internal_error (__FILE__
, __LINE__
,
2907 "gdbarch: gdbarch_max_register_raw_size invalid");
2908 if (gdbarch_debug
>= 2)
2909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2910 return gdbarch
->max_register_raw_size
;
2914 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2915 int max_register_raw_size
)
2917 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2921 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2923 gdb_assert (gdbarch
!= NULL
);
2924 if (gdbarch
->register_virtual_size
== 0)
2925 internal_error (__FILE__
, __LINE__
,
2926 "gdbarch: gdbarch_register_virtual_size invalid");
2927 if (gdbarch_debug
>= 2)
2928 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2929 return gdbarch
->register_virtual_size (reg_nr
);
2933 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2934 gdbarch_register_virtual_size_ftype register_virtual_size
)
2936 gdbarch
->register_virtual_size
= register_virtual_size
;
2940 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2942 gdb_assert (gdbarch
!= NULL
);
2943 if (gdbarch
->max_register_virtual_size
== -1)
2944 internal_error (__FILE__
, __LINE__
,
2945 "gdbarch: gdbarch_max_register_virtual_size invalid");
2946 if (gdbarch_debug
>= 2)
2947 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2948 return gdbarch
->max_register_virtual_size
;
2952 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2953 int max_register_virtual_size
)
2955 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2959 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2961 gdb_assert (gdbarch
!= NULL
);
2962 if (gdbarch
->register_virtual_type
== 0)
2963 internal_error (__FILE__
, __LINE__
,
2964 "gdbarch: gdbarch_register_virtual_type invalid");
2965 if (gdbarch_debug
>= 2)
2966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2967 return gdbarch
->register_virtual_type (reg_nr
);
2971 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2972 gdbarch_register_virtual_type_ftype register_virtual_type
)
2974 gdbarch
->register_virtual_type
= register_virtual_type
;
2978 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2980 gdb_assert (gdbarch
!= NULL
);
2981 if (gdbarch
->do_registers_info
== 0)
2982 internal_error (__FILE__
, __LINE__
,
2983 "gdbarch: gdbarch_do_registers_info invalid");
2984 if (gdbarch_debug
>= 2)
2985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2986 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2990 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2991 gdbarch_do_registers_info_ftype do_registers_info
)
2993 gdbarch
->do_registers_info
= do_registers_info
;
2997 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
2999 gdb_assert (gdbarch
!= NULL
);
3000 return gdbarch
->print_float_info
!= 0;
3004 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3006 gdb_assert (gdbarch
!= NULL
);
3007 if (gdbarch
->print_float_info
== 0)
3008 internal_error (__FILE__
, __LINE__
,
3009 "gdbarch: gdbarch_print_float_info invalid");
3010 if (gdbarch_debug
>= 2)
3011 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3012 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3016 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3017 gdbarch_print_float_info_ftype print_float_info
)
3019 gdbarch
->print_float_info
= print_float_info
;
3023 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3025 gdb_assert (gdbarch
!= NULL
);
3026 if (gdbarch
->register_sim_regno
== 0)
3027 internal_error (__FILE__
, __LINE__
,
3028 "gdbarch: gdbarch_register_sim_regno invalid");
3029 if (gdbarch_debug
>= 2)
3030 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3031 return gdbarch
->register_sim_regno (reg_nr
);
3035 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3036 gdbarch_register_sim_regno_ftype register_sim_regno
)
3038 gdbarch
->register_sim_regno
= register_sim_regno
;
3042 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3044 gdb_assert (gdbarch
!= NULL
);
3045 return gdbarch
->register_bytes_ok
!= 0;
3049 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3051 gdb_assert (gdbarch
!= NULL
);
3052 if (gdbarch
->register_bytes_ok
== 0)
3053 internal_error (__FILE__
, __LINE__
,
3054 "gdbarch: gdbarch_register_bytes_ok invalid");
3055 if (gdbarch_debug
>= 2)
3056 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3057 return gdbarch
->register_bytes_ok (nr_bytes
);
3061 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3062 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3064 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3068 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3070 gdb_assert (gdbarch
!= NULL
);
3071 if (gdbarch
->cannot_fetch_register
== 0)
3072 internal_error (__FILE__
, __LINE__
,
3073 "gdbarch: gdbarch_cannot_fetch_register invalid");
3074 if (gdbarch_debug
>= 2)
3075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3076 return gdbarch
->cannot_fetch_register (regnum
);
3080 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3081 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3083 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3087 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3089 gdb_assert (gdbarch
!= NULL
);
3090 if (gdbarch
->cannot_store_register
== 0)
3091 internal_error (__FILE__
, __LINE__
,
3092 "gdbarch: gdbarch_cannot_store_register invalid");
3093 if (gdbarch_debug
>= 2)
3094 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3095 return gdbarch
->cannot_store_register (regnum
);
3099 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3100 gdbarch_cannot_store_register_ftype cannot_store_register
)
3102 gdbarch
->cannot_store_register
= cannot_store_register
;
3106 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3108 gdb_assert (gdbarch
!= NULL
);
3109 return gdbarch
->get_longjmp_target
!= 0;
3113 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3115 gdb_assert (gdbarch
!= NULL
);
3116 if (gdbarch
->get_longjmp_target
== 0)
3117 internal_error (__FILE__
, __LINE__
,
3118 "gdbarch: gdbarch_get_longjmp_target invalid");
3119 if (gdbarch_debug
>= 2)
3120 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3121 return gdbarch
->get_longjmp_target (pc
);
3125 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3126 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3128 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3132 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3134 gdb_assert (gdbarch
!= NULL
);
3135 if (gdbarch
->use_generic_dummy_frames
== -1)
3136 internal_error (__FILE__
, __LINE__
,
3137 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3138 if (gdbarch_debug
>= 2)
3139 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3140 return gdbarch
->use_generic_dummy_frames
;
3144 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3145 int use_generic_dummy_frames
)
3147 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3151 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3153 gdb_assert (gdbarch
!= NULL
);
3154 if (gdbarch
->call_dummy_location
== 0)
3155 internal_error (__FILE__
, __LINE__
,
3156 "gdbarch: gdbarch_call_dummy_location invalid");
3157 if (gdbarch_debug
>= 2)
3158 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3159 return gdbarch
->call_dummy_location
;
3163 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3164 int call_dummy_location
)
3166 gdbarch
->call_dummy_location
= call_dummy_location
;
3170 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3172 gdb_assert (gdbarch
!= NULL
);
3173 if (gdbarch
->call_dummy_address
== 0)
3174 internal_error (__FILE__
, __LINE__
,
3175 "gdbarch: gdbarch_call_dummy_address invalid");
3176 if (gdbarch_debug
>= 2)
3177 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3178 return gdbarch
->call_dummy_address ();
3182 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3183 gdbarch_call_dummy_address_ftype call_dummy_address
)
3185 gdbarch
->call_dummy_address
= call_dummy_address
;
3189 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3191 gdb_assert (gdbarch
!= NULL
);
3192 if (gdbarch
->call_dummy_start_offset
== -1)
3193 internal_error (__FILE__
, __LINE__
,
3194 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3195 if (gdbarch_debug
>= 2)
3196 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3197 return gdbarch
->call_dummy_start_offset
;
3201 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3202 CORE_ADDR call_dummy_start_offset
)
3204 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3208 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3210 gdb_assert (gdbarch
!= NULL
);
3211 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3212 internal_error (__FILE__
, __LINE__
,
3213 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3214 if (gdbarch_debug
>= 2)
3215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3216 return gdbarch
->call_dummy_breakpoint_offset
;
3220 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3221 CORE_ADDR call_dummy_breakpoint_offset
)
3223 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3227 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3229 gdb_assert (gdbarch
!= NULL
);
3230 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3231 internal_error (__FILE__
, __LINE__
,
3232 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3233 if (gdbarch_debug
>= 2)
3234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3235 return gdbarch
->call_dummy_breakpoint_offset_p
;
3239 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3240 int call_dummy_breakpoint_offset_p
)
3242 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3246 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3248 gdb_assert (gdbarch
!= NULL
);
3249 if (gdbarch
->call_dummy_length
== -1)
3250 internal_error (__FILE__
, __LINE__
,
3251 "gdbarch: gdbarch_call_dummy_length invalid");
3252 if (gdbarch_debug
>= 2)
3253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3254 return gdbarch
->call_dummy_length
;
3258 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3259 int call_dummy_length
)
3261 gdbarch
->call_dummy_length
= call_dummy_length
;
3265 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3267 gdb_assert (gdbarch
!= NULL
);
3268 if (gdbarch
->pc_in_call_dummy
== 0)
3269 internal_error (__FILE__
, __LINE__
,
3270 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3271 if (gdbarch_debug
>= 2)
3272 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3273 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3277 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3278 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3280 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3284 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3286 gdb_assert (gdbarch
!= NULL
);
3287 if (gdbarch
->call_dummy_p
== -1)
3288 internal_error (__FILE__
, __LINE__
,
3289 "gdbarch: gdbarch_call_dummy_p invalid");
3290 if (gdbarch_debug
>= 2)
3291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3292 return gdbarch
->call_dummy_p
;
3296 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3299 gdbarch
->call_dummy_p
= call_dummy_p
;
3303 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3305 gdb_assert (gdbarch
!= NULL
);
3306 /* Skip verify of call_dummy_words, invalid_p == 0 */
3307 if (gdbarch_debug
>= 2)
3308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3309 return gdbarch
->call_dummy_words
;
3313 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3314 LONGEST
* call_dummy_words
)
3316 gdbarch
->call_dummy_words
= call_dummy_words
;
3320 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3322 gdb_assert (gdbarch
!= NULL
);
3323 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3324 if (gdbarch_debug
>= 2)
3325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3326 return gdbarch
->sizeof_call_dummy_words
;
3330 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3331 int sizeof_call_dummy_words
)
3333 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3337 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3339 gdb_assert (gdbarch
!= NULL
);
3340 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3341 internal_error (__FILE__
, __LINE__
,
3342 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3343 if (gdbarch_debug
>= 2)
3344 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3345 return gdbarch
->call_dummy_stack_adjust_p
;
3349 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3350 int call_dummy_stack_adjust_p
)
3352 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3356 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3358 gdb_assert (gdbarch
!= NULL
);
3359 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3360 internal_error (__FILE__
, __LINE__
,
3361 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3362 if (gdbarch_debug
>= 2)
3363 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3364 return gdbarch
->call_dummy_stack_adjust
;
3368 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3369 int call_dummy_stack_adjust
)
3371 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3375 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
)
3377 gdb_assert (gdbarch
!= NULL
);
3378 if (gdbarch
->fix_call_dummy
== 0)
3379 internal_error (__FILE__
, __LINE__
,
3380 "gdbarch: gdbarch_fix_call_dummy invalid");
3381 if (gdbarch_debug
>= 2)
3382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3383 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3387 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3388 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3390 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3394 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3396 gdb_assert (gdbarch
!= NULL
);
3397 if (gdbarch
->init_frame_pc_first
== 0)
3398 internal_error (__FILE__
, __LINE__
,
3399 "gdbarch: gdbarch_init_frame_pc_first invalid");
3400 if (gdbarch_debug
>= 2)
3401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3402 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3406 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3407 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3409 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3413 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3415 gdb_assert (gdbarch
!= NULL
);
3416 if (gdbarch
->init_frame_pc
== 0)
3417 internal_error (__FILE__
, __LINE__
,
3418 "gdbarch: gdbarch_init_frame_pc invalid");
3419 if (gdbarch_debug
>= 2)
3420 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3421 gdbarch
->init_frame_pc (fromleaf
, prev
);
3425 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3426 gdbarch_init_frame_pc_ftype init_frame_pc
)
3428 gdbarch
->init_frame_pc
= init_frame_pc
;
3432 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3434 gdb_assert (gdbarch
!= NULL
);
3435 if (gdbarch_debug
>= 2)
3436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3437 return gdbarch
->believe_pcc_promotion
;
3441 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3442 int believe_pcc_promotion
)
3444 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3448 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3450 gdb_assert (gdbarch
!= NULL
);
3451 if (gdbarch_debug
>= 2)
3452 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3453 return gdbarch
->believe_pcc_promotion_type
;
3457 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3458 int believe_pcc_promotion_type
)
3460 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3464 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3466 gdb_assert (gdbarch
!= NULL
);
3467 if (gdbarch
->coerce_float_to_double
== 0)
3468 internal_error (__FILE__
, __LINE__
,
3469 "gdbarch: gdbarch_coerce_float_to_double invalid");
3470 if (gdbarch_debug
>= 2)
3471 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3472 return gdbarch
->coerce_float_to_double (formal
, actual
);
3476 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3477 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3479 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3483 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
)
3485 gdb_assert (gdbarch
!= NULL
);
3486 if (gdbarch
->get_saved_register
== 0)
3487 internal_error (__FILE__
, __LINE__
,
3488 "gdbarch: gdbarch_get_saved_register invalid");
3489 if (gdbarch_debug
>= 2)
3490 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3491 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3495 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3496 gdbarch_get_saved_register_ftype get_saved_register
)
3498 gdbarch
->get_saved_register
= get_saved_register
;
3502 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3504 gdb_assert (gdbarch
!= NULL
);
3505 if (gdbarch
->register_convertible
== 0)
3506 internal_error (__FILE__
, __LINE__
,
3507 "gdbarch: gdbarch_register_convertible invalid");
3508 if (gdbarch_debug
>= 2)
3509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3510 return gdbarch
->register_convertible (nr
);
3514 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3515 gdbarch_register_convertible_ftype register_convertible
)
3517 gdbarch
->register_convertible
= register_convertible
;
3521 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3523 gdb_assert (gdbarch
!= NULL
);
3524 if (gdbarch
->register_convert_to_virtual
== 0)
3525 internal_error (__FILE__
, __LINE__
,
3526 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3527 if (gdbarch_debug
>= 2)
3528 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3529 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3533 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3534 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3536 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3540 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3542 gdb_assert (gdbarch
!= NULL
);
3543 if (gdbarch
->register_convert_to_raw
== 0)
3544 internal_error (__FILE__
, __LINE__
,
3545 "gdbarch: gdbarch_register_convert_to_raw invalid");
3546 if (gdbarch_debug
>= 2)
3547 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3548 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3552 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3553 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3555 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3559 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3561 gdb_assert (gdbarch
!= NULL
);
3562 if (gdbarch
->convert_register_p
== 0)
3563 internal_error (__FILE__
, __LINE__
,
3564 "gdbarch: gdbarch_convert_register_p invalid");
3565 if (gdbarch_debug
>= 2)
3566 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3567 return gdbarch
->convert_register_p (regnum
);
3571 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3572 gdbarch_convert_register_p_ftype convert_register_p
)
3574 gdbarch
->convert_register_p
= convert_register_p
;
3578 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3580 gdb_assert (gdbarch
!= NULL
);
3581 if (gdbarch
->register_to_value
== 0)
3582 internal_error (__FILE__
, __LINE__
,
3583 "gdbarch: gdbarch_register_to_value invalid");
3584 if (gdbarch_debug
>= 2)
3585 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3586 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3590 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3591 gdbarch_register_to_value_ftype register_to_value
)
3593 gdbarch
->register_to_value
= register_to_value
;
3597 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3599 gdb_assert (gdbarch
!= NULL
);
3600 if (gdbarch
->value_to_register
== 0)
3601 internal_error (__FILE__
, __LINE__
,
3602 "gdbarch: gdbarch_value_to_register invalid");
3603 if (gdbarch_debug
>= 2)
3604 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3605 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3609 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3610 gdbarch_value_to_register_ftype value_to_register
)
3612 gdbarch
->value_to_register
= value_to_register
;
3616 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3618 gdb_assert (gdbarch
!= NULL
);
3619 if (gdbarch
->pointer_to_address
== 0)
3620 internal_error (__FILE__
, __LINE__
,
3621 "gdbarch: gdbarch_pointer_to_address invalid");
3622 if (gdbarch_debug
>= 2)
3623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3624 return gdbarch
->pointer_to_address (type
, buf
);
3628 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3629 gdbarch_pointer_to_address_ftype pointer_to_address
)
3631 gdbarch
->pointer_to_address
= pointer_to_address
;
3635 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3637 gdb_assert (gdbarch
!= NULL
);
3638 if (gdbarch
->address_to_pointer
== 0)
3639 internal_error (__FILE__
, __LINE__
,
3640 "gdbarch: gdbarch_address_to_pointer invalid");
3641 if (gdbarch_debug
>= 2)
3642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3643 gdbarch
->address_to_pointer (type
, buf
, addr
);
3647 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3648 gdbarch_address_to_pointer_ftype address_to_pointer
)
3650 gdbarch
->address_to_pointer
= address_to_pointer
;
3654 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3656 gdb_assert (gdbarch
!= NULL
);
3657 return gdbarch
->integer_to_address
!= 0;
3661 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3663 gdb_assert (gdbarch
!= NULL
);
3664 if (gdbarch
->integer_to_address
== 0)
3665 internal_error (__FILE__
, __LINE__
,
3666 "gdbarch: gdbarch_integer_to_address invalid");
3667 if (gdbarch_debug
>= 2)
3668 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3669 return gdbarch
->integer_to_address (type
, buf
);
3673 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3674 gdbarch_integer_to_address_ftype integer_to_address
)
3676 gdbarch
->integer_to_address
= integer_to_address
;
3680 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3682 gdb_assert (gdbarch
!= NULL
);
3683 if (gdbarch
->return_value_on_stack
== 0)
3684 internal_error (__FILE__
, __LINE__
,
3685 "gdbarch: gdbarch_return_value_on_stack invalid");
3686 if (gdbarch_debug
>= 2)
3687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3688 return gdbarch
->return_value_on_stack (type
);
3692 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3693 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3695 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3699 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, char *valbuf
)
3701 gdb_assert (gdbarch
!= NULL
);
3702 if (gdbarch
->extract_return_value
== 0)
3703 internal_error (__FILE__
, __LINE__
,
3704 "gdbarch: gdbarch_extract_return_value invalid");
3705 if (gdbarch_debug
>= 2)
3706 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3707 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3711 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3712 gdbarch_extract_return_value_ftype extract_return_value
)
3714 gdbarch
->extract_return_value
= extract_return_value
;
3718 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3720 gdb_assert (gdbarch
!= NULL
);
3721 if (gdbarch
->deprecated_extract_return_value
== 0)
3722 internal_error (__FILE__
, __LINE__
,
3723 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
3724 if (gdbarch_debug
>= 2)
3725 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3726 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
3730 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
3731 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
3733 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
3737 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3739 gdb_assert (gdbarch
!= NULL
);
3740 if (gdbarch
->push_arguments
== 0)
3741 internal_error (__FILE__
, __LINE__
,
3742 "gdbarch: gdbarch_push_arguments invalid");
3743 if (gdbarch_debug
>= 2)
3744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3745 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3749 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3750 gdbarch_push_arguments_ftype push_arguments
)
3752 gdbarch
->push_arguments
= push_arguments
;
3756 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3758 gdb_assert (gdbarch
!= NULL
);
3759 if (gdbarch
->push_dummy_frame
== 0)
3760 internal_error (__FILE__
, __LINE__
,
3761 "gdbarch: gdbarch_push_dummy_frame invalid");
3762 if (gdbarch_debug
>= 2)
3763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3764 gdbarch
->push_dummy_frame ();
3768 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3769 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3771 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3775 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3777 gdb_assert (gdbarch
!= NULL
);
3778 return gdbarch
->push_return_address
!= 0;
3782 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3784 gdb_assert (gdbarch
!= NULL
);
3785 if (gdbarch
->push_return_address
== 0)
3786 internal_error (__FILE__
, __LINE__
,
3787 "gdbarch: gdbarch_push_return_address invalid");
3788 if (gdbarch_debug
>= 2)
3789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3790 return gdbarch
->push_return_address (pc
, sp
);
3794 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3795 gdbarch_push_return_address_ftype push_return_address
)
3797 gdbarch
->push_return_address
= push_return_address
;
3801 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3803 gdb_assert (gdbarch
!= NULL
);
3804 if (gdbarch
->pop_frame
== 0)
3805 internal_error (__FILE__
, __LINE__
,
3806 "gdbarch: gdbarch_pop_frame invalid");
3807 if (gdbarch_debug
>= 2)
3808 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3809 gdbarch
->pop_frame ();
3813 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3814 gdbarch_pop_frame_ftype pop_frame
)
3816 gdbarch
->pop_frame
= pop_frame
;
3820 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3822 gdb_assert (gdbarch
!= NULL
);
3823 if (gdbarch
->store_struct_return
== 0)
3824 internal_error (__FILE__
, __LINE__
,
3825 "gdbarch: gdbarch_store_struct_return invalid");
3826 if (gdbarch_debug
>= 2)
3827 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3828 gdbarch
->store_struct_return (addr
, sp
);
3832 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3833 gdbarch_store_struct_return_ftype store_struct_return
)
3835 gdbarch
->store_struct_return
= store_struct_return
;
3839 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3841 gdb_assert (gdbarch
!= NULL
);
3842 if (gdbarch
->store_return_value
== 0)
3843 internal_error (__FILE__
, __LINE__
,
3844 "gdbarch: gdbarch_store_return_value invalid");
3845 if (gdbarch_debug
>= 2)
3846 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3847 gdbarch
->store_return_value (type
, valbuf
);
3851 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3852 gdbarch_store_return_value_ftype store_return_value
)
3854 gdbarch
->store_return_value
= store_return_value
;
3858 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3860 gdb_assert (gdbarch
!= NULL
);
3861 return gdbarch
->extract_struct_value_address
!= 0;
3865 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3867 gdb_assert (gdbarch
!= NULL
);
3868 if (gdbarch
->extract_struct_value_address
== 0)
3869 internal_error (__FILE__
, __LINE__
,
3870 "gdbarch: gdbarch_extract_struct_value_address invalid");
3871 if (gdbarch_debug
>= 2)
3872 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3873 return gdbarch
->extract_struct_value_address (regcache
);
3877 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3878 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3880 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3884 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3886 gdb_assert (gdbarch
!= NULL
);
3887 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
3891 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3893 gdb_assert (gdbarch
!= NULL
);
3894 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
3895 internal_error (__FILE__
, __LINE__
,
3896 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
3897 if (gdbarch_debug
>= 2)
3898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
3899 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
3903 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
3904 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
3906 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
3910 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3912 gdb_assert (gdbarch
!= NULL
);
3913 if (gdbarch
->use_struct_convention
== 0)
3914 internal_error (__FILE__
, __LINE__
,
3915 "gdbarch: gdbarch_use_struct_convention invalid");
3916 if (gdbarch_debug
>= 2)
3917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3918 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3922 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3923 gdbarch_use_struct_convention_ftype use_struct_convention
)
3925 gdbarch
->use_struct_convention
= use_struct_convention
;
3929 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3931 gdb_assert (gdbarch
!= NULL
);
3932 if (gdbarch
->frame_init_saved_regs
== 0)
3933 internal_error (__FILE__
, __LINE__
,
3934 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3935 if (gdbarch_debug
>= 2)
3936 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3937 gdbarch
->frame_init_saved_regs (frame
);
3941 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3942 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3944 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3948 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3950 gdb_assert (gdbarch
!= NULL
);
3951 return gdbarch
->init_extra_frame_info
!= 0;
3955 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3957 gdb_assert (gdbarch
!= NULL
);
3958 if (gdbarch
->init_extra_frame_info
== 0)
3959 internal_error (__FILE__
, __LINE__
,
3960 "gdbarch: gdbarch_init_extra_frame_info invalid");
3961 if (gdbarch_debug
>= 2)
3962 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3963 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3967 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3968 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3970 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3974 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3976 gdb_assert (gdbarch
!= NULL
);
3977 if (gdbarch
->skip_prologue
== 0)
3978 internal_error (__FILE__
, __LINE__
,
3979 "gdbarch: gdbarch_skip_prologue invalid");
3980 if (gdbarch_debug
>= 2)
3981 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3982 return gdbarch
->skip_prologue (ip
);
3986 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3987 gdbarch_skip_prologue_ftype skip_prologue
)
3989 gdbarch
->skip_prologue
= skip_prologue
;
3993 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3995 gdb_assert (gdbarch
!= NULL
);
3996 if (gdbarch
->prologue_frameless_p
== 0)
3997 internal_error (__FILE__
, __LINE__
,
3998 "gdbarch: gdbarch_prologue_frameless_p invalid");
3999 if (gdbarch_debug
>= 2)
4000 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4001 return gdbarch
->prologue_frameless_p (ip
);
4005 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4006 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4008 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4012 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4014 gdb_assert (gdbarch
!= NULL
);
4015 if (gdbarch
->inner_than
== 0)
4016 internal_error (__FILE__
, __LINE__
,
4017 "gdbarch: gdbarch_inner_than invalid");
4018 if (gdbarch_debug
>= 2)
4019 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4020 return gdbarch
->inner_than (lhs
, rhs
);
4024 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4025 gdbarch_inner_than_ftype inner_than
)
4027 gdbarch
->inner_than
= inner_than
;
4030 const unsigned char *
4031 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4033 gdb_assert (gdbarch
!= NULL
);
4034 if (gdbarch
->breakpoint_from_pc
== 0)
4035 internal_error (__FILE__
, __LINE__
,
4036 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4037 if (gdbarch_debug
>= 2)
4038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4039 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4043 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4044 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4046 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4050 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4052 gdb_assert (gdbarch
!= NULL
);
4053 if (gdbarch
->memory_insert_breakpoint
== 0)
4054 internal_error (__FILE__
, __LINE__
,
4055 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4056 if (gdbarch_debug
>= 2)
4057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4058 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4062 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4063 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4065 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4069 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4071 gdb_assert (gdbarch
!= NULL
);
4072 if (gdbarch
->memory_remove_breakpoint
== 0)
4073 internal_error (__FILE__
, __LINE__
,
4074 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4075 if (gdbarch_debug
>= 2)
4076 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4077 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4081 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4082 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4084 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4088 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4090 gdb_assert (gdbarch
!= NULL
);
4091 if (gdbarch
->decr_pc_after_break
== -1)
4092 internal_error (__FILE__
, __LINE__
,
4093 "gdbarch: gdbarch_decr_pc_after_break invalid");
4094 if (gdbarch_debug
>= 2)
4095 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4096 return gdbarch
->decr_pc_after_break
;
4100 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4101 CORE_ADDR decr_pc_after_break
)
4103 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4107 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4109 gdb_assert (gdbarch
!= NULL
);
4110 if (gdbarch
->prepare_to_proceed
== 0)
4111 internal_error (__FILE__
, __LINE__
,
4112 "gdbarch: gdbarch_prepare_to_proceed invalid");
4113 if (gdbarch_debug
>= 2)
4114 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4115 return gdbarch
->prepare_to_proceed (select_it
);
4119 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4120 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4122 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4126 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4128 gdb_assert (gdbarch
!= NULL
);
4129 if (gdbarch
->function_start_offset
== -1)
4130 internal_error (__FILE__
, __LINE__
,
4131 "gdbarch: gdbarch_function_start_offset invalid");
4132 if (gdbarch_debug
>= 2)
4133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4134 return gdbarch
->function_start_offset
;
4138 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4139 CORE_ADDR function_start_offset
)
4141 gdbarch
->function_start_offset
= function_start_offset
;
4145 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4147 gdb_assert (gdbarch
!= NULL
);
4148 if (gdbarch
->remote_translate_xfer_address
== 0)
4149 internal_error (__FILE__
, __LINE__
,
4150 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4151 if (gdbarch_debug
>= 2)
4152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4153 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4157 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4158 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4160 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4164 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4166 gdb_assert (gdbarch
!= NULL
);
4167 if (gdbarch
->frame_args_skip
== -1)
4168 internal_error (__FILE__
, __LINE__
,
4169 "gdbarch: gdbarch_frame_args_skip invalid");
4170 if (gdbarch_debug
>= 2)
4171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4172 return gdbarch
->frame_args_skip
;
4176 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4177 CORE_ADDR frame_args_skip
)
4179 gdbarch
->frame_args_skip
= frame_args_skip
;
4183 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4185 gdb_assert (gdbarch
!= NULL
);
4186 if (gdbarch
->frameless_function_invocation
== 0)
4187 internal_error (__FILE__
, __LINE__
,
4188 "gdbarch: gdbarch_frameless_function_invocation invalid");
4189 if (gdbarch_debug
>= 2)
4190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4191 return gdbarch
->frameless_function_invocation (fi
);
4195 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4196 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4198 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4202 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4204 gdb_assert (gdbarch
!= NULL
);
4205 if (gdbarch
->frame_chain
== 0)
4206 internal_error (__FILE__
, __LINE__
,
4207 "gdbarch: gdbarch_frame_chain invalid");
4208 if (gdbarch_debug
>= 2)
4209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4210 return gdbarch
->frame_chain (frame
);
4214 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4215 gdbarch_frame_chain_ftype frame_chain
)
4217 gdbarch
->frame_chain
= frame_chain
;
4221 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4223 gdb_assert (gdbarch
!= NULL
);
4224 if (gdbarch
->frame_chain_valid
== 0)
4225 internal_error (__FILE__
, __LINE__
,
4226 "gdbarch: gdbarch_frame_chain_valid invalid");
4227 if (gdbarch_debug
>= 2)
4228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4229 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4233 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4234 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4236 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4240 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4242 gdb_assert (gdbarch
!= NULL
);
4243 if (gdbarch
->frame_saved_pc
== 0)
4244 internal_error (__FILE__
, __LINE__
,
4245 "gdbarch: gdbarch_frame_saved_pc invalid");
4246 if (gdbarch_debug
>= 2)
4247 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4248 return gdbarch
->frame_saved_pc (fi
);
4252 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4253 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4255 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4259 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4261 gdb_assert (gdbarch
!= NULL
);
4262 if (gdbarch
->frame_args_address
== 0)
4263 internal_error (__FILE__
, __LINE__
,
4264 "gdbarch: gdbarch_frame_args_address invalid");
4265 if (gdbarch_debug
>= 2)
4266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4267 return gdbarch
->frame_args_address (fi
);
4271 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4272 gdbarch_frame_args_address_ftype frame_args_address
)
4274 gdbarch
->frame_args_address
= frame_args_address
;
4278 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4280 gdb_assert (gdbarch
!= NULL
);
4281 if (gdbarch
->frame_locals_address
== 0)
4282 internal_error (__FILE__
, __LINE__
,
4283 "gdbarch: gdbarch_frame_locals_address invalid");
4284 if (gdbarch_debug
>= 2)
4285 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4286 return gdbarch
->frame_locals_address (fi
);
4290 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4291 gdbarch_frame_locals_address_ftype frame_locals_address
)
4293 gdbarch
->frame_locals_address
= frame_locals_address
;
4297 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4299 gdb_assert (gdbarch
!= NULL
);
4300 if (gdbarch
->saved_pc_after_call
== 0)
4301 internal_error (__FILE__
, __LINE__
,
4302 "gdbarch: gdbarch_saved_pc_after_call invalid");
4303 if (gdbarch_debug
>= 2)
4304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4305 return gdbarch
->saved_pc_after_call (frame
);
4309 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4310 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4312 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4316 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4318 gdb_assert (gdbarch
!= NULL
);
4319 if (gdbarch
->frame_num_args
== 0)
4320 internal_error (__FILE__
, __LINE__
,
4321 "gdbarch: gdbarch_frame_num_args invalid");
4322 if (gdbarch_debug
>= 2)
4323 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4324 return gdbarch
->frame_num_args (frame
);
4328 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4329 gdbarch_frame_num_args_ftype frame_num_args
)
4331 gdbarch
->frame_num_args
= frame_num_args
;
4335 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4337 gdb_assert (gdbarch
!= NULL
);
4338 return gdbarch
->stack_align
!= 0;
4342 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4344 gdb_assert (gdbarch
!= NULL
);
4345 if (gdbarch
->stack_align
== 0)
4346 internal_error (__FILE__
, __LINE__
,
4347 "gdbarch: gdbarch_stack_align invalid");
4348 if (gdbarch_debug
>= 2)
4349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4350 return gdbarch
->stack_align (sp
);
4354 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4355 gdbarch_stack_align_ftype stack_align
)
4357 gdbarch
->stack_align
= stack_align
;
4361 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4363 gdb_assert (gdbarch
!= NULL
);
4364 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4365 if (gdbarch_debug
>= 2)
4366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4367 return gdbarch
->extra_stack_alignment_needed
;
4371 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4372 int extra_stack_alignment_needed
)
4374 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4378 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4380 gdb_assert (gdbarch
!= NULL
);
4381 return gdbarch
->reg_struct_has_addr
!= 0;
4385 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4387 gdb_assert (gdbarch
!= NULL
);
4388 if (gdbarch
->reg_struct_has_addr
== 0)
4389 internal_error (__FILE__
, __LINE__
,
4390 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4391 if (gdbarch_debug
>= 2)
4392 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4393 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4397 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4398 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4400 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4404 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4406 gdb_assert (gdbarch
!= NULL
);
4407 return gdbarch
->save_dummy_frame_tos
!= 0;
4411 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4413 gdb_assert (gdbarch
!= NULL
);
4414 if (gdbarch
->save_dummy_frame_tos
== 0)
4415 internal_error (__FILE__
, __LINE__
,
4416 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4417 if (gdbarch_debug
>= 2)
4418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4419 gdbarch
->save_dummy_frame_tos (sp
);
4423 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4424 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4426 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4430 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4432 gdb_assert (gdbarch
!= NULL
);
4433 if (gdbarch_debug
>= 2)
4434 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4435 return gdbarch
->parm_boundary
;
4439 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4442 gdbarch
->parm_boundary
= parm_boundary
;
4445 const struct floatformat
*
4446 gdbarch_float_format (struct gdbarch
*gdbarch
)
4448 gdb_assert (gdbarch
!= NULL
);
4449 if (gdbarch_debug
>= 2)
4450 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4451 return gdbarch
->float_format
;
4455 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4456 const struct floatformat
* float_format
)
4458 gdbarch
->float_format
= float_format
;
4461 const struct floatformat
*
4462 gdbarch_double_format (struct gdbarch
*gdbarch
)
4464 gdb_assert (gdbarch
!= NULL
);
4465 if (gdbarch_debug
>= 2)
4466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4467 return gdbarch
->double_format
;
4471 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4472 const struct floatformat
* double_format
)
4474 gdbarch
->double_format
= double_format
;
4477 const struct floatformat
*
4478 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4480 gdb_assert (gdbarch
!= NULL
);
4481 if (gdbarch_debug
>= 2)
4482 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4483 return gdbarch
->long_double_format
;
4487 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4488 const struct floatformat
* long_double_format
)
4490 gdbarch
->long_double_format
= long_double_format
;
4494 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4496 gdb_assert (gdbarch
!= NULL
);
4497 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4498 internal_error (__FILE__
, __LINE__
,
4499 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4500 if (gdbarch_debug
>= 2)
4501 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4502 return gdbarch
->convert_from_func_ptr_addr (addr
);
4506 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4507 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4509 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4513 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4515 gdb_assert (gdbarch
!= NULL
);
4516 if (gdbarch
->addr_bits_remove
== 0)
4517 internal_error (__FILE__
, __LINE__
,
4518 "gdbarch: gdbarch_addr_bits_remove invalid");
4519 if (gdbarch_debug
>= 2)
4520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4521 return gdbarch
->addr_bits_remove (addr
);
4525 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4526 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4528 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4532 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4534 gdb_assert (gdbarch
!= NULL
);
4535 if (gdbarch
->smash_text_address
== 0)
4536 internal_error (__FILE__
, __LINE__
,
4537 "gdbarch: gdbarch_smash_text_address invalid");
4538 if (gdbarch_debug
>= 2)
4539 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4540 return gdbarch
->smash_text_address (addr
);
4544 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4545 gdbarch_smash_text_address_ftype smash_text_address
)
4547 gdbarch
->smash_text_address
= smash_text_address
;
4551 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4553 gdb_assert (gdbarch
!= NULL
);
4554 return gdbarch
->software_single_step
!= 0;
4558 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4560 gdb_assert (gdbarch
!= NULL
);
4561 if (gdbarch
->software_single_step
== 0)
4562 internal_error (__FILE__
, __LINE__
,
4563 "gdbarch: gdbarch_software_single_step invalid");
4564 if (gdbarch_debug
>= 2)
4565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4566 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4570 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4571 gdbarch_software_single_step_ftype software_single_step
)
4573 gdbarch
->software_single_step
= software_single_step
;
4577 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4579 gdb_assert (gdbarch
!= NULL
);
4580 if (gdbarch
->print_insn
== 0)
4581 internal_error (__FILE__
, __LINE__
,
4582 "gdbarch: gdbarch_print_insn invalid");
4583 if (gdbarch_debug
>= 2)
4584 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4585 return gdbarch
->print_insn (vma
, info
);
4589 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4590 gdbarch_print_insn_ftype print_insn
)
4592 gdbarch
->print_insn
= print_insn
;
4596 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4598 gdb_assert (gdbarch
!= NULL
);
4599 if (gdbarch
->skip_trampoline_code
== 0)
4600 internal_error (__FILE__
, __LINE__
,
4601 "gdbarch: gdbarch_skip_trampoline_code invalid");
4602 if (gdbarch_debug
>= 2)
4603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4604 return gdbarch
->skip_trampoline_code (pc
);
4608 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4609 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4611 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4615 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4617 gdb_assert (gdbarch
!= NULL
);
4618 if (gdbarch
->in_solib_call_trampoline
== 0)
4619 internal_error (__FILE__
, __LINE__
,
4620 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4621 if (gdbarch_debug
>= 2)
4622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4623 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4627 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4628 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4630 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4634 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4636 gdb_assert (gdbarch
!= NULL
);
4637 if (gdbarch
->pc_in_sigtramp
== 0)
4638 internal_error (__FILE__
, __LINE__
,
4639 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4640 if (gdbarch_debug
>= 2)
4641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4642 return gdbarch
->pc_in_sigtramp (pc
, name
);
4646 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4647 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4649 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4653 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4655 gdb_assert (gdbarch
!= NULL
);
4656 if (gdbarch
->in_function_epilogue_p
== 0)
4657 internal_error (__FILE__
, __LINE__
,
4658 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4659 if (gdbarch_debug
>= 2)
4660 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4661 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4665 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4666 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4668 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4672 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4674 gdb_assert (gdbarch
!= NULL
);
4675 if (gdbarch
->construct_inferior_arguments
== 0)
4676 internal_error (__FILE__
, __LINE__
,
4677 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4678 if (gdbarch_debug
>= 2)
4679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4680 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4684 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4685 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4687 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4691 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4693 gdb_assert (gdbarch
!= NULL
);
4694 return gdbarch
->dwarf2_build_frame_info
!= 0;
4698 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4700 gdb_assert (gdbarch
!= NULL
);
4701 if (gdbarch
->dwarf2_build_frame_info
== 0)
4702 internal_error (__FILE__
, __LINE__
,
4703 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4704 if (gdbarch_debug
>= 2)
4705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4706 gdbarch
->dwarf2_build_frame_info (objfile
);
4710 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4711 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4713 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4717 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4719 gdb_assert (gdbarch
!= NULL
);
4720 if (gdbarch
->elf_make_msymbol_special
== 0)
4721 internal_error (__FILE__
, __LINE__
,
4722 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4723 if (gdbarch_debug
>= 2)
4724 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4725 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4729 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4730 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4732 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4736 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4738 gdb_assert (gdbarch
!= NULL
);
4739 if (gdbarch
->coff_make_msymbol_special
== 0)
4740 internal_error (__FILE__
, __LINE__
,
4741 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4742 if (gdbarch_debug
>= 2)
4743 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4744 gdbarch
->coff_make_msymbol_special (val
, msym
);
4748 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4749 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4751 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4755 /* Keep a registry of per-architecture data-pointers required by GDB
4762 gdbarch_data_init_ftype
*init
;
4763 gdbarch_data_free_ftype
*free
;
4766 struct gdbarch_data_registration
4768 struct gdbarch_data
*data
;
4769 struct gdbarch_data_registration
*next
;
4772 struct gdbarch_data_registry
4775 struct gdbarch_data_registration
*registrations
;
4778 struct gdbarch_data_registry gdbarch_data_registry
=
4783 struct gdbarch_data
*
4784 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4785 gdbarch_data_free_ftype
*free
)
4787 struct gdbarch_data_registration
**curr
;
4788 /* Append the new registraration. */
4789 for (curr
= &gdbarch_data_registry
.registrations
;
4791 curr
= &(*curr
)->next
);
4792 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4793 (*curr
)->next
= NULL
;
4794 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4795 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4796 (*curr
)->data
->init
= init
;
4797 (*curr
)->data
->init_p
= 1;
4798 (*curr
)->data
->free
= free
;
4799 return (*curr
)->data
;
4803 /* Create/delete the gdbarch data vector. */
4806 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4808 gdb_assert (gdbarch
->data
== NULL
);
4809 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4810 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4814 free_gdbarch_data (struct gdbarch
*gdbarch
)
4816 struct gdbarch_data_registration
*rego
;
4817 gdb_assert (gdbarch
->data
!= NULL
);
4818 for (rego
= gdbarch_data_registry
.registrations
;
4822 struct gdbarch_data
*data
= rego
->data
;
4823 gdb_assert (data
->index
< gdbarch
->nr_data
);
4824 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4826 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4827 gdbarch
->data
[data
->index
] = NULL
;
4830 xfree (gdbarch
->data
);
4831 gdbarch
->data
= NULL
;
4835 /* Initialize the current value of the specified per-architecture
4839 set_gdbarch_data (struct gdbarch
*gdbarch
,
4840 struct gdbarch_data
*data
,
4843 gdb_assert (data
->index
< gdbarch
->nr_data
);
4844 if (gdbarch
->data
[data
->index
] != NULL
)
4846 gdb_assert (data
->free
!= NULL
);
4847 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4849 gdbarch
->data
[data
->index
] = pointer
;
4852 /* Return the current value of the specified per-architecture
4856 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4858 gdb_assert (data
->index
< gdbarch
->nr_data
);
4859 /* The data-pointer isn't initialized, call init() to get a value but
4860 only if the architecture initializaiton has completed. Otherwise
4861 punt - hope that the caller knows what they are doing. */
4862 if (gdbarch
->data
[data
->index
] == NULL
4863 && gdbarch
->initialized_p
)
4865 /* Be careful to detect an initialization cycle. */
4866 gdb_assert (data
->init_p
);
4868 gdb_assert (data
->init
!= NULL
);
4869 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
4871 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
4873 return gdbarch
->data
[data
->index
];
4878 /* Keep a registry of swapped data required by GDB modules. */
4883 struct gdbarch_swap_registration
*source
;
4884 struct gdbarch_swap
*next
;
4887 struct gdbarch_swap_registration
4890 unsigned long sizeof_data
;
4891 gdbarch_swap_ftype
*init
;
4892 struct gdbarch_swap_registration
*next
;
4895 struct gdbarch_swap_registry
4898 struct gdbarch_swap_registration
*registrations
;
4901 struct gdbarch_swap_registry gdbarch_swap_registry
=
4907 register_gdbarch_swap (void *data
,
4908 unsigned long sizeof_data
,
4909 gdbarch_swap_ftype
*init
)
4911 struct gdbarch_swap_registration
**rego
;
4912 for (rego
= &gdbarch_swap_registry
.registrations
;
4914 rego
= &(*rego
)->next
);
4915 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4916 (*rego
)->next
= NULL
;
4917 (*rego
)->init
= init
;
4918 (*rego
)->data
= data
;
4919 (*rego
)->sizeof_data
= sizeof_data
;
4923 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
4925 struct gdbarch_swap
*curr
;
4926 for (curr
= gdbarch
->swap
;
4930 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
4935 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4937 struct gdbarch_swap_registration
*rego
;
4938 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4939 for (rego
= gdbarch_swap_registry
.registrations
;
4943 if (rego
->data
!= NULL
)
4945 (*curr
) = XMALLOC (struct gdbarch_swap
);
4946 (*curr
)->source
= rego
;
4947 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4948 (*curr
)->next
= NULL
;
4949 curr
= &(*curr
)->next
;
4951 if (rego
->init
!= NULL
)
4957 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4959 struct gdbarch_swap
*curr
;
4960 for (curr
= gdbarch
->swap
;
4963 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4967 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4969 struct gdbarch_swap
*curr
;
4970 for (curr
= gdbarch
->swap
;
4973 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4977 /* Keep a registry of the architectures known by GDB. */
4979 struct gdbarch_registration
4981 enum bfd_architecture bfd_architecture
;
4982 gdbarch_init_ftype
*init
;
4983 gdbarch_dump_tdep_ftype
*dump_tdep
;
4984 struct gdbarch_list
*arches
;
4985 struct gdbarch_registration
*next
;
4988 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4991 append_name (const char ***buf
, int *nr
, const char *name
)
4993 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4999 gdbarch_printable_names (void)
5003 /* Accumulate a list of names based on the registed list of
5005 enum bfd_architecture a
;
5007 const char **arches
= NULL
;
5008 struct gdbarch_registration
*rego
;
5009 for (rego
= gdbarch_registry
;
5013 const struct bfd_arch_info
*ap
;
5014 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5016 internal_error (__FILE__
, __LINE__
,
5017 "gdbarch_architecture_names: multi-arch unknown");
5020 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5025 append_name (&arches
, &nr_arches
, NULL
);
5029 /* Just return all the architectures that BFD knows. Assume that
5030 the legacy architecture framework supports them. */
5031 return bfd_arch_list ();
5036 gdbarch_register (enum bfd_architecture bfd_architecture
,
5037 gdbarch_init_ftype
*init
,
5038 gdbarch_dump_tdep_ftype
*dump_tdep
)
5040 struct gdbarch_registration
**curr
;
5041 const struct bfd_arch_info
*bfd_arch_info
;
5042 /* Check that BFD recognizes this architecture */
5043 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5044 if (bfd_arch_info
== NULL
)
5046 internal_error (__FILE__
, __LINE__
,
5047 "gdbarch: Attempt to register unknown architecture (%d)",
5050 /* Check that we haven't seen this architecture before */
5051 for (curr
= &gdbarch_registry
;
5053 curr
= &(*curr
)->next
)
5055 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5056 internal_error (__FILE__
, __LINE__
,
5057 "gdbarch: Duplicate registraration of architecture (%s)",
5058 bfd_arch_info
->printable_name
);
5062 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5063 bfd_arch_info
->printable_name
,
5066 (*curr
) = XMALLOC (struct gdbarch_registration
);
5067 (*curr
)->bfd_architecture
= bfd_architecture
;
5068 (*curr
)->init
= init
;
5069 (*curr
)->dump_tdep
= dump_tdep
;
5070 (*curr
)->arches
= NULL
;
5071 (*curr
)->next
= NULL
;
5072 /* When non- multi-arch, install whatever target dump routine we've
5073 been provided - hopefully that routine has been written correctly
5074 and works regardless of multi-arch. */
5075 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5076 && startup_gdbarch
.dump_tdep
== NULL
)
5077 startup_gdbarch
.dump_tdep
= dump_tdep
;
5081 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5082 gdbarch_init_ftype
*init
)
5084 gdbarch_register (bfd_architecture
, init
, NULL
);
5088 /* Look for an architecture using gdbarch_info. Base search on only
5089 BFD_ARCH_INFO and BYTE_ORDER. */
5091 struct gdbarch_list
*
5092 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5093 const struct gdbarch_info
*info
)
5095 for (; arches
!= NULL
; arches
= arches
->next
)
5097 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5099 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5107 /* Update the current architecture. Return ZERO if the update request
5111 gdbarch_update_p (struct gdbarch_info info
)
5113 struct gdbarch
*new_gdbarch
;
5114 struct gdbarch
*old_gdbarch
;
5115 struct gdbarch_registration
*rego
;
5117 /* Fill in missing parts of the INFO struct using a number of
5118 sources: ``set ...''; INFOabfd supplied; existing target. */
5120 /* ``(gdb) set architecture ...'' */
5121 if (info
.bfd_arch_info
== NULL
5122 && !TARGET_ARCHITECTURE_AUTO
)
5123 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5124 if (info
.bfd_arch_info
== NULL
5125 && info
.abfd
!= NULL
5126 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5127 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5128 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5129 if (info
.bfd_arch_info
== NULL
)
5130 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5132 /* ``(gdb) set byte-order ...'' */
5133 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5134 && !TARGET_BYTE_ORDER_AUTO
)
5135 info
.byte_order
= TARGET_BYTE_ORDER
;
5136 /* From the INFO struct. */
5137 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5138 && info
.abfd
!= NULL
)
5139 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5140 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5141 : BFD_ENDIAN_UNKNOWN
);
5142 /* From the current target. */
5143 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5144 info
.byte_order
= TARGET_BYTE_ORDER
;
5146 /* Must have found some sort of architecture. */
5147 gdb_assert (info
.bfd_arch_info
!= NULL
);
5151 fprintf_unfiltered (gdb_stdlog
,
5152 "gdbarch_update: info.bfd_arch_info %s\n",
5153 (info
.bfd_arch_info
!= NULL
5154 ? info
.bfd_arch_info
->printable_name
5156 fprintf_unfiltered (gdb_stdlog
,
5157 "gdbarch_update: info.byte_order %d (%s)\n",
5159 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5160 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5162 fprintf_unfiltered (gdb_stdlog
,
5163 "gdbarch_update: info.abfd 0x%lx\n",
5165 fprintf_unfiltered (gdb_stdlog
,
5166 "gdbarch_update: info.tdep_info 0x%lx\n",
5167 (long) info
.tdep_info
);
5170 /* Find the target that knows about this architecture. */
5171 for (rego
= gdbarch_registry
;
5174 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5179 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5183 /* Swap the data belonging to the old target out setting the
5184 installed data to zero. This stops the ->init() function trying
5185 to refer to the previous architecture's global data structures. */
5186 swapout_gdbarch_swap (current_gdbarch
);
5187 clear_gdbarch_swap (current_gdbarch
);
5189 /* Save the previously selected architecture, setting the global to
5190 NULL. This stops ->init() trying to use the previous
5191 architecture's configuration. The previous architecture may not
5192 even be of the same architecture family. The most recent
5193 architecture of the same family is found at the head of the
5194 rego->arches list. */
5195 old_gdbarch
= current_gdbarch
;
5196 current_gdbarch
= NULL
;
5198 /* Ask the target for a replacement architecture. */
5199 new_gdbarch
= rego
->init (info
, rego
->arches
);
5201 /* Did the target like it? No. Reject the change and revert to the
5202 old architecture. */
5203 if (new_gdbarch
== NULL
)
5206 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5207 swapin_gdbarch_swap (old_gdbarch
);
5208 current_gdbarch
= old_gdbarch
;
5212 /* Did the architecture change? No. Oops, put the old architecture
5214 if (old_gdbarch
== new_gdbarch
)
5217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5219 new_gdbarch
->bfd_arch_info
->printable_name
);
5220 swapin_gdbarch_swap (old_gdbarch
);
5221 current_gdbarch
= old_gdbarch
;
5225 /* Is this a pre-existing architecture? Yes. Move it to the front
5226 of the list of architectures (keeping the list sorted Most
5227 Recently Used) and then copy it in. */
5229 struct gdbarch_list
**list
;
5230 for (list
= ®o
->arches
;
5232 list
= &(*list
)->next
)
5234 if ((*list
)->gdbarch
== new_gdbarch
)
5236 struct gdbarch_list
*this;
5238 fprintf_unfiltered (gdb_stdlog
,
5239 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5241 new_gdbarch
->bfd_arch_info
->printable_name
);
5244 (*list
) = this->next
;
5245 /* Insert in the front. */
5246 this->next
= rego
->arches
;
5247 rego
->arches
= this;
5248 /* Copy the new architecture in. */
5249 current_gdbarch
= new_gdbarch
;
5250 swapin_gdbarch_swap (new_gdbarch
);
5251 architecture_changed_event ();
5257 /* Prepend this new architecture to the architecture list (keep the
5258 list sorted Most Recently Used). */
5260 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5261 this->next
= rego
->arches
;
5262 this->gdbarch
= new_gdbarch
;
5263 rego
->arches
= this;
5266 /* Switch to this new architecture marking it initialized. */
5267 current_gdbarch
= new_gdbarch
;
5268 current_gdbarch
->initialized_p
= 1;
5271 fprintf_unfiltered (gdb_stdlog
,
5272 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5274 new_gdbarch
->bfd_arch_info
->printable_name
);
5277 /* Check that the newly installed architecture is valid. Plug in
5278 any post init values. */
5279 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5280 verify_gdbarch (new_gdbarch
);
5282 /* Initialize the per-architecture memory (swap) areas.
5283 CURRENT_GDBARCH must be update before these modules are
5285 init_gdbarch_swap (new_gdbarch
);
5287 /* Initialize the per-architecture data. CURRENT_GDBARCH
5288 must be updated before these modules are called. */
5289 architecture_changed_event ();
5292 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5300 /* Pointer to the target-dependent disassembly function. */
5301 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5302 disassemble_info tm_print_insn_info
;
5305 extern void _initialize_gdbarch (void);
5308 _initialize_gdbarch (void)
5310 struct cmd_list_element
*c
;
5312 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5313 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5314 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5315 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5316 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5318 add_show_from_set (add_set_cmd ("arch",
5321 (char *)&gdbarch_debug
,
5322 "Set architecture debugging.\n\
5323 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5325 c
= add_set_cmd ("archdebug",
5328 (char *)&gdbarch_debug
,
5329 "Set architecture debugging.\n\
5330 When non-zero, architecture debugging is enabled.", &setlist
);
5332 deprecate_cmd (c
, "set debug arch");
5333 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");