1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch
*gdbarch
);
70 static void alloc_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void swapout_gdbarch_swap (struct gdbarch
*);
75 static void swapin_gdbarch_swap (struct gdbarch
*);
77 /* Convenience macro for allocting typesafe memory. */
80 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
84 /* Non-zero if we want to trace architecture code. */
87 #define GDBARCH_DEBUG 0
89 int gdbarch_debug
= GDBARCH_DEBUG
;
92 /* Maintain the struct gdbarch object */
96 /* basic architectural information */
97 const struct bfd_arch_info
* bfd_arch_info
;
100 /* target specific vector. */
101 struct gdbarch_tdep
*tdep
;
102 gdbarch_dump_tdep_ftype
*dump_tdep
;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap
*swap
;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype
*read_pc
;
149 gdbarch_write_pc_ftype
*write_pc
;
150 gdbarch_read_fp_ftype
*read_fp
;
151 gdbarch_write_fp_ftype
*write_fp
;
152 gdbarch_read_sp_ftype
*read_sp
;
153 gdbarch_write_sp_ftype
*write_sp
;
154 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
155 gdbarch_register_read_ftype
*register_read
;
156 gdbarch_register_write_ftype
*register_write
;
165 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
166 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
167 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
168 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
169 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
170 gdbarch_register_name_ftype
*register_name
;
173 gdbarch_register_byte_ftype
*register_byte
;
174 gdbarch_register_raw_size_ftype
*register_raw_size
;
175 int max_register_raw_size
;
176 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
177 int max_register_virtual_size
;
178 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
179 gdbarch_do_registers_info_ftype
*do_registers_info
;
180 gdbarch_print_float_info_ftype
*print_float_info
;
181 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
182 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
183 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
184 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
185 int use_generic_dummy_frames
;
186 int call_dummy_location
;
187 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
188 CORE_ADDR call_dummy_start_offset
;
189 CORE_ADDR call_dummy_breakpoint_offset
;
190 int call_dummy_breakpoint_offset_p
;
191 int call_dummy_length
;
192 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
194 LONGEST
* call_dummy_words
;
195 int sizeof_call_dummy_words
;
196 int call_dummy_stack_adjust_p
;
197 int call_dummy_stack_adjust
;
198 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
199 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
200 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
201 int believe_pcc_promotion
;
202 int believe_pcc_promotion_type
;
203 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
204 gdbarch_get_saved_register_ftype
*get_saved_register
;
205 gdbarch_register_convertible_ftype
*register_convertible
;
206 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
207 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
208 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
209 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
210 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
211 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
212 gdbarch_integer_to_address_ftype
*integer_to_address
;
213 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
214 gdbarch_extract_return_value_ftype
*extract_return_value
;
215 gdbarch_push_arguments_ftype
*push_arguments
;
216 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
217 gdbarch_push_return_address_ftype
*push_return_address
;
218 gdbarch_pop_frame_ftype
*pop_frame
;
219 gdbarch_store_struct_return_ftype
*store_struct_return
;
220 gdbarch_store_return_value_ftype
*store_return_value
;
221 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
222 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
223 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
224 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
225 gdbarch_skip_prologue_ftype
*skip_prologue
;
226 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
227 gdbarch_inner_than_ftype
*inner_than
;
228 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
229 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
230 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
231 CORE_ADDR decr_pc_after_break
;
232 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
233 CORE_ADDR function_start_offset
;
234 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
235 CORE_ADDR frame_args_skip
;
236 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
237 gdbarch_frame_chain_ftype
*frame_chain
;
238 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
239 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
240 gdbarch_frame_args_address_ftype
*frame_args_address
;
241 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
242 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
243 gdbarch_frame_num_args_ftype
*frame_num_args
;
244 gdbarch_stack_align_ftype
*stack_align
;
245 int extra_stack_alignment_needed
;
246 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
247 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
249 const struct floatformat
* float_format
;
250 const struct floatformat
* double_format
;
251 const struct floatformat
* long_double_format
;
252 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
253 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
254 gdbarch_smash_text_address_ftype
*smash_text_address
;
255 gdbarch_software_single_step_ftype
*software_single_step
;
256 gdbarch_print_insn_ftype
*print_insn
;
257 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
258 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
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 /* basic architecture information */
275 &bfd_default_arch_struct
,
277 /* target specific vector and its dump routine */
279 /*per-architecture data-pointers and swap regions */
281 /* Multi-arch values */
285 8 * sizeof (LONGEST
),
288 8 * sizeof (long double),
319 generic_register_raw_size
,
321 generic_register_virtual_size
,
349 generic_get_saved_register
,
404 generic_in_function_epilogue_p
,
405 construct_inferior_arguments
,
409 /* startup_gdbarch() */
412 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
414 /* Do any initialization needed for a non-multiarch configuration
415 after the _initialize_MODULE functions have been run. */
417 initialize_non_multiarch ()
419 alloc_gdbarch_data (&startup_gdbarch
);
420 init_gdbarch_data (&startup_gdbarch
);
424 /* Create a new ``struct gdbarch'' based on information provided by
425 ``struct gdbarch_info''. */
428 gdbarch_alloc (const struct gdbarch_info
*info
,
429 struct gdbarch_tdep
*tdep
)
431 /* NOTE: The new architecture variable is named ``current_gdbarch''
432 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
433 the current local architecture and not the previous global
434 architecture. This ensures that the new architectures initial
435 values are not influenced by the previous architecture. Once
436 everything is parameterised with gdbarch, this will go away. */
437 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
438 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
440 alloc_gdbarch_data (current_gdbarch
);
442 current_gdbarch
->tdep
= tdep
;
444 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
445 current_gdbarch
->byte_order
= info
->byte_order
;
447 /* Force the explicit initialization of these. */
448 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
449 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
450 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
451 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
452 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
453 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
454 current_gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
455 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
456 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
457 current_gdbarch
->char_signed
= -1;
458 current_gdbarch
->read_pc
= generic_target_read_pc
;
459 current_gdbarch
->write_pc
= generic_target_write_pc
;
460 current_gdbarch
->read_fp
= generic_target_read_fp
;
461 current_gdbarch
->write_fp
= generic_target_write_fp
;
462 current_gdbarch
->read_sp
= generic_target_read_sp
;
463 current_gdbarch
->write_sp
= generic_target_write_sp
;
464 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
465 current_gdbarch
->num_regs
= -1;
466 current_gdbarch
->sp_regnum
= -1;
467 current_gdbarch
->fp_regnum
= -1;
468 current_gdbarch
->pc_regnum
= -1;
469 current_gdbarch
->fp0_regnum
= -1;
470 current_gdbarch
->npc_regnum
= -1;
471 current_gdbarch
->nnpc_regnum
= -1;
472 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
473 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
474 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
475 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
476 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
477 current_gdbarch
->register_name
= legacy_register_name
;
478 current_gdbarch
->register_size
= -1;
479 current_gdbarch
->register_bytes
= -1;
480 current_gdbarch
->max_register_raw_size
= -1;
481 current_gdbarch
->max_register_virtual_size
= -1;
482 current_gdbarch
->do_registers_info
= do_registers_info
;
483 current_gdbarch
->print_float_info
= default_print_float_info
;
484 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
485 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
486 current_gdbarch
->cannot_store_register
= cannot_register_not
;
487 current_gdbarch
->use_generic_dummy_frames
= -1;
488 current_gdbarch
->call_dummy_start_offset
= -1;
489 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
490 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
491 current_gdbarch
->call_dummy_length
= -1;
492 current_gdbarch
->call_dummy_p
= -1;
493 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
494 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
495 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
496 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
497 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
498 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
499 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
500 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
501 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
502 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
503 current_gdbarch
->push_arguments
= default_push_arguments
;
504 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
505 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
506 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
507 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
508 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
509 current_gdbarch
->decr_pc_after_break
= -1;
510 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
511 current_gdbarch
->function_start_offset
= -1;
512 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
513 current_gdbarch
->frame_args_skip
= -1;
514 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
515 current_gdbarch
->extra_stack_alignment_needed
= 1;
516 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
517 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
518 current_gdbarch
->smash_text_address
= core_addr_identity
;
519 current_gdbarch
->print_insn
= legacy_print_insn
;
520 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
521 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
522 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
523 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
524 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
525 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
526 /* gdbarch_alloc() */
528 return current_gdbarch
;
532 /* Free a gdbarch struct. This should never happen in normal
533 operation --- once you've created a gdbarch, you keep it around.
534 However, if an architecture's init function encounters an error
535 building the structure, it may need to clean up a partially
536 constructed gdbarch. */
539 gdbarch_free (struct gdbarch
*arch
)
541 gdb_assert (arch
!= NULL
);
542 free_gdbarch_data (arch
);
547 /* Ensure that all values in a GDBARCH are reasonable. */
550 verify_gdbarch (struct gdbarch
*gdbarch
)
553 struct cleanup
*cleanups
;
556 /* Only perform sanity checks on a multi-arch target. */
559 log
= mem_fileopen ();
560 cleanups
= make_cleanup_ui_file_delete (log
);
562 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
563 fprintf_unfiltered (log
, "\n\tbyte-order");
564 if (gdbarch
->bfd_arch_info
== NULL
)
565 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
566 /* Check those that need to be defined for the given multi-arch level. */
567 /* Skip verify of short_bit, invalid_p == 0 */
568 /* Skip verify of int_bit, invalid_p == 0 */
569 /* Skip verify of long_bit, invalid_p == 0 */
570 /* Skip verify of long_long_bit, invalid_p == 0 */
571 /* Skip verify of float_bit, invalid_p == 0 */
572 /* Skip verify of double_bit, invalid_p == 0 */
573 /* Skip verify of long_double_bit, invalid_p == 0 */
574 /* Skip verify of ptr_bit, invalid_p == 0 */
575 if (gdbarch
->addr_bit
== 0)
576 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
577 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
578 if (gdbarch
->char_signed
== -1)
579 gdbarch
->char_signed
= 1;
580 /* Skip verify of read_pc, invalid_p == 0 */
581 /* Skip verify of write_pc, invalid_p == 0 */
582 /* Skip verify of read_fp, invalid_p == 0 */
583 /* Skip verify of write_fp, invalid_p == 0 */
584 /* Skip verify of read_sp, invalid_p == 0 */
585 /* Skip verify of write_sp, invalid_p == 0 */
586 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
587 /* Skip verify of register_read, has predicate */
588 /* Skip verify of register_write, has predicate */
589 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
590 && (gdbarch
->num_regs
== -1))
591 fprintf_unfiltered (log
, "\n\tnum_regs");
592 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
593 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
594 && (gdbarch
->sp_regnum
== -1))
595 fprintf_unfiltered (log
, "\n\tsp_regnum");
596 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
597 && (gdbarch
->fp_regnum
== -1))
598 fprintf_unfiltered (log
, "\n\tfp_regnum");
599 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
600 && (gdbarch
->pc_regnum
== -1))
601 fprintf_unfiltered (log
, "\n\tpc_regnum");
602 /* Skip verify of fp0_regnum, invalid_p == 0 */
603 /* Skip verify of npc_regnum, invalid_p == 0 */
604 /* Skip verify of nnpc_regnum, invalid_p == 0 */
605 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
606 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
607 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
608 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
609 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
610 /* Skip verify of register_name, invalid_p == 0 */
611 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
612 && (gdbarch
->register_size
== -1))
613 fprintf_unfiltered (log
, "\n\tregister_size");
614 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
615 && (gdbarch
->register_bytes
== -1))
616 fprintf_unfiltered (log
, "\n\tregister_bytes");
617 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
618 && (gdbarch
->register_byte
== 0))
619 fprintf_unfiltered (log
, "\n\tregister_byte");
620 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
621 && (gdbarch
->register_raw_size
== 0))
622 fprintf_unfiltered (log
, "\n\tregister_raw_size");
623 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
624 && (gdbarch
->max_register_raw_size
== -1))
625 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
626 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
627 && (gdbarch
->register_virtual_size
== 0))
628 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
629 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
630 && (gdbarch
->max_register_virtual_size
== -1))
631 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
632 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
633 && (gdbarch
->register_virtual_type
== 0))
634 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
635 /* Skip verify of do_registers_info, invalid_p == 0 */
636 /* Skip verify of print_float_info, invalid_p == 0 */
637 /* Skip verify of register_sim_regno, invalid_p == 0 */
638 /* Skip verify of register_bytes_ok, has predicate */
639 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
640 /* Skip verify of cannot_store_register, invalid_p == 0 */
641 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
642 && (gdbarch
->use_generic_dummy_frames
== -1))
643 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
644 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
645 && (gdbarch
->call_dummy_location
== 0))
646 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
647 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
648 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
649 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
650 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
651 && (gdbarch
->call_dummy_start_offset
== -1))
652 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
653 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
654 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
655 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
656 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
657 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
658 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
659 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
660 && (gdbarch
->call_dummy_length
== -1))
661 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
662 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
663 && (gdbarch
->pc_in_call_dummy
== 0))
664 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
665 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
666 && (gdbarch
->call_dummy_p
== -1))
667 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
668 /* Skip verify of call_dummy_words, invalid_p == 0 */
669 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
670 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
671 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
672 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
673 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
674 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
675 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
676 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
677 && (gdbarch
->fix_call_dummy
== 0))
678 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
679 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
680 /* Skip verify of init_frame_pc, invalid_p == 0 */
681 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
682 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
683 && (gdbarch
->get_saved_register
== 0))
684 fprintf_unfiltered (log
, "\n\tget_saved_register");
685 /* Skip verify of register_convertible, invalid_p == 0 */
686 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
687 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
688 /* Skip verify of fetch_pseudo_register, has predicate */
689 /* Skip verify of store_pseudo_register, has predicate */
690 /* Skip verify of pointer_to_address, invalid_p == 0 */
691 /* Skip verify of address_to_pointer, invalid_p == 0 */
692 /* Skip verify of integer_to_address, has predicate */
693 /* Skip verify of return_value_on_stack, invalid_p == 0 */
694 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
695 && (gdbarch
->extract_return_value
== 0))
696 fprintf_unfiltered (log
, "\n\textract_return_value");
697 /* Skip verify of push_arguments, invalid_p == 0 */
698 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
699 && (gdbarch
->push_dummy_frame
== 0))
700 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
701 /* Skip verify of push_return_address, has predicate */
702 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
703 && (gdbarch
->pop_frame
== 0))
704 fprintf_unfiltered (log
, "\n\tpop_frame");
705 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
706 && (gdbarch
->store_struct_return
== 0))
707 fprintf_unfiltered (log
, "\n\tstore_struct_return");
708 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
709 && (gdbarch
->store_return_value
== 0))
710 fprintf_unfiltered (log
, "\n\tstore_return_value");
711 /* Skip verify of extract_struct_value_address, has predicate */
712 /* Skip verify of use_struct_convention, invalid_p == 0 */
713 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
714 && (gdbarch
->frame_init_saved_regs
== 0))
715 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
716 /* Skip verify of init_extra_frame_info, has predicate */
717 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
718 && (gdbarch
->skip_prologue
== 0))
719 fprintf_unfiltered (log
, "\n\tskip_prologue");
720 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
722 && (gdbarch
->inner_than
== 0))
723 fprintf_unfiltered (log
, "\n\tinner_than");
724 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
725 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
726 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
727 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
728 && (gdbarch
->decr_pc_after_break
== -1))
729 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
730 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
731 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
732 && (gdbarch
->function_start_offset
== -1))
733 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
734 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
735 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
736 && (gdbarch
->frame_args_skip
== -1))
737 fprintf_unfiltered (log
, "\n\tframe_args_skip");
738 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
740 && (gdbarch
->frame_chain
== 0))
741 fprintf_unfiltered (log
, "\n\tframe_chain");
742 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
743 && (gdbarch
->frame_chain_valid
== 0))
744 fprintf_unfiltered (log
, "\n\tframe_chain_valid");
745 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
746 && (gdbarch
->frame_saved_pc
== 0))
747 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
748 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
749 && (gdbarch
->frame_args_address
== 0))
750 fprintf_unfiltered (log
, "\n\tframe_args_address");
751 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
752 && (gdbarch
->frame_locals_address
== 0))
753 fprintf_unfiltered (log
, "\n\tframe_locals_address");
754 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
755 && (gdbarch
->saved_pc_after_call
== 0))
756 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
757 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
758 && (gdbarch
->frame_num_args
== 0))
759 fprintf_unfiltered (log
, "\n\tframe_num_args");
760 /* Skip verify of stack_align, has predicate */
761 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
762 /* Skip verify of reg_struct_has_addr, has predicate */
763 /* Skip verify of save_dummy_frame_tos, has predicate */
764 if (gdbarch
->float_format
== 0)
765 gdbarch
->float_format
= default_float_format (gdbarch
);
766 if (gdbarch
->double_format
== 0)
767 gdbarch
->double_format
= default_double_format (gdbarch
);
768 if (gdbarch
->long_double_format
== 0)
769 gdbarch
->long_double_format
= default_double_format (gdbarch
);
770 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
771 /* Skip verify of addr_bits_remove, invalid_p == 0 */
772 /* Skip verify of smash_text_address, invalid_p == 0 */
773 /* Skip verify of software_single_step, has predicate */
774 /* Skip verify of print_insn, invalid_p == 0 */
775 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
776 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
777 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
778 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
779 /* Skip verify of dwarf2_build_frame_info, has predicate */
780 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
781 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
782 buf
= ui_file_xstrdup (log
, &dummy
);
783 make_cleanup (xfree
, buf
);
784 if (strlen (buf
) > 0)
785 internal_error (__FILE__
, __LINE__
,
786 "verify_gdbarch: the following are invalid ...%s",
788 do_cleanups (cleanups
);
792 /* Print out the details of the current architecture. */
794 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
795 just happens to match the global variable ``current_gdbarch''. That
796 way macros refering to that variable get the local and not the global
797 version - ulgh. Once everything is parameterised with gdbarch, this
801 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
803 fprintf_unfiltered (file
,
804 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
809 (long) current_gdbarch
->in_function_epilogue_p
);
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: register_read = 0x%08lx\n",
813 (long) current_gdbarch
->register_read
);
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: register_write = 0x%08lx\n",
817 (long) current_gdbarch
->register_write
);
818 #ifdef ADDRESS_TO_POINTER
820 /* Macro might contain `[{}]' when not multi-arch */
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: %s # %s\n",
823 "ADDRESS_TO_POINTER(type, buf, addr)",
824 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
829 (long) current_gdbarch
->address_to_pointer
830 /*ADDRESS_TO_POINTER ()*/);
832 #ifdef ADDR_BITS_REMOVE
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: %s # %s\n",
835 "ADDR_BITS_REMOVE(addr)",
836 XSTRING (ADDR_BITS_REMOVE (addr
)));
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
840 (long) current_gdbarch
->addr_bits_remove
841 /*ADDR_BITS_REMOVE ()*/);
843 #ifdef BELIEVE_PCC_PROMOTION
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
846 XSTRING (BELIEVE_PCC_PROMOTION
));
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
849 BELIEVE_PCC_PROMOTION
);
851 #ifdef BELIEVE_PCC_PROMOTION_TYPE
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
854 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
857 BELIEVE_PCC_PROMOTION_TYPE
);
859 #ifdef BREAKPOINT_FROM_PC
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: %s # %s\n",
862 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
863 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
867 (long) current_gdbarch
->breakpoint_from_pc
868 /*BREAKPOINT_FROM_PC ()*/);
870 #ifdef CALL_DUMMY_ADDRESS
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: %s # %s\n",
873 "CALL_DUMMY_ADDRESS()",
874 XSTRING (CALL_DUMMY_ADDRESS ()));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
878 (long) current_gdbarch
->call_dummy_address
879 /*CALL_DUMMY_ADDRESS ()*/);
881 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
884 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
885 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
888 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
890 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
893 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
896 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
898 #ifdef CALL_DUMMY_LENGTH
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
901 XSTRING (CALL_DUMMY_LENGTH
));
902 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
907 #ifdef CALL_DUMMY_LOCATION
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
910 XSTRING (CALL_DUMMY_LOCATION
));
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
913 CALL_DUMMY_LOCATION
);
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: CALL_DUMMY_P # %s\n",
918 XSTRING (CALL_DUMMY_P
));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CALL_DUMMY_P = %d\n",
923 #ifdef CALL_DUMMY_STACK_ADJUST
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
926 XSTRING (CALL_DUMMY_STACK_ADJUST
));
927 if (CALL_DUMMY_STACK_ADJUST_P
)
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
930 (long) CALL_DUMMY_STACK_ADJUST
);
932 #ifdef CALL_DUMMY_STACK_ADJUST_P
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
935 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
938 (long) CALL_DUMMY_STACK_ADJUST_P
);
940 #ifdef CALL_DUMMY_START_OFFSET
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
943 XSTRING (CALL_DUMMY_START_OFFSET
));
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
946 (long) CALL_DUMMY_START_OFFSET
);
948 #ifdef CALL_DUMMY_WORDS
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
951 XSTRING (CALL_DUMMY_WORDS
));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
954 (long) CALL_DUMMY_WORDS
);
956 #ifdef CANNOT_FETCH_REGISTER
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: %s # %s\n",
959 "CANNOT_FETCH_REGISTER(regnum)",
960 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
964 (long) current_gdbarch
->cannot_fetch_register
965 /*CANNOT_FETCH_REGISTER ()*/);
967 #ifdef CANNOT_STORE_REGISTER
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: %s # %s\n",
970 "CANNOT_STORE_REGISTER(regnum)",
971 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
975 (long) current_gdbarch
->cannot_store_register
976 /*CANNOT_STORE_REGISTER ()*/);
978 #ifdef COERCE_FLOAT_TO_DOUBLE
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: %s # %s\n",
981 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
982 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
986 (long) current_gdbarch
->coerce_float_to_double
987 /*COERCE_FLOAT_TO_DOUBLE ()*/);
989 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
991 /* Macro might contain `[{}]' when not multi-arch */
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: %s # %s\n",
994 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
995 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1000 (long) current_gdbarch
->coff_make_msymbol_special
1001 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1006 (long) current_gdbarch
->construct_inferior_arguments
);
1007 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: %s # %s\n",
1010 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1011 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1015 (long) current_gdbarch
->convert_from_func_ptr_addr
1016 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1018 #ifdef DECR_PC_AFTER_BREAK
1019 fprintf_unfiltered (file
,
1020 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1021 XSTRING (DECR_PC_AFTER_BREAK
));
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1024 (long) DECR_PC_AFTER_BREAK
);
1026 #ifdef DO_REGISTERS_INFO
1028 /* Macro might contain `[{}]' when not multi-arch */
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: %s # %s\n",
1031 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1032 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1037 (long) current_gdbarch
->do_registers_info
1038 /*DO_REGISTERS_INFO ()*/);
1040 #ifdef DWARF2_BUILD_FRAME_INFO
1042 /* Macro might contain `[{}]' when not multi-arch */
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: %s # %s\n",
1045 "DWARF2_BUILD_FRAME_INFO(objfile)",
1046 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1051 (long) current_gdbarch
->dwarf2_build_frame_info
1052 /*DWARF2_BUILD_FRAME_INFO ()*/);
1054 #ifdef DWARF2_REG_TO_REGNUM
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: %s # %s\n",
1057 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1058 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1062 (long) current_gdbarch
->dwarf2_reg_to_regnum
1063 /*DWARF2_REG_TO_REGNUM ()*/);
1065 #ifdef DWARF_REG_TO_REGNUM
1066 fprintf_unfiltered (file
,
1067 "gdbarch_dump: %s # %s\n",
1068 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1069 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1073 (long) current_gdbarch
->dwarf_reg_to_regnum
1074 /*DWARF_REG_TO_REGNUM ()*/);
1076 #ifdef ECOFF_REG_TO_REGNUM
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: %s # %s\n",
1079 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1080 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1084 (long) current_gdbarch
->ecoff_reg_to_regnum
1085 /*ECOFF_REG_TO_REGNUM ()*/);
1087 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1089 /* Macro might contain `[{}]' when not multi-arch */
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: %s # %s\n",
1092 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1093 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1098 (long) current_gdbarch
->elf_make_msymbol_special
1099 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1101 #ifdef EXTRACT_RETURN_VALUE
1103 /* Macro might contain `[{}]' when not multi-arch */
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: %s # %s\n",
1106 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1107 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1112 (long) current_gdbarch
->extract_return_value
1113 /*EXTRACT_RETURN_VALUE ()*/);
1115 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: %s # %s\n",
1118 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1119 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1123 (long) current_gdbarch
->extract_struct_value_address
1124 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1126 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1127 fprintf_unfiltered (file
,
1128 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1129 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1130 fprintf_unfiltered (file
,
1131 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1132 EXTRA_STACK_ALIGNMENT_NEEDED
);
1134 #ifdef FETCH_PSEUDO_REGISTER
1136 /* Macro might contain `[{}]' when not multi-arch */
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: %s # %s\n",
1139 "FETCH_PSEUDO_REGISTER(regnum)",
1140 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1145 (long) current_gdbarch
->fetch_pseudo_register
1146 /*FETCH_PSEUDO_REGISTER ()*/);
1148 #ifdef FIX_CALL_DUMMY
1150 /* Macro might contain `[{}]' when not multi-arch */
1151 fprintf_unfiltered (file
,
1152 "gdbarch_dump: %s # %s\n",
1153 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1154 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1159 (long) current_gdbarch
->fix_call_dummy
1160 /*FIX_CALL_DUMMY ()*/);
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: FP0_REGNUM # %s\n",
1165 XSTRING (FP0_REGNUM
));
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: FP0_REGNUM = %d\n",
1171 fprintf_unfiltered (file
,
1172 "gdbarch_dump: FP_REGNUM # %s\n",
1173 XSTRING (FP_REGNUM
));
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: FP_REGNUM = %d\n",
1178 #ifdef FRAMELESS_FUNCTION_INVOCATION
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: %s # %s\n",
1181 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1182 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1186 (long) current_gdbarch
->frameless_function_invocation
1187 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1189 #ifdef FRAME_ARGS_ADDRESS
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: %s # %s\n",
1192 "FRAME_ARGS_ADDRESS(fi)",
1193 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1197 (long) current_gdbarch
->frame_args_address
1198 /*FRAME_ARGS_ADDRESS ()*/);
1200 #ifdef FRAME_ARGS_SKIP
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1203 XSTRING (FRAME_ARGS_SKIP
));
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1206 (long) FRAME_ARGS_SKIP
);
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: %s # %s\n",
1211 "FRAME_CHAIN(frame)",
1212 XSTRING (FRAME_CHAIN (frame
)));
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1216 (long) current_gdbarch
->frame_chain
1217 /*FRAME_CHAIN ()*/);
1219 #ifdef FRAME_CHAIN_VALID
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: %s # %s\n",
1222 "FRAME_CHAIN_VALID(chain, thisframe)",
1223 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1225 fprintf_unfiltered (file
,
1226 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1227 (long) current_gdbarch
->frame_chain_valid
1228 /*FRAME_CHAIN_VALID ()*/);
1230 #ifdef FRAME_INIT_SAVED_REGS
1232 /* Macro might contain `[{}]' when not multi-arch */
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: %s # %s\n",
1235 "FRAME_INIT_SAVED_REGS(frame)",
1236 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1241 (long) current_gdbarch
->frame_init_saved_regs
1242 /*FRAME_INIT_SAVED_REGS ()*/);
1244 #ifdef FRAME_LOCALS_ADDRESS
1245 fprintf_unfiltered (file
,
1246 "gdbarch_dump: %s # %s\n",
1247 "FRAME_LOCALS_ADDRESS(fi)",
1248 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1252 (long) current_gdbarch
->frame_locals_address
1253 /*FRAME_LOCALS_ADDRESS ()*/);
1255 #ifdef FRAME_NUM_ARGS
1256 fprintf_unfiltered (file
,
1257 "gdbarch_dump: %s # %s\n",
1258 "FRAME_NUM_ARGS(frame)",
1259 XSTRING (FRAME_NUM_ARGS (frame
)));
1261 fprintf_unfiltered (file
,
1262 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1263 (long) current_gdbarch
->frame_num_args
1264 /*FRAME_NUM_ARGS ()*/);
1266 #ifdef FRAME_SAVED_PC
1267 fprintf_unfiltered (file
,
1268 "gdbarch_dump: %s # %s\n",
1269 "FRAME_SAVED_PC(fi)",
1270 XSTRING (FRAME_SAVED_PC (fi
)));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1274 (long) current_gdbarch
->frame_saved_pc
1275 /*FRAME_SAVED_PC ()*/);
1277 #ifdef FUNCTION_START_OFFSET
1278 fprintf_unfiltered (file
,
1279 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1280 XSTRING (FUNCTION_START_OFFSET
));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1283 (long) FUNCTION_START_OFFSET
);
1285 #ifdef GET_SAVED_REGISTER
1287 /* Macro might contain `[{}]' when not multi-arch */
1288 fprintf_unfiltered (file
,
1289 "gdbarch_dump: %s # %s\n",
1290 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1291 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1296 (long) current_gdbarch
->get_saved_register
1297 /*GET_SAVED_REGISTER ()*/);
1299 #ifdef INIT_EXTRA_FRAME_INFO
1301 /* Macro might contain `[{}]' when not multi-arch */
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: %s # %s\n",
1304 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1305 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1310 (long) current_gdbarch
->init_extra_frame_info
1311 /*INIT_EXTRA_FRAME_INFO ()*/);
1313 #ifdef INIT_FRAME_PC
1315 /* Macro might contain `[{}]' when not multi-arch */
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: %s # %s\n",
1318 "INIT_FRAME_PC(fromleaf, prev)",
1319 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1322 fprintf_unfiltered (file
,
1323 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1324 (long) current_gdbarch
->init_frame_pc
1325 /*INIT_FRAME_PC ()*/);
1327 #ifdef INIT_FRAME_PC_FIRST
1329 /* Macro might contain `[{}]' when not multi-arch */
1330 fprintf_unfiltered (file
,
1331 "gdbarch_dump: %s # %s\n",
1332 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1333 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1336 fprintf_unfiltered (file
,
1337 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1338 (long) current_gdbarch
->init_frame_pc_first
1339 /*INIT_FRAME_PC_FIRST ()*/);
1342 fprintf_unfiltered (file
,
1343 "gdbarch_dump: %s # %s\n",
1344 "INNER_THAN(lhs, rhs)",
1345 XSTRING (INNER_THAN (lhs
, rhs
)));
1347 fprintf_unfiltered (file
,
1348 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1349 (long) current_gdbarch
->inner_than
1352 #ifdef INTEGER_TO_ADDRESS
1353 fprintf_unfiltered (file
,
1354 "gdbarch_dump: %s # %s\n",
1355 "INTEGER_TO_ADDRESS(type, buf)",
1356 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1358 fprintf_unfiltered (file
,
1359 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1360 (long) current_gdbarch
->integer_to_address
1361 /*INTEGER_TO_ADDRESS ()*/);
1363 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: %s # %s\n",
1366 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1367 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1371 (long) current_gdbarch
->in_solib_call_trampoline
1372 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1374 #ifdef MAX_REGISTER_RAW_SIZE
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1377 XSTRING (MAX_REGISTER_RAW_SIZE
));
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1380 MAX_REGISTER_RAW_SIZE
);
1382 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1385 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1388 MAX_REGISTER_VIRTUAL_SIZE
);
1390 #ifdef MEMORY_INSERT_BREAKPOINT
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: %s # %s\n",
1393 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1394 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1398 (long) current_gdbarch
->memory_insert_breakpoint
1399 /*MEMORY_INSERT_BREAKPOINT ()*/);
1401 #ifdef MEMORY_REMOVE_BREAKPOINT
1402 fprintf_unfiltered (file
,
1403 "gdbarch_dump: %s # %s\n",
1404 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1405 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1407 fprintf_unfiltered (file
,
1408 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1409 (long) current_gdbarch
->memory_remove_breakpoint
1410 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: NNPC_REGNUM # %s\n",
1415 XSTRING (NNPC_REGNUM
));
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: NNPC_REGNUM = %d\n",
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: NPC_REGNUM # %s\n",
1423 XSTRING (NPC_REGNUM
));
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: NPC_REGNUM = %d\n",
1428 #ifdef NUM_PSEUDO_REGS
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1431 XSTRING (NUM_PSEUDO_REGS
));
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: NUM_REGS # %s\n",
1439 XSTRING (NUM_REGS
));
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: NUM_REGS = %d\n",
1444 #ifdef PARM_BOUNDARY
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1447 XSTRING (PARM_BOUNDARY
));
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1452 #ifdef PC_IN_CALL_DUMMY
1453 fprintf_unfiltered (file
,
1454 "gdbarch_dump: %s # %s\n",
1455 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1456 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1460 (long) current_gdbarch
->pc_in_call_dummy
1461 /*PC_IN_CALL_DUMMY ()*/);
1464 fprintf_unfiltered (file
,
1465 "gdbarch_dump: PC_REGNUM # %s\n",
1466 XSTRING (PC_REGNUM
));
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: PC_REGNUM = %d\n",
1471 #ifdef POINTER_TO_ADDRESS
1472 fprintf_unfiltered (file
,
1473 "gdbarch_dump: %s # %s\n",
1474 "POINTER_TO_ADDRESS(type, buf)",
1475 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1479 (long) current_gdbarch
->pointer_to_address
1480 /*POINTER_TO_ADDRESS ()*/);
1484 /* Macro might contain `[{}]' when not multi-arch */
1485 fprintf_unfiltered (file
,
1486 "gdbarch_dump: %s # %s\n",
1488 XSTRING (POP_FRAME (-)));
1491 fprintf_unfiltered (file
,
1492 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1493 (long) current_gdbarch
->pop_frame
1496 #ifdef PREPARE_TO_PROCEED
1497 fprintf_unfiltered (file
,
1498 "gdbarch_dump: %s # %s\n",
1499 "PREPARE_TO_PROCEED(select_it)",
1500 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1502 fprintf_unfiltered (file
,
1503 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1504 (long) current_gdbarch
->prepare_to_proceed
1505 /*PREPARE_TO_PROCEED ()*/);
1507 #ifdef PRINT_FLOAT_INFO
1509 /* Macro might contain `[{}]' when not multi-arch */
1510 fprintf_unfiltered (file
,
1511 "gdbarch_dump: %s # %s\n",
1512 "PRINT_FLOAT_INFO()",
1513 XSTRING (PRINT_FLOAT_INFO ()));
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1518 (long) current_gdbarch
->print_float_info
1519 /*PRINT_FLOAT_INFO ()*/);
1521 #ifdef PROLOGUE_FRAMELESS_P
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: %s # %s\n",
1524 "PROLOGUE_FRAMELESS_P(ip)",
1525 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1527 fprintf_unfiltered (file
,
1528 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1529 (long) current_gdbarch
->prologue_frameless_p
1530 /*PROLOGUE_FRAMELESS_P ()*/);
1532 #ifdef PUSH_ARGUMENTS
1533 fprintf_unfiltered (file
,
1534 "gdbarch_dump: %s # %s\n",
1535 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1536 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1540 (long) current_gdbarch
->push_arguments
1541 /*PUSH_ARGUMENTS ()*/);
1543 #ifdef PUSH_DUMMY_FRAME
1545 /* Macro might contain `[{}]' when not multi-arch */
1546 fprintf_unfiltered (file
,
1547 "gdbarch_dump: %s # %s\n",
1548 "PUSH_DUMMY_FRAME(-)",
1549 XSTRING (PUSH_DUMMY_FRAME (-)));
1552 fprintf_unfiltered (file
,
1553 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1554 (long) current_gdbarch
->push_dummy_frame
1555 /*PUSH_DUMMY_FRAME ()*/);
1557 #ifdef PUSH_RETURN_ADDRESS
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: %s # %s\n",
1560 "PUSH_RETURN_ADDRESS(pc, sp)",
1561 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1565 (long) current_gdbarch
->push_return_address
1566 /*PUSH_RETURN_ADDRESS ()*/);
1568 #ifdef REGISTER_BYTE
1569 fprintf_unfiltered (file
,
1570 "gdbarch_dump: %s # %s\n",
1571 "REGISTER_BYTE(reg_nr)",
1572 XSTRING (REGISTER_BYTE (reg_nr
)));
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1576 (long) current_gdbarch
->register_byte
1577 /*REGISTER_BYTE ()*/);
1579 #ifdef REGISTER_BYTES
1580 fprintf_unfiltered (file
,
1581 "gdbarch_dump: REGISTER_BYTES # %s\n",
1582 XSTRING (REGISTER_BYTES
));
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: REGISTER_BYTES = %d\n",
1587 #ifdef REGISTER_BYTES_OK
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: %s # %s\n",
1590 "REGISTER_BYTES_OK(nr_bytes)",
1591 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1595 (long) current_gdbarch
->register_bytes_ok
1596 /*REGISTER_BYTES_OK ()*/);
1598 #ifdef REGISTER_CONVERTIBLE
1599 fprintf_unfiltered (file
,
1600 "gdbarch_dump: %s # %s\n",
1601 "REGISTER_CONVERTIBLE(nr)",
1602 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1604 fprintf_unfiltered (file
,
1605 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1606 (long) current_gdbarch
->register_convertible
1607 /*REGISTER_CONVERTIBLE ()*/);
1609 #ifdef REGISTER_CONVERT_TO_RAW
1611 /* Macro might contain `[{}]' when not multi-arch */
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: %s # %s\n",
1614 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1615 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1620 (long) current_gdbarch
->register_convert_to_raw
1621 /*REGISTER_CONVERT_TO_RAW ()*/);
1623 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1625 /* Macro might contain `[{}]' when not multi-arch */
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: %s # %s\n",
1628 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1629 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1632 fprintf_unfiltered (file
,
1633 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1634 (long) current_gdbarch
->register_convert_to_virtual
1635 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1637 #ifdef REGISTER_NAME
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: %s # %s\n",
1640 "REGISTER_NAME(regnr)",
1641 XSTRING (REGISTER_NAME (regnr
)));
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1645 (long) current_gdbarch
->register_name
1646 /*REGISTER_NAME ()*/);
1648 #ifdef REGISTER_RAW_SIZE
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: %s # %s\n",
1651 "REGISTER_RAW_SIZE(reg_nr)",
1652 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1654 fprintf_unfiltered (file
,
1655 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1656 (long) current_gdbarch
->register_raw_size
1657 /*REGISTER_RAW_SIZE ()*/);
1659 #ifdef REGISTER_SIM_REGNO
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: %s # %s\n",
1662 "REGISTER_SIM_REGNO(reg_nr)",
1663 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1665 fprintf_unfiltered (file
,
1666 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1667 (long) current_gdbarch
->register_sim_regno
1668 /*REGISTER_SIM_REGNO ()*/);
1670 #ifdef REGISTER_SIZE
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: REGISTER_SIZE # %s\n",
1673 XSTRING (REGISTER_SIZE
));
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: REGISTER_SIZE = %d\n",
1678 #ifdef REGISTER_VIRTUAL_SIZE
1679 fprintf_unfiltered (file
,
1680 "gdbarch_dump: %s # %s\n",
1681 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1682 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1686 (long) current_gdbarch
->register_virtual_size
1687 /*REGISTER_VIRTUAL_SIZE ()*/);
1689 #ifdef REGISTER_VIRTUAL_TYPE
1690 fprintf_unfiltered (file
,
1691 "gdbarch_dump: %s # %s\n",
1692 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1693 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1695 fprintf_unfiltered (file
,
1696 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1697 (long) current_gdbarch
->register_virtual_type
1698 /*REGISTER_VIRTUAL_TYPE ()*/);
1700 #ifdef REG_STRUCT_HAS_ADDR
1701 fprintf_unfiltered (file
,
1702 "gdbarch_dump: %s # %s\n",
1703 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1704 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1706 fprintf_unfiltered (file
,
1707 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1708 (long) current_gdbarch
->reg_struct_has_addr
1709 /*REG_STRUCT_HAS_ADDR ()*/);
1711 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1713 /* Macro might contain `[{}]' when not multi-arch */
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: %s # %s\n",
1716 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1717 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1720 fprintf_unfiltered (file
,
1721 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1722 (long) current_gdbarch
->remote_translate_xfer_address
1723 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1725 #ifdef RETURN_VALUE_ON_STACK
1726 fprintf_unfiltered (file
,
1727 "gdbarch_dump: %s # %s\n",
1728 "RETURN_VALUE_ON_STACK(type)",
1729 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1731 fprintf_unfiltered (file
,
1732 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1733 (long) current_gdbarch
->return_value_on_stack
1734 /*RETURN_VALUE_ON_STACK ()*/);
1736 #ifdef SAVED_PC_AFTER_CALL
1737 fprintf_unfiltered (file
,
1738 "gdbarch_dump: %s # %s\n",
1739 "SAVED_PC_AFTER_CALL(frame)",
1740 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1742 fprintf_unfiltered (file
,
1743 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1744 (long) current_gdbarch
->saved_pc_after_call
1745 /*SAVED_PC_AFTER_CALL ()*/);
1747 #ifdef SAVE_DUMMY_FRAME_TOS
1749 /* Macro might contain `[{}]' when not multi-arch */
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: %s # %s\n",
1752 "SAVE_DUMMY_FRAME_TOS(sp)",
1753 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1756 fprintf_unfiltered (file
,
1757 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1758 (long) current_gdbarch
->save_dummy_frame_tos
1759 /*SAVE_DUMMY_FRAME_TOS ()*/);
1761 #ifdef SDB_REG_TO_REGNUM
1762 fprintf_unfiltered (file
,
1763 "gdbarch_dump: %s # %s\n",
1764 "SDB_REG_TO_REGNUM(sdb_regnr)",
1765 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1767 fprintf_unfiltered (file
,
1768 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1769 (long) current_gdbarch
->sdb_reg_to_regnum
1770 /*SDB_REG_TO_REGNUM ()*/);
1772 #ifdef SIZEOF_CALL_DUMMY_WORDS
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1775 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1778 (long) SIZEOF_CALL_DUMMY_WORDS
);
1780 #ifdef SKIP_PROLOGUE
1781 fprintf_unfiltered (file
,
1782 "gdbarch_dump: %s # %s\n",
1783 "SKIP_PROLOGUE(ip)",
1784 XSTRING (SKIP_PROLOGUE (ip
)));
1786 fprintf_unfiltered (file
,
1787 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1788 (long) current_gdbarch
->skip_prologue
1789 /*SKIP_PROLOGUE ()*/);
1791 #ifdef SKIP_TRAMPOLINE_CODE
1792 fprintf_unfiltered (file
,
1793 "gdbarch_dump: %s # %s\n",
1794 "SKIP_TRAMPOLINE_CODE(pc)",
1795 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1797 fprintf_unfiltered (file
,
1798 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1799 (long) current_gdbarch
->skip_trampoline_code
1800 /*SKIP_TRAMPOLINE_CODE ()*/);
1802 #ifdef SMASH_TEXT_ADDRESS
1803 fprintf_unfiltered (file
,
1804 "gdbarch_dump: %s # %s\n",
1805 "SMASH_TEXT_ADDRESS(addr)",
1806 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1808 fprintf_unfiltered (file
,
1809 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1810 (long) current_gdbarch
->smash_text_address
1811 /*SMASH_TEXT_ADDRESS ()*/);
1813 #ifdef SOFTWARE_SINGLE_STEP
1815 /* Macro might contain `[{}]' when not multi-arch */
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: %s # %s\n",
1818 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1819 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1824 (long) current_gdbarch
->software_single_step
1825 /*SOFTWARE_SINGLE_STEP ()*/);
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: SP_REGNUM # %s\n",
1830 XSTRING (SP_REGNUM
));
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: SP_REGNUM = %d\n",
1835 #ifdef STAB_REG_TO_REGNUM
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: %s # %s\n",
1838 "STAB_REG_TO_REGNUM(stab_regnr)",
1839 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1843 (long) current_gdbarch
->stab_reg_to_regnum
1844 /*STAB_REG_TO_REGNUM ()*/);
1847 fprintf_unfiltered (file
,
1848 "gdbarch_dump: %s # %s\n",
1850 XSTRING (STACK_ALIGN (sp
)));
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1854 (long) current_gdbarch
->stack_align
1855 /*STACK_ALIGN ()*/);
1857 #ifdef STORE_PSEUDO_REGISTER
1859 /* Macro might contain `[{}]' when not multi-arch */
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: %s # %s\n",
1862 "STORE_PSEUDO_REGISTER(regnum)",
1863 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1868 (long) current_gdbarch
->store_pseudo_register
1869 /*STORE_PSEUDO_REGISTER ()*/);
1871 #ifdef STORE_RETURN_VALUE
1873 /* Macro might contain `[{}]' when not multi-arch */
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: %s # %s\n",
1876 "STORE_RETURN_VALUE(type, valbuf)",
1877 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1882 (long) current_gdbarch
->store_return_value
1883 /*STORE_RETURN_VALUE ()*/);
1885 #ifdef STORE_STRUCT_RETURN
1887 /* Macro might contain `[{}]' when not multi-arch */
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: %s # %s\n",
1890 "STORE_STRUCT_RETURN(addr, sp)",
1891 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1896 (long) current_gdbarch
->store_struct_return
1897 /*STORE_STRUCT_RETURN ()*/);
1899 #ifdef TARGET_ADDR_BIT
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1902 XSTRING (TARGET_ADDR_BIT
));
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1907 #ifdef TARGET_ARCHITECTURE
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1910 XSTRING (TARGET_ARCHITECTURE
));
1911 if (TARGET_ARCHITECTURE
!= NULL
)
1912 fprintf_unfiltered (file
,
1913 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1914 TARGET_ARCHITECTURE
->printable_name
);
1916 #ifdef TARGET_BFD_VMA_BIT
1917 fprintf_unfiltered (file
,
1918 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1919 XSTRING (TARGET_BFD_VMA_BIT
));
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1922 TARGET_BFD_VMA_BIT
);
1924 #ifdef TARGET_BYTE_ORDER
1925 fprintf_unfiltered (file
,
1926 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1927 XSTRING (TARGET_BYTE_ORDER
));
1928 fprintf_unfiltered (file
,
1929 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1930 (long) TARGET_BYTE_ORDER
);
1932 #ifdef TARGET_CHAR_SIGNED
1933 fprintf_unfiltered (file
,
1934 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1935 XSTRING (TARGET_CHAR_SIGNED
));
1936 fprintf_unfiltered (file
,
1937 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1938 TARGET_CHAR_SIGNED
);
1940 #ifdef TARGET_DOUBLE_BIT
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1943 XSTRING (TARGET_DOUBLE_BIT
));
1944 fprintf_unfiltered (file
,
1945 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1948 #ifdef TARGET_DOUBLE_FORMAT
1949 fprintf_unfiltered (file
,
1950 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1951 XSTRING (TARGET_DOUBLE_FORMAT
));
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1954 (long) TARGET_DOUBLE_FORMAT
);
1956 #ifdef TARGET_FLOAT_BIT
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1959 XSTRING (TARGET_FLOAT_BIT
));
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1964 #ifdef TARGET_FLOAT_FORMAT
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1967 XSTRING (TARGET_FLOAT_FORMAT
));
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1970 (long) TARGET_FLOAT_FORMAT
);
1972 #ifdef TARGET_INT_BIT
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1975 XSTRING (TARGET_INT_BIT
));
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1980 #ifdef TARGET_LONG_BIT
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1983 XSTRING (TARGET_LONG_BIT
));
1984 fprintf_unfiltered (file
,
1985 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
1988 #ifdef TARGET_LONG_DOUBLE_BIT
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1991 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1992 fprintf_unfiltered (file
,
1993 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
1994 TARGET_LONG_DOUBLE_BIT
);
1996 #ifdef TARGET_LONG_DOUBLE_FORMAT
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1999 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2002 (long) TARGET_LONG_DOUBLE_FORMAT
);
2004 #ifdef TARGET_LONG_LONG_BIT
2005 fprintf_unfiltered (file
,
2006 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2007 XSTRING (TARGET_LONG_LONG_BIT
));
2008 fprintf_unfiltered (file
,
2009 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2010 TARGET_LONG_LONG_BIT
);
2012 #ifdef TARGET_PRINT_INSN
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: %s # %s\n",
2015 "TARGET_PRINT_INSN(vma, info)",
2016 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2020 (long) current_gdbarch
->print_insn
2021 /*TARGET_PRINT_INSN ()*/);
2023 #ifdef TARGET_PTR_BIT
2024 fprintf_unfiltered (file
,
2025 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2026 XSTRING (TARGET_PTR_BIT
));
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2031 #ifdef TARGET_READ_FP
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: %s # %s\n",
2035 XSTRING (TARGET_READ_FP ()));
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2039 (long) current_gdbarch
->read_fp
2040 /*TARGET_READ_FP ()*/);
2042 #ifdef TARGET_READ_PC
2043 fprintf_unfiltered (file
,
2044 "gdbarch_dump: %s # %s\n",
2045 "TARGET_READ_PC(ptid)",
2046 XSTRING (TARGET_READ_PC (ptid
)));
2048 fprintf_unfiltered (file
,
2049 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2050 (long) current_gdbarch
->read_pc
2051 /*TARGET_READ_PC ()*/);
2053 #ifdef TARGET_READ_SP
2054 fprintf_unfiltered (file
,
2055 "gdbarch_dump: %s # %s\n",
2057 XSTRING (TARGET_READ_SP ()));
2059 fprintf_unfiltered (file
,
2060 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2061 (long) current_gdbarch
->read_sp
2062 /*TARGET_READ_SP ()*/);
2064 #ifdef TARGET_SHORT_BIT
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2067 XSTRING (TARGET_SHORT_BIT
));
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2072 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2074 /* Macro might contain `[{}]' when not multi-arch */
2075 fprintf_unfiltered (file
,
2076 "gdbarch_dump: %s # %s\n",
2077 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2078 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2083 (long) current_gdbarch
->virtual_frame_pointer
2084 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2086 #ifdef TARGET_WRITE_FP
2088 /* Macro might contain `[{}]' when not multi-arch */
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: %s # %s\n",
2091 "TARGET_WRITE_FP(val)",
2092 XSTRING (TARGET_WRITE_FP (val
)));
2095 fprintf_unfiltered (file
,
2096 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2097 (long) current_gdbarch
->write_fp
2098 /*TARGET_WRITE_FP ()*/);
2100 #ifdef TARGET_WRITE_PC
2102 /* Macro might contain `[{}]' when not multi-arch */
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: %s # %s\n",
2105 "TARGET_WRITE_PC(val, ptid)",
2106 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2111 (long) current_gdbarch
->write_pc
2112 /*TARGET_WRITE_PC ()*/);
2114 #ifdef TARGET_WRITE_SP
2116 /* Macro might contain `[{}]' when not multi-arch */
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: %s # %s\n",
2119 "TARGET_WRITE_SP(val)",
2120 XSTRING (TARGET_WRITE_SP (val
)));
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2125 (long) current_gdbarch
->write_sp
2126 /*TARGET_WRITE_SP ()*/);
2128 #ifdef USE_GENERIC_DUMMY_FRAMES
2129 fprintf_unfiltered (file
,
2130 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2131 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2132 fprintf_unfiltered (file
,
2133 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2134 USE_GENERIC_DUMMY_FRAMES
);
2136 #ifdef USE_STRUCT_CONVENTION
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: %s # %s\n",
2139 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2140 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2142 fprintf_unfiltered (file
,
2143 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2144 (long) current_gdbarch
->use_struct_convention
2145 /*USE_STRUCT_CONVENTION ()*/);
2147 if (current_gdbarch
->dump_tdep
!= NULL
)
2148 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2151 struct gdbarch_tdep
*
2152 gdbarch_tdep (struct gdbarch
*gdbarch
)
2154 if (gdbarch_debug
>= 2)
2155 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2156 return gdbarch
->tdep
;
2160 const struct bfd_arch_info
*
2161 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2163 if (gdbarch_debug
>= 2)
2164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2165 return gdbarch
->bfd_arch_info
;
2169 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2171 if (gdbarch_debug
>= 2)
2172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2173 return gdbarch
->byte_order
;
2177 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2179 /* Skip verify of short_bit, invalid_p == 0 */
2180 if (gdbarch_debug
>= 2)
2181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2182 return gdbarch
->short_bit
;
2186 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2189 gdbarch
->short_bit
= short_bit
;
2193 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2195 /* Skip verify of int_bit, invalid_p == 0 */
2196 if (gdbarch_debug
>= 2)
2197 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2198 return gdbarch
->int_bit
;
2202 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2205 gdbarch
->int_bit
= int_bit
;
2209 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2211 /* Skip verify of long_bit, invalid_p == 0 */
2212 if (gdbarch_debug
>= 2)
2213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2214 return gdbarch
->long_bit
;
2218 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2221 gdbarch
->long_bit
= long_bit
;
2225 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2227 /* Skip verify of long_long_bit, invalid_p == 0 */
2228 if (gdbarch_debug
>= 2)
2229 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2230 return gdbarch
->long_long_bit
;
2234 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2237 gdbarch
->long_long_bit
= long_long_bit
;
2241 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2243 /* Skip verify of float_bit, invalid_p == 0 */
2244 if (gdbarch_debug
>= 2)
2245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2246 return gdbarch
->float_bit
;
2250 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2253 gdbarch
->float_bit
= float_bit
;
2257 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2259 /* Skip verify of double_bit, invalid_p == 0 */
2260 if (gdbarch_debug
>= 2)
2261 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2262 return gdbarch
->double_bit
;
2266 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2269 gdbarch
->double_bit
= double_bit
;
2273 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2275 /* Skip verify of long_double_bit, invalid_p == 0 */
2276 if (gdbarch_debug
>= 2)
2277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2278 return gdbarch
->long_double_bit
;
2282 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2283 int long_double_bit
)
2285 gdbarch
->long_double_bit
= long_double_bit
;
2289 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2291 /* Skip verify of ptr_bit, invalid_p == 0 */
2292 if (gdbarch_debug
>= 2)
2293 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2294 return gdbarch
->ptr_bit
;
2298 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2301 gdbarch
->ptr_bit
= ptr_bit
;
2305 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2307 if (gdbarch
->addr_bit
== 0)
2308 internal_error (__FILE__
, __LINE__
,
2309 "gdbarch: gdbarch_addr_bit invalid");
2310 if (gdbarch_debug
>= 2)
2311 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2312 return gdbarch
->addr_bit
;
2316 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2319 gdbarch
->addr_bit
= addr_bit
;
2323 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2325 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2326 if (gdbarch_debug
>= 2)
2327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2328 return gdbarch
->bfd_vma_bit
;
2332 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2335 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2339 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2341 if (gdbarch
->char_signed
== -1)
2342 internal_error (__FILE__
, __LINE__
,
2343 "gdbarch: gdbarch_char_signed invalid");
2344 if (gdbarch_debug
>= 2)
2345 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2346 return gdbarch
->char_signed
;
2350 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2353 gdbarch
->char_signed
= char_signed
;
2357 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2359 if (gdbarch
->read_pc
== 0)
2360 internal_error (__FILE__
, __LINE__
,
2361 "gdbarch: gdbarch_read_pc invalid");
2362 if (gdbarch_debug
>= 2)
2363 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2364 return gdbarch
->read_pc (ptid
);
2368 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2369 gdbarch_read_pc_ftype read_pc
)
2371 gdbarch
->read_pc
= read_pc
;
2375 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2377 if (gdbarch
->write_pc
== 0)
2378 internal_error (__FILE__
, __LINE__
,
2379 "gdbarch: gdbarch_write_pc invalid");
2380 if (gdbarch_debug
>= 2)
2381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2382 gdbarch
->write_pc (val
, ptid
);
2386 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2387 gdbarch_write_pc_ftype write_pc
)
2389 gdbarch
->write_pc
= write_pc
;
2393 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2395 if (gdbarch
->read_fp
== 0)
2396 internal_error (__FILE__
, __LINE__
,
2397 "gdbarch: gdbarch_read_fp invalid");
2398 if (gdbarch_debug
>= 2)
2399 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2400 return gdbarch
->read_fp ();
2404 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2405 gdbarch_read_fp_ftype read_fp
)
2407 gdbarch
->read_fp
= read_fp
;
2411 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2413 if (gdbarch
->write_fp
== 0)
2414 internal_error (__FILE__
, __LINE__
,
2415 "gdbarch: gdbarch_write_fp invalid");
2416 if (gdbarch_debug
>= 2)
2417 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2418 gdbarch
->write_fp (val
);
2422 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2423 gdbarch_write_fp_ftype write_fp
)
2425 gdbarch
->write_fp
= write_fp
;
2429 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2431 if (gdbarch
->read_sp
== 0)
2432 internal_error (__FILE__
, __LINE__
,
2433 "gdbarch: gdbarch_read_sp invalid");
2434 if (gdbarch_debug
>= 2)
2435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2436 return gdbarch
->read_sp ();
2440 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2441 gdbarch_read_sp_ftype read_sp
)
2443 gdbarch
->read_sp
= read_sp
;
2447 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2449 if (gdbarch
->write_sp
== 0)
2450 internal_error (__FILE__
, __LINE__
,
2451 "gdbarch: gdbarch_write_sp invalid");
2452 if (gdbarch_debug
>= 2)
2453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2454 gdbarch
->write_sp (val
);
2458 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2459 gdbarch_write_sp_ftype write_sp
)
2461 gdbarch
->write_sp
= write_sp
;
2465 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2467 if (gdbarch
->virtual_frame_pointer
== 0)
2468 internal_error (__FILE__
, __LINE__
,
2469 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2470 if (gdbarch_debug
>= 2)
2471 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2472 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2476 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2477 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2479 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2483 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2485 return gdbarch
->register_read
!= 0;
2489 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2491 if (gdbarch
->register_read
== 0)
2492 internal_error (__FILE__
, __LINE__
,
2493 "gdbarch: gdbarch_register_read invalid");
2494 if (gdbarch_debug
>= 2)
2495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2496 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2500 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2501 gdbarch_register_read_ftype register_read
)
2503 gdbarch
->register_read
= register_read
;
2507 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2509 return gdbarch
->register_write
!= 0;
2513 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2515 if (gdbarch
->register_write
== 0)
2516 internal_error (__FILE__
, __LINE__
,
2517 "gdbarch: gdbarch_register_write invalid");
2518 if (gdbarch_debug
>= 2)
2519 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2520 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2524 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2525 gdbarch_register_write_ftype register_write
)
2527 gdbarch
->register_write
= register_write
;
2531 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2533 if (gdbarch
->num_regs
== -1)
2534 internal_error (__FILE__
, __LINE__
,
2535 "gdbarch: gdbarch_num_regs invalid");
2536 if (gdbarch_debug
>= 2)
2537 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2538 return gdbarch
->num_regs
;
2542 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2545 gdbarch
->num_regs
= num_regs
;
2549 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2551 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2552 if (gdbarch_debug
>= 2)
2553 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2554 return gdbarch
->num_pseudo_regs
;
2558 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2559 int num_pseudo_regs
)
2561 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2565 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2567 if (gdbarch
->sp_regnum
== -1)
2568 internal_error (__FILE__
, __LINE__
,
2569 "gdbarch: gdbarch_sp_regnum invalid");
2570 if (gdbarch_debug
>= 2)
2571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2572 return gdbarch
->sp_regnum
;
2576 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2579 gdbarch
->sp_regnum
= sp_regnum
;
2583 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2585 if (gdbarch
->fp_regnum
== -1)
2586 internal_error (__FILE__
, __LINE__
,
2587 "gdbarch: gdbarch_fp_regnum invalid");
2588 if (gdbarch_debug
>= 2)
2589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2590 return gdbarch
->fp_regnum
;
2594 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2597 gdbarch
->fp_regnum
= fp_regnum
;
2601 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2603 if (gdbarch
->pc_regnum
== -1)
2604 internal_error (__FILE__
, __LINE__
,
2605 "gdbarch: gdbarch_pc_regnum invalid");
2606 if (gdbarch_debug
>= 2)
2607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2608 return gdbarch
->pc_regnum
;
2612 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2615 gdbarch
->pc_regnum
= pc_regnum
;
2619 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2621 /* Skip verify of fp0_regnum, invalid_p == 0 */
2622 if (gdbarch_debug
>= 2)
2623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2624 return gdbarch
->fp0_regnum
;
2628 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2631 gdbarch
->fp0_regnum
= fp0_regnum
;
2635 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2637 /* Skip verify of npc_regnum, invalid_p == 0 */
2638 if (gdbarch_debug
>= 2)
2639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2640 return gdbarch
->npc_regnum
;
2644 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2647 gdbarch
->npc_regnum
= npc_regnum
;
2651 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2653 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2654 if (gdbarch_debug
>= 2)
2655 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2656 return gdbarch
->nnpc_regnum
;
2660 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2663 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2667 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2669 if (gdbarch
->stab_reg_to_regnum
== 0)
2670 internal_error (__FILE__
, __LINE__
,
2671 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2672 if (gdbarch_debug
>= 2)
2673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2674 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2678 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2679 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2681 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2685 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2687 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2688 internal_error (__FILE__
, __LINE__
,
2689 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2690 if (gdbarch_debug
>= 2)
2691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2692 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2696 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2697 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2699 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2703 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2705 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2706 internal_error (__FILE__
, __LINE__
,
2707 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2708 if (gdbarch_debug
>= 2)
2709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2710 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2714 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2715 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2717 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2721 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2723 if (gdbarch
->sdb_reg_to_regnum
== 0)
2724 internal_error (__FILE__
, __LINE__
,
2725 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2726 if (gdbarch_debug
>= 2)
2727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2728 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2732 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2733 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2735 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2739 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2741 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2742 internal_error (__FILE__
, __LINE__
,
2743 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2744 if (gdbarch_debug
>= 2)
2745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2746 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2750 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2751 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2753 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2757 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2759 if (gdbarch
->register_name
== 0)
2760 internal_error (__FILE__
, __LINE__
,
2761 "gdbarch: gdbarch_register_name invalid");
2762 if (gdbarch_debug
>= 2)
2763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2764 return gdbarch
->register_name (regnr
);
2768 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2769 gdbarch_register_name_ftype register_name
)
2771 gdbarch
->register_name
= register_name
;
2775 gdbarch_register_size (struct gdbarch
*gdbarch
)
2777 if (gdbarch
->register_size
== -1)
2778 internal_error (__FILE__
, __LINE__
,
2779 "gdbarch: gdbarch_register_size invalid");
2780 if (gdbarch_debug
>= 2)
2781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2782 return gdbarch
->register_size
;
2786 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2789 gdbarch
->register_size
= register_size
;
2793 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2795 if (gdbarch
->register_bytes
== -1)
2796 internal_error (__FILE__
, __LINE__
,
2797 "gdbarch: gdbarch_register_bytes invalid");
2798 if (gdbarch_debug
>= 2)
2799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2800 return gdbarch
->register_bytes
;
2804 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2807 gdbarch
->register_bytes
= register_bytes
;
2811 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2813 if (gdbarch
->register_byte
== 0)
2814 internal_error (__FILE__
, __LINE__
,
2815 "gdbarch: gdbarch_register_byte invalid");
2816 if (gdbarch_debug
>= 2)
2817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2818 return gdbarch
->register_byte (reg_nr
);
2822 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2823 gdbarch_register_byte_ftype register_byte
)
2825 gdbarch
->register_byte
= register_byte
;
2829 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2831 if (gdbarch
->register_raw_size
== 0)
2832 internal_error (__FILE__
, __LINE__
,
2833 "gdbarch: gdbarch_register_raw_size invalid");
2834 if (gdbarch_debug
>= 2)
2835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2836 return gdbarch
->register_raw_size (reg_nr
);
2840 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2841 gdbarch_register_raw_size_ftype register_raw_size
)
2843 gdbarch
->register_raw_size
= register_raw_size
;
2847 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2849 if (gdbarch
->max_register_raw_size
== -1)
2850 internal_error (__FILE__
, __LINE__
,
2851 "gdbarch: gdbarch_max_register_raw_size invalid");
2852 if (gdbarch_debug
>= 2)
2853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2854 return gdbarch
->max_register_raw_size
;
2858 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2859 int max_register_raw_size
)
2861 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2865 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2867 if (gdbarch
->register_virtual_size
== 0)
2868 internal_error (__FILE__
, __LINE__
,
2869 "gdbarch: gdbarch_register_virtual_size invalid");
2870 if (gdbarch_debug
>= 2)
2871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2872 return gdbarch
->register_virtual_size (reg_nr
);
2876 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2877 gdbarch_register_virtual_size_ftype register_virtual_size
)
2879 gdbarch
->register_virtual_size
= register_virtual_size
;
2883 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2885 if (gdbarch
->max_register_virtual_size
== -1)
2886 internal_error (__FILE__
, __LINE__
,
2887 "gdbarch: gdbarch_max_register_virtual_size invalid");
2888 if (gdbarch_debug
>= 2)
2889 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2890 return gdbarch
->max_register_virtual_size
;
2894 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2895 int max_register_virtual_size
)
2897 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2901 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2903 if (gdbarch
->register_virtual_type
== 0)
2904 internal_error (__FILE__
, __LINE__
,
2905 "gdbarch: gdbarch_register_virtual_type invalid");
2906 if (gdbarch_debug
>= 2)
2907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2908 return gdbarch
->register_virtual_type (reg_nr
);
2912 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2913 gdbarch_register_virtual_type_ftype register_virtual_type
)
2915 gdbarch
->register_virtual_type
= register_virtual_type
;
2919 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2921 if (gdbarch
->do_registers_info
== 0)
2922 internal_error (__FILE__
, __LINE__
,
2923 "gdbarch: gdbarch_do_registers_info invalid");
2924 if (gdbarch_debug
>= 2)
2925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2926 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2930 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2931 gdbarch_do_registers_info_ftype do_registers_info
)
2933 gdbarch
->do_registers_info
= do_registers_info
;
2937 gdbarch_print_float_info (struct gdbarch
*gdbarch
)
2939 if (gdbarch
->print_float_info
== 0)
2940 internal_error (__FILE__
, __LINE__
,
2941 "gdbarch: gdbarch_print_float_info invalid");
2942 if (gdbarch_debug
>= 2)
2943 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2944 gdbarch
->print_float_info ();
2948 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2949 gdbarch_print_float_info_ftype print_float_info
)
2951 gdbarch
->print_float_info
= print_float_info
;
2955 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2957 if (gdbarch
->register_sim_regno
== 0)
2958 internal_error (__FILE__
, __LINE__
,
2959 "gdbarch: gdbarch_register_sim_regno invalid");
2960 if (gdbarch_debug
>= 2)
2961 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2962 return gdbarch
->register_sim_regno (reg_nr
);
2966 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2967 gdbarch_register_sim_regno_ftype register_sim_regno
)
2969 gdbarch
->register_sim_regno
= register_sim_regno
;
2973 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2975 return gdbarch
->register_bytes_ok
!= 0;
2979 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2981 if (gdbarch
->register_bytes_ok
== 0)
2982 internal_error (__FILE__
, __LINE__
,
2983 "gdbarch: gdbarch_register_bytes_ok invalid");
2984 if (gdbarch_debug
>= 2)
2985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2986 return gdbarch
->register_bytes_ok (nr_bytes
);
2990 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2991 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2993 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2997 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2999 if (gdbarch
->cannot_fetch_register
== 0)
3000 internal_error (__FILE__
, __LINE__
,
3001 "gdbarch: gdbarch_cannot_fetch_register invalid");
3002 if (gdbarch_debug
>= 2)
3003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3004 return gdbarch
->cannot_fetch_register (regnum
);
3008 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3009 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3011 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3015 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3017 if (gdbarch
->cannot_store_register
== 0)
3018 internal_error (__FILE__
, __LINE__
,
3019 "gdbarch: gdbarch_cannot_store_register invalid");
3020 if (gdbarch_debug
>= 2)
3021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3022 return gdbarch
->cannot_store_register (regnum
);
3026 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3027 gdbarch_cannot_store_register_ftype cannot_store_register
)
3029 gdbarch
->cannot_store_register
= cannot_store_register
;
3033 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3035 if (gdbarch
->use_generic_dummy_frames
== -1)
3036 internal_error (__FILE__
, __LINE__
,
3037 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3038 if (gdbarch_debug
>= 2)
3039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3040 return gdbarch
->use_generic_dummy_frames
;
3044 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3045 int use_generic_dummy_frames
)
3047 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3051 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3053 if (gdbarch
->call_dummy_location
== 0)
3054 internal_error (__FILE__
, __LINE__
,
3055 "gdbarch: gdbarch_call_dummy_location invalid");
3056 if (gdbarch_debug
>= 2)
3057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3058 return gdbarch
->call_dummy_location
;
3062 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3063 int call_dummy_location
)
3065 gdbarch
->call_dummy_location
= call_dummy_location
;
3069 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3071 if (gdbarch
->call_dummy_address
== 0)
3072 internal_error (__FILE__
, __LINE__
,
3073 "gdbarch: gdbarch_call_dummy_address invalid");
3074 if (gdbarch_debug
>= 2)
3075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3076 return gdbarch
->call_dummy_address ();
3080 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3081 gdbarch_call_dummy_address_ftype call_dummy_address
)
3083 gdbarch
->call_dummy_address
= call_dummy_address
;
3087 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3089 if (gdbarch
->call_dummy_start_offset
== -1)
3090 internal_error (__FILE__
, __LINE__
,
3091 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3092 if (gdbarch_debug
>= 2)
3093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3094 return gdbarch
->call_dummy_start_offset
;
3098 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3099 CORE_ADDR call_dummy_start_offset
)
3101 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3105 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3107 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3108 internal_error (__FILE__
, __LINE__
,
3109 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3110 if (gdbarch_debug
>= 2)
3111 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3112 return gdbarch
->call_dummy_breakpoint_offset
;
3116 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3117 CORE_ADDR call_dummy_breakpoint_offset
)
3119 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3123 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3125 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3126 internal_error (__FILE__
, __LINE__
,
3127 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3128 if (gdbarch_debug
>= 2)
3129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3130 return gdbarch
->call_dummy_breakpoint_offset_p
;
3134 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3135 int call_dummy_breakpoint_offset_p
)
3137 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3141 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3143 if (gdbarch
->call_dummy_length
== -1)
3144 internal_error (__FILE__
, __LINE__
,
3145 "gdbarch: gdbarch_call_dummy_length invalid");
3146 if (gdbarch_debug
>= 2)
3147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3148 return gdbarch
->call_dummy_length
;
3152 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3153 int call_dummy_length
)
3155 gdbarch
->call_dummy_length
= call_dummy_length
;
3159 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3161 if (gdbarch
->pc_in_call_dummy
== 0)
3162 internal_error (__FILE__
, __LINE__
,
3163 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3164 if (gdbarch_debug
>= 2)
3165 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3166 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3170 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3171 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3173 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3177 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3179 if (gdbarch
->call_dummy_p
== -1)
3180 internal_error (__FILE__
, __LINE__
,
3181 "gdbarch: gdbarch_call_dummy_p invalid");
3182 if (gdbarch_debug
>= 2)
3183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3184 return gdbarch
->call_dummy_p
;
3188 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3191 gdbarch
->call_dummy_p
= call_dummy_p
;
3195 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3197 /* Skip verify of call_dummy_words, invalid_p == 0 */
3198 if (gdbarch_debug
>= 2)
3199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3200 return gdbarch
->call_dummy_words
;
3204 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3205 LONGEST
* call_dummy_words
)
3207 gdbarch
->call_dummy_words
= call_dummy_words
;
3211 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3213 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3214 if (gdbarch_debug
>= 2)
3215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3216 return gdbarch
->sizeof_call_dummy_words
;
3220 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3221 int sizeof_call_dummy_words
)
3223 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3227 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3229 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3230 internal_error (__FILE__
, __LINE__
,
3231 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3232 if (gdbarch_debug
>= 2)
3233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3234 return gdbarch
->call_dummy_stack_adjust_p
;
3238 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3239 int call_dummy_stack_adjust_p
)
3241 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3245 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3247 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3248 internal_error (__FILE__
, __LINE__
,
3249 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3250 if (gdbarch_debug
>= 2)
3251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3252 return gdbarch
->call_dummy_stack_adjust
;
3256 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3257 int call_dummy_stack_adjust
)
3259 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3263 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
)
3265 if (gdbarch
->fix_call_dummy
== 0)
3266 internal_error (__FILE__
, __LINE__
,
3267 "gdbarch: gdbarch_fix_call_dummy invalid");
3268 if (gdbarch_debug
>= 2)
3269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3270 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3274 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3275 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3277 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3281 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3283 if (gdbarch
->init_frame_pc_first
== 0)
3284 internal_error (__FILE__
, __LINE__
,
3285 "gdbarch: gdbarch_init_frame_pc_first invalid");
3286 if (gdbarch_debug
>= 2)
3287 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3288 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3292 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3293 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3295 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3299 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3301 if (gdbarch
->init_frame_pc
== 0)
3302 internal_error (__FILE__
, __LINE__
,
3303 "gdbarch: gdbarch_init_frame_pc invalid");
3304 if (gdbarch_debug
>= 2)
3305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3306 gdbarch
->init_frame_pc (fromleaf
, prev
);
3310 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3311 gdbarch_init_frame_pc_ftype init_frame_pc
)
3313 gdbarch
->init_frame_pc
= init_frame_pc
;
3317 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3319 if (gdbarch_debug
>= 2)
3320 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3321 return gdbarch
->believe_pcc_promotion
;
3325 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3326 int believe_pcc_promotion
)
3328 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3332 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3334 if (gdbarch_debug
>= 2)
3335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3336 return gdbarch
->believe_pcc_promotion_type
;
3340 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3341 int believe_pcc_promotion_type
)
3343 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3347 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3349 if (gdbarch
->coerce_float_to_double
== 0)
3350 internal_error (__FILE__
, __LINE__
,
3351 "gdbarch: gdbarch_coerce_float_to_double invalid");
3352 if (gdbarch_debug
>= 2)
3353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3354 return gdbarch
->coerce_float_to_double (formal
, actual
);
3358 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3359 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3361 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3365 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
)
3367 if (gdbarch
->get_saved_register
== 0)
3368 internal_error (__FILE__
, __LINE__
,
3369 "gdbarch: gdbarch_get_saved_register invalid");
3370 if (gdbarch_debug
>= 2)
3371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3372 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3376 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3377 gdbarch_get_saved_register_ftype get_saved_register
)
3379 gdbarch
->get_saved_register
= get_saved_register
;
3383 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3385 if (gdbarch
->register_convertible
== 0)
3386 internal_error (__FILE__
, __LINE__
,
3387 "gdbarch: gdbarch_register_convertible invalid");
3388 if (gdbarch_debug
>= 2)
3389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3390 return gdbarch
->register_convertible (nr
);
3394 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3395 gdbarch_register_convertible_ftype register_convertible
)
3397 gdbarch
->register_convertible
= register_convertible
;
3401 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3403 if (gdbarch
->register_convert_to_virtual
== 0)
3404 internal_error (__FILE__
, __LINE__
,
3405 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3406 if (gdbarch_debug
>= 2)
3407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3408 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3412 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3413 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3415 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3419 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3421 if (gdbarch
->register_convert_to_raw
== 0)
3422 internal_error (__FILE__
, __LINE__
,
3423 "gdbarch: gdbarch_register_convert_to_raw invalid");
3424 if (gdbarch_debug
>= 2)
3425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3426 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3430 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3431 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3433 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3437 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3439 return gdbarch
->fetch_pseudo_register
!= 0;
3443 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3445 if (gdbarch
->fetch_pseudo_register
== 0)
3446 internal_error (__FILE__
, __LINE__
,
3447 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3448 if (gdbarch_debug
>= 2)
3449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3450 gdbarch
->fetch_pseudo_register (regnum
);
3454 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3455 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3457 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3461 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3463 return gdbarch
->store_pseudo_register
!= 0;
3467 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3469 if (gdbarch
->store_pseudo_register
== 0)
3470 internal_error (__FILE__
, __LINE__
,
3471 "gdbarch: gdbarch_store_pseudo_register invalid");
3472 if (gdbarch_debug
>= 2)
3473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3474 gdbarch
->store_pseudo_register (regnum
);
3478 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3479 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3481 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3485 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3487 if (gdbarch
->pointer_to_address
== 0)
3488 internal_error (__FILE__
, __LINE__
,
3489 "gdbarch: gdbarch_pointer_to_address invalid");
3490 if (gdbarch_debug
>= 2)
3491 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3492 return gdbarch
->pointer_to_address (type
, buf
);
3496 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3497 gdbarch_pointer_to_address_ftype pointer_to_address
)
3499 gdbarch
->pointer_to_address
= pointer_to_address
;
3503 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3505 if (gdbarch
->address_to_pointer
== 0)
3506 internal_error (__FILE__
, __LINE__
,
3507 "gdbarch: gdbarch_address_to_pointer invalid");
3508 if (gdbarch_debug
>= 2)
3509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3510 gdbarch
->address_to_pointer (type
, buf
, addr
);
3514 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3515 gdbarch_address_to_pointer_ftype address_to_pointer
)
3517 gdbarch
->address_to_pointer
= address_to_pointer
;
3521 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3523 return gdbarch
->integer_to_address
!= 0;
3527 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3529 if (gdbarch
->integer_to_address
== 0)
3530 internal_error (__FILE__
, __LINE__
,
3531 "gdbarch: gdbarch_integer_to_address invalid");
3532 if (gdbarch_debug
>= 2)
3533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3534 return gdbarch
->integer_to_address (type
, buf
);
3538 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3539 gdbarch_integer_to_address_ftype integer_to_address
)
3541 gdbarch
->integer_to_address
= integer_to_address
;
3545 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3547 if (gdbarch
->return_value_on_stack
== 0)
3548 internal_error (__FILE__
, __LINE__
,
3549 "gdbarch: gdbarch_return_value_on_stack invalid");
3550 if (gdbarch_debug
>= 2)
3551 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3552 return gdbarch
->return_value_on_stack (type
);
3556 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3557 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3559 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3563 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3565 if (gdbarch
->extract_return_value
== 0)
3566 internal_error (__FILE__
, __LINE__
,
3567 "gdbarch: gdbarch_extract_return_value invalid");
3568 if (gdbarch_debug
>= 2)
3569 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3570 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3574 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3575 gdbarch_extract_return_value_ftype extract_return_value
)
3577 gdbarch
->extract_return_value
= extract_return_value
;
3581 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3583 if (gdbarch
->push_arguments
== 0)
3584 internal_error (__FILE__
, __LINE__
,
3585 "gdbarch: gdbarch_push_arguments invalid");
3586 if (gdbarch_debug
>= 2)
3587 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3588 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3592 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3593 gdbarch_push_arguments_ftype push_arguments
)
3595 gdbarch
->push_arguments
= push_arguments
;
3599 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3601 if (gdbarch
->push_dummy_frame
== 0)
3602 internal_error (__FILE__
, __LINE__
,
3603 "gdbarch: gdbarch_push_dummy_frame invalid");
3604 if (gdbarch_debug
>= 2)
3605 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3606 gdbarch
->push_dummy_frame ();
3610 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3611 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3613 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3617 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3619 return gdbarch
->push_return_address
!= 0;
3623 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3625 if (gdbarch
->push_return_address
== 0)
3626 internal_error (__FILE__
, __LINE__
,
3627 "gdbarch: gdbarch_push_return_address invalid");
3628 if (gdbarch_debug
>= 2)
3629 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3630 return gdbarch
->push_return_address (pc
, sp
);
3634 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3635 gdbarch_push_return_address_ftype push_return_address
)
3637 gdbarch
->push_return_address
= push_return_address
;
3641 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3643 if (gdbarch
->pop_frame
== 0)
3644 internal_error (__FILE__
, __LINE__
,
3645 "gdbarch: gdbarch_pop_frame invalid");
3646 if (gdbarch_debug
>= 2)
3647 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3648 gdbarch
->pop_frame ();
3652 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3653 gdbarch_pop_frame_ftype pop_frame
)
3655 gdbarch
->pop_frame
= pop_frame
;
3659 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3661 if (gdbarch
->store_struct_return
== 0)
3662 internal_error (__FILE__
, __LINE__
,
3663 "gdbarch: gdbarch_store_struct_return invalid");
3664 if (gdbarch_debug
>= 2)
3665 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3666 gdbarch
->store_struct_return (addr
, sp
);
3670 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3671 gdbarch_store_struct_return_ftype store_struct_return
)
3673 gdbarch
->store_struct_return
= store_struct_return
;
3677 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3679 if (gdbarch
->store_return_value
== 0)
3680 internal_error (__FILE__
, __LINE__
,
3681 "gdbarch: gdbarch_store_return_value invalid");
3682 if (gdbarch_debug
>= 2)
3683 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3684 gdbarch
->store_return_value (type
, valbuf
);
3688 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3689 gdbarch_store_return_value_ftype store_return_value
)
3691 gdbarch
->store_return_value
= store_return_value
;
3695 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3697 return gdbarch
->extract_struct_value_address
!= 0;
3701 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3703 if (gdbarch
->extract_struct_value_address
== 0)
3704 internal_error (__FILE__
, __LINE__
,
3705 "gdbarch: gdbarch_extract_struct_value_address invalid");
3706 if (gdbarch_debug
>= 2)
3707 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3708 return gdbarch
->extract_struct_value_address (regbuf
);
3712 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3713 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3715 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3719 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3721 if (gdbarch
->use_struct_convention
== 0)
3722 internal_error (__FILE__
, __LINE__
,
3723 "gdbarch: gdbarch_use_struct_convention invalid");
3724 if (gdbarch_debug
>= 2)
3725 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3726 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3730 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3731 gdbarch_use_struct_convention_ftype use_struct_convention
)
3733 gdbarch
->use_struct_convention
= use_struct_convention
;
3737 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3739 if (gdbarch
->frame_init_saved_regs
== 0)
3740 internal_error (__FILE__
, __LINE__
,
3741 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3742 if (gdbarch_debug
>= 2)
3743 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3744 gdbarch
->frame_init_saved_regs (frame
);
3748 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3749 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3751 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3755 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3757 return gdbarch
->init_extra_frame_info
!= 0;
3761 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3763 if (gdbarch
->init_extra_frame_info
== 0)
3764 internal_error (__FILE__
, __LINE__
,
3765 "gdbarch: gdbarch_init_extra_frame_info invalid");
3766 if (gdbarch_debug
>= 2)
3767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3768 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3772 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3773 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3775 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3779 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3781 if (gdbarch
->skip_prologue
== 0)
3782 internal_error (__FILE__
, __LINE__
,
3783 "gdbarch: gdbarch_skip_prologue invalid");
3784 if (gdbarch_debug
>= 2)
3785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3786 return gdbarch
->skip_prologue (ip
);
3790 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3791 gdbarch_skip_prologue_ftype skip_prologue
)
3793 gdbarch
->skip_prologue
= skip_prologue
;
3797 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3799 if (gdbarch
->prologue_frameless_p
== 0)
3800 internal_error (__FILE__
, __LINE__
,
3801 "gdbarch: gdbarch_prologue_frameless_p invalid");
3802 if (gdbarch_debug
>= 2)
3803 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3804 return gdbarch
->prologue_frameless_p (ip
);
3808 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3809 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3811 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3815 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3817 if (gdbarch
->inner_than
== 0)
3818 internal_error (__FILE__
, __LINE__
,
3819 "gdbarch: gdbarch_inner_than invalid");
3820 if (gdbarch_debug
>= 2)
3821 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3822 return gdbarch
->inner_than (lhs
, rhs
);
3826 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3827 gdbarch_inner_than_ftype inner_than
)
3829 gdbarch
->inner_than
= inner_than
;
3833 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3835 if (gdbarch
->breakpoint_from_pc
== 0)
3836 internal_error (__FILE__
, __LINE__
,
3837 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3838 if (gdbarch_debug
>= 2)
3839 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3840 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3844 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3845 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3847 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3851 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3853 if (gdbarch
->memory_insert_breakpoint
== 0)
3854 internal_error (__FILE__
, __LINE__
,
3855 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3856 if (gdbarch_debug
>= 2)
3857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3858 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3862 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3863 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3865 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3869 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3871 if (gdbarch
->memory_remove_breakpoint
== 0)
3872 internal_error (__FILE__
, __LINE__
,
3873 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3874 if (gdbarch_debug
>= 2)
3875 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3876 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3880 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3881 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3883 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3887 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3889 if (gdbarch
->decr_pc_after_break
== -1)
3890 internal_error (__FILE__
, __LINE__
,
3891 "gdbarch: gdbarch_decr_pc_after_break invalid");
3892 if (gdbarch_debug
>= 2)
3893 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3894 return gdbarch
->decr_pc_after_break
;
3898 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3899 CORE_ADDR decr_pc_after_break
)
3901 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3905 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3907 if (gdbarch
->prepare_to_proceed
== 0)
3908 internal_error (__FILE__
, __LINE__
,
3909 "gdbarch: gdbarch_prepare_to_proceed invalid");
3910 if (gdbarch_debug
>= 2)
3911 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3912 return gdbarch
->prepare_to_proceed (select_it
);
3916 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3917 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3919 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3923 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3925 if (gdbarch
->function_start_offset
== -1)
3926 internal_error (__FILE__
, __LINE__
,
3927 "gdbarch: gdbarch_function_start_offset invalid");
3928 if (gdbarch_debug
>= 2)
3929 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3930 return gdbarch
->function_start_offset
;
3934 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3935 CORE_ADDR function_start_offset
)
3937 gdbarch
->function_start_offset
= function_start_offset
;
3941 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3943 if (gdbarch
->remote_translate_xfer_address
== 0)
3944 internal_error (__FILE__
, __LINE__
,
3945 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3946 if (gdbarch_debug
>= 2)
3947 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3948 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3952 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3953 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3955 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3959 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3961 if (gdbarch
->frame_args_skip
== -1)
3962 internal_error (__FILE__
, __LINE__
,
3963 "gdbarch: gdbarch_frame_args_skip invalid");
3964 if (gdbarch_debug
>= 2)
3965 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3966 return gdbarch
->frame_args_skip
;
3970 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3971 CORE_ADDR frame_args_skip
)
3973 gdbarch
->frame_args_skip
= frame_args_skip
;
3977 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3979 if (gdbarch
->frameless_function_invocation
== 0)
3980 internal_error (__FILE__
, __LINE__
,
3981 "gdbarch: gdbarch_frameless_function_invocation invalid");
3982 if (gdbarch_debug
>= 2)
3983 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3984 return gdbarch
->frameless_function_invocation (fi
);
3988 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3989 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3991 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3995 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3997 if (gdbarch
->frame_chain
== 0)
3998 internal_error (__FILE__
, __LINE__
,
3999 "gdbarch: gdbarch_frame_chain invalid");
4000 if (gdbarch_debug
>= 2)
4001 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4002 return gdbarch
->frame_chain (frame
);
4006 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4007 gdbarch_frame_chain_ftype frame_chain
)
4009 gdbarch
->frame_chain
= frame_chain
;
4013 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4015 if (gdbarch
->frame_chain_valid
== 0)
4016 internal_error (__FILE__
, __LINE__
,
4017 "gdbarch: gdbarch_frame_chain_valid invalid");
4018 if (gdbarch_debug
>= 2)
4019 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4020 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4024 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4025 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4027 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4031 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4033 if (gdbarch
->frame_saved_pc
== 0)
4034 internal_error (__FILE__
, __LINE__
,
4035 "gdbarch: gdbarch_frame_saved_pc invalid");
4036 if (gdbarch_debug
>= 2)
4037 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4038 return gdbarch
->frame_saved_pc (fi
);
4042 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4043 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4045 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4049 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4051 if (gdbarch
->frame_args_address
== 0)
4052 internal_error (__FILE__
, __LINE__
,
4053 "gdbarch: gdbarch_frame_args_address invalid");
4054 if (gdbarch_debug
>= 2)
4055 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4056 return gdbarch
->frame_args_address (fi
);
4060 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4061 gdbarch_frame_args_address_ftype frame_args_address
)
4063 gdbarch
->frame_args_address
= frame_args_address
;
4067 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4069 if (gdbarch
->frame_locals_address
== 0)
4070 internal_error (__FILE__
, __LINE__
,
4071 "gdbarch: gdbarch_frame_locals_address invalid");
4072 if (gdbarch_debug
>= 2)
4073 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4074 return gdbarch
->frame_locals_address (fi
);
4078 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4079 gdbarch_frame_locals_address_ftype frame_locals_address
)
4081 gdbarch
->frame_locals_address
= frame_locals_address
;
4085 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4087 if (gdbarch
->saved_pc_after_call
== 0)
4088 internal_error (__FILE__
, __LINE__
,
4089 "gdbarch: gdbarch_saved_pc_after_call invalid");
4090 if (gdbarch_debug
>= 2)
4091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4092 return gdbarch
->saved_pc_after_call (frame
);
4096 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4097 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4099 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4103 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4105 if (gdbarch
->frame_num_args
== 0)
4106 internal_error (__FILE__
, __LINE__
,
4107 "gdbarch: gdbarch_frame_num_args invalid");
4108 if (gdbarch_debug
>= 2)
4109 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4110 return gdbarch
->frame_num_args (frame
);
4114 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4115 gdbarch_frame_num_args_ftype frame_num_args
)
4117 gdbarch
->frame_num_args
= frame_num_args
;
4121 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4123 return gdbarch
->stack_align
!= 0;
4127 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4129 if (gdbarch
->stack_align
== 0)
4130 internal_error (__FILE__
, __LINE__
,
4131 "gdbarch: gdbarch_stack_align invalid");
4132 if (gdbarch_debug
>= 2)
4133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4134 return gdbarch
->stack_align (sp
);
4138 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4139 gdbarch_stack_align_ftype stack_align
)
4141 gdbarch
->stack_align
= stack_align
;
4145 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4147 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4148 if (gdbarch_debug
>= 2)
4149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4150 return gdbarch
->extra_stack_alignment_needed
;
4154 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4155 int extra_stack_alignment_needed
)
4157 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4161 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4163 return gdbarch
->reg_struct_has_addr
!= 0;
4167 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4169 if (gdbarch
->reg_struct_has_addr
== 0)
4170 internal_error (__FILE__
, __LINE__
,
4171 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4172 if (gdbarch_debug
>= 2)
4173 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4174 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4178 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4179 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4181 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4185 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4187 return gdbarch
->save_dummy_frame_tos
!= 0;
4191 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4193 if (gdbarch
->save_dummy_frame_tos
== 0)
4194 internal_error (__FILE__
, __LINE__
,
4195 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4196 if (gdbarch_debug
>= 2)
4197 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4198 gdbarch
->save_dummy_frame_tos (sp
);
4202 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4203 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4205 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4209 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4211 if (gdbarch_debug
>= 2)
4212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4213 return gdbarch
->parm_boundary
;
4217 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4220 gdbarch
->parm_boundary
= parm_boundary
;
4223 const struct floatformat
*
4224 gdbarch_float_format (struct gdbarch
*gdbarch
)
4226 if (gdbarch_debug
>= 2)
4227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4228 return gdbarch
->float_format
;
4232 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4233 const struct floatformat
* float_format
)
4235 gdbarch
->float_format
= float_format
;
4238 const struct floatformat
*
4239 gdbarch_double_format (struct gdbarch
*gdbarch
)
4241 if (gdbarch_debug
>= 2)
4242 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4243 return gdbarch
->double_format
;
4247 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4248 const struct floatformat
* double_format
)
4250 gdbarch
->double_format
= double_format
;
4253 const struct floatformat
*
4254 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4256 if (gdbarch_debug
>= 2)
4257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4258 return gdbarch
->long_double_format
;
4262 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4263 const struct floatformat
* long_double_format
)
4265 gdbarch
->long_double_format
= long_double_format
;
4269 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4271 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4272 internal_error (__FILE__
, __LINE__
,
4273 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4274 if (gdbarch_debug
>= 2)
4275 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4276 return gdbarch
->convert_from_func_ptr_addr (addr
);
4280 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4281 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4283 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4287 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4289 if (gdbarch
->addr_bits_remove
== 0)
4290 internal_error (__FILE__
, __LINE__
,
4291 "gdbarch: gdbarch_addr_bits_remove invalid");
4292 if (gdbarch_debug
>= 2)
4293 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4294 return gdbarch
->addr_bits_remove (addr
);
4298 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4299 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4301 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4305 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4307 if (gdbarch
->smash_text_address
== 0)
4308 internal_error (__FILE__
, __LINE__
,
4309 "gdbarch: gdbarch_smash_text_address invalid");
4310 if (gdbarch_debug
>= 2)
4311 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4312 return gdbarch
->smash_text_address (addr
);
4316 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4317 gdbarch_smash_text_address_ftype smash_text_address
)
4319 gdbarch
->smash_text_address
= smash_text_address
;
4323 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4325 return gdbarch
->software_single_step
!= 0;
4329 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4331 if (gdbarch
->software_single_step
== 0)
4332 internal_error (__FILE__
, __LINE__
,
4333 "gdbarch: gdbarch_software_single_step invalid");
4334 if (gdbarch_debug
>= 2)
4335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4336 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4340 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4341 gdbarch_software_single_step_ftype software_single_step
)
4343 gdbarch
->software_single_step
= software_single_step
;
4347 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4349 if (gdbarch
->print_insn
== 0)
4350 internal_error (__FILE__
, __LINE__
,
4351 "gdbarch: gdbarch_print_insn invalid");
4352 if (gdbarch_debug
>= 2)
4353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4354 return gdbarch
->print_insn (vma
, info
);
4358 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4359 gdbarch_print_insn_ftype print_insn
)
4361 gdbarch
->print_insn
= print_insn
;
4365 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4367 if (gdbarch
->skip_trampoline_code
== 0)
4368 internal_error (__FILE__
, __LINE__
,
4369 "gdbarch: gdbarch_skip_trampoline_code invalid");
4370 if (gdbarch_debug
>= 2)
4371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4372 return gdbarch
->skip_trampoline_code (pc
);
4376 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4377 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4379 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4383 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4385 if (gdbarch
->in_solib_call_trampoline
== 0)
4386 internal_error (__FILE__
, __LINE__
,
4387 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4388 if (gdbarch_debug
>= 2)
4389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4390 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4394 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4395 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4397 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4401 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4403 if (gdbarch
->in_function_epilogue_p
== 0)
4404 internal_error (__FILE__
, __LINE__
,
4405 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4406 if (gdbarch_debug
>= 2)
4407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4408 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4412 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4413 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4415 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4419 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4421 if (gdbarch
->construct_inferior_arguments
== 0)
4422 internal_error (__FILE__
, __LINE__
,
4423 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4424 if (gdbarch_debug
>= 2)
4425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4426 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4430 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4431 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4433 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4437 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4439 return gdbarch
->dwarf2_build_frame_info
!= 0;
4443 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4445 if (gdbarch
->dwarf2_build_frame_info
== 0)
4446 internal_error (__FILE__
, __LINE__
,
4447 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4448 if (gdbarch_debug
>= 2)
4449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4450 gdbarch
->dwarf2_build_frame_info (objfile
);
4454 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4455 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4457 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4461 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4463 if (gdbarch
->elf_make_msymbol_special
== 0)
4464 internal_error (__FILE__
, __LINE__
,
4465 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4466 if (gdbarch_debug
>= 2)
4467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4468 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4472 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4473 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4475 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4479 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4481 if (gdbarch
->coff_make_msymbol_special
== 0)
4482 internal_error (__FILE__
, __LINE__
,
4483 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4484 if (gdbarch_debug
>= 2)
4485 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4486 gdbarch
->coff_make_msymbol_special (val
, msym
);
4490 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4491 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4493 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4497 /* Keep a registry of per-architecture data-pointers required by GDB
4503 gdbarch_data_init_ftype
*init
;
4504 gdbarch_data_free_ftype
*free
;
4507 struct gdbarch_data_registration
4509 struct gdbarch_data
*data
;
4510 struct gdbarch_data_registration
*next
;
4513 struct gdbarch_data_registry
4516 struct gdbarch_data_registration
*registrations
;
4519 struct gdbarch_data_registry gdbarch_data_registry
=
4524 struct gdbarch_data
*
4525 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4526 gdbarch_data_free_ftype
*free
)
4528 struct gdbarch_data_registration
**curr
;
4529 for (curr
= &gdbarch_data_registry
.registrations
;
4531 curr
= &(*curr
)->next
);
4532 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4533 (*curr
)->next
= NULL
;
4534 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4535 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4536 (*curr
)->data
->init
= init
;
4537 (*curr
)->data
->free
= free
;
4538 return (*curr
)->data
;
4542 /* Walk through all the registered users initializing each in turn. */
4545 init_gdbarch_data (struct gdbarch
*gdbarch
)
4547 struct gdbarch_data_registration
*rego
;
4548 for (rego
= gdbarch_data_registry
.registrations
;
4552 struct gdbarch_data
*data
= rego
->data
;
4553 gdb_assert (data
->index
< gdbarch
->nr_data
);
4554 if (data
->init
!= NULL
)
4556 void *pointer
= data
->init (gdbarch
);
4557 set_gdbarch_data (gdbarch
, data
, pointer
);
4562 /* Create/delete the gdbarch data vector. */
4565 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4567 gdb_assert (gdbarch
->data
== NULL
);
4568 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4569 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4573 free_gdbarch_data (struct gdbarch
*gdbarch
)
4575 struct gdbarch_data_registration
*rego
;
4576 gdb_assert (gdbarch
->data
!= NULL
);
4577 for (rego
= gdbarch_data_registry
.registrations
;
4581 struct gdbarch_data
*data
= rego
->data
;
4582 gdb_assert (data
->index
< gdbarch
->nr_data
);
4583 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4585 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4586 gdbarch
->data
[data
->index
] = NULL
;
4589 xfree (gdbarch
->data
);
4590 gdbarch
->data
= NULL
;
4594 /* Initialize the current value of thee specified per-architecture
4598 set_gdbarch_data (struct gdbarch
*gdbarch
,
4599 struct gdbarch_data
*data
,
4602 gdb_assert (data
->index
< gdbarch
->nr_data
);
4603 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4604 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4605 gdbarch
->data
[data
->index
] = pointer
;
4608 /* Return the current value of the specified per-architecture
4612 gdbarch_data (struct gdbarch_data
*data
)
4614 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4615 return current_gdbarch
->data
[data
->index
];
4620 /* Keep a registry of swapped data required by GDB modules. */
4625 struct gdbarch_swap_registration
*source
;
4626 struct gdbarch_swap
*next
;
4629 struct gdbarch_swap_registration
4632 unsigned long sizeof_data
;
4633 gdbarch_swap_ftype
*init
;
4634 struct gdbarch_swap_registration
*next
;
4637 struct gdbarch_swap_registry
4640 struct gdbarch_swap_registration
*registrations
;
4643 struct gdbarch_swap_registry gdbarch_swap_registry
=
4649 register_gdbarch_swap (void *data
,
4650 unsigned long sizeof_data
,
4651 gdbarch_swap_ftype
*init
)
4653 struct gdbarch_swap_registration
**rego
;
4654 for (rego
= &gdbarch_swap_registry
.registrations
;
4656 rego
= &(*rego
)->next
);
4657 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4658 (*rego
)->next
= NULL
;
4659 (*rego
)->init
= init
;
4660 (*rego
)->data
= data
;
4661 (*rego
)->sizeof_data
= sizeof_data
;
4666 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4668 struct gdbarch_swap_registration
*rego
;
4669 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4670 for (rego
= gdbarch_swap_registry
.registrations
;
4674 if (rego
->data
!= NULL
)
4676 (*curr
) = XMALLOC (struct gdbarch_swap
);
4677 (*curr
)->source
= rego
;
4678 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4679 (*curr
)->next
= NULL
;
4680 memset (rego
->data
, 0, rego
->sizeof_data
);
4681 curr
= &(*curr
)->next
;
4683 if (rego
->init
!= NULL
)
4689 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4691 struct gdbarch_swap
*curr
;
4692 for (curr
= gdbarch
->swap
;
4695 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4699 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4701 struct gdbarch_swap
*curr
;
4702 for (curr
= gdbarch
->swap
;
4705 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4709 /* Keep a registry of the architectures known by GDB. */
4711 struct gdbarch_registration
4713 enum bfd_architecture bfd_architecture
;
4714 gdbarch_init_ftype
*init
;
4715 gdbarch_dump_tdep_ftype
*dump_tdep
;
4716 struct gdbarch_list
*arches
;
4717 struct gdbarch_registration
*next
;
4720 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4723 append_name (const char ***buf
, int *nr
, const char *name
)
4725 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4731 gdbarch_printable_names (void)
4735 /* Accumulate a list of names based on the registed list of
4737 enum bfd_architecture a
;
4739 const char **arches
= NULL
;
4740 struct gdbarch_registration
*rego
;
4741 for (rego
= gdbarch_registry
;
4745 const struct bfd_arch_info
*ap
;
4746 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4748 internal_error (__FILE__
, __LINE__
,
4749 "gdbarch_architecture_names: multi-arch unknown");
4752 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4757 append_name (&arches
, &nr_arches
, NULL
);
4761 /* Just return all the architectures that BFD knows. Assume that
4762 the legacy architecture framework supports them. */
4763 return bfd_arch_list ();
4768 gdbarch_register (enum bfd_architecture bfd_architecture
,
4769 gdbarch_init_ftype
*init
,
4770 gdbarch_dump_tdep_ftype
*dump_tdep
)
4772 struct gdbarch_registration
**curr
;
4773 const struct bfd_arch_info
*bfd_arch_info
;
4774 /* Check that BFD recognizes this architecture */
4775 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4776 if (bfd_arch_info
== NULL
)
4778 internal_error (__FILE__
, __LINE__
,
4779 "gdbarch: Attempt to register unknown architecture (%d)",
4782 /* Check that we haven't seen this architecture before */
4783 for (curr
= &gdbarch_registry
;
4785 curr
= &(*curr
)->next
)
4787 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4788 internal_error (__FILE__
, __LINE__
,
4789 "gdbarch: Duplicate registraration of architecture (%s)",
4790 bfd_arch_info
->printable_name
);
4794 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4795 bfd_arch_info
->printable_name
,
4798 (*curr
) = XMALLOC (struct gdbarch_registration
);
4799 (*curr
)->bfd_architecture
= bfd_architecture
;
4800 (*curr
)->init
= init
;
4801 (*curr
)->dump_tdep
= dump_tdep
;
4802 (*curr
)->arches
= NULL
;
4803 (*curr
)->next
= NULL
;
4804 /* When non- multi-arch, install whatever target dump routine we've
4805 been provided - hopefully that routine has been written correctly
4806 and works regardless of multi-arch. */
4807 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4808 && startup_gdbarch
.dump_tdep
== NULL
)
4809 startup_gdbarch
.dump_tdep
= dump_tdep
;
4813 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4814 gdbarch_init_ftype
*init
)
4816 gdbarch_register (bfd_architecture
, init
, NULL
);
4820 /* Look for an architecture using gdbarch_info. Base search on only
4821 BFD_ARCH_INFO and BYTE_ORDER. */
4823 struct gdbarch_list
*
4824 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4825 const struct gdbarch_info
*info
)
4827 for (; arches
!= NULL
; arches
= arches
->next
)
4829 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4831 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4839 /* Update the current architecture. Return ZERO if the update request
4843 gdbarch_update_p (struct gdbarch_info info
)
4845 struct gdbarch
*new_gdbarch
;
4846 struct gdbarch_list
**list
;
4847 struct gdbarch_registration
*rego
;
4849 /* Fill in missing parts of the INFO struct using a number of
4850 sources: ``set ...''; INFOabfd supplied; existing target. */
4852 /* ``(gdb) set architecture ...'' */
4853 if (info
.bfd_arch_info
== NULL
4854 && !TARGET_ARCHITECTURE_AUTO
)
4855 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4856 if (info
.bfd_arch_info
== NULL
4857 && info
.abfd
!= NULL
4858 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4859 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4860 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4861 if (info
.bfd_arch_info
== NULL
)
4862 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4864 /* ``(gdb) set byte-order ...'' */
4865 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4866 && !TARGET_BYTE_ORDER_AUTO
)
4867 info
.byte_order
= TARGET_BYTE_ORDER
;
4868 /* From the INFO struct. */
4869 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4870 && info
.abfd
!= NULL
)
4871 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
4872 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
4873 : BFD_ENDIAN_UNKNOWN
);
4874 /* From the current target. */
4875 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
4876 info
.byte_order
= TARGET_BYTE_ORDER
;
4878 /* Must have found some sort of architecture. */
4879 gdb_assert (info
.bfd_arch_info
!= NULL
);
4883 fprintf_unfiltered (gdb_stdlog
,
4884 "gdbarch_update: info.bfd_arch_info %s\n",
4885 (info
.bfd_arch_info
!= NULL
4886 ? info
.bfd_arch_info
->printable_name
4888 fprintf_unfiltered (gdb_stdlog
,
4889 "gdbarch_update: info.byte_order %d (%s)\n",
4891 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4892 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4894 fprintf_unfiltered (gdb_stdlog
,
4895 "gdbarch_update: info.abfd 0x%lx\n",
4897 fprintf_unfiltered (gdb_stdlog
,
4898 "gdbarch_update: info.tdep_info 0x%lx\n",
4899 (long) info
.tdep_info
);
4902 /* Find the target that knows about this architecture. */
4903 for (rego
= gdbarch_registry
;
4906 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4911 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4915 /* Ask the target for a replacement architecture. */
4916 new_gdbarch
= rego
->init (info
, rego
->arches
);
4918 /* Did the target like it? No. Reject the change. */
4919 if (new_gdbarch
== NULL
)
4922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4926 /* Did the architecture change? No. Do nothing. */
4927 if (current_gdbarch
== new_gdbarch
)
4930 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4932 new_gdbarch
->bfd_arch_info
->printable_name
);
4936 /* Swap all data belonging to the old target out */
4937 swapout_gdbarch_swap (current_gdbarch
);
4939 /* Is this a pre-existing architecture? Yes. Swap it in. */
4940 for (list
= ®o
->arches
;
4942 list
= &(*list
)->next
)
4944 if ((*list
)->gdbarch
== new_gdbarch
)
4947 fprintf_unfiltered (gdb_stdlog
,
4948 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4950 new_gdbarch
->bfd_arch_info
->printable_name
);
4951 current_gdbarch
= new_gdbarch
;
4952 swapin_gdbarch_swap (new_gdbarch
);
4953 architecture_changed_event ();
4958 /* Append this new architecture to this targets list. */
4959 (*list
) = XMALLOC (struct gdbarch_list
);
4960 (*list
)->next
= NULL
;
4961 (*list
)->gdbarch
= new_gdbarch
;
4963 /* Switch to this new architecture. Dump it out. */
4964 current_gdbarch
= new_gdbarch
;
4967 fprintf_unfiltered (gdb_stdlog
,
4968 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4970 new_gdbarch
->bfd_arch_info
->printable_name
);
4973 /* Check that the newly installed architecture is valid. Plug in
4974 any post init values. */
4975 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4976 verify_gdbarch (new_gdbarch
);
4978 /* Initialize the per-architecture memory (swap) areas.
4979 CURRENT_GDBARCH must be update before these modules are
4981 init_gdbarch_swap (new_gdbarch
);
4983 /* Initialize the per-architecture data-pointer of all parties that
4984 registered an interest in this architecture. CURRENT_GDBARCH
4985 must be updated before these modules are called. */
4986 init_gdbarch_data (new_gdbarch
);
4987 architecture_changed_event ();
4990 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4998 /* Pointer to the target-dependent disassembly function. */
4999 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5000 disassemble_info tm_print_insn_info
;
5003 extern void _initialize_gdbarch (void);
5006 _initialize_gdbarch (void)
5008 struct cmd_list_element
*c
;
5010 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5011 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5012 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5013 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5014 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5016 add_show_from_set (add_set_cmd ("arch",
5019 (char *)&gdbarch_debug
,
5020 "Set architecture debugging.\n\
5021 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5023 c
= add_set_cmd ("archdebug",
5026 (char *)&gdbarch_debug
,
5027 "Set architecture debugging.\n\
5028 When non-zero, architecture debugging is enabled.", &setlist
);
5030 deprecate_cmd (c
, "set debug arch");
5031 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");