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 /* Non-zero if we want to trace architecture code. */
80 #define GDBARCH_DEBUG 0
82 int gdbarch_debug
= GDBARCH_DEBUG
;
85 /* Maintain the struct gdbarch object */
89 /* basic architectural information */
90 const struct bfd_arch_info
* bfd_arch_info
;
93 /* target specific vector. */
94 struct gdbarch_tdep
*tdep
;
95 gdbarch_dump_tdep_ftype
*dump_tdep
;
97 /* per-architecture data-pointers */
101 /* per-architecture swap-regions */
102 struct gdbarch_swap
*swap
;
104 /* Multi-arch values.
106 When extending this structure you must:
110 Declare set/get functions and define the corresponding
113 gdbarch_alloc(): If zero/NULL is not a suitable default,
114 initialize the new field.
116 verify_gdbarch(): Confirm that the target updated the field
119 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
122 ``startup_gdbarch()'': Append an initial value to the static
123 variable (base values on the host's c-type system).
125 get_gdbarch(): Implement the set/get functions (probably using
126 the macro's as shortcuts).
141 gdbarch_read_pc_ftype
*read_pc
;
142 gdbarch_write_pc_ftype
*write_pc
;
143 gdbarch_read_fp_ftype
*read_fp
;
144 gdbarch_read_sp_ftype
*read_sp
;
145 gdbarch_write_sp_ftype
*write_sp
;
146 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
147 gdbarch_register_read_ftype
*register_read
;
148 gdbarch_register_write_ftype
*register_write
;
157 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
158 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
159 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
160 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
161 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
162 gdbarch_register_name_ftype
*register_name
;
165 gdbarch_register_byte_ftype
*register_byte
;
166 gdbarch_register_raw_size_ftype
*register_raw_size
;
167 int max_register_raw_size
;
168 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
169 int max_register_virtual_size
;
170 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
171 gdbarch_do_registers_info_ftype
*do_registers_info
;
172 gdbarch_print_float_info_ftype
*print_float_info
;
173 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
174 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
175 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
176 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
177 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
178 int use_generic_dummy_frames
;
179 int call_dummy_location
;
180 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
181 CORE_ADDR call_dummy_start_offset
;
182 CORE_ADDR call_dummy_breakpoint_offset
;
183 int call_dummy_breakpoint_offset_p
;
184 int call_dummy_length
;
185 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
187 LONGEST
* call_dummy_words
;
188 int sizeof_call_dummy_words
;
189 int call_dummy_stack_adjust_p
;
190 int call_dummy_stack_adjust
;
191 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
192 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
193 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
194 int believe_pcc_promotion
;
195 int believe_pcc_promotion_type
;
196 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
197 gdbarch_get_saved_register_ftype
*get_saved_register
;
198 gdbarch_register_convertible_ftype
*register_convertible
;
199 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
200 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
201 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
202 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
203 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
204 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
205 gdbarch_integer_to_address_ftype
*integer_to_address
;
206 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
207 gdbarch_extract_return_value_ftype
*extract_return_value
;
208 gdbarch_push_arguments_ftype
*push_arguments
;
209 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
210 gdbarch_push_return_address_ftype
*push_return_address
;
211 gdbarch_pop_frame_ftype
*pop_frame
;
212 gdbarch_store_struct_return_ftype
*store_struct_return
;
213 gdbarch_store_return_value_ftype
*store_return_value
;
214 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
215 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
216 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
217 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
218 gdbarch_skip_prologue_ftype
*skip_prologue
;
219 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
220 gdbarch_inner_than_ftype
*inner_than
;
221 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
222 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
223 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
224 CORE_ADDR decr_pc_after_break
;
225 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
226 CORE_ADDR function_start_offset
;
227 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
228 CORE_ADDR frame_args_skip
;
229 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
230 gdbarch_frame_chain_ftype
*frame_chain
;
231 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
232 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
233 gdbarch_frame_args_address_ftype
*frame_args_address
;
234 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
235 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
236 gdbarch_frame_num_args_ftype
*frame_num_args
;
237 gdbarch_stack_align_ftype
*stack_align
;
238 int extra_stack_alignment_needed
;
239 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
240 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
242 const struct floatformat
* float_format
;
243 const struct floatformat
* double_format
;
244 const struct floatformat
* long_double_format
;
245 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
246 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
247 gdbarch_smash_text_address_ftype
*smash_text_address
;
248 gdbarch_software_single_step_ftype
*software_single_step
;
249 gdbarch_print_insn_ftype
*print_insn
;
250 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
251 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
252 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
253 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
254 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
255 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
256 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
260 /* The default architecture uses host values (for want of a better
263 extern const struct bfd_arch_info bfd_default_arch_struct
;
265 struct gdbarch startup_gdbarch
=
267 /* basic architecture information */
268 &bfd_default_arch_struct
,
270 /* target specific vector and its dump routine */
272 /*per-architecture data-pointers and swap regions */
274 /* Multi-arch values */
278 8 * sizeof (LONGEST
),
281 8 * sizeof (long double),
311 generic_register_raw_size
,
313 generic_register_virtual_size
,
342 generic_get_saved_register
,
397 generic_in_function_epilogue_p
,
398 construct_inferior_arguments
,
402 /* startup_gdbarch() */
405 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
407 /* Do any initialization needed for a non-multiarch configuration
408 after the _initialize_MODULE functions have been run. */
410 initialize_non_multiarch ()
412 alloc_gdbarch_data (&startup_gdbarch
);
413 init_gdbarch_swap (&startup_gdbarch
)
414 init_gdbarch_data (&startup_gdbarch
);
418 /* Create a new ``struct gdbarch'' based on information provided by
419 ``struct gdbarch_info''. */
422 gdbarch_alloc (const struct gdbarch_info
*info
,
423 struct gdbarch_tdep
*tdep
)
425 /* NOTE: The new architecture variable is named ``current_gdbarch''
426 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
427 the current local architecture and not the previous global
428 architecture. This ensures that the new architectures initial
429 values are not influenced by the previous architecture. Once
430 everything is parameterised with gdbarch, this will go away. */
431 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
432 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
434 alloc_gdbarch_data (current_gdbarch
);
436 current_gdbarch
->tdep
= tdep
;
438 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
439 current_gdbarch
->byte_order
= info
->byte_order
;
441 /* Force the explicit initialization of these. */
442 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
443 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
444 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
445 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
446 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
447 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
448 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
449 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
450 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
451 current_gdbarch
->char_signed
= -1;
452 current_gdbarch
->read_pc
= generic_target_read_pc
;
453 current_gdbarch
->write_pc
= generic_target_write_pc
;
454 current_gdbarch
->read_fp
= generic_target_read_fp
;
455 current_gdbarch
->read_sp
= generic_target_read_sp
;
456 current_gdbarch
->write_sp
= generic_target_write_sp
;
457 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
458 current_gdbarch
->num_regs
= -1;
459 current_gdbarch
->sp_regnum
= -1;
460 current_gdbarch
->fp_regnum
= -1;
461 current_gdbarch
->pc_regnum
= -1;
462 current_gdbarch
->fp0_regnum
= -1;
463 current_gdbarch
->npc_regnum
= -1;
464 current_gdbarch
->nnpc_regnum
= -1;
465 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
466 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
467 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
468 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
469 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
470 current_gdbarch
->register_name
= legacy_register_name
;
471 current_gdbarch
->register_size
= -1;
472 current_gdbarch
->register_bytes
= -1;
473 current_gdbarch
->max_register_raw_size
= -1;
474 current_gdbarch
->max_register_virtual_size
= -1;
475 current_gdbarch
->do_registers_info
= do_registers_info
;
476 current_gdbarch
->print_float_info
= default_print_float_info
;
477 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
478 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
479 current_gdbarch
->cannot_store_register
= cannot_register_not
;
480 current_gdbarch
->use_generic_dummy_frames
= -1;
481 current_gdbarch
->call_dummy_start_offset
= -1;
482 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
483 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
484 current_gdbarch
->call_dummy_length
= -1;
485 current_gdbarch
->call_dummy_p
= -1;
486 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
487 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
488 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
489 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
490 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
491 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
492 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
493 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
494 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
495 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
496 current_gdbarch
->push_arguments
= default_push_arguments
;
497 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
498 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
499 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
500 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
501 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
502 current_gdbarch
->decr_pc_after_break
= -1;
503 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
504 current_gdbarch
->function_start_offset
= -1;
505 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
506 current_gdbarch
->frame_args_skip
= -1;
507 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
508 current_gdbarch
->frame_chain_valid
= func_frame_chain_valid
;
509 current_gdbarch
->extra_stack_alignment_needed
= 1;
510 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
511 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
512 current_gdbarch
->smash_text_address
= core_addr_identity
;
513 current_gdbarch
->print_insn
= legacy_print_insn
;
514 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
515 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
516 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
517 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
518 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
519 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
520 /* gdbarch_alloc() */
522 return current_gdbarch
;
526 /* Free a gdbarch struct. This should never happen in normal
527 operation --- once you've created a gdbarch, you keep it around.
528 However, if an architecture's init function encounters an error
529 building the structure, it may need to clean up a partially
530 constructed gdbarch. */
533 gdbarch_free (struct gdbarch
*arch
)
535 gdb_assert (arch
!= NULL
);
536 free_gdbarch_data (arch
);
541 /* Ensure that all values in a GDBARCH are reasonable. */
544 verify_gdbarch (struct gdbarch
*gdbarch
)
547 struct cleanup
*cleanups
;
550 /* Only perform sanity checks on a multi-arch target. */
553 log
= mem_fileopen ();
554 cleanups
= make_cleanup_ui_file_delete (log
);
556 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
557 fprintf_unfiltered (log
, "\n\tbyte-order");
558 if (gdbarch
->bfd_arch_info
== NULL
)
559 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
560 /* Check those that need to be defined for the given multi-arch level. */
561 /* Skip verify of short_bit, invalid_p == 0 */
562 /* Skip verify of int_bit, invalid_p == 0 */
563 /* Skip verify of long_bit, invalid_p == 0 */
564 /* Skip verify of long_long_bit, invalid_p == 0 */
565 /* Skip verify of float_bit, invalid_p == 0 */
566 /* Skip verify of double_bit, invalid_p == 0 */
567 /* Skip verify of long_double_bit, invalid_p == 0 */
568 /* Skip verify of ptr_bit, invalid_p == 0 */
569 if (gdbarch
->addr_bit
== 0)
570 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
571 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
572 if (gdbarch
->char_signed
== -1)
573 gdbarch
->char_signed
= 1;
574 /* Skip verify of read_pc, invalid_p == 0 */
575 /* Skip verify of write_pc, invalid_p == 0 */
576 /* Skip verify of read_fp, invalid_p == 0 */
577 /* Skip verify of read_sp, invalid_p == 0 */
578 /* Skip verify of write_sp, invalid_p == 0 */
579 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
580 /* Skip verify of register_read, has predicate */
581 /* Skip verify of register_write, has predicate */
582 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
583 && (gdbarch
->num_regs
== -1))
584 fprintf_unfiltered (log
, "\n\tnum_regs");
585 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
586 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
587 && (gdbarch
->sp_regnum
== -1))
588 fprintf_unfiltered (log
, "\n\tsp_regnum");
589 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
590 && (gdbarch
->fp_regnum
== -1))
591 fprintf_unfiltered (log
, "\n\tfp_regnum");
592 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
593 && (gdbarch
->pc_regnum
== -1))
594 fprintf_unfiltered (log
, "\n\tpc_regnum");
595 /* Skip verify of fp0_regnum, invalid_p == 0 */
596 /* Skip verify of npc_regnum, invalid_p == 0 */
597 /* Skip verify of nnpc_regnum, invalid_p == 0 */
598 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
599 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
600 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
601 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
602 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
603 /* Skip verify of register_name, invalid_p == 0 */
604 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
605 && (gdbarch
->register_size
== -1))
606 fprintf_unfiltered (log
, "\n\tregister_size");
607 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
608 && (gdbarch
->register_bytes
== -1))
609 fprintf_unfiltered (log
, "\n\tregister_bytes");
610 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
611 && (gdbarch
->register_byte
== 0))
612 fprintf_unfiltered (log
, "\n\tregister_byte");
613 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
614 && (gdbarch
->register_raw_size
== 0))
615 fprintf_unfiltered (log
, "\n\tregister_raw_size");
616 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
617 && (gdbarch
->max_register_raw_size
== -1))
618 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
619 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
620 && (gdbarch
->register_virtual_size
== 0))
621 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
622 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
623 && (gdbarch
->max_register_virtual_size
== -1))
624 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
625 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
626 && (gdbarch
->register_virtual_type
== 0))
627 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
628 /* Skip verify of do_registers_info, invalid_p == 0 */
629 /* Skip verify of print_float_info, invalid_p == 0 */
630 /* Skip verify of register_sim_regno, invalid_p == 0 */
631 /* Skip verify of register_bytes_ok, has predicate */
632 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
633 /* Skip verify of cannot_store_register, invalid_p == 0 */
634 /* Skip verify of get_longjmp_target, has predicate */
635 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
636 && (gdbarch
->use_generic_dummy_frames
== -1))
637 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
638 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
639 && (gdbarch
->call_dummy_location
== 0))
640 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
641 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
642 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
643 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
644 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
645 && (gdbarch
->call_dummy_start_offset
== -1))
646 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
647 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
648 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
649 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
650 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
651 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
652 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
653 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
654 && (gdbarch
->call_dummy_length
== -1))
655 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
656 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
657 && (gdbarch
->pc_in_call_dummy
== 0))
658 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
659 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
660 && (gdbarch
->call_dummy_p
== -1))
661 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
662 /* Skip verify of call_dummy_words, invalid_p == 0 */
663 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
664 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
665 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
666 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
667 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
668 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
669 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
670 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
671 && (gdbarch
->fix_call_dummy
== 0))
672 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
673 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
674 /* Skip verify of init_frame_pc, invalid_p == 0 */
675 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
676 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
677 && (gdbarch
->get_saved_register
== 0))
678 fprintf_unfiltered (log
, "\n\tget_saved_register");
679 /* Skip verify of register_convertible, invalid_p == 0 */
680 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
681 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
682 /* Skip verify of fetch_pseudo_register, has predicate */
683 /* Skip verify of store_pseudo_register, has predicate */
684 /* Skip verify of pointer_to_address, invalid_p == 0 */
685 /* Skip verify of address_to_pointer, invalid_p == 0 */
686 /* Skip verify of integer_to_address, has predicate */
687 /* Skip verify of return_value_on_stack, invalid_p == 0 */
688 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
689 && (gdbarch
->extract_return_value
== 0))
690 fprintf_unfiltered (log
, "\n\textract_return_value");
691 /* Skip verify of push_arguments, invalid_p == 0 */
692 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
693 && (gdbarch
->push_dummy_frame
== 0))
694 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
695 /* Skip verify of push_return_address, has predicate */
696 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
697 && (gdbarch
->pop_frame
== 0))
698 fprintf_unfiltered (log
, "\n\tpop_frame");
699 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
700 && (gdbarch
->store_struct_return
== 0))
701 fprintf_unfiltered (log
, "\n\tstore_struct_return");
702 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
703 && (gdbarch
->store_return_value
== 0))
704 fprintf_unfiltered (log
, "\n\tstore_return_value");
705 /* Skip verify of extract_struct_value_address, has predicate */
706 /* Skip verify of use_struct_convention, invalid_p == 0 */
707 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
708 && (gdbarch
->frame_init_saved_regs
== 0))
709 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
710 /* Skip verify of init_extra_frame_info, has predicate */
711 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
712 && (gdbarch
->skip_prologue
== 0))
713 fprintf_unfiltered (log
, "\n\tskip_prologue");
714 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
715 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
716 && (gdbarch
->inner_than
== 0))
717 fprintf_unfiltered (log
, "\n\tinner_than");
718 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
719 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
720 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
722 && (gdbarch
->decr_pc_after_break
== -1))
723 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
724 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
725 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
726 && (gdbarch
->function_start_offset
== -1))
727 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
728 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
729 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
730 && (gdbarch
->frame_args_skip
== -1))
731 fprintf_unfiltered (log
, "\n\tframe_args_skip");
732 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
733 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
734 && (gdbarch
->frame_chain
== 0))
735 fprintf_unfiltered (log
, "\n\tframe_chain");
736 /* Skip verify of frame_chain_valid, invalid_p == 0 */
737 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
738 && (gdbarch
->frame_saved_pc
== 0))
739 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
740 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
741 && (gdbarch
->frame_args_address
== 0))
742 fprintf_unfiltered (log
, "\n\tframe_args_address");
743 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
744 && (gdbarch
->frame_locals_address
== 0))
745 fprintf_unfiltered (log
, "\n\tframe_locals_address");
746 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
747 && (gdbarch
->saved_pc_after_call
== 0))
748 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
749 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
750 && (gdbarch
->frame_num_args
== 0))
751 fprintf_unfiltered (log
, "\n\tframe_num_args");
752 /* Skip verify of stack_align, has predicate */
753 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
754 /* Skip verify of reg_struct_has_addr, has predicate */
755 /* Skip verify of save_dummy_frame_tos, has predicate */
756 if (gdbarch
->float_format
== 0)
757 gdbarch
->float_format
= default_float_format (gdbarch
);
758 if (gdbarch
->double_format
== 0)
759 gdbarch
->double_format
= default_double_format (gdbarch
);
760 if (gdbarch
->long_double_format
== 0)
761 gdbarch
->long_double_format
= default_double_format (gdbarch
);
762 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
763 /* Skip verify of addr_bits_remove, invalid_p == 0 */
764 /* Skip verify of smash_text_address, invalid_p == 0 */
765 /* Skip verify of software_single_step, has predicate */
766 /* Skip verify of print_insn, invalid_p == 0 */
767 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
768 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
769 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
770 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
771 /* Skip verify of dwarf2_build_frame_info, has predicate */
772 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
773 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
774 buf
= ui_file_xstrdup (log
, &dummy
);
775 make_cleanup (xfree
, buf
);
776 if (strlen (buf
) > 0)
777 internal_error (__FILE__
, __LINE__
,
778 "verify_gdbarch: the following are invalid ...%s",
780 do_cleanups (cleanups
);
784 /* Print out the details of the current architecture. */
786 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
787 just happens to match the global variable ``current_gdbarch''. That
788 way macros refering to that variable get the local and not the global
789 version - ulgh. Once everything is parameterised with gdbarch, this
793 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
795 fprintf_unfiltered (file
,
796 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
799 fprintf_unfiltered (file
,
800 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
801 (long) current_gdbarch
->in_function_epilogue_p
);
803 fprintf_unfiltered (file
,
804 "gdbarch_dump: register_read = 0x%08lx\n",
805 (long) current_gdbarch
->register_read
);
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: register_write = 0x%08lx\n",
809 (long) current_gdbarch
->register_write
);
810 #ifdef ADDRESS_TO_POINTER
812 /* Macro might contain `[{}]' when not multi-arch */
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: %s # %s\n",
815 "ADDRESS_TO_POINTER(type, buf, addr)",
816 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
821 (long) current_gdbarch
->address_to_pointer
822 /*ADDRESS_TO_POINTER ()*/);
824 #ifdef ADDR_BITS_REMOVE
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: %s # %s\n",
827 "ADDR_BITS_REMOVE(addr)",
828 XSTRING (ADDR_BITS_REMOVE (addr
)));
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
832 (long) current_gdbarch
->addr_bits_remove
833 /*ADDR_BITS_REMOVE ()*/);
835 #ifdef BELIEVE_PCC_PROMOTION
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
838 XSTRING (BELIEVE_PCC_PROMOTION
));
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
841 BELIEVE_PCC_PROMOTION
);
843 #ifdef BELIEVE_PCC_PROMOTION_TYPE
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
846 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
849 BELIEVE_PCC_PROMOTION_TYPE
);
851 #ifdef BREAKPOINT_FROM_PC
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: %s # %s\n",
854 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
855 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
857 fprintf_unfiltered (file
,
858 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
859 (long) current_gdbarch
->breakpoint_from_pc
860 /*BREAKPOINT_FROM_PC ()*/);
862 #ifdef CALL_DUMMY_ADDRESS
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: %s # %s\n",
865 "CALL_DUMMY_ADDRESS()",
866 XSTRING (CALL_DUMMY_ADDRESS ()));
868 fprintf_unfiltered (file
,
869 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
870 (long) current_gdbarch
->call_dummy_address
871 /*CALL_DUMMY_ADDRESS ()*/);
873 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
876 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
877 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
880 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
882 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
885 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
888 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
890 #ifdef CALL_DUMMY_LENGTH
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
893 XSTRING (CALL_DUMMY_LENGTH
));
894 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
899 #ifdef CALL_DUMMY_LOCATION
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
902 XSTRING (CALL_DUMMY_LOCATION
));
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
905 CALL_DUMMY_LOCATION
);
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: CALL_DUMMY_P # %s\n",
910 XSTRING (CALL_DUMMY_P
));
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: CALL_DUMMY_P = %d\n",
915 #ifdef CALL_DUMMY_STACK_ADJUST
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
918 XSTRING (CALL_DUMMY_STACK_ADJUST
));
919 if (CALL_DUMMY_STACK_ADJUST_P
)
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
922 (long) CALL_DUMMY_STACK_ADJUST
);
924 #ifdef CALL_DUMMY_STACK_ADJUST_P
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
927 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
930 (long) CALL_DUMMY_STACK_ADJUST_P
);
932 #ifdef CALL_DUMMY_START_OFFSET
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
935 XSTRING (CALL_DUMMY_START_OFFSET
));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
938 (long) CALL_DUMMY_START_OFFSET
);
940 #ifdef CALL_DUMMY_WORDS
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
943 XSTRING (CALL_DUMMY_WORDS
));
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
946 (long) CALL_DUMMY_WORDS
);
948 #ifdef CANNOT_FETCH_REGISTER
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: %s # %s\n",
951 "CANNOT_FETCH_REGISTER(regnum)",
952 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
954 fprintf_unfiltered (file
,
955 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
956 (long) current_gdbarch
->cannot_fetch_register
957 /*CANNOT_FETCH_REGISTER ()*/);
959 #ifdef CANNOT_STORE_REGISTER
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: %s # %s\n",
962 "CANNOT_STORE_REGISTER(regnum)",
963 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
967 (long) current_gdbarch
->cannot_store_register
968 /*CANNOT_STORE_REGISTER ()*/);
970 #ifdef COERCE_FLOAT_TO_DOUBLE
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: %s # %s\n",
973 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
974 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
976 fprintf_unfiltered (file
,
977 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
978 (long) current_gdbarch
->coerce_float_to_double
979 /*COERCE_FLOAT_TO_DOUBLE ()*/);
981 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
983 /* Macro might contain `[{}]' when not multi-arch */
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: %s # %s\n",
986 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
987 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
992 (long) current_gdbarch
->coff_make_msymbol_special
993 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
998 (long) current_gdbarch
->construct_inferior_arguments
);
999 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: %s # %s\n",
1002 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1003 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1007 (long) current_gdbarch
->convert_from_func_ptr_addr
1008 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1010 #ifdef DECR_PC_AFTER_BREAK
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1013 XSTRING (DECR_PC_AFTER_BREAK
));
1014 fprintf_unfiltered (file
,
1015 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1016 (long) DECR_PC_AFTER_BREAK
);
1018 #ifdef DO_REGISTERS_INFO
1020 /* Macro might contain `[{}]' when not multi-arch */
1021 fprintf_unfiltered (file
,
1022 "gdbarch_dump: %s # %s\n",
1023 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1024 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1029 (long) current_gdbarch
->do_registers_info
1030 /*DO_REGISTERS_INFO ()*/);
1032 #ifdef DWARF2_BUILD_FRAME_INFO
1034 /* Macro might contain `[{}]' when not multi-arch */
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: %s # %s\n",
1037 "DWARF2_BUILD_FRAME_INFO(objfile)",
1038 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1043 (long) current_gdbarch
->dwarf2_build_frame_info
1044 /*DWARF2_BUILD_FRAME_INFO ()*/);
1046 #ifdef DWARF2_REG_TO_REGNUM
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: %s # %s\n",
1049 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1050 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1054 (long) current_gdbarch
->dwarf2_reg_to_regnum
1055 /*DWARF2_REG_TO_REGNUM ()*/);
1057 #ifdef DWARF_REG_TO_REGNUM
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: %s # %s\n",
1060 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1061 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1065 (long) current_gdbarch
->dwarf_reg_to_regnum
1066 /*DWARF_REG_TO_REGNUM ()*/);
1068 #ifdef ECOFF_REG_TO_REGNUM
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: %s # %s\n",
1071 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1072 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1076 (long) current_gdbarch
->ecoff_reg_to_regnum
1077 /*ECOFF_REG_TO_REGNUM ()*/);
1079 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1081 /* Macro might contain `[{}]' when not multi-arch */
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: %s # %s\n",
1084 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1085 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1088 fprintf_unfiltered (file
,
1089 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1090 (long) current_gdbarch
->elf_make_msymbol_special
1091 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1093 #ifdef EXTRACT_RETURN_VALUE
1095 /* Macro might contain `[{}]' when not multi-arch */
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: %s # %s\n",
1098 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1099 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1104 (long) current_gdbarch
->extract_return_value
1105 /*EXTRACT_RETURN_VALUE ()*/);
1107 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: %s # %s\n",
1110 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1111 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1115 (long) current_gdbarch
->extract_struct_value_address
1116 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1118 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1121 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1124 EXTRA_STACK_ALIGNMENT_NEEDED
);
1126 #ifdef FETCH_PSEUDO_REGISTER
1128 /* Macro might contain `[{}]' when not multi-arch */
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: %s # %s\n",
1131 "FETCH_PSEUDO_REGISTER(regnum)",
1132 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1137 (long) current_gdbarch
->fetch_pseudo_register
1138 /*FETCH_PSEUDO_REGISTER ()*/);
1140 #ifdef FIX_CALL_DUMMY
1142 /* Macro might contain `[{}]' when not multi-arch */
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: %s # %s\n",
1145 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1146 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1151 (long) current_gdbarch
->fix_call_dummy
1152 /*FIX_CALL_DUMMY ()*/);
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: FP0_REGNUM # %s\n",
1157 XSTRING (FP0_REGNUM
));
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: FP0_REGNUM = %d\n",
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: FP_REGNUM # %s\n",
1165 XSTRING (FP_REGNUM
));
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: FP_REGNUM = %d\n",
1170 #ifdef FRAMELESS_FUNCTION_INVOCATION
1171 fprintf_unfiltered (file
,
1172 "gdbarch_dump: %s # %s\n",
1173 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1174 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1176 fprintf_unfiltered (file
,
1177 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1178 (long) current_gdbarch
->frameless_function_invocation
1179 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1181 #ifdef FRAME_ARGS_ADDRESS
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: %s # %s\n",
1184 "FRAME_ARGS_ADDRESS(fi)",
1185 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1187 fprintf_unfiltered (file
,
1188 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1189 (long) current_gdbarch
->frame_args_address
1190 /*FRAME_ARGS_ADDRESS ()*/);
1192 #ifdef FRAME_ARGS_SKIP
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1195 XSTRING (FRAME_ARGS_SKIP
));
1196 fprintf_unfiltered (file
,
1197 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1198 (long) FRAME_ARGS_SKIP
);
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: %s # %s\n",
1203 "FRAME_CHAIN(frame)",
1204 XSTRING (FRAME_CHAIN (frame
)));
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1208 (long) current_gdbarch
->frame_chain
1209 /*FRAME_CHAIN ()*/);
1211 #ifdef FRAME_CHAIN_VALID
1212 fprintf_unfiltered (file
,
1213 "gdbarch_dump: %s # %s\n",
1214 "FRAME_CHAIN_VALID(chain, thisframe)",
1215 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1219 (long) current_gdbarch
->frame_chain_valid
1220 /*FRAME_CHAIN_VALID ()*/);
1222 #ifdef FRAME_INIT_SAVED_REGS
1224 /* Macro might contain `[{}]' when not multi-arch */
1225 fprintf_unfiltered (file
,
1226 "gdbarch_dump: %s # %s\n",
1227 "FRAME_INIT_SAVED_REGS(frame)",
1228 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1231 fprintf_unfiltered (file
,
1232 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1233 (long) current_gdbarch
->frame_init_saved_regs
1234 /*FRAME_INIT_SAVED_REGS ()*/);
1236 #ifdef FRAME_LOCALS_ADDRESS
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: %s # %s\n",
1239 "FRAME_LOCALS_ADDRESS(fi)",
1240 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1244 (long) current_gdbarch
->frame_locals_address
1245 /*FRAME_LOCALS_ADDRESS ()*/);
1247 #ifdef FRAME_NUM_ARGS
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: %s # %s\n",
1250 "FRAME_NUM_ARGS(frame)",
1251 XSTRING (FRAME_NUM_ARGS (frame
)));
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1255 (long) current_gdbarch
->frame_num_args
1256 /*FRAME_NUM_ARGS ()*/);
1258 #ifdef FRAME_SAVED_PC
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: %s # %s\n",
1261 "FRAME_SAVED_PC(fi)",
1262 XSTRING (FRAME_SAVED_PC (fi
)));
1264 fprintf_unfiltered (file
,
1265 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1266 (long) current_gdbarch
->frame_saved_pc
1267 /*FRAME_SAVED_PC ()*/);
1269 #ifdef FUNCTION_START_OFFSET
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1272 XSTRING (FUNCTION_START_OFFSET
));
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1275 (long) FUNCTION_START_OFFSET
);
1277 #ifdef GET_LONGJMP_TARGET
1278 fprintf_unfiltered (file
,
1279 "gdbarch_dump: %s # %s\n",
1280 "GET_LONGJMP_TARGET(pc)",
1281 XSTRING (GET_LONGJMP_TARGET (pc
)));
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1285 (long) current_gdbarch
->get_longjmp_target
1286 /*GET_LONGJMP_TARGET ()*/);
1288 #ifdef GET_SAVED_REGISTER
1290 /* Macro might contain `[{}]' when not multi-arch */
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: %s # %s\n",
1293 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1294 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1299 (long) current_gdbarch
->get_saved_register
1300 /*GET_SAVED_REGISTER ()*/);
1302 #ifdef INIT_EXTRA_FRAME_INFO
1304 /* Macro might contain `[{}]' when not multi-arch */
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1308 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1311 fprintf_unfiltered (file
,
1312 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1313 (long) current_gdbarch
->init_extra_frame_info
1314 /*INIT_EXTRA_FRAME_INFO ()*/);
1316 #ifdef INIT_FRAME_PC
1318 /* Macro might contain `[{}]' when not multi-arch */
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: %s # %s\n",
1321 "INIT_FRAME_PC(fromleaf, prev)",
1322 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1327 (long) current_gdbarch
->init_frame_pc
1328 /*INIT_FRAME_PC ()*/);
1330 #ifdef INIT_FRAME_PC_FIRST
1332 /* Macro might contain `[{}]' when not multi-arch */
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: %s # %s\n",
1335 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1336 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1341 (long) current_gdbarch
->init_frame_pc_first
1342 /*INIT_FRAME_PC_FIRST ()*/);
1345 fprintf_unfiltered (file
,
1346 "gdbarch_dump: %s # %s\n",
1347 "INNER_THAN(lhs, rhs)",
1348 XSTRING (INNER_THAN (lhs
, rhs
)));
1350 fprintf_unfiltered (file
,
1351 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1352 (long) current_gdbarch
->inner_than
1355 #ifdef INTEGER_TO_ADDRESS
1356 fprintf_unfiltered (file
,
1357 "gdbarch_dump: %s # %s\n",
1358 "INTEGER_TO_ADDRESS(type, buf)",
1359 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1363 (long) current_gdbarch
->integer_to_address
1364 /*INTEGER_TO_ADDRESS ()*/);
1366 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: %s # %s\n",
1369 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1370 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1374 (long) current_gdbarch
->in_solib_call_trampoline
1375 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1377 #ifdef MAX_REGISTER_RAW_SIZE
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1380 XSTRING (MAX_REGISTER_RAW_SIZE
));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1383 MAX_REGISTER_RAW_SIZE
);
1385 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1388 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1391 MAX_REGISTER_VIRTUAL_SIZE
);
1393 #ifdef MEMORY_INSERT_BREAKPOINT
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: %s # %s\n",
1396 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1397 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1401 (long) current_gdbarch
->memory_insert_breakpoint
1402 /*MEMORY_INSERT_BREAKPOINT ()*/);
1404 #ifdef MEMORY_REMOVE_BREAKPOINT
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: %s # %s\n",
1407 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1408 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1412 (long) current_gdbarch
->memory_remove_breakpoint
1413 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: NNPC_REGNUM # %s\n",
1418 XSTRING (NNPC_REGNUM
));
1419 fprintf_unfiltered (file
,
1420 "gdbarch_dump: NNPC_REGNUM = %d\n",
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: NPC_REGNUM # %s\n",
1426 XSTRING (NPC_REGNUM
));
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: NPC_REGNUM = %d\n",
1431 #ifdef NUM_PSEUDO_REGS
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1434 XSTRING (NUM_PSEUDO_REGS
));
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: NUM_REGS # %s\n",
1442 XSTRING (NUM_REGS
));
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: NUM_REGS = %d\n",
1447 #ifdef PARM_BOUNDARY
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1450 XSTRING (PARM_BOUNDARY
));
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1455 #ifdef PC_IN_CALL_DUMMY
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: %s # %s\n",
1458 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1459 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1463 (long) current_gdbarch
->pc_in_call_dummy
1464 /*PC_IN_CALL_DUMMY ()*/);
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: PC_REGNUM # %s\n",
1469 XSTRING (PC_REGNUM
));
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: PC_REGNUM = %d\n",
1474 #ifdef POINTER_TO_ADDRESS
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: %s # %s\n",
1477 "POINTER_TO_ADDRESS(type, buf)",
1478 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1482 (long) current_gdbarch
->pointer_to_address
1483 /*POINTER_TO_ADDRESS ()*/);
1487 /* Macro might contain `[{}]' when not multi-arch */
1488 fprintf_unfiltered (file
,
1489 "gdbarch_dump: %s # %s\n",
1491 XSTRING (POP_FRAME (-)));
1494 fprintf_unfiltered (file
,
1495 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1496 (long) current_gdbarch
->pop_frame
1499 #ifdef PREPARE_TO_PROCEED
1500 fprintf_unfiltered (file
,
1501 "gdbarch_dump: %s # %s\n",
1502 "PREPARE_TO_PROCEED(select_it)",
1503 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1507 (long) current_gdbarch
->prepare_to_proceed
1508 /*PREPARE_TO_PROCEED ()*/);
1510 #ifdef PRINT_FLOAT_INFO
1512 /* Macro might contain `[{}]' when not multi-arch */
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: %s # %s\n",
1515 "PRINT_FLOAT_INFO()",
1516 XSTRING (PRINT_FLOAT_INFO ()));
1519 fprintf_unfiltered (file
,
1520 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1521 (long) current_gdbarch
->print_float_info
1522 /*PRINT_FLOAT_INFO ()*/);
1524 #ifdef PROLOGUE_FRAMELESS_P
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: %s # %s\n",
1527 "PROLOGUE_FRAMELESS_P(ip)",
1528 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1532 (long) current_gdbarch
->prologue_frameless_p
1533 /*PROLOGUE_FRAMELESS_P ()*/);
1535 #ifdef PUSH_ARGUMENTS
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: %s # %s\n",
1538 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1539 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1543 (long) current_gdbarch
->push_arguments
1544 /*PUSH_ARGUMENTS ()*/);
1546 #ifdef PUSH_DUMMY_FRAME
1548 /* Macro might contain `[{}]' when not multi-arch */
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: %s # %s\n",
1551 "PUSH_DUMMY_FRAME(-)",
1552 XSTRING (PUSH_DUMMY_FRAME (-)));
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1557 (long) current_gdbarch
->push_dummy_frame
1558 /*PUSH_DUMMY_FRAME ()*/);
1560 #ifdef PUSH_RETURN_ADDRESS
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: %s # %s\n",
1563 "PUSH_RETURN_ADDRESS(pc, sp)",
1564 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1566 fprintf_unfiltered (file
,
1567 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1568 (long) current_gdbarch
->push_return_address
1569 /*PUSH_RETURN_ADDRESS ()*/);
1571 #ifdef REGISTER_BYTE
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: %s # %s\n",
1574 "REGISTER_BYTE(reg_nr)",
1575 XSTRING (REGISTER_BYTE (reg_nr
)));
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1579 (long) current_gdbarch
->register_byte
1580 /*REGISTER_BYTE ()*/);
1582 #ifdef REGISTER_BYTES
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: REGISTER_BYTES # %s\n",
1585 XSTRING (REGISTER_BYTES
));
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: REGISTER_BYTES = %d\n",
1590 #ifdef REGISTER_BYTES_OK
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: %s # %s\n",
1593 "REGISTER_BYTES_OK(nr_bytes)",
1594 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1596 fprintf_unfiltered (file
,
1597 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1598 (long) current_gdbarch
->register_bytes_ok
1599 /*REGISTER_BYTES_OK ()*/);
1601 #ifdef REGISTER_CONVERTIBLE
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: %s # %s\n",
1604 "REGISTER_CONVERTIBLE(nr)",
1605 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1609 (long) current_gdbarch
->register_convertible
1610 /*REGISTER_CONVERTIBLE ()*/);
1612 #ifdef REGISTER_CONVERT_TO_RAW
1614 /* Macro might contain `[{}]' when not multi-arch */
1615 fprintf_unfiltered (file
,
1616 "gdbarch_dump: %s # %s\n",
1617 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1618 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1621 fprintf_unfiltered (file
,
1622 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1623 (long) current_gdbarch
->register_convert_to_raw
1624 /*REGISTER_CONVERT_TO_RAW ()*/);
1626 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1628 /* Macro might contain `[{}]' when not multi-arch */
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: %s # %s\n",
1631 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1632 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1637 (long) current_gdbarch
->register_convert_to_virtual
1638 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1640 #ifdef REGISTER_NAME
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: %s # %s\n",
1643 "REGISTER_NAME(regnr)",
1644 XSTRING (REGISTER_NAME (regnr
)));
1646 fprintf_unfiltered (file
,
1647 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1648 (long) current_gdbarch
->register_name
1649 /*REGISTER_NAME ()*/);
1651 #ifdef REGISTER_RAW_SIZE
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: %s # %s\n",
1654 "REGISTER_RAW_SIZE(reg_nr)",
1655 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1659 (long) current_gdbarch
->register_raw_size
1660 /*REGISTER_RAW_SIZE ()*/);
1662 #ifdef REGISTER_SIM_REGNO
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: %s # %s\n",
1665 "REGISTER_SIM_REGNO(reg_nr)",
1666 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1670 (long) current_gdbarch
->register_sim_regno
1671 /*REGISTER_SIM_REGNO ()*/);
1673 #ifdef REGISTER_SIZE
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: REGISTER_SIZE # %s\n",
1676 XSTRING (REGISTER_SIZE
));
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: REGISTER_SIZE = %d\n",
1681 #ifdef REGISTER_VIRTUAL_SIZE
1682 fprintf_unfiltered (file
,
1683 "gdbarch_dump: %s # %s\n",
1684 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1685 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1687 fprintf_unfiltered (file
,
1688 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1689 (long) current_gdbarch
->register_virtual_size
1690 /*REGISTER_VIRTUAL_SIZE ()*/);
1692 #ifdef REGISTER_VIRTUAL_TYPE
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: %s # %s\n",
1695 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1696 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1700 (long) current_gdbarch
->register_virtual_type
1701 /*REGISTER_VIRTUAL_TYPE ()*/);
1703 #ifdef REG_STRUCT_HAS_ADDR
1704 fprintf_unfiltered (file
,
1705 "gdbarch_dump: %s # %s\n",
1706 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1707 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1709 fprintf_unfiltered (file
,
1710 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1711 (long) current_gdbarch
->reg_struct_has_addr
1712 /*REG_STRUCT_HAS_ADDR ()*/);
1714 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1716 /* Macro might contain `[{}]' when not multi-arch */
1717 fprintf_unfiltered (file
,
1718 "gdbarch_dump: %s # %s\n",
1719 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1720 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1725 (long) current_gdbarch
->remote_translate_xfer_address
1726 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1728 #ifdef RETURN_VALUE_ON_STACK
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: %s # %s\n",
1731 "RETURN_VALUE_ON_STACK(type)",
1732 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1736 (long) current_gdbarch
->return_value_on_stack
1737 /*RETURN_VALUE_ON_STACK ()*/);
1739 #ifdef SAVED_PC_AFTER_CALL
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: %s # %s\n",
1742 "SAVED_PC_AFTER_CALL(frame)",
1743 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1745 fprintf_unfiltered (file
,
1746 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1747 (long) current_gdbarch
->saved_pc_after_call
1748 /*SAVED_PC_AFTER_CALL ()*/);
1750 #ifdef SAVE_DUMMY_FRAME_TOS
1752 /* Macro might contain `[{}]' when not multi-arch */
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: %s # %s\n",
1755 "SAVE_DUMMY_FRAME_TOS(sp)",
1756 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1761 (long) current_gdbarch
->save_dummy_frame_tos
1762 /*SAVE_DUMMY_FRAME_TOS ()*/);
1764 #ifdef SDB_REG_TO_REGNUM
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: %s # %s\n",
1767 "SDB_REG_TO_REGNUM(sdb_regnr)",
1768 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1770 fprintf_unfiltered (file
,
1771 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1772 (long) current_gdbarch
->sdb_reg_to_regnum
1773 /*SDB_REG_TO_REGNUM ()*/);
1775 #ifdef SIZEOF_CALL_DUMMY_WORDS
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1778 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1781 (long) SIZEOF_CALL_DUMMY_WORDS
);
1783 #ifdef SKIP_PROLOGUE
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: %s # %s\n",
1786 "SKIP_PROLOGUE(ip)",
1787 XSTRING (SKIP_PROLOGUE (ip
)));
1789 fprintf_unfiltered (file
,
1790 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1791 (long) current_gdbarch
->skip_prologue
1792 /*SKIP_PROLOGUE ()*/);
1794 #ifdef SKIP_TRAMPOLINE_CODE
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: %s # %s\n",
1797 "SKIP_TRAMPOLINE_CODE(pc)",
1798 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1802 (long) current_gdbarch
->skip_trampoline_code
1803 /*SKIP_TRAMPOLINE_CODE ()*/);
1805 #ifdef SMASH_TEXT_ADDRESS
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: %s # %s\n",
1808 "SMASH_TEXT_ADDRESS(addr)",
1809 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1813 (long) current_gdbarch
->smash_text_address
1814 /*SMASH_TEXT_ADDRESS ()*/);
1816 #ifdef SOFTWARE_SINGLE_STEP
1818 /* Macro might contain `[{}]' when not multi-arch */
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: %s # %s\n",
1821 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1822 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1827 (long) current_gdbarch
->software_single_step
1828 /*SOFTWARE_SINGLE_STEP ()*/);
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: SP_REGNUM # %s\n",
1833 XSTRING (SP_REGNUM
));
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: SP_REGNUM = %d\n",
1838 #ifdef STAB_REG_TO_REGNUM
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: %s # %s\n",
1841 "STAB_REG_TO_REGNUM(stab_regnr)",
1842 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1844 fprintf_unfiltered (file
,
1845 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1846 (long) current_gdbarch
->stab_reg_to_regnum
1847 /*STAB_REG_TO_REGNUM ()*/);
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: %s # %s\n",
1853 XSTRING (STACK_ALIGN (sp
)));
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1857 (long) current_gdbarch
->stack_align
1858 /*STACK_ALIGN ()*/);
1860 #ifdef STORE_PSEUDO_REGISTER
1862 /* Macro might contain `[{}]' when not multi-arch */
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: %s # %s\n",
1865 "STORE_PSEUDO_REGISTER(regnum)",
1866 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1869 fprintf_unfiltered (file
,
1870 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1871 (long) current_gdbarch
->store_pseudo_register
1872 /*STORE_PSEUDO_REGISTER ()*/);
1874 #ifdef STORE_RETURN_VALUE
1876 /* Macro might contain `[{}]' when not multi-arch */
1877 fprintf_unfiltered (file
,
1878 "gdbarch_dump: %s # %s\n",
1879 "STORE_RETURN_VALUE(type, valbuf)",
1880 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1885 (long) current_gdbarch
->store_return_value
1886 /*STORE_RETURN_VALUE ()*/);
1888 #ifdef STORE_STRUCT_RETURN
1890 /* Macro might contain `[{}]' when not multi-arch */
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: %s # %s\n",
1893 "STORE_STRUCT_RETURN(addr, sp)",
1894 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1899 (long) current_gdbarch
->store_struct_return
1900 /*STORE_STRUCT_RETURN ()*/);
1902 #ifdef TARGET_ADDR_BIT
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1905 XSTRING (TARGET_ADDR_BIT
));
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1910 #ifdef TARGET_ARCHITECTURE
1911 fprintf_unfiltered (file
,
1912 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1913 XSTRING (TARGET_ARCHITECTURE
));
1914 if (TARGET_ARCHITECTURE
!= NULL
)
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1917 TARGET_ARCHITECTURE
->printable_name
);
1919 #ifdef TARGET_BFD_VMA_BIT
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1922 XSTRING (TARGET_BFD_VMA_BIT
));
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1925 TARGET_BFD_VMA_BIT
);
1927 #ifdef TARGET_BYTE_ORDER
1928 fprintf_unfiltered (file
,
1929 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1930 XSTRING (TARGET_BYTE_ORDER
));
1931 fprintf_unfiltered (file
,
1932 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1933 (long) TARGET_BYTE_ORDER
);
1935 #ifdef TARGET_CHAR_SIGNED
1936 fprintf_unfiltered (file
,
1937 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1938 XSTRING (TARGET_CHAR_SIGNED
));
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1941 TARGET_CHAR_SIGNED
);
1943 #ifdef TARGET_DOUBLE_BIT
1944 fprintf_unfiltered (file
,
1945 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1946 XSTRING (TARGET_DOUBLE_BIT
));
1947 fprintf_unfiltered (file
,
1948 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1951 #ifdef TARGET_DOUBLE_FORMAT
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1954 XSTRING (TARGET_DOUBLE_FORMAT
));
1955 fprintf_unfiltered (file
,
1956 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1957 (long) TARGET_DOUBLE_FORMAT
);
1959 #ifdef TARGET_FLOAT_BIT
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1962 XSTRING (TARGET_FLOAT_BIT
));
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1967 #ifdef TARGET_FLOAT_FORMAT
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1970 XSTRING (TARGET_FLOAT_FORMAT
));
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1973 (long) TARGET_FLOAT_FORMAT
);
1975 #ifdef TARGET_INT_BIT
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1978 XSTRING (TARGET_INT_BIT
));
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1983 #ifdef TARGET_LONG_BIT
1984 fprintf_unfiltered (file
,
1985 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1986 XSTRING (TARGET_LONG_BIT
));
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
1991 #ifdef TARGET_LONG_DOUBLE_BIT
1992 fprintf_unfiltered (file
,
1993 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1994 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
1997 TARGET_LONG_DOUBLE_BIT
);
1999 #ifdef TARGET_LONG_DOUBLE_FORMAT
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2002 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2005 (long) TARGET_LONG_DOUBLE_FORMAT
);
2007 #ifdef TARGET_LONG_LONG_BIT
2008 fprintf_unfiltered (file
,
2009 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2010 XSTRING (TARGET_LONG_LONG_BIT
));
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2013 TARGET_LONG_LONG_BIT
);
2015 #ifdef TARGET_PRINT_INSN
2016 fprintf_unfiltered (file
,
2017 "gdbarch_dump: %s # %s\n",
2018 "TARGET_PRINT_INSN(vma, info)",
2019 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2021 fprintf_unfiltered (file
,
2022 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2023 (long) current_gdbarch
->print_insn
2024 /*TARGET_PRINT_INSN ()*/);
2026 #ifdef TARGET_PTR_BIT
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2029 XSTRING (TARGET_PTR_BIT
));
2030 fprintf_unfiltered (file
,
2031 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2034 #ifdef TARGET_READ_FP
2035 fprintf_unfiltered (file
,
2036 "gdbarch_dump: %s # %s\n",
2038 XSTRING (TARGET_READ_FP ()));
2040 fprintf_unfiltered (file
,
2041 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2042 (long) current_gdbarch
->read_fp
2043 /*TARGET_READ_FP ()*/);
2045 #ifdef TARGET_READ_PC
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: %s # %s\n",
2048 "TARGET_READ_PC(ptid)",
2049 XSTRING (TARGET_READ_PC (ptid
)));
2051 fprintf_unfiltered (file
,
2052 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2053 (long) current_gdbarch
->read_pc
2054 /*TARGET_READ_PC ()*/);
2056 #ifdef TARGET_READ_SP
2057 fprintf_unfiltered (file
,
2058 "gdbarch_dump: %s # %s\n",
2060 XSTRING (TARGET_READ_SP ()));
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2064 (long) current_gdbarch
->read_sp
2065 /*TARGET_READ_SP ()*/);
2067 #ifdef TARGET_SHORT_BIT
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2070 XSTRING (TARGET_SHORT_BIT
));
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2075 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2077 /* Macro might contain `[{}]' when not multi-arch */
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: %s # %s\n",
2080 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2081 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2086 (long) current_gdbarch
->virtual_frame_pointer
2087 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2089 #ifdef TARGET_WRITE_PC
2091 /* Macro might contain `[{}]' when not multi-arch */
2092 fprintf_unfiltered (file
,
2093 "gdbarch_dump: %s # %s\n",
2094 "TARGET_WRITE_PC(val, ptid)",
2095 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2098 fprintf_unfiltered (file
,
2099 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2100 (long) current_gdbarch
->write_pc
2101 /*TARGET_WRITE_PC ()*/);
2103 #ifdef TARGET_WRITE_SP
2105 /* Macro might contain `[{}]' when not multi-arch */
2106 fprintf_unfiltered (file
,
2107 "gdbarch_dump: %s # %s\n",
2108 "TARGET_WRITE_SP(val)",
2109 XSTRING (TARGET_WRITE_SP (val
)));
2112 fprintf_unfiltered (file
,
2113 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2114 (long) current_gdbarch
->write_sp
2115 /*TARGET_WRITE_SP ()*/);
2117 #ifdef USE_GENERIC_DUMMY_FRAMES
2118 fprintf_unfiltered (file
,
2119 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2120 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2121 fprintf_unfiltered (file
,
2122 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2123 USE_GENERIC_DUMMY_FRAMES
);
2125 #ifdef USE_STRUCT_CONVENTION
2126 fprintf_unfiltered (file
,
2127 "gdbarch_dump: %s # %s\n",
2128 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2129 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2133 (long) current_gdbarch
->use_struct_convention
2134 /*USE_STRUCT_CONVENTION ()*/);
2136 if (current_gdbarch
->dump_tdep
!= NULL
)
2137 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2140 struct gdbarch_tdep
*
2141 gdbarch_tdep (struct gdbarch
*gdbarch
)
2143 if (gdbarch_debug
>= 2)
2144 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2145 return gdbarch
->tdep
;
2149 const struct bfd_arch_info
*
2150 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2152 if (gdbarch_debug
>= 2)
2153 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2154 return gdbarch
->bfd_arch_info
;
2158 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2160 if (gdbarch_debug
>= 2)
2161 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2162 return gdbarch
->byte_order
;
2166 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2168 /* Skip verify of short_bit, invalid_p == 0 */
2169 if (gdbarch_debug
>= 2)
2170 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2171 return gdbarch
->short_bit
;
2175 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2178 gdbarch
->short_bit
= short_bit
;
2182 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2184 /* Skip verify of int_bit, invalid_p == 0 */
2185 if (gdbarch_debug
>= 2)
2186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2187 return gdbarch
->int_bit
;
2191 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2194 gdbarch
->int_bit
= int_bit
;
2198 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2200 /* Skip verify of long_bit, invalid_p == 0 */
2201 if (gdbarch_debug
>= 2)
2202 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2203 return gdbarch
->long_bit
;
2207 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2210 gdbarch
->long_bit
= long_bit
;
2214 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2216 /* Skip verify of long_long_bit, invalid_p == 0 */
2217 if (gdbarch_debug
>= 2)
2218 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2219 return gdbarch
->long_long_bit
;
2223 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2226 gdbarch
->long_long_bit
= long_long_bit
;
2230 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2232 /* Skip verify of float_bit, invalid_p == 0 */
2233 if (gdbarch_debug
>= 2)
2234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2235 return gdbarch
->float_bit
;
2239 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2242 gdbarch
->float_bit
= float_bit
;
2246 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2248 /* Skip verify of double_bit, invalid_p == 0 */
2249 if (gdbarch_debug
>= 2)
2250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2251 return gdbarch
->double_bit
;
2255 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2258 gdbarch
->double_bit
= double_bit
;
2262 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2264 /* Skip verify of long_double_bit, invalid_p == 0 */
2265 if (gdbarch_debug
>= 2)
2266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2267 return gdbarch
->long_double_bit
;
2271 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2272 int long_double_bit
)
2274 gdbarch
->long_double_bit
= long_double_bit
;
2278 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2280 /* Skip verify of ptr_bit, invalid_p == 0 */
2281 if (gdbarch_debug
>= 2)
2282 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2283 return gdbarch
->ptr_bit
;
2287 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2290 gdbarch
->ptr_bit
= ptr_bit
;
2294 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2296 if (gdbarch
->addr_bit
== 0)
2297 internal_error (__FILE__
, __LINE__
,
2298 "gdbarch: gdbarch_addr_bit invalid");
2299 if (gdbarch_debug
>= 2)
2300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2301 return gdbarch
->addr_bit
;
2305 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2308 gdbarch
->addr_bit
= addr_bit
;
2312 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2314 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2315 if (gdbarch_debug
>= 2)
2316 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2317 return gdbarch
->bfd_vma_bit
;
2321 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2324 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2328 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2330 if (gdbarch
->char_signed
== -1)
2331 internal_error (__FILE__
, __LINE__
,
2332 "gdbarch: gdbarch_char_signed invalid");
2333 if (gdbarch_debug
>= 2)
2334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2335 return gdbarch
->char_signed
;
2339 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2342 gdbarch
->char_signed
= char_signed
;
2346 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2348 if (gdbarch
->read_pc
== 0)
2349 internal_error (__FILE__
, __LINE__
,
2350 "gdbarch: gdbarch_read_pc invalid");
2351 if (gdbarch_debug
>= 2)
2352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2353 return gdbarch
->read_pc (ptid
);
2357 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2358 gdbarch_read_pc_ftype read_pc
)
2360 gdbarch
->read_pc
= read_pc
;
2364 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2366 if (gdbarch
->write_pc
== 0)
2367 internal_error (__FILE__
, __LINE__
,
2368 "gdbarch: gdbarch_write_pc invalid");
2369 if (gdbarch_debug
>= 2)
2370 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2371 gdbarch
->write_pc (val
, ptid
);
2375 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2376 gdbarch_write_pc_ftype write_pc
)
2378 gdbarch
->write_pc
= write_pc
;
2382 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2384 if (gdbarch
->read_fp
== 0)
2385 internal_error (__FILE__
, __LINE__
,
2386 "gdbarch: gdbarch_read_fp invalid");
2387 if (gdbarch_debug
>= 2)
2388 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2389 return gdbarch
->read_fp ();
2393 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2394 gdbarch_read_fp_ftype read_fp
)
2396 gdbarch
->read_fp
= read_fp
;
2400 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2402 if (gdbarch
->read_sp
== 0)
2403 internal_error (__FILE__
, __LINE__
,
2404 "gdbarch: gdbarch_read_sp invalid");
2405 if (gdbarch_debug
>= 2)
2406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2407 return gdbarch
->read_sp ();
2411 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2412 gdbarch_read_sp_ftype read_sp
)
2414 gdbarch
->read_sp
= read_sp
;
2418 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2420 if (gdbarch
->write_sp
== 0)
2421 internal_error (__FILE__
, __LINE__
,
2422 "gdbarch: gdbarch_write_sp invalid");
2423 if (gdbarch_debug
>= 2)
2424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2425 gdbarch
->write_sp (val
);
2429 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2430 gdbarch_write_sp_ftype write_sp
)
2432 gdbarch
->write_sp
= write_sp
;
2436 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2438 if (gdbarch
->virtual_frame_pointer
== 0)
2439 internal_error (__FILE__
, __LINE__
,
2440 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2441 if (gdbarch_debug
>= 2)
2442 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2443 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2447 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2448 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2450 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2454 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2456 return gdbarch
->register_read
!= 0;
2460 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2462 if (gdbarch
->register_read
== 0)
2463 internal_error (__FILE__
, __LINE__
,
2464 "gdbarch: gdbarch_register_read invalid");
2465 if (gdbarch_debug
>= 2)
2466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2467 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2471 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2472 gdbarch_register_read_ftype register_read
)
2474 gdbarch
->register_read
= register_read
;
2478 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2480 return gdbarch
->register_write
!= 0;
2484 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2486 if (gdbarch
->register_write
== 0)
2487 internal_error (__FILE__
, __LINE__
,
2488 "gdbarch: gdbarch_register_write invalid");
2489 if (gdbarch_debug
>= 2)
2490 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2491 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2495 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2496 gdbarch_register_write_ftype register_write
)
2498 gdbarch
->register_write
= register_write
;
2502 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2504 if (gdbarch
->num_regs
== -1)
2505 internal_error (__FILE__
, __LINE__
,
2506 "gdbarch: gdbarch_num_regs invalid");
2507 if (gdbarch_debug
>= 2)
2508 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2509 return gdbarch
->num_regs
;
2513 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2516 gdbarch
->num_regs
= num_regs
;
2520 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2522 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2523 if (gdbarch_debug
>= 2)
2524 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2525 return gdbarch
->num_pseudo_regs
;
2529 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2530 int num_pseudo_regs
)
2532 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2536 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2538 if (gdbarch
->sp_regnum
== -1)
2539 internal_error (__FILE__
, __LINE__
,
2540 "gdbarch: gdbarch_sp_regnum invalid");
2541 if (gdbarch_debug
>= 2)
2542 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2543 return gdbarch
->sp_regnum
;
2547 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2550 gdbarch
->sp_regnum
= sp_regnum
;
2554 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2556 if (gdbarch
->fp_regnum
== -1)
2557 internal_error (__FILE__
, __LINE__
,
2558 "gdbarch: gdbarch_fp_regnum invalid");
2559 if (gdbarch_debug
>= 2)
2560 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2561 return gdbarch
->fp_regnum
;
2565 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2568 gdbarch
->fp_regnum
= fp_regnum
;
2572 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2574 if (gdbarch
->pc_regnum
== -1)
2575 internal_error (__FILE__
, __LINE__
,
2576 "gdbarch: gdbarch_pc_regnum invalid");
2577 if (gdbarch_debug
>= 2)
2578 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2579 return gdbarch
->pc_regnum
;
2583 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2586 gdbarch
->pc_regnum
= pc_regnum
;
2590 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2592 /* Skip verify of fp0_regnum, invalid_p == 0 */
2593 if (gdbarch_debug
>= 2)
2594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2595 return gdbarch
->fp0_regnum
;
2599 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2602 gdbarch
->fp0_regnum
= fp0_regnum
;
2606 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2608 /* Skip verify of npc_regnum, invalid_p == 0 */
2609 if (gdbarch_debug
>= 2)
2610 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2611 return gdbarch
->npc_regnum
;
2615 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2618 gdbarch
->npc_regnum
= npc_regnum
;
2622 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2624 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2625 if (gdbarch_debug
>= 2)
2626 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2627 return gdbarch
->nnpc_regnum
;
2631 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2634 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2638 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2640 if (gdbarch
->stab_reg_to_regnum
== 0)
2641 internal_error (__FILE__
, __LINE__
,
2642 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2643 if (gdbarch_debug
>= 2)
2644 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2645 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2649 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2650 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2652 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2656 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2658 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2659 internal_error (__FILE__
, __LINE__
,
2660 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2661 if (gdbarch_debug
>= 2)
2662 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2663 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2667 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2668 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2670 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2674 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2676 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2677 internal_error (__FILE__
, __LINE__
,
2678 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2679 if (gdbarch_debug
>= 2)
2680 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2681 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2685 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2686 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2688 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2692 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2694 if (gdbarch
->sdb_reg_to_regnum
== 0)
2695 internal_error (__FILE__
, __LINE__
,
2696 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2697 if (gdbarch_debug
>= 2)
2698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2699 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2703 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2704 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2706 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2710 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2712 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2713 internal_error (__FILE__
, __LINE__
,
2714 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2715 if (gdbarch_debug
>= 2)
2716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2717 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2721 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2722 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2724 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2728 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2730 if (gdbarch
->register_name
== 0)
2731 internal_error (__FILE__
, __LINE__
,
2732 "gdbarch: gdbarch_register_name invalid");
2733 if (gdbarch_debug
>= 2)
2734 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2735 return gdbarch
->register_name (regnr
);
2739 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2740 gdbarch_register_name_ftype register_name
)
2742 gdbarch
->register_name
= register_name
;
2746 gdbarch_register_size (struct gdbarch
*gdbarch
)
2748 if (gdbarch
->register_size
== -1)
2749 internal_error (__FILE__
, __LINE__
,
2750 "gdbarch: gdbarch_register_size invalid");
2751 if (gdbarch_debug
>= 2)
2752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2753 return gdbarch
->register_size
;
2757 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2760 gdbarch
->register_size
= register_size
;
2764 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2766 if (gdbarch
->register_bytes
== -1)
2767 internal_error (__FILE__
, __LINE__
,
2768 "gdbarch: gdbarch_register_bytes invalid");
2769 if (gdbarch_debug
>= 2)
2770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2771 return gdbarch
->register_bytes
;
2775 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2778 gdbarch
->register_bytes
= register_bytes
;
2782 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2784 if (gdbarch
->register_byte
== 0)
2785 internal_error (__FILE__
, __LINE__
,
2786 "gdbarch: gdbarch_register_byte invalid");
2787 if (gdbarch_debug
>= 2)
2788 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2789 return gdbarch
->register_byte (reg_nr
);
2793 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2794 gdbarch_register_byte_ftype register_byte
)
2796 gdbarch
->register_byte
= register_byte
;
2800 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2802 if (gdbarch
->register_raw_size
== 0)
2803 internal_error (__FILE__
, __LINE__
,
2804 "gdbarch: gdbarch_register_raw_size invalid");
2805 if (gdbarch_debug
>= 2)
2806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2807 return gdbarch
->register_raw_size (reg_nr
);
2811 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2812 gdbarch_register_raw_size_ftype register_raw_size
)
2814 gdbarch
->register_raw_size
= register_raw_size
;
2818 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2820 if (gdbarch
->max_register_raw_size
== -1)
2821 internal_error (__FILE__
, __LINE__
,
2822 "gdbarch: gdbarch_max_register_raw_size invalid");
2823 if (gdbarch_debug
>= 2)
2824 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2825 return gdbarch
->max_register_raw_size
;
2829 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2830 int max_register_raw_size
)
2832 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2836 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2838 if (gdbarch
->register_virtual_size
== 0)
2839 internal_error (__FILE__
, __LINE__
,
2840 "gdbarch: gdbarch_register_virtual_size invalid");
2841 if (gdbarch_debug
>= 2)
2842 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2843 return gdbarch
->register_virtual_size (reg_nr
);
2847 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2848 gdbarch_register_virtual_size_ftype register_virtual_size
)
2850 gdbarch
->register_virtual_size
= register_virtual_size
;
2854 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2856 if (gdbarch
->max_register_virtual_size
== -1)
2857 internal_error (__FILE__
, __LINE__
,
2858 "gdbarch: gdbarch_max_register_virtual_size invalid");
2859 if (gdbarch_debug
>= 2)
2860 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2861 return gdbarch
->max_register_virtual_size
;
2865 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2866 int max_register_virtual_size
)
2868 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2872 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2874 if (gdbarch
->register_virtual_type
== 0)
2875 internal_error (__FILE__
, __LINE__
,
2876 "gdbarch: gdbarch_register_virtual_type invalid");
2877 if (gdbarch_debug
>= 2)
2878 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2879 return gdbarch
->register_virtual_type (reg_nr
);
2883 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2884 gdbarch_register_virtual_type_ftype register_virtual_type
)
2886 gdbarch
->register_virtual_type
= register_virtual_type
;
2890 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2892 if (gdbarch
->do_registers_info
== 0)
2893 internal_error (__FILE__
, __LINE__
,
2894 "gdbarch: gdbarch_do_registers_info invalid");
2895 if (gdbarch_debug
>= 2)
2896 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2897 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2901 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2902 gdbarch_do_registers_info_ftype do_registers_info
)
2904 gdbarch
->do_registers_info
= do_registers_info
;
2908 gdbarch_print_float_info (struct gdbarch
*gdbarch
)
2910 if (gdbarch
->print_float_info
== 0)
2911 internal_error (__FILE__
, __LINE__
,
2912 "gdbarch: gdbarch_print_float_info invalid");
2913 if (gdbarch_debug
>= 2)
2914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2915 gdbarch
->print_float_info ();
2919 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2920 gdbarch_print_float_info_ftype print_float_info
)
2922 gdbarch
->print_float_info
= print_float_info
;
2926 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2928 if (gdbarch
->register_sim_regno
== 0)
2929 internal_error (__FILE__
, __LINE__
,
2930 "gdbarch: gdbarch_register_sim_regno invalid");
2931 if (gdbarch_debug
>= 2)
2932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2933 return gdbarch
->register_sim_regno (reg_nr
);
2937 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2938 gdbarch_register_sim_regno_ftype register_sim_regno
)
2940 gdbarch
->register_sim_regno
= register_sim_regno
;
2944 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2946 return gdbarch
->register_bytes_ok
!= 0;
2950 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2952 if (gdbarch
->register_bytes_ok
== 0)
2953 internal_error (__FILE__
, __LINE__
,
2954 "gdbarch: gdbarch_register_bytes_ok invalid");
2955 if (gdbarch_debug
>= 2)
2956 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2957 return gdbarch
->register_bytes_ok (nr_bytes
);
2961 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2962 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2964 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2968 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2970 if (gdbarch
->cannot_fetch_register
== 0)
2971 internal_error (__FILE__
, __LINE__
,
2972 "gdbarch: gdbarch_cannot_fetch_register invalid");
2973 if (gdbarch_debug
>= 2)
2974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2975 return gdbarch
->cannot_fetch_register (regnum
);
2979 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2980 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2982 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2986 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2988 if (gdbarch
->cannot_store_register
== 0)
2989 internal_error (__FILE__
, __LINE__
,
2990 "gdbarch: gdbarch_cannot_store_register invalid");
2991 if (gdbarch_debug
>= 2)
2992 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2993 return gdbarch
->cannot_store_register (regnum
);
2997 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2998 gdbarch_cannot_store_register_ftype cannot_store_register
)
3000 gdbarch
->cannot_store_register
= cannot_store_register
;
3004 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3006 return gdbarch
->get_longjmp_target
!= 0;
3010 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3012 if (gdbarch
->get_longjmp_target
== 0)
3013 internal_error (__FILE__
, __LINE__
,
3014 "gdbarch: gdbarch_get_longjmp_target invalid");
3015 if (gdbarch_debug
>= 2)
3016 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3017 return gdbarch
->get_longjmp_target (pc
);
3021 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3022 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3024 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3028 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3030 if (gdbarch
->use_generic_dummy_frames
== -1)
3031 internal_error (__FILE__
, __LINE__
,
3032 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3033 if (gdbarch_debug
>= 2)
3034 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3035 return gdbarch
->use_generic_dummy_frames
;
3039 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3040 int use_generic_dummy_frames
)
3042 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3046 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3048 if (gdbarch
->call_dummy_location
== 0)
3049 internal_error (__FILE__
, __LINE__
,
3050 "gdbarch: gdbarch_call_dummy_location invalid");
3051 if (gdbarch_debug
>= 2)
3052 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3053 return gdbarch
->call_dummy_location
;
3057 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3058 int call_dummy_location
)
3060 gdbarch
->call_dummy_location
= call_dummy_location
;
3064 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3066 if (gdbarch
->call_dummy_address
== 0)
3067 internal_error (__FILE__
, __LINE__
,
3068 "gdbarch: gdbarch_call_dummy_address invalid");
3069 if (gdbarch_debug
>= 2)
3070 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3071 return gdbarch
->call_dummy_address ();
3075 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3076 gdbarch_call_dummy_address_ftype call_dummy_address
)
3078 gdbarch
->call_dummy_address
= call_dummy_address
;
3082 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3084 if (gdbarch
->call_dummy_start_offset
== -1)
3085 internal_error (__FILE__
, __LINE__
,
3086 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3087 if (gdbarch_debug
>= 2)
3088 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3089 return gdbarch
->call_dummy_start_offset
;
3093 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3094 CORE_ADDR call_dummy_start_offset
)
3096 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3100 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3102 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3103 internal_error (__FILE__
, __LINE__
,
3104 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3105 if (gdbarch_debug
>= 2)
3106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3107 return gdbarch
->call_dummy_breakpoint_offset
;
3111 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3112 CORE_ADDR call_dummy_breakpoint_offset
)
3114 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3118 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3120 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3121 internal_error (__FILE__
, __LINE__
,
3122 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3123 if (gdbarch_debug
>= 2)
3124 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3125 return gdbarch
->call_dummy_breakpoint_offset_p
;
3129 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3130 int call_dummy_breakpoint_offset_p
)
3132 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3136 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3138 if (gdbarch
->call_dummy_length
== -1)
3139 internal_error (__FILE__
, __LINE__
,
3140 "gdbarch: gdbarch_call_dummy_length invalid");
3141 if (gdbarch_debug
>= 2)
3142 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3143 return gdbarch
->call_dummy_length
;
3147 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3148 int call_dummy_length
)
3150 gdbarch
->call_dummy_length
= call_dummy_length
;
3154 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3156 if (gdbarch
->pc_in_call_dummy
== 0)
3157 internal_error (__FILE__
, __LINE__
,
3158 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3159 if (gdbarch_debug
>= 2)
3160 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3161 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3165 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3166 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3168 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3172 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3174 if (gdbarch
->call_dummy_p
== -1)
3175 internal_error (__FILE__
, __LINE__
,
3176 "gdbarch: gdbarch_call_dummy_p invalid");
3177 if (gdbarch_debug
>= 2)
3178 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3179 return gdbarch
->call_dummy_p
;
3183 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3186 gdbarch
->call_dummy_p
= call_dummy_p
;
3190 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3192 /* Skip verify of call_dummy_words, invalid_p == 0 */
3193 if (gdbarch_debug
>= 2)
3194 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3195 return gdbarch
->call_dummy_words
;
3199 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3200 LONGEST
* call_dummy_words
)
3202 gdbarch
->call_dummy_words
= call_dummy_words
;
3206 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3208 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3209 if (gdbarch_debug
>= 2)
3210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3211 return gdbarch
->sizeof_call_dummy_words
;
3215 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3216 int sizeof_call_dummy_words
)
3218 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3222 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3224 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3225 internal_error (__FILE__
, __LINE__
,
3226 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3227 if (gdbarch_debug
>= 2)
3228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3229 return gdbarch
->call_dummy_stack_adjust_p
;
3233 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3234 int call_dummy_stack_adjust_p
)
3236 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3240 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3242 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3243 internal_error (__FILE__
, __LINE__
,
3244 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3245 if (gdbarch_debug
>= 2)
3246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3247 return gdbarch
->call_dummy_stack_adjust
;
3251 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3252 int call_dummy_stack_adjust
)
3254 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3258 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
)
3260 if (gdbarch
->fix_call_dummy
== 0)
3261 internal_error (__FILE__
, __LINE__
,
3262 "gdbarch: gdbarch_fix_call_dummy invalid");
3263 if (gdbarch_debug
>= 2)
3264 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3265 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3269 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3270 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3272 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3276 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3278 if (gdbarch
->init_frame_pc_first
== 0)
3279 internal_error (__FILE__
, __LINE__
,
3280 "gdbarch: gdbarch_init_frame_pc_first invalid");
3281 if (gdbarch_debug
>= 2)
3282 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3283 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3287 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3288 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3290 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3294 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3296 if (gdbarch
->init_frame_pc
== 0)
3297 internal_error (__FILE__
, __LINE__
,
3298 "gdbarch: gdbarch_init_frame_pc invalid");
3299 if (gdbarch_debug
>= 2)
3300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3301 gdbarch
->init_frame_pc (fromleaf
, prev
);
3305 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3306 gdbarch_init_frame_pc_ftype init_frame_pc
)
3308 gdbarch
->init_frame_pc
= init_frame_pc
;
3312 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3314 if (gdbarch_debug
>= 2)
3315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3316 return gdbarch
->believe_pcc_promotion
;
3320 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3321 int believe_pcc_promotion
)
3323 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3327 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3329 if (gdbarch_debug
>= 2)
3330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3331 return gdbarch
->believe_pcc_promotion_type
;
3335 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3336 int believe_pcc_promotion_type
)
3338 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3342 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3344 if (gdbarch
->coerce_float_to_double
== 0)
3345 internal_error (__FILE__
, __LINE__
,
3346 "gdbarch: gdbarch_coerce_float_to_double invalid");
3347 if (gdbarch_debug
>= 2)
3348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3349 return gdbarch
->coerce_float_to_double (formal
, actual
);
3353 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3354 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3356 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3360 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
)
3362 if (gdbarch
->get_saved_register
== 0)
3363 internal_error (__FILE__
, __LINE__
,
3364 "gdbarch: gdbarch_get_saved_register invalid");
3365 if (gdbarch_debug
>= 2)
3366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3367 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3371 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3372 gdbarch_get_saved_register_ftype get_saved_register
)
3374 gdbarch
->get_saved_register
= get_saved_register
;
3378 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3380 if (gdbarch
->register_convertible
== 0)
3381 internal_error (__FILE__
, __LINE__
,
3382 "gdbarch: gdbarch_register_convertible invalid");
3383 if (gdbarch_debug
>= 2)
3384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3385 return gdbarch
->register_convertible (nr
);
3389 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3390 gdbarch_register_convertible_ftype register_convertible
)
3392 gdbarch
->register_convertible
= register_convertible
;
3396 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3398 if (gdbarch
->register_convert_to_virtual
== 0)
3399 internal_error (__FILE__
, __LINE__
,
3400 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3401 if (gdbarch_debug
>= 2)
3402 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3403 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3407 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3408 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3410 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3414 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3416 if (gdbarch
->register_convert_to_raw
== 0)
3417 internal_error (__FILE__
, __LINE__
,
3418 "gdbarch: gdbarch_register_convert_to_raw invalid");
3419 if (gdbarch_debug
>= 2)
3420 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3421 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3425 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3426 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3428 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3432 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3434 return gdbarch
->fetch_pseudo_register
!= 0;
3438 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3440 if (gdbarch
->fetch_pseudo_register
== 0)
3441 internal_error (__FILE__
, __LINE__
,
3442 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3443 if (gdbarch_debug
>= 2)
3444 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3445 gdbarch
->fetch_pseudo_register (regnum
);
3449 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3450 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3452 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3456 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3458 return gdbarch
->store_pseudo_register
!= 0;
3462 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3464 if (gdbarch
->store_pseudo_register
== 0)
3465 internal_error (__FILE__
, __LINE__
,
3466 "gdbarch: gdbarch_store_pseudo_register invalid");
3467 if (gdbarch_debug
>= 2)
3468 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3469 gdbarch
->store_pseudo_register (regnum
);
3473 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3474 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3476 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3480 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3482 if (gdbarch
->pointer_to_address
== 0)
3483 internal_error (__FILE__
, __LINE__
,
3484 "gdbarch: gdbarch_pointer_to_address invalid");
3485 if (gdbarch_debug
>= 2)
3486 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3487 return gdbarch
->pointer_to_address (type
, buf
);
3491 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3492 gdbarch_pointer_to_address_ftype pointer_to_address
)
3494 gdbarch
->pointer_to_address
= pointer_to_address
;
3498 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3500 if (gdbarch
->address_to_pointer
== 0)
3501 internal_error (__FILE__
, __LINE__
,
3502 "gdbarch: gdbarch_address_to_pointer invalid");
3503 if (gdbarch_debug
>= 2)
3504 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3505 gdbarch
->address_to_pointer (type
, buf
, addr
);
3509 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3510 gdbarch_address_to_pointer_ftype address_to_pointer
)
3512 gdbarch
->address_to_pointer
= address_to_pointer
;
3516 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3518 return gdbarch
->integer_to_address
!= 0;
3522 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3524 if (gdbarch
->integer_to_address
== 0)
3525 internal_error (__FILE__
, __LINE__
,
3526 "gdbarch: gdbarch_integer_to_address invalid");
3527 if (gdbarch_debug
>= 2)
3528 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3529 return gdbarch
->integer_to_address (type
, buf
);
3533 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3534 gdbarch_integer_to_address_ftype integer_to_address
)
3536 gdbarch
->integer_to_address
= integer_to_address
;
3540 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3542 if (gdbarch
->return_value_on_stack
== 0)
3543 internal_error (__FILE__
, __LINE__
,
3544 "gdbarch: gdbarch_return_value_on_stack invalid");
3545 if (gdbarch_debug
>= 2)
3546 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3547 return gdbarch
->return_value_on_stack (type
);
3551 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3552 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3554 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3558 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3560 if (gdbarch
->extract_return_value
== 0)
3561 internal_error (__FILE__
, __LINE__
,
3562 "gdbarch: gdbarch_extract_return_value invalid");
3563 if (gdbarch_debug
>= 2)
3564 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3565 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3569 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3570 gdbarch_extract_return_value_ftype extract_return_value
)
3572 gdbarch
->extract_return_value
= extract_return_value
;
3576 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3578 if (gdbarch
->push_arguments
== 0)
3579 internal_error (__FILE__
, __LINE__
,
3580 "gdbarch: gdbarch_push_arguments invalid");
3581 if (gdbarch_debug
>= 2)
3582 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3583 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3587 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3588 gdbarch_push_arguments_ftype push_arguments
)
3590 gdbarch
->push_arguments
= push_arguments
;
3594 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3596 if (gdbarch
->push_dummy_frame
== 0)
3597 internal_error (__FILE__
, __LINE__
,
3598 "gdbarch: gdbarch_push_dummy_frame invalid");
3599 if (gdbarch_debug
>= 2)
3600 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3601 gdbarch
->push_dummy_frame ();
3605 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3606 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3608 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3612 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3614 return gdbarch
->push_return_address
!= 0;
3618 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3620 if (gdbarch
->push_return_address
== 0)
3621 internal_error (__FILE__
, __LINE__
,
3622 "gdbarch: gdbarch_push_return_address invalid");
3623 if (gdbarch_debug
>= 2)
3624 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3625 return gdbarch
->push_return_address (pc
, sp
);
3629 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3630 gdbarch_push_return_address_ftype push_return_address
)
3632 gdbarch
->push_return_address
= push_return_address
;
3636 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3638 if (gdbarch
->pop_frame
== 0)
3639 internal_error (__FILE__
, __LINE__
,
3640 "gdbarch: gdbarch_pop_frame invalid");
3641 if (gdbarch_debug
>= 2)
3642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3643 gdbarch
->pop_frame ();
3647 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3648 gdbarch_pop_frame_ftype pop_frame
)
3650 gdbarch
->pop_frame
= pop_frame
;
3654 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3656 if (gdbarch
->store_struct_return
== 0)
3657 internal_error (__FILE__
, __LINE__
,
3658 "gdbarch: gdbarch_store_struct_return invalid");
3659 if (gdbarch_debug
>= 2)
3660 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3661 gdbarch
->store_struct_return (addr
, sp
);
3665 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3666 gdbarch_store_struct_return_ftype store_struct_return
)
3668 gdbarch
->store_struct_return
= store_struct_return
;
3672 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3674 if (gdbarch
->store_return_value
== 0)
3675 internal_error (__FILE__
, __LINE__
,
3676 "gdbarch: gdbarch_store_return_value invalid");
3677 if (gdbarch_debug
>= 2)
3678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3679 gdbarch
->store_return_value (type
, valbuf
);
3683 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3684 gdbarch_store_return_value_ftype store_return_value
)
3686 gdbarch
->store_return_value
= store_return_value
;
3690 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3692 return gdbarch
->extract_struct_value_address
!= 0;
3696 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3698 if (gdbarch
->extract_struct_value_address
== 0)
3699 internal_error (__FILE__
, __LINE__
,
3700 "gdbarch: gdbarch_extract_struct_value_address invalid");
3701 if (gdbarch_debug
>= 2)
3702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3703 return gdbarch
->extract_struct_value_address (regbuf
);
3707 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3708 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3710 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3714 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3716 if (gdbarch
->use_struct_convention
== 0)
3717 internal_error (__FILE__
, __LINE__
,
3718 "gdbarch: gdbarch_use_struct_convention invalid");
3719 if (gdbarch_debug
>= 2)
3720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3721 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3725 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3726 gdbarch_use_struct_convention_ftype use_struct_convention
)
3728 gdbarch
->use_struct_convention
= use_struct_convention
;
3732 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3734 if (gdbarch
->frame_init_saved_regs
== 0)
3735 internal_error (__FILE__
, __LINE__
,
3736 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3737 if (gdbarch_debug
>= 2)
3738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3739 gdbarch
->frame_init_saved_regs (frame
);
3743 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3744 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3746 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3750 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3752 return gdbarch
->init_extra_frame_info
!= 0;
3756 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3758 if (gdbarch
->init_extra_frame_info
== 0)
3759 internal_error (__FILE__
, __LINE__
,
3760 "gdbarch: gdbarch_init_extra_frame_info invalid");
3761 if (gdbarch_debug
>= 2)
3762 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3763 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3767 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3768 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3770 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3774 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3776 if (gdbarch
->skip_prologue
== 0)
3777 internal_error (__FILE__
, __LINE__
,
3778 "gdbarch: gdbarch_skip_prologue invalid");
3779 if (gdbarch_debug
>= 2)
3780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3781 return gdbarch
->skip_prologue (ip
);
3785 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3786 gdbarch_skip_prologue_ftype skip_prologue
)
3788 gdbarch
->skip_prologue
= skip_prologue
;
3792 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3794 if (gdbarch
->prologue_frameless_p
== 0)
3795 internal_error (__FILE__
, __LINE__
,
3796 "gdbarch: gdbarch_prologue_frameless_p invalid");
3797 if (gdbarch_debug
>= 2)
3798 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3799 return gdbarch
->prologue_frameless_p (ip
);
3803 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3804 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3806 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3810 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3812 if (gdbarch
->inner_than
== 0)
3813 internal_error (__FILE__
, __LINE__
,
3814 "gdbarch: gdbarch_inner_than invalid");
3815 if (gdbarch_debug
>= 2)
3816 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3817 return gdbarch
->inner_than (lhs
, rhs
);
3821 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3822 gdbarch_inner_than_ftype inner_than
)
3824 gdbarch
->inner_than
= inner_than
;
3828 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3830 if (gdbarch
->breakpoint_from_pc
== 0)
3831 internal_error (__FILE__
, __LINE__
,
3832 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3833 if (gdbarch_debug
>= 2)
3834 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3835 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3839 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3840 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3842 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3846 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3848 if (gdbarch
->memory_insert_breakpoint
== 0)
3849 internal_error (__FILE__
, __LINE__
,
3850 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3851 if (gdbarch_debug
>= 2)
3852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3853 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3857 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3858 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3860 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3864 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3866 if (gdbarch
->memory_remove_breakpoint
== 0)
3867 internal_error (__FILE__
, __LINE__
,
3868 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3869 if (gdbarch_debug
>= 2)
3870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3871 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3875 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3876 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3878 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3882 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3884 if (gdbarch
->decr_pc_after_break
== -1)
3885 internal_error (__FILE__
, __LINE__
,
3886 "gdbarch: gdbarch_decr_pc_after_break invalid");
3887 if (gdbarch_debug
>= 2)
3888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3889 return gdbarch
->decr_pc_after_break
;
3893 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3894 CORE_ADDR decr_pc_after_break
)
3896 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3900 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3902 if (gdbarch
->prepare_to_proceed
== 0)
3903 internal_error (__FILE__
, __LINE__
,
3904 "gdbarch: gdbarch_prepare_to_proceed invalid");
3905 if (gdbarch_debug
>= 2)
3906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3907 return gdbarch
->prepare_to_proceed (select_it
);
3911 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3912 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3914 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3918 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3920 if (gdbarch
->function_start_offset
== -1)
3921 internal_error (__FILE__
, __LINE__
,
3922 "gdbarch: gdbarch_function_start_offset invalid");
3923 if (gdbarch_debug
>= 2)
3924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3925 return gdbarch
->function_start_offset
;
3929 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3930 CORE_ADDR function_start_offset
)
3932 gdbarch
->function_start_offset
= function_start_offset
;
3936 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3938 if (gdbarch
->remote_translate_xfer_address
== 0)
3939 internal_error (__FILE__
, __LINE__
,
3940 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3941 if (gdbarch_debug
>= 2)
3942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3943 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3947 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3948 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3950 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3954 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3956 if (gdbarch
->frame_args_skip
== -1)
3957 internal_error (__FILE__
, __LINE__
,
3958 "gdbarch: gdbarch_frame_args_skip invalid");
3959 if (gdbarch_debug
>= 2)
3960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3961 return gdbarch
->frame_args_skip
;
3965 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3966 CORE_ADDR frame_args_skip
)
3968 gdbarch
->frame_args_skip
= frame_args_skip
;
3972 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3974 if (gdbarch
->frameless_function_invocation
== 0)
3975 internal_error (__FILE__
, __LINE__
,
3976 "gdbarch: gdbarch_frameless_function_invocation invalid");
3977 if (gdbarch_debug
>= 2)
3978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3979 return gdbarch
->frameless_function_invocation (fi
);
3983 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3984 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3986 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3990 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3992 if (gdbarch
->frame_chain
== 0)
3993 internal_error (__FILE__
, __LINE__
,
3994 "gdbarch: gdbarch_frame_chain invalid");
3995 if (gdbarch_debug
>= 2)
3996 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3997 return gdbarch
->frame_chain (frame
);
4001 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4002 gdbarch_frame_chain_ftype frame_chain
)
4004 gdbarch
->frame_chain
= frame_chain
;
4008 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4010 if (gdbarch
->frame_chain_valid
== 0)
4011 internal_error (__FILE__
, __LINE__
,
4012 "gdbarch: gdbarch_frame_chain_valid invalid");
4013 if (gdbarch_debug
>= 2)
4014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4015 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4019 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4020 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4022 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4026 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4028 if (gdbarch
->frame_saved_pc
== 0)
4029 internal_error (__FILE__
, __LINE__
,
4030 "gdbarch: gdbarch_frame_saved_pc invalid");
4031 if (gdbarch_debug
>= 2)
4032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4033 return gdbarch
->frame_saved_pc (fi
);
4037 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4038 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4040 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4044 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4046 if (gdbarch
->frame_args_address
== 0)
4047 internal_error (__FILE__
, __LINE__
,
4048 "gdbarch: gdbarch_frame_args_address invalid");
4049 if (gdbarch_debug
>= 2)
4050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4051 return gdbarch
->frame_args_address (fi
);
4055 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4056 gdbarch_frame_args_address_ftype frame_args_address
)
4058 gdbarch
->frame_args_address
= frame_args_address
;
4062 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4064 if (gdbarch
->frame_locals_address
== 0)
4065 internal_error (__FILE__
, __LINE__
,
4066 "gdbarch: gdbarch_frame_locals_address invalid");
4067 if (gdbarch_debug
>= 2)
4068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4069 return gdbarch
->frame_locals_address (fi
);
4073 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4074 gdbarch_frame_locals_address_ftype frame_locals_address
)
4076 gdbarch
->frame_locals_address
= frame_locals_address
;
4080 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4082 if (gdbarch
->saved_pc_after_call
== 0)
4083 internal_error (__FILE__
, __LINE__
,
4084 "gdbarch: gdbarch_saved_pc_after_call invalid");
4085 if (gdbarch_debug
>= 2)
4086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4087 return gdbarch
->saved_pc_after_call (frame
);
4091 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4092 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4094 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4098 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4100 if (gdbarch
->frame_num_args
== 0)
4101 internal_error (__FILE__
, __LINE__
,
4102 "gdbarch: gdbarch_frame_num_args invalid");
4103 if (gdbarch_debug
>= 2)
4104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4105 return gdbarch
->frame_num_args (frame
);
4109 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4110 gdbarch_frame_num_args_ftype frame_num_args
)
4112 gdbarch
->frame_num_args
= frame_num_args
;
4116 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4118 return gdbarch
->stack_align
!= 0;
4122 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4124 if (gdbarch
->stack_align
== 0)
4125 internal_error (__FILE__
, __LINE__
,
4126 "gdbarch: gdbarch_stack_align invalid");
4127 if (gdbarch_debug
>= 2)
4128 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4129 return gdbarch
->stack_align (sp
);
4133 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4134 gdbarch_stack_align_ftype stack_align
)
4136 gdbarch
->stack_align
= stack_align
;
4140 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4142 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4143 if (gdbarch_debug
>= 2)
4144 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4145 return gdbarch
->extra_stack_alignment_needed
;
4149 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4150 int extra_stack_alignment_needed
)
4152 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4156 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4158 return gdbarch
->reg_struct_has_addr
!= 0;
4162 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4164 if (gdbarch
->reg_struct_has_addr
== 0)
4165 internal_error (__FILE__
, __LINE__
,
4166 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4167 if (gdbarch_debug
>= 2)
4168 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4169 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4173 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4174 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4176 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4180 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4182 return gdbarch
->save_dummy_frame_tos
!= 0;
4186 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4188 if (gdbarch
->save_dummy_frame_tos
== 0)
4189 internal_error (__FILE__
, __LINE__
,
4190 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4191 if (gdbarch_debug
>= 2)
4192 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4193 gdbarch
->save_dummy_frame_tos (sp
);
4197 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4198 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4200 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4204 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4206 if (gdbarch_debug
>= 2)
4207 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4208 return gdbarch
->parm_boundary
;
4212 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4215 gdbarch
->parm_boundary
= parm_boundary
;
4218 const struct floatformat
*
4219 gdbarch_float_format (struct gdbarch
*gdbarch
)
4221 if (gdbarch_debug
>= 2)
4222 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4223 return gdbarch
->float_format
;
4227 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4228 const struct floatformat
* float_format
)
4230 gdbarch
->float_format
= float_format
;
4233 const struct floatformat
*
4234 gdbarch_double_format (struct gdbarch
*gdbarch
)
4236 if (gdbarch_debug
>= 2)
4237 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4238 return gdbarch
->double_format
;
4242 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4243 const struct floatformat
* double_format
)
4245 gdbarch
->double_format
= double_format
;
4248 const struct floatformat
*
4249 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4251 if (gdbarch_debug
>= 2)
4252 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4253 return gdbarch
->long_double_format
;
4257 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4258 const struct floatformat
* long_double_format
)
4260 gdbarch
->long_double_format
= long_double_format
;
4264 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4266 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4267 internal_error (__FILE__
, __LINE__
,
4268 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4269 if (gdbarch_debug
>= 2)
4270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4271 return gdbarch
->convert_from_func_ptr_addr (addr
);
4275 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4276 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4278 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4282 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4284 if (gdbarch
->addr_bits_remove
== 0)
4285 internal_error (__FILE__
, __LINE__
,
4286 "gdbarch: gdbarch_addr_bits_remove invalid");
4287 if (gdbarch_debug
>= 2)
4288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4289 return gdbarch
->addr_bits_remove (addr
);
4293 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4294 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4296 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4300 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4302 if (gdbarch
->smash_text_address
== 0)
4303 internal_error (__FILE__
, __LINE__
,
4304 "gdbarch: gdbarch_smash_text_address invalid");
4305 if (gdbarch_debug
>= 2)
4306 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4307 return gdbarch
->smash_text_address (addr
);
4311 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4312 gdbarch_smash_text_address_ftype smash_text_address
)
4314 gdbarch
->smash_text_address
= smash_text_address
;
4318 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4320 return gdbarch
->software_single_step
!= 0;
4324 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4326 if (gdbarch
->software_single_step
== 0)
4327 internal_error (__FILE__
, __LINE__
,
4328 "gdbarch: gdbarch_software_single_step invalid");
4329 if (gdbarch_debug
>= 2)
4330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4331 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4335 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4336 gdbarch_software_single_step_ftype software_single_step
)
4338 gdbarch
->software_single_step
= software_single_step
;
4342 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4344 if (gdbarch
->print_insn
== 0)
4345 internal_error (__FILE__
, __LINE__
,
4346 "gdbarch: gdbarch_print_insn invalid");
4347 if (gdbarch_debug
>= 2)
4348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4349 return gdbarch
->print_insn (vma
, info
);
4353 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4354 gdbarch_print_insn_ftype print_insn
)
4356 gdbarch
->print_insn
= print_insn
;
4360 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4362 if (gdbarch
->skip_trampoline_code
== 0)
4363 internal_error (__FILE__
, __LINE__
,
4364 "gdbarch: gdbarch_skip_trampoline_code invalid");
4365 if (gdbarch_debug
>= 2)
4366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4367 return gdbarch
->skip_trampoline_code (pc
);
4371 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4372 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4374 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4378 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4380 if (gdbarch
->in_solib_call_trampoline
== 0)
4381 internal_error (__FILE__
, __LINE__
,
4382 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4383 if (gdbarch_debug
>= 2)
4384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4385 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4389 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4390 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4392 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4396 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4398 if (gdbarch
->in_function_epilogue_p
== 0)
4399 internal_error (__FILE__
, __LINE__
,
4400 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4401 if (gdbarch_debug
>= 2)
4402 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4403 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4407 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4408 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4410 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4414 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4416 if (gdbarch
->construct_inferior_arguments
== 0)
4417 internal_error (__FILE__
, __LINE__
,
4418 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4419 if (gdbarch_debug
>= 2)
4420 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4421 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4425 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4426 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4428 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4432 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4434 return gdbarch
->dwarf2_build_frame_info
!= 0;
4438 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4440 if (gdbarch
->dwarf2_build_frame_info
== 0)
4441 internal_error (__FILE__
, __LINE__
,
4442 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4443 if (gdbarch_debug
>= 2)
4444 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4445 gdbarch
->dwarf2_build_frame_info (objfile
);
4449 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4450 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4452 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4456 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4458 if (gdbarch
->elf_make_msymbol_special
== 0)
4459 internal_error (__FILE__
, __LINE__
,
4460 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4461 if (gdbarch_debug
>= 2)
4462 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4463 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4467 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4468 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4470 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4474 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4476 if (gdbarch
->coff_make_msymbol_special
== 0)
4477 internal_error (__FILE__
, __LINE__
,
4478 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4479 if (gdbarch_debug
>= 2)
4480 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4481 gdbarch
->coff_make_msymbol_special (val
, msym
);
4485 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4486 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4488 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4492 /* Keep a registry of per-architecture data-pointers required by GDB
4498 gdbarch_data_init_ftype
*init
;
4499 gdbarch_data_free_ftype
*free
;
4502 struct gdbarch_data_registration
4504 struct gdbarch_data
*data
;
4505 struct gdbarch_data_registration
*next
;
4508 struct gdbarch_data_registry
4511 struct gdbarch_data_registration
*registrations
;
4514 struct gdbarch_data_registry gdbarch_data_registry
=
4519 struct gdbarch_data
*
4520 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4521 gdbarch_data_free_ftype
*free
)
4523 struct gdbarch_data_registration
**curr
;
4524 for (curr
= &gdbarch_data_registry
.registrations
;
4526 curr
= &(*curr
)->next
);
4527 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4528 (*curr
)->next
= NULL
;
4529 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4530 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4531 (*curr
)->data
->init
= init
;
4532 (*curr
)->data
->free
= free
;
4533 return (*curr
)->data
;
4537 /* Walk through all the registered users initializing each in turn. */
4540 init_gdbarch_data (struct gdbarch
*gdbarch
)
4542 struct gdbarch_data_registration
*rego
;
4543 for (rego
= gdbarch_data_registry
.registrations
;
4547 struct gdbarch_data
*data
= rego
->data
;
4548 gdb_assert (data
->index
< gdbarch
->nr_data
);
4549 if (data
->init
!= NULL
)
4551 void *pointer
= data
->init (gdbarch
);
4552 set_gdbarch_data (gdbarch
, data
, pointer
);
4557 /* Create/delete the gdbarch data vector. */
4560 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4562 gdb_assert (gdbarch
->data
== NULL
);
4563 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4564 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4568 free_gdbarch_data (struct gdbarch
*gdbarch
)
4570 struct gdbarch_data_registration
*rego
;
4571 gdb_assert (gdbarch
->data
!= NULL
);
4572 for (rego
= gdbarch_data_registry
.registrations
;
4576 struct gdbarch_data
*data
= rego
->data
;
4577 gdb_assert (data
->index
< gdbarch
->nr_data
);
4578 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4580 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4581 gdbarch
->data
[data
->index
] = NULL
;
4584 xfree (gdbarch
->data
);
4585 gdbarch
->data
= NULL
;
4589 /* Initialize the current value of thee specified per-architecture
4593 set_gdbarch_data (struct gdbarch
*gdbarch
,
4594 struct gdbarch_data
*data
,
4597 gdb_assert (data
->index
< gdbarch
->nr_data
);
4598 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4599 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4600 gdbarch
->data
[data
->index
] = pointer
;
4603 /* Return the current value of the specified per-architecture
4607 gdbarch_data (struct gdbarch_data
*data
)
4609 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4610 return current_gdbarch
->data
[data
->index
];
4615 /* Keep a registry of swapped data required by GDB modules. */
4620 struct gdbarch_swap_registration
*source
;
4621 struct gdbarch_swap
*next
;
4624 struct gdbarch_swap_registration
4627 unsigned long sizeof_data
;
4628 gdbarch_swap_ftype
*init
;
4629 struct gdbarch_swap_registration
*next
;
4632 struct gdbarch_swap_registry
4635 struct gdbarch_swap_registration
*registrations
;
4638 struct gdbarch_swap_registry gdbarch_swap_registry
=
4644 register_gdbarch_swap (void *data
,
4645 unsigned long sizeof_data
,
4646 gdbarch_swap_ftype
*init
)
4648 struct gdbarch_swap_registration
**rego
;
4649 for (rego
= &gdbarch_swap_registry
.registrations
;
4651 rego
= &(*rego
)->next
);
4652 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4653 (*rego
)->next
= NULL
;
4654 (*rego
)->init
= init
;
4655 (*rego
)->data
= data
;
4656 (*rego
)->sizeof_data
= sizeof_data
;
4661 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4663 struct gdbarch_swap_registration
*rego
;
4664 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4665 for (rego
= gdbarch_swap_registry
.registrations
;
4669 if (rego
->data
!= NULL
)
4671 (*curr
) = XMALLOC (struct gdbarch_swap
);
4672 (*curr
)->source
= rego
;
4673 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4674 (*curr
)->next
= NULL
;
4675 memset (rego
->data
, 0, rego
->sizeof_data
);
4676 curr
= &(*curr
)->next
;
4678 if (rego
->init
!= NULL
)
4684 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4686 struct gdbarch_swap
*curr
;
4687 for (curr
= gdbarch
->swap
;
4690 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4694 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4696 struct gdbarch_swap
*curr
;
4697 for (curr
= gdbarch
->swap
;
4700 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4704 /* Keep a registry of the architectures known by GDB. */
4706 struct gdbarch_registration
4708 enum bfd_architecture bfd_architecture
;
4709 gdbarch_init_ftype
*init
;
4710 gdbarch_dump_tdep_ftype
*dump_tdep
;
4711 struct gdbarch_list
*arches
;
4712 struct gdbarch_registration
*next
;
4715 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4718 append_name (const char ***buf
, int *nr
, const char *name
)
4720 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4726 gdbarch_printable_names (void)
4730 /* Accumulate a list of names based on the registed list of
4732 enum bfd_architecture a
;
4734 const char **arches
= NULL
;
4735 struct gdbarch_registration
*rego
;
4736 for (rego
= gdbarch_registry
;
4740 const struct bfd_arch_info
*ap
;
4741 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4743 internal_error (__FILE__
, __LINE__
,
4744 "gdbarch_architecture_names: multi-arch unknown");
4747 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4752 append_name (&arches
, &nr_arches
, NULL
);
4756 /* Just return all the architectures that BFD knows. Assume that
4757 the legacy architecture framework supports them. */
4758 return bfd_arch_list ();
4763 gdbarch_register (enum bfd_architecture bfd_architecture
,
4764 gdbarch_init_ftype
*init
,
4765 gdbarch_dump_tdep_ftype
*dump_tdep
)
4767 struct gdbarch_registration
**curr
;
4768 const struct bfd_arch_info
*bfd_arch_info
;
4769 /* Check that BFD recognizes this architecture */
4770 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4771 if (bfd_arch_info
== NULL
)
4773 internal_error (__FILE__
, __LINE__
,
4774 "gdbarch: Attempt to register unknown architecture (%d)",
4777 /* Check that we haven't seen this architecture before */
4778 for (curr
= &gdbarch_registry
;
4780 curr
= &(*curr
)->next
)
4782 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4783 internal_error (__FILE__
, __LINE__
,
4784 "gdbarch: Duplicate registraration of architecture (%s)",
4785 bfd_arch_info
->printable_name
);
4789 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4790 bfd_arch_info
->printable_name
,
4793 (*curr
) = XMALLOC (struct gdbarch_registration
);
4794 (*curr
)->bfd_architecture
= bfd_architecture
;
4795 (*curr
)->init
= init
;
4796 (*curr
)->dump_tdep
= dump_tdep
;
4797 (*curr
)->arches
= NULL
;
4798 (*curr
)->next
= NULL
;
4799 /* When non- multi-arch, install whatever target dump routine we've
4800 been provided - hopefully that routine has been written correctly
4801 and works regardless of multi-arch. */
4802 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4803 && startup_gdbarch
.dump_tdep
== NULL
)
4804 startup_gdbarch
.dump_tdep
= dump_tdep
;
4808 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4809 gdbarch_init_ftype
*init
)
4811 gdbarch_register (bfd_architecture
, init
, NULL
);
4815 /* Look for an architecture using gdbarch_info. Base search on only
4816 BFD_ARCH_INFO and BYTE_ORDER. */
4818 struct gdbarch_list
*
4819 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4820 const struct gdbarch_info
*info
)
4822 for (; arches
!= NULL
; arches
= arches
->next
)
4824 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4826 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4834 /* Update the current architecture. Return ZERO if the update request
4838 gdbarch_update_p (struct gdbarch_info info
)
4840 struct gdbarch
*new_gdbarch
;
4841 struct gdbarch_list
**list
;
4842 struct gdbarch_registration
*rego
;
4844 /* Fill in missing parts of the INFO struct using a number of
4845 sources: ``set ...''; INFOabfd supplied; existing target. */
4847 /* ``(gdb) set architecture ...'' */
4848 if (info
.bfd_arch_info
== NULL
4849 && !TARGET_ARCHITECTURE_AUTO
)
4850 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4851 if (info
.bfd_arch_info
== NULL
4852 && info
.abfd
!= NULL
4853 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4854 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4855 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4856 if (info
.bfd_arch_info
== NULL
)
4857 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4859 /* ``(gdb) set byte-order ...'' */
4860 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4861 && !TARGET_BYTE_ORDER_AUTO
)
4862 info
.byte_order
= TARGET_BYTE_ORDER
;
4863 /* From the INFO struct. */
4864 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4865 && info
.abfd
!= NULL
)
4866 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
4867 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
4868 : BFD_ENDIAN_UNKNOWN
);
4869 /* From the current target. */
4870 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
4871 info
.byte_order
= TARGET_BYTE_ORDER
;
4873 /* Must have found some sort of architecture. */
4874 gdb_assert (info
.bfd_arch_info
!= NULL
);
4878 fprintf_unfiltered (gdb_stdlog
,
4879 "gdbarch_update: info.bfd_arch_info %s\n",
4880 (info
.bfd_arch_info
!= NULL
4881 ? info
.bfd_arch_info
->printable_name
4883 fprintf_unfiltered (gdb_stdlog
,
4884 "gdbarch_update: info.byte_order %d (%s)\n",
4886 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4887 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4889 fprintf_unfiltered (gdb_stdlog
,
4890 "gdbarch_update: info.abfd 0x%lx\n",
4892 fprintf_unfiltered (gdb_stdlog
,
4893 "gdbarch_update: info.tdep_info 0x%lx\n",
4894 (long) info
.tdep_info
);
4897 /* Find the target that knows about this architecture. */
4898 for (rego
= gdbarch_registry
;
4901 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4910 /* Ask the target for a replacement architecture. */
4911 new_gdbarch
= rego
->init (info
, rego
->arches
);
4913 /* Did the target like it? No. Reject the change. */
4914 if (new_gdbarch
== NULL
)
4917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4921 /* Did the architecture change? No. Do nothing. */
4922 if (current_gdbarch
== new_gdbarch
)
4925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4927 new_gdbarch
->bfd_arch_info
->printable_name
);
4931 /* Swap all data belonging to the old target out */
4932 swapout_gdbarch_swap (current_gdbarch
);
4934 /* Is this a pre-existing architecture? Yes. Swap it in. */
4935 for (list
= ®o
->arches
;
4937 list
= &(*list
)->next
)
4939 if ((*list
)->gdbarch
== new_gdbarch
)
4942 fprintf_unfiltered (gdb_stdlog
,
4943 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4945 new_gdbarch
->bfd_arch_info
->printable_name
);
4946 current_gdbarch
= new_gdbarch
;
4947 swapin_gdbarch_swap (new_gdbarch
);
4948 architecture_changed_event ();
4953 /* Append this new architecture to this targets list. */
4954 (*list
) = XMALLOC (struct gdbarch_list
);
4955 (*list
)->next
= NULL
;
4956 (*list
)->gdbarch
= new_gdbarch
;
4958 /* Switch to this new architecture. Dump it out. */
4959 current_gdbarch
= new_gdbarch
;
4962 fprintf_unfiltered (gdb_stdlog
,
4963 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4965 new_gdbarch
->bfd_arch_info
->printable_name
);
4968 /* Check that the newly installed architecture is valid. Plug in
4969 any post init values. */
4970 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4971 verify_gdbarch (new_gdbarch
);
4973 /* Initialize the per-architecture memory (swap) areas.
4974 CURRENT_GDBARCH must be update before these modules are
4976 init_gdbarch_swap (new_gdbarch
);
4978 /* Initialize the per-architecture data-pointer of all parties that
4979 registered an interest in this architecture. CURRENT_GDBARCH
4980 must be updated before these modules are called. */
4981 init_gdbarch_data (new_gdbarch
);
4982 architecture_changed_event ();
4985 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4993 /* Pointer to the target-dependent disassembly function. */
4994 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4995 disassemble_info tm_print_insn_info
;
4998 extern void _initialize_gdbarch (void);
5001 _initialize_gdbarch (void)
5003 struct cmd_list_element
*c
;
5005 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5006 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5007 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5008 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5009 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5011 add_show_from_set (add_set_cmd ("arch",
5014 (char *)&gdbarch_debug
,
5015 "Set architecture debugging.\n\
5016 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5018 c
= add_set_cmd ("archdebug",
5021 (char *)&gdbarch_debug
,
5022 "Set architecture debugging.\n\
5023 When non-zero, architecture debugging is enabled.", &setlist
);
5025 deprecate_cmd (c
, "set debug arch");
5026 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");