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_data (&startup_gdbarch
);
417 /* Create a new ``struct gdbarch'' based on information provided by
418 ``struct gdbarch_info''. */
421 gdbarch_alloc (const struct gdbarch_info
*info
,
422 struct gdbarch_tdep
*tdep
)
424 /* NOTE: The new architecture variable is named ``current_gdbarch''
425 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
426 the current local architecture and not the previous global
427 architecture. This ensures that the new architectures initial
428 values are not influenced by the previous architecture. Once
429 everything is parameterised with gdbarch, this will go away. */
430 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
431 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
433 alloc_gdbarch_data (current_gdbarch
);
435 current_gdbarch
->tdep
= tdep
;
437 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
438 current_gdbarch
->byte_order
= info
->byte_order
;
440 /* Force the explicit initialization of these. */
441 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
442 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
443 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
444 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
445 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
446 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
447 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
448 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
449 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
450 current_gdbarch
->char_signed
= -1;
451 current_gdbarch
->read_pc
= generic_target_read_pc
;
452 current_gdbarch
->write_pc
= generic_target_write_pc
;
453 current_gdbarch
->read_fp
= generic_target_read_fp
;
454 current_gdbarch
->read_sp
= generic_target_read_sp
;
455 current_gdbarch
->write_sp
= generic_target_write_sp
;
456 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
457 current_gdbarch
->num_regs
= -1;
458 current_gdbarch
->sp_regnum
= -1;
459 current_gdbarch
->fp_regnum
= -1;
460 current_gdbarch
->pc_regnum
= -1;
461 current_gdbarch
->fp0_regnum
= -1;
462 current_gdbarch
->npc_regnum
= -1;
463 current_gdbarch
->nnpc_regnum
= -1;
464 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
465 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
466 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
467 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
468 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
469 current_gdbarch
->register_name
= legacy_register_name
;
470 current_gdbarch
->register_size
= -1;
471 current_gdbarch
->register_bytes
= -1;
472 current_gdbarch
->max_register_raw_size
= -1;
473 current_gdbarch
->max_register_virtual_size
= -1;
474 current_gdbarch
->do_registers_info
= do_registers_info
;
475 current_gdbarch
->print_float_info
= default_print_float_info
;
476 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
477 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
478 current_gdbarch
->cannot_store_register
= cannot_register_not
;
479 current_gdbarch
->use_generic_dummy_frames
= -1;
480 current_gdbarch
->call_dummy_start_offset
= -1;
481 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
482 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
483 current_gdbarch
->call_dummy_length
= -1;
484 current_gdbarch
->call_dummy_p
= -1;
485 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
486 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
487 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
488 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
489 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
490 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
491 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
492 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
493 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
494 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
495 current_gdbarch
->push_arguments
= default_push_arguments
;
496 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
497 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
498 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
499 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
500 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
501 current_gdbarch
->decr_pc_after_break
= -1;
502 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
503 current_gdbarch
->function_start_offset
= -1;
504 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
505 current_gdbarch
->frame_args_skip
= -1;
506 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
507 current_gdbarch
->frame_chain_valid
= func_frame_chain_valid
;
508 current_gdbarch
->extra_stack_alignment_needed
= 1;
509 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
510 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
511 current_gdbarch
->smash_text_address
= core_addr_identity
;
512 current_gdbarch
->print_insn
= legacy_print_insn
;
513 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
514 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
515 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
516 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
517 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
518 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
519 /* gdbarch_alloc() */
521 return current_gdbarch
;
525 /* Free a gdbarch struct. This should never happen in normal
526 operation --- once you've created a gdbarch, you keep it around.
527 However, if an architecture's init function encounters an error
528 building the structure, it may need to clean up a partially
529 constructed gdbarch. */
532 gdbarch_free (struct gdbarch
*arch
)
534 gdb_assert (arch
!= NULL
);
535 free_gdbarch_data (arch
);
540 /* Ensure that all values in a GDBARCH are reasonable. */
543 verify_gdbarch (struct gdbarch
*gdbarch
)
546 struct cleanup
*cleanups
;
549 /* Only perform sanity checks on a multi-arch target. */
552 log
= mem_fileopen ();
553 cleanups
= make_cleanup_ui_file_delete (log
);
555 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
556 fprintf_unfiltered (log
, "\n\tbyte-order");
557 if (gdbarch
->bfd_arch_info
== NULL
)
558 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
559 /* Check those that need to be defined for the given multi-arch level. */
560 /* Skip verify of short_bit, invalid_p == 0 */
561 /* Skip verify of int_bit, invalid_p == 0 */
562 /* Skip verify of long_bit, invalid_p == 0 */
563 /* Skip verify of long_long_bit, invalid_p == 0 */
564 /* Skip verify of float_bit, invalid_p == 0 */
565 /* Skip verify of double_bit, invalid_p == 0 */
566 /* Skip verify of long_double_bit, invalid_p == 0 */
567 /* Skip verify of ptr_bit, invalid_p == 0 */
568 if (gdbarch
->addr_bit
== 0)
569 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
570 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
571 if (gdbarch
->char_signed
== -1)
572 gdbarch
->char_signed
= 1;
573 /* Skip verify of read_pc, invalid_p == 0 */
574 /* Skip verify of write_pc, invalid_p == 0 */
575 /* Skip verify of read_fp, invalid_p == 0 */
576 /* Skip verify of read_sp, invalid_p == 0 */
577 /* Skip verify of write_sp, invalid_p == 0 */
578 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
579 /* Skip verify of register_read, has predicate */
580 /* Skip verify of register_write, has predicate */
581 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
582 && (gdbarch
->num_regs
== -1))
583 fprintf_unfiltered (log
, "\n\tnum_regs");
584 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
585 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
586 && (gdbarch
->sp_regnum
== -1))
587 fprintf_unfiltered (log
, "\n\tsp_regnum");
588 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
589 && (gdbarch
->fp_regnum
== -1))
590 fprintf_unfiltered (log
, "\n\tfp_regnum");
591 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
592 && (gdbarch
->pc_regnum
== -1))
593 fprintf_unfiltered (log
, "\n\tpc_regnum");
594 /* Skip verify of fp0_regnum, invalid_p == 0 */
595 /* Skip verify of npc_regnum, invalid_p == 0 */
596 /* Skip verify of nnpc_regnum, invalid_p == 0 */
597 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
598 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
599 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
600 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
601 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
602 /* Skip verify of register_name, invalid_p == 0 */
603 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
604 && (gdbarch
->register_size
== -1))
605 fprintf_unfiltered (log
, "\n\tregister_size");
606 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
607 && (gdbarch
->register_bytes
== -1))
608 fprintf_unfiltered (log
, "\n\tregister_bytes");
609 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
610 && (gdbarch
->register_byte
== 0))
611 fprintf_unfiltered (log
, "\n\tregister_byte");
612 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
613 && (gdbarch
->register_raw_size
== 0))
614 fprintf_unfiltered (log
, "\n\tregister_raw_size");
615 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
616 && (gdbarch
->max_register_raw_size
== -1))
617 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
618 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
619 && (gdbarch
->register_virtual_size
== 0))
620 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
621 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
622 && (gdbarch
->max_register_virtual_size
== -1))
623 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
624 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
625 && (gdbarch
->register_virtual_type
== 0))
626 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
627 /* Skip verify of do_registers_info, invalid_p == 0 */
628 /* Skip verify of print_float_info, invalid_p == 0 */
629 /* Skip verify of register_sim_regno, invalid_p == 0 */
630 /* Skip verify of register_bytes_ok, has predicate */
631 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
632 /* Skip verify of cannot_store_register, invalid_p == 0 */
633 /* Skip verify of get_longjmp_target, has predicate */
634 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
635 && (gdbarch
->use_generic_dummy_frames
== -1))
636 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
637 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
638 && (gdbarch
->call_dummy_location
== 0))
639 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
640 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
641 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
642 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
643 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
644 && (gdbarch
->call_dummy_start_offset
== -1))
645 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
646 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
647 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
648 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
649 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
650 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
651 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
652 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
653 && (gdbarch
->call_dummy_length
== -1))
654 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
655 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
656 && (gdbarch
->pc_in_call_dummy
== 0))
657 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
658 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
659 && (gdbarch
->call_dummy_p
== -1))
660 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
661 /* Skip verify of call_dummy_words, invalid_p == 0 */
662 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
663 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
664 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
665 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
666 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
667 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
668 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
669 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
670 && (gdbarch
->fix_call_dummy
== 0))
671 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
672 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
673 /* Skip verify of init_frame_pc, invalid_p == 0 */
674 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
675 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
676 && (gdbarch
->get_saved_register
== 0))
677 fprintf_unfiltered (log
, "\n\tget_saved_register");
678 /* Skip verify of register_convertible, invalid_p == 0 */
679 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
680 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
681 /* Skip verify of fetch_pseudo_register, has predicate */
682 /* Skip verify of store_pseudo_register, has predicate */
683 /* Skip verify of pointer_to_address, invalid_p == 0 */
684 /* Skip verify of address_to_pointer, invalid_p == 0 */
685 /* Skip verify of integer_to_address, has predicate */
686 /* Skip verify of return_value_on_stack, invalid_p == 0 */
687 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
688 && (gdbarch
->extract_return_value
== 0))
689 fprintf_unfiltered (log
, "\n\textract_return_value");
690 /* Skip verify of push_arguments, invalid_p == 0 */
691 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
692 && (gdbarch
->push_dummy_frame
== 0))
693 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
694 /* Skip verify of push_return_address, has predicate */
695 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
696 && (gdbarch
->pop_frame
== 0))
697 fprintf_unfiltered (log
, "\n\tpop_frame");
698 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
699 && (gdbarch
->store_struct_return
== 0))
700 fprintf_unfiltered (log
, "\n\tstore_struct_return");
701 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
702 && (gdbarch
->store_return_value
== 0))
703 fprintf_unfiltered (log
, "\n\tstore_return_value");
704 /* Skip verify of extract_struct_value_address, has predicate */
705 /* Skip verify of use_struct_convention, invalid_p == 0 */
706 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
707 && (gdbarch
->frame_init_saved_regs
== 0))
708 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
709 /* Skip verify of init_extra_frame_info, has predicate */
710 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
711 && (gdbarch
->skip_prologue
== 0))
712 fprintf_unfiltered (log
, "\n\tskip_prologue");
713 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
714 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
715 && (gdbarch
->inner_than
== 0))
716 fprintf_unfiltered (log
, "\n\tinner_than");
717 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
718 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
719 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
720 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
721 && (gdbarch
->decr_pc_after_break
== -1))
722 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
723 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
724 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
725 && (gdbarch
->function_start_offset
== -1))
726 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
727 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
728 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
729 && (gdbarch
->frame_args_skip
== -1))
730 fprintf_unfiltered (log
, "\n\tframe_args_skip");
731 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
733 && (gdbarch
->frame_chain
== 0))
734 fprintf_unfiltered (log
, "\n\tframe_chain");
735 /* Skip verify of frame_chain_valid, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
737 && (gdbarch
->frame_saved_pc
== 0))
738 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
739 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
740 && (gdbarch
->frame_args_address
== 0))
741 fprintf_unfiltered (log
, "\n\tframe_args_address");
742 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
743 && (gdbarch
->frame_locals_address
== 0))
744 fprintf_unfiltered (log
, "\n\tframe_locals_address");
745 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
746 && (gdbarch
->saved_pc_after_call
== 0))
747 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
748 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
749 && (gdbarch
->frame_num_args
== 0))
750 fprintf_unfiltered (log
, "\n\tframe_num_args");
751 /* Skip verify of stack_align, has predicate */
752 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
753 /* Skip verify of reg_struct_has_addr, has predicate */
754 /* Skip verify of save_dummy_frame_tos, has predicate */
755 if (gdbarch
->float_format
== 0)
756 gdbarch
->float_format
= default_float_format (gdbarch
);
757 if (gdbarch
->double_format
== 0)
758 gdbarch
->double_format
= default_double_format (gdbarch
);
759 if (gdbarch
->long_double_format
== 0)
760 gdbarch
->long_double_format
= default_double_format (gdbarch
);
761 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
762 /* Skip verify of addr_bits_remove, invalid_p == 0 */
763 /* Skip verify of smash_text_address, invalid_p == 0 */
764 /* Skip verify of software_single_step, has predicate */
765 /* Skip verify of print_insn, invalid_p == 0 */
766 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
767 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
768 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
769 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
770 /* Skip verify of dwarf2_build_frame_info, has predicate */
771 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
772 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
773 buf
= ui_file_xstrdup (log
, &dummy
);
774 make_cleanup (xfree
, buf
);
775 if (strlen (buf
) > 0)
776 internal_error (__FILE__
, __LINE__
,
777 "verify_gdbarch: the following are invalid ...%s",
779 do_cleanups (cleanups
);
783 /* Print out the details of the current architecture. */
785 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
786 just happens to match the global variable ``current_gdbarch''. That
787 way macros refering to that variable get the local and not the global
788 version - ulgh. Once everything is parameterised with gdbarch, this
792 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
794 fprintf_unfiltered (file
,
795 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
798 fprintf_unfiltered (file
,
799 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
800 (long) current_gdbarch
->in_function_epilogue_p
);
802 fprintf_unfiltered (file
,
803 "gdbarch_dump: register_read = 0x%08lx\n",
804 (long) current_gdbarch
->register_read
);
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: register_write = 0x%08lx\n",
808 (long) current_gdbarch
->register_write
);
809 #ifdef ADDRESS_TO_POINTER
811 /* Macro might contain `[{}]' when not multi-arch */
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: %s # %s\n",
814 "ADDRESS_TO_POINTER(type, buf, addr)",
815 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
820 (long) current_gdbarch
->address_to_pointer
821 /*ADDRESS_TO_POINTER ()*/);
823 #ifdef ADDR_BITS_REMOVE
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: %s # %s\n",
826 "ADDR_BITS_REMOVE(addr)",
827 XSTRING (ADDR_BITS_REMOVE (addr
)));
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
831 (long) current_gdbarch
->addr_bits_remove
832 /*ADDR_BITS_REMOVE ()*/);
834 #ifdef BELIEVE_PCC_PROMOTION
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
837 XSTRING (BELIEVE_PCC_PROMOTION
));
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
840 BELIEVE_PCC_PROMOTION
);
842 #ifdef BELIEVE_PCC_PROMOTION_TYPE
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
845 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
848 BELIEVE_PCC_PROMOTION_TYPE
);
850 #ifdef BREAKPOINT_FROM_PC
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: %s # %s\n",
853 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
854 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
858 (long) current_gdbarch
->breakpoint_from_pc
859 /*BREAKPOINT_FROM_PC ()*/);
861 #ifdef CALL_DUMMY_ADDRESS
862 fprintf_unfiltered (file
,
863 "gdbarch_dump: %s # %s\n",
864 "CALL_DUMMY_ADDRESS()",
865 XSTRING (CALL_DUMMY_ADDRESS ()));
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
869 (long) current_gdbarch
->call_dummy_address
870 /*CALL_DUMMY_ADDRESS ()*/);
872 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
873 fprintf_unfiltered (file
,
874 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
875 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
876 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
879 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
881 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
884 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
887 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
889 #ifdef CALL_DUMMY_LENGTH
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
892 XSTRING (CALL_DUMMY_LENGTH
));
893 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
898 #ifdef CALL_DUMMY_LOCATION
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
901 XSTRING (CALL_DUMMY_LOCATION
));
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
904 CALL_DUMMY_LOCATION
);
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: CALL_DUMMY_P # %s\n",
909 XSTRING (CALL_DUMMY_P
));
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: CALL_DUMMY_P = %d\n",
914 #ifdef CALL_DUMMY_STACK_ADJUST
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
917 XSTRING (CALL_DUMMY_STACK_ADJUST
));
918 if (CALL_DUMMY_STACK_ADJUST_P
)
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
921 (long) CALL_DUMMY_STACK_ADJUST
);
923 #ifdef CALL_DUMMY_STACK_ADJUST_P
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
926 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
929 (long) CALL_DUMMY_STACK_ADJUST_P
);
931 #ifdef CALL_DUMMY_START_OFFSET
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
934 XSTRING (CALL_DUMMY_START_OFFSET
));
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
937 (long) CALL_DUMMY_START_OFFSET
);
939 #ifdef CALL_DUMMY_WORDS
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
942 XSTRING (CALL_DUMMY_WORDS
));
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
945 (long) CALL_DUMMY_WORDS
);
947 #ifdef CANNOT_FETCH_REGISTER
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: %s # %s\n",
950 "CANNOT_FETCH_REGISTER(regnum)",
951 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
955 (long) current_gdbarch
->cannot_fetch_register
956 /*CANNOT_FETCH_REGISTER ()*/);
958 #ifdef CANNOT_STORE_REGISTER
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: %s # %s\n",
961 "CANNOT_STORE_REGISTER(regnum)",
962 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
964 fprintf_unfiltered (file
,
965 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
966 (long) current_gdbarch
->cannot_store_register
967 /*CANNOT_STORE_REGISTER ()*/);
969 #ifdef COERCE_FLOAT_TO_DOUBLE
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: %s # %s\n",
972 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
973 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
977 (long) current_gdbarch
->coerce_float_to_double
978 /*COERCE_FLOAT_TO_DOUBLE ()*/);
980 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
982 /* Macro might contain `[{}]' when not multi-arch */
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: %s # %s\n",
985 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
986 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
991 (long) current_gdbarch
->coff_make_msymbol_special
992 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
997 (long) current_gdbarch
->construct_inferior_arguments
);
998 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: %s # %s\n",
1001 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1002 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1006 (long) current_gdbarch
->convert_from_func_ptr_addr
1007 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1009 #ifdef DECR_PC_AFTER_BREAK
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1012 XSTRING (DECR_PC_AFTER_BREAK
));
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1015 (long) DECR_PC_AFTER_BREAK
);
1017 #ifdef DO_REGISTERS_INFO
1019 /* Macro might contain `[{}]' when not multi-arch */
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: %s # %s\n",
1022 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1023 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1028 (long) current_gdbarch
->do_registers_info
1029 /*DO_REGISTERS_INFO ()*/);
1031 #ifdef DWARF2_BUILD_FRAME_INFO
1033 /* Macro might contain `[{}]' when not multi-arch */
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: %s # %s\n",
1036 "DWARF2_BUILD_FRAME_INFO(objfile)",
1037 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1042 (long) current_gdbarch
->dwarf2_build_frame_info
1043 /*DWARF2_BUILD_FRAME_INFO ()*/);
1045 #ifdef DWARF2_REG_TO_REGNUM
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: %s # %s\n",
1048 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1049 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1053 (long) current_gdbarch
->dwarf2_reg_to_regnum
1054 /*DWARF2_REG_TO_REGNUM ()*/);
1056 #ifdef DWARF_REG_TO_REGNUM
1057 fprintf_unfiltered (file
,
1058 "gdbarch_dump: %s # %s\n",
1059 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1060 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1064 (long) current_gdbarch
->dwarf_reg_to_regnum
1065 /*DWARF_REG_TO_REGNUM ()*/);
1067 #ifdef ECOFF_REG_TO_REGNUM
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: %s # %s\n",
1070 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1071 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1075 (long) current_gdbarch
->ecoff_reg_to_regnum
1076 /*ECOFF_REG_TO_REGNUM ()*/);
1078 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1080 /* Macro might contain `[{}]' when not multi-arch */
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: %s # %s\n",
1083 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1084 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1089 (long) current_gdbarch
->elf_make_msymbol_special
1090 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1092 #ifdef EXTRACT_RETURN_VALUE
1094 /* Macro might contain `[{}]' when not multi-arch */
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: %s # %s\n",
1097 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1098 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1103 (long) current_gdbarch
->extract_return_value
1104 /*EXTRACT_RETURN_VALUE ()*/);
1106 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: %s # %s\n",
1109 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1110 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1114 (long) current_gdbarch
->extract_struct_value_address
1115 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1117 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1120 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1123 EXTRA_STACK_ALIGNMENT_NEEDED
);
1125 #ifdef FETCH_PSEUDO_REGISTER
1127 /* Macro might contain `[{}]' when not multi-arch */
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: %s # %s\n",
1130 "FETCH_PSEUDO_REGISTER(regnum)",
1131 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1136 (long) current_gdbarch
->fetch_pseudo_register
1137 /*FETCH_PSEUDO_REGISTER ()*/);
1139 #ifdef FIX_CALL_DUMMY
1141 /* Macro might contain `[{}]' when not multi-arch */
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: %s # %s\n",
1144 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1145 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1150 (long) current_gdbarch
->fix_call_dummy
1151 /*FIX_CALL_DUMMY ()*/);
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: FP0_REGNUM # %s\n",
1156 XSTRING (FP0_REGNUM
));
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: FP0_REGNUM = %d\n",
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: FP_REGNUM # %s\n",
1164 XSTRING (FP_REGNUM
));
1165 fprintf_unfiltered (file
,
1166 "gdbarch_dump: FP_REGNUM = %d\n",
1169 #ifdef FRAMELESS_FUNCTION_INVOCATION
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: %s # %s\n",
1172 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1173 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1177 (long) current_gdbarch
->frameless_function_invocation
1178 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1180 #ifdef FRAME_ARGS_ADDRESS
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: %s # %s\n",
1183 "FRAME_ARGS_ADDRESS(fi)",
1184 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1188 (long) current_gdbarch
->frame_args_address
1189 /*FRAME_ARGS_ADDRESS ()*/);
1191 #ifdef FRAME_ARGS_SKIP
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1194 XSTRING (FRAME_ARGS_SKIP
));
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1197 (long) FRAME_ARGS_SKIP
);
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: %s # %s\n",
1202 "FRAME_CHAIN(frame)",
1203 XSTRING (FRAME_CHAIN (frame
)));
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1207 (long) current_gdbarch
->frame_chain
1208 /*FRAME_CHAIN ()*/);
1210 #ifdef FRAME_CHAIN_VALID
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1213 "FRAME_CHAIN_VALID(chain, thisframe)",
1214 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1218 (long) current_gdbarch
->frame_chain_valid
1219 /*FRAME_CHAIN_VALID ()*/);
1221 #ifdef FRAME_INIT_SAVED_REGS
1223 /* Macro might contain `[{}]' when not multi-arch */
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: %s # %s\n",
1226 "FRAME_INIT_SAVED_REGS(frame)",
1227 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1232 (long) current_gdbarch
->frame_init_saved_regs
1233 /*FRAME_INIT_SAVED_REGS ()*/);
1235 #ifdef FRAME_LOCALS_ADDRESS
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: %s # %s\n",
1238 "FRAME_LOCALS_ADDRESS(fi)",
1239 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1243 (long) current_gdbarch
->frame_locals_address
1244 /*FRAME_LOCALS_ADDRESS ()*/);
1246 #ifdef FRAME_NUM_ARGS
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: %s # %s\n",
1249 "FRAME_NUM_ARGS(frame)",
1250 XSTRING (FRAME_NUM_ARGS (frame
)));
1252 fprintf_unfiltered (file
,
1253 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1254 (long) current_gdbarch
->frame_num_args
1255 /*FRAME_NUM_ARGS ()*/);
1257 #ifdef FRAME_SAVED_PC
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: %s # %s\n",
1260 "FRAME_SAVED_PC(fi)",
1261 XSTRING (FRAME_SAVED_PC (fi
)));
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1265 (long) current_gdbarch
->frame_saved_pc
1266 /*FRAME_SAVED_PC ()*/);
1268 #ifdef FUNCTION_START_OFFSET
1269 fprintf_unfiltered (file
,
1270 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1271 XSTRING (FUNCTION_START_OFFSET
));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1274 (long) FUNCTION_START_OFFSET
);
1276 #ifdef GET_LONGJMP_TARGET
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: %s # %s\n",
1279 "GET_LONGJMP_TARGET(pc)",
1280 XSTRING (GET_LONGJMP_TARGET (pc
)));
1282 fprintf_unfiltered (file
,
1283 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1284 (long) current_gdbarch
->get_longjmp_target
1285 /*GET_LONGJMP_TARGET ()*/);
1287 #ifdef GET_SAVED_REGISTER
1289 /* Macro might contain `[{}]' when not multi-arch */
1290 fprintf_unfiltered (file
,
1291 "gdbarch_dump: %s # %s\n",
1292 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1293 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1296 fprintf_unfiltered (file
,
1297 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1298 (long) current_gdbarch
->get_saved_register
1299 /*GET_SAVED_REGISTER ()*/);
1301 #ifdef INIT_EXTRA_FRAME_INFO
1303 /* Macro might contain `[{}]' when not multi-arch */
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: %s # %s\n",
1306 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1307 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1312 (long) current_gdbarch
->init_extra_frame_info
1313 /*INIT_EXTRA_FRAME_INFO ()*/);
1315 #ifdef INIT_FRAME_PC
1317 /* Macro might contain `[{}]' when not multi-arch */
1318 fprintf_unfiltered (file
,
1319 "gdbarch_dump: %s # %s\n",
1320 "INIT_FRAME_PC(fromleaf, prev)",
1321 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1326 (long) current_gdbarch
->init_frame_pc
1327 /*INIT_FRAME_PC ()*/);
1329 #ifdef INIT_FRAME_PC_FIRST
1331 /* Macro might contain `[{}]' when not multi-arch */
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: %s # %s\n",
1334 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1335 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1340 (long) current_gdbarch
->init_frame_pc_first
1341 /*INIT_FRAME_PC_FIRST ()*/);
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: %s # %s\n",
1346 "INNER_THAN(lhs, rhs)",
1347 XSTRING (INNER_THAN (lhs
, rhs
)));
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1351 (long) current_gdbarch
->inner_than
1354 #ifdef INTEGER_TO_ADDRESS
1355 fprintf_unfiltered (file
,
1356 "gdbarch_dump: %s # %s\n",
1357 "INTEGER_TO_ADDRESS(type, buf)",
1358 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1362 (long) current_gdbarch
->integer_to_address
1363 /*INTEGER_TO_ADDRESS ()*/);
1365 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1366 fprintf_unfiltered (file
,
1367 "gdbarch_dump: %s # %s\n",
1368 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1369 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1371 fprintf_unfiltered (file
,
1372 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1373 (long) current_gdbarch
->in_solib_call_trampoline
1374 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1376 #ifdef MAX_REGISTER_RAW_SIZE
1377 fprintf_unfiltered (file
,
1378 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1379 XSTRING (MAX_REGISTER_RAW_SIZE
));
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1382 MAX_REGISTER_RAW_SIZE
);
1384 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1387 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1390 MAX_REGISTER_VIRTUAL_SIZE
);
1392 #ifdef MEMORY_INSERT_BREAKPOINT
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: %s # %s\n",
1395 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1396 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1400 (long) current_gdbarch
->memory_insert_breakpoint
1401 /*MEMORY_INSERT_BREAKPOINT ()*/);
1403 #ifdef MEMORY_REMOVE_BREAKPOINT
1404 fprintf_unfiltered (file
,
1405 "gdbarch_dump: %s # %s\n",
1406 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1407 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1411 (long) current_gdbarch
->memory_remove_breakpoint
1412 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1415 fprintf_unfiltered (file
,
1416 "gdbarch_dump: NNPC_REGNUM # %s\n",
1417 XSTRING (NNPC_REGNUM
));
1418 fprintf_unfiltered (file
,
1419 "gdbarch_dump: NNPC_REGNUM = %d\n",
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: NPC_REGNUM # %s\n",
1425 XSTRING (NPC_REGNUM
));
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: NPC_REGNUM = %d\n",
1430 #ifdef NUM_PSEUDO_REGS
1431 fprintf_unfiltered (file
,
1432 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1433 XSTRING (NUM_PSEUDO_REGS
));
1434 fprintf_unfiltered (file
,
1435 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: NUM_REGS # %s\n",
1441 XSTRING (NUM_REGS
));
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: NUM_REGS = %d\n",
1446 #ifdef PARM_BOUNDARY
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1449 XSTRING (PARM_BOUNDARY
));
1450 fprintf_unfiltered (file
,
1451 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1454 #ifdef PC_IN_CALL_DUMMY
1455 fprintf_unfiltered (file
,
1456 "gdbarch_dump: %s # %s\n",
1457 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1458 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1462 (long) current_gdbarch
->pc_in_call_dummy
1463 /*PC_IN_CALL_DUMMY ()*/);
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: PC_REGNUM # %s\n",
1468 XSTRING (PC_REGNUM
));
1469 fprintf_unfiltered (file
,
1470 "gdbarch_dump: PC_REGNUM = %d\n",
1473 #ifdef POINTER_TO_ADDRESS
1474 fprintf_unfiltered (file
,
1475 "gdbarch_dump: %s # %s\n",
1476 "POINTER_TO_ADDRESS(type, buf)",
1477 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1481 (long) current_gdbarch
->pointer_to_address
1482 /*POINTER_TO_ADDRESS ()*/);
1486 /* Macro might contain `[{}]' when not multi-arch */
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: %s # %s\n",
1490 XSTRING (POP_FRAME (-)));
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1495 (long) current_gdbarch
->pop_frame
1498 #ifdef PREPARE_TO_PROCEED
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: %s # %s\n",
1501 "PREPARE_TO_PROCEED(select_it)",
1502 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1504 fprintf_unfiltered (file
,
1505 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1506 (long) current_gdbarch
->prepare_to_proceed
1507 /*PREPARE_TO_PROCEED ()*/);
1509 #ifdef PRINT_FLOAT_INFO
1511 /* Macro might contain `[{}]' when not multi-arch */
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: %s # %s\n",
1514 "PRINT_FLOAT_INFO()",
1515 XSTRING (PRINT_FLOAT_INFO ()));
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1520 (long) current_gdbarch
->print_float_info
1521 /*PRINT_FLOAT_INFO ()*/);
1523 #ifdef PROLOGUE_FRAMELESS_P
1524 fprintf_unfiltered (file
,
1525 "gdbarch_dump: %s # %s\n",
1526 "PROLOGUE_FRAMELESS_P(ip)",
1527 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1529 fprintf_unfiltered (file
,
1530 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1531 (long) current_gdbarch
->prologue_frameless_p
1532 /*PROLOGUE_FRAMELESS_P ()*/);
1534 #ifdef PUSH_ARGUMENTS
1535 fprintf_unfiltered (file
,
1536 "gdbarch_dump: %s # %s\n",
1537 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1538 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1540 fprintf_unfiltered (file
,
1541 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1542 (long) current_gdbarch
->push_arguments
1543 /*PUSH_ARGUMENTS ()*/);
1545 #ifdef PUSH_DUMMY_FRAME
1547 /* Macro might contain `[{}]' when not multi-arch */
1548 fprintf_unfiltered (file
,
1549 "gdbarch_dump: %s # %s\n",
1550 "PUSH_DUMMY_FRAME(-)",
1551 XSTRING (PUSH_DUMMY_FRAME (-)));
1554 fprintf_unfiltered (file
,
1555 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1556 (long) current_gdbarch
->push_dummy_frame
1557 /*PUSH_DUMMY_FRAME ()*/);
1559 #ifdef PUSH_RETURN_ADDRESS
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: %s # %s\n",
1562 "PUSH_RETURN_ADDRESS(pc, sp)",
1563 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1565 fprintf_unfiltered (file
,
1566 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1567 (long) current_gdbarch
->push_return_address
1568 /*PUSH_RETURN_ADDRESS ()*/);
1570 #ifdef REGISTER_BYTE
1571 fprintf_unfiltered (file
,
1572 "gdbarch_dump: %s # %s\n",
1573 "REGISTER_BYTE(reg_nr)",
1574 XSTRING (REGISTER_BYTE (reg_nr
)));
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1578 (long) current_gdbarch
->register_byte
1579 /*REGISTER_BYTE ()*/);
1581 #ifdef REGISTER_BYTES
1582 fprintf_unfiltered (file
,
1583 "gdbarch_dump: REGISTER_BYTES # %s\n",
1584 XSTRING (REGISTER_BYTES
));
1585 fprintf_unfiltered (file
,
1586 "gdbarch_dump: REGISTER_BYTES = %d\n",
1589 #ifdef REGISTER_BYTES_OK
1590 fprintf_unfiltered (file
,
1591 "gdbarch_dump: %s # %s\n",
1592 "REGISTER_BYTES_OK(nr_bytes)",
1593 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1597 (long) current_gdbarch
->register_bytes_ok
1598 /*REGISTER_BYTES_OK ()*/);
1600 #ifdef REGISTER_CONVERTIBLE
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: %s # %s\n",
1603 "REGISTER_CONVERTIBLE(nr)",
1604 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1608 (long) current_gdbarch
->register_convertible
1609 /*REGISTER_CONVERTIBLE ()*/);
1611 #ifdef REGISTER_CONVERT_TO_RAW
1613 /* Macro might contain `[{}]' when not multi-arch */
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: %s # %s\n",
1616 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1617 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1622 (long) current_gdbarch
->register_convert_to_raw
1623 /*REGISTER_CONVERT_TO_RAW ()*/);
1625 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1627 /* Macro might contain `[{}]' when not multi-arch */
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: %s # %s\n",
1630 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1631 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1634 fprintf_unfiltered (file
,
1635 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1636 (long) current_gdbarch
->register_convert_to_virtual
1637 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1639 #ifdef REGISTER_NAME
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: %s # %s\n",
1642 "REGISTER_NAME(regnr)",
1643 XSTRING (REGISTER_NAME (regnr
)));
1645 fprintf_unfiltered (file
,
1646 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1647 (long) current_gdbarch
->register_name
1648 /*REGISTER_NAME ()*/);
1650 #ifdef REGISTER_RAW_SIZE
1651 fprintf_unfiltered (file
,
1652 "gdbarch_dump: %s # %s\n",
1653 "REGISTER_RAW_SIZE(reg_nr)",
1654 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1656 fprintf_unfiltered (file
,
1657 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1658 (long) current_gdbarch
->register_raw_size
1659 /*REGISTER_RAW_SIZE ()*/);
1661 #ifdef REGISTER_SIM_REGNO
1662 fprintf_unfiltered (file
,
1663 "gdbarch_dump: %s # %s\n",
1664 "REGISTER_SIM_REGNO(reg_nr)",
1665 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1669 (long) current_gdbarch
->register_sim_regno
1670 /*REGISTER_SIM_REGNO ()*/);
1672 #ifdef REGISTER_SIZE
1673 fprintf_unfiltered (file
,
1674 "gdbarch_dump: REGISTER_SIZE # %s\n",
1675 XSTRING (REGISTER_SIZE
));
1676 fprintf_unfiltered (file
,
1677 "gdbarch_dump: REGISTER_SIZE = %d\n",
1680 #ifdef REGISTER_VIRTUAL_SIZE
1681 fprintf_unfiltered (file
,
1682 "gdbarch_dump: %s # %s\n",
1683 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1684 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1686 fprintf_unfiltered (file
,
1687 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1688 (long) current_gdbarch
->register_virtual_size
1689 /*REGISTER_VIRTUAL_SIZE ()*/);
1691 #ifdef REGISTER_VIRTUAL_TYPE
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: %s # %s\n",
1694 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1695 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1697 fprintf_unfiltered (file
,
1698 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1699 (long) current_gdbarch
->register_virtual_type
1700 /*REGISTER_VIRTUAL_TYPE ()*/);
1702 #ifdef REG_STRUCT_HAS_ADDR
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: %s # %s\n",
1705 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1706 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1710 (long) current_gdbarch
->reg_struct_has_addr
1711 /*REG_STRUCT_HAS_ADDR ()*/);
1713 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1715 /* Macro might contain `[{}]' when not multi-arch */
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: %s # %s\n",
1718 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1719 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1724 (long) current_gdbarch
->remote_translate_xfer_address
1725 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1727 #ifdef RETURN_VALUE_ON_STACK
1728 fprintf_unfiltered (file
,
1729 "gdbarch_dump: %s # %s\n",
1730 "RETURN_VALUE_ON_STACK(type)",
1731 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1735 (long) current_gdbarch
->return_value_on_stack
1736 /*RETURN_VALUE_ON_STACK ()*/);
1738 #ifdef SAVED_PC_AFTER_CALL
1739 fprintf_unfiltered (file
,
1740 "gdbarch_dump: %s # %s\n",
1741 "SAVED_PC_AFTER_CALL(frame)",
1742 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1746 (long) current_gdbarch
->saved_pc_after_call
1747 /*SAVED_PC_AFTER_CALL ()*/);
1749 #ifdef SAVE_DUMMY_FRAME_TOS
1751 /* Macro might contain `[{}]' when not multi-arch */
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: %s # %s\n",
1754 "SAVE_DUMMY_FRAME_TOS(sp)",
1755 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1758 fprintf_unfiltered (file
,
1759 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1760 (long) current_gdbarch
->save_dummy_frame_tos
1761 /*SAVE_DUMMY_FRAME_TOS ()*/);
1763 #ifdef SDB_REG_TO_REGNUM
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: %s # %s\n",
1766 "SDB_REG_TO_REGNUM(sdb_regnr)",
1767 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1771 (long) current_gdbarch
->sdb_reg_to_regnum
1772 /*SDB_REG_TO_REGNUM ()*/);
1774 #ifdef SIZEOF_CALL_DUMMY_WORDS
1775 fprintf_unfiltered (file
,
1776 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1777 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1780 (long) SIZEOF_CALL_DUMMY_WORDS
);
1782 #ifdef SKIP_PROLOGUE
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: %s # %s\n",
1785 "SKIP_PROLOGUE(ip)",
1786 XSTRING (SKIP_PROLOGUE (ip
)));
1788 fprintf_unfiltered (file
,
1789 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1790 (long) current_gdbarch
->skip_prologue
1791 /*SKIP_PROLOGUE ()*/);
1793 #ifdef SKIP_TRAMPOLINE_CODE
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: %s # %s\n",
1796 "SKIP_TRAMPOLINE_CODE(pc)",
1797 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1801 (long) current_gdbarch
->skip_trampoline_code
1802 /*SKIP_TRAMPOLINE_CODE ()*/);
1804 #ifdef SMASH_TEXT_ADDRESS
1805 fprintf_unfiltered (file
,
1806 "gdbarch_dump: %s # %s\n",
1807 "SMASH_TEXT_ADDRESS(addr)",
1808 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1812 (long) current_gdbarch
->smash_text_address
1813 /*SMASH_TEXT_ADDRESS ()*/);
1815 #ifdef SOFTWARE_SINGLE_STEP
1817 /* Macro might contain `[{}]' when not multi-arch */
1818 fprintf_unfiltered (file
,
1819 "gdbarch_dump: %s # %s\n",
1820 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1821 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1826 (long) current_gdbarch
->software_single_step
1827 /*SOFTWARE_SINGLE_STEP ()*/);
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: SP_REGNUM # %s\n",
1832 XSTRING (SP_REGNUM
));
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: SP_REGNUM = %d\n",
1837 #ifdef STAB_REG_TO_REGNUM
1838 fprintf_unfiltered (file
,
1839 "gdbarch_dump: %s # %s\n",
1840 "STAB_REG_TO_REGNUM(stab_regnr)",
1841 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1845 (long) current_gdbarch
->stab_reg_to_regnum
1846 /*STAB_REG_TO_REGNUM ()*/);
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: %s # %s\n",
1852 XSTRING (STACK_ALIGN (sp
)));
1854 fprintf_unfiltered (file
,
1855 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1856 (long) current_gdbarch
->stack_align
1857 /*STACK_ALIGN ()*/);
1859 #ifdef STORE_PSEUDO_REGISTER
1861 /* Macro might contain `[{}]' when not multi-arch */
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: %s # %s\n",
1864 "STORE_PSEUDO_REGISTER(regnum)",
1865 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1870 (long) current_gdbarch
->store_pseudo_register
1871 /*STORE_PSEUDO_REGISTER ()*/);
1873 #ifdef STORE_RETURN_VALUE
1875 /* Macro might contain `[{}]' when not multi-arch */
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: %s # %s\n",
1878 "STORE_RETURN_VALUE(type, valbuf)",
1879 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1882 fprintf_unfiltered (file
,
1883 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1884 (long) current_gdbarch
->store_return_value
1885 /*STORE_RETURN_VALUE ()*/);
1887 #ifdef STORE_STRUCT_RETURN
1889 /* Macro might contain `[{}]' when not multi-arch */
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: %s # %s\n",
1892 "STORE_STRUCT_RETURN(addr, sp)",
1893 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1896 fprintf_unfiltered (file
,
1897 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1898 (long) current_gdbarch
->store_struct_return
1899 /*STORE_STRUCT_RETURN ()*/);
1901 #ifdef TARGET_ADDR_BIT
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1904 XSTRING (TARGET_ADDR_BIT
));
1905 fprintf_unfiltered (file
,
1906 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1909 #ifdef TARGET_ARCHITECTURE
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1912 XSTRING (TARGET_ARCHITECTURE
));
1913 if (TARGET_ARCHITECTURE
!= NULL
)
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1916 TARGET_ARCHITECTURE
->printable_name
);
1918 #ifdef TARGET_BFD_VMA_BIT
1919 fprintf_unfiltered (file
,
1920 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1921 XSTRING (TARGET_BFD_VMA_BIT
));
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1924 TARGET_BFD_VMA_BIT
);
1926 #ifdef TARGET_BYTE_ORDER
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1929 XSTRING (TARGET_BYTE_ORDER
));
1930 fprintf_unfiltered (file
,
1931 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1932 (long) TARGET_BYTE_ORDER
);
1934 #ifdef TARGET_CHAR_SIGNED
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1937 XSTRING (TARGET_CHAR_SIGNED
));
1938 fprintf_unfiltered (file
,
1939 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1940 TARGET_CHAR_SIGNED
);
1942 #ifdef TARGET_DOUBLE_BIT
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1945 XSTRING (TARGET_DOUBLE_BIT
));
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1950 #ifdef TARGET_DOUBLE_FORMAT
1951 fprintf_unfiltered (file
,
1952 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1953 XSTRING (TARGET_DOUBLE_FORMAT
));
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1956 (long) TARGET_DOUBLE_FORMAT
);
1958 #ifdef TARGET_FLOAT_BIT
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1961 XSTRING (TARGET_FLOAT_BIT
));
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1966 #ifdef TARGET_FLOAT_FORMAT
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1969 XSTRING (TARGET_FLOAT_FORMAT
));
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1972 (long) TARGET_FLOAT_FORMAT
);
1974 #ifdef TARGET_INT_BIT
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1977 XSTRING (TARGET_INT_BIT
));
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1982 #ifdef TARGET_LONG_BIT
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1985 XSTRING (TARGET_LONG_BIT
));
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
1990 #ifdef TARGET_LONG_DOUBLE_BIT
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1993 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1994 fprintf_unfiltered (file
,
1995 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
1996 TARGET_LONG_DOUBLE_BIT
);
1998 #ifdef TARGET_LONG_DOUBLE_FORMAT
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2001 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2002 fprintf_unfiltered (file
,
2003 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2004 (long) TARGET_LONG_DOUBLE_FORMAT
);
2006 #ifdef TARGET_LONG_LONG_BIT
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2009 XSTRING (TARGET_LONG_LONG_BIT
));
2010 fprintf_unfiltered (file
,
2011 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2012 TARGET_LONG_LONG_BIT
);
2014 #ifdef TARGET_PRINT_INSN
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: %s # %s\n",
2017 "TARGET_PRINT_INSN(vma, info)",
2018 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2022 (long) current_gdbarch
->print_insn
2023 /*TARGET_PRINT_INSN ()*/);
2025 #ifdef TARGET_PTR_BIT
2026 fprintf_unfiltered (file
,
2027 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2028 XSTRING (TARGET_PTR_BIT
));
2029 fprintf_unfiltered (file
,
2030 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2033 #ifdef TARGET_READ_FP
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: %s # %s\n",
2037 XSTRING (TARGET_READ_FP ()));
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2041 (long) current_gdbarch
->read_fp
2042 /*TARGET_READ_FP ()*/);
2044 #ifdef TARGET_READ_PC
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: %s # %s\n",
2047 "TARGET_READ_PC(ptid)",
2048 XSTRING (TARGET_READ_PC (ptid
)));
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2052 (long) current_gdbarch
->read_pc
2053 /*TARGET_READ_PC ()*/);
2055 #ifdef TARGET_READ_SP
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: %s # %s\n",
2059 XSTRING (TARGET_READ_SP ()));
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2063 (long) current_gdbarch
->read_sp
2064 /*TARGET_READ_SP ()*/);
2066 #ifdef TARGET_SHORT_BIT
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2069 XSTRING (TARGET_SHORT_BIT
));
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2074 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2076 /* Macro might contain `[{}]' when not multi-arch */
2077 fprintf_unfiltered (file
,
2078 "gdbarch_dump: %s # %s\n",
2079 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2080 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2083 fprintf_unfiltered (file
,
2084 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2085 (long) current_gdbarch
->virtual_frame_pointer
2086 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2088 #ifdef TARGET_WRITE_PC
2090 /* Macro might contain `[{}]' when not multi-arch */
2091 fprintf_unfiltered (file
,
2092 "gdbarch_dump: %s # %s\n",
2093 "TARGET_WRITE_PC(val, ptid)",
2094 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2097 fprintf_unfiltered (file
,
2098 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2099 (long) current_gdbarch
->write_pc
2100 /*TARGET_WRITE_PC ()*/);
2102 #ifdef TARGET_WRITE_SP
2104 /* Macro might contain `[{}]' when not multi-arch */
2105 fprintf_unfiltered (file
,
2106 "gdbarch_dump: %s # %s\n",
2107 "TARGET_WRITE_SP(val)",
2108 XSTRING (TARGET_WRITE_SP (val
)));
2111 fprintf_unfiltered (file
,
2112 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2113 (long) current_gdbarch
->write_sp
2114 /*TARGET_WRITE_SP ()*/);
2116 #ifdef USE_GENERIC_DUMMY_FRAMES
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2119 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2120 fprintf_unfiltered (file
,
2121 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2122 USE_GENERIC_DUMMY_FRAMES
);
2124 #ifdef USE_STRUCT_CONVENTION
2125 fprintf_unfiltered (file
,
2126 "gdbarch_dump: %s # %s\n",
2127 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2128 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2130 fprintf_unfiltered (file
,
2131 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2132 (long) current_gdbarch
->use_struct_convention
2133 /*USE_STRUCT_CONVENTION ()*/);
2135 if (current_gdbarch
->dump_tdep
!= NULL
)
2136 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2139 struct gdbarch_tdep
*
2140 gdbarch_tdep (struct gdbarch
*gdbarch
)
2142 if (gdbarch_debug
>= 2)
2143 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2144 return gdbarch
->tdep
;
2148 const struct bfd_arch_info
*
2149 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2151 if (gdbarch_debug
>= 2)
2152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2153 return gdbarch
->bfd_arch_info
;
2157 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2159 if (gdbarch_debug
>= 2)
2160 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2161 return gdbarch
->byte_order
;
2165 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2167 /* Skip verify of short_bit, invalid_p == 0 */
2168 if (gdbarch_debug
>= 2)
2169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2170 return gdbarch
->short_bit
;
2174 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2177 gdbarch
->short_bit
= short_bit
;
2181 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2183 /* Skip verify of int_bit, invalid_p == 0 */
2184 if (gdbarch_debug
>= 2)
2185 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2186 return gdbarch
->int_bit
;
2190 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2193 gdbarch
->int_bit
= int_bit
;
2197 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2199 /* Skip verify of long_bit, invalid_p == 0 */
2200 if (gdbarch_debug
>= 2)
2201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2202 return gdbarch
->long_bit
;
2206 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2209 gdbarch
->long_bit
= long_bit
;
2213 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2215 /* Skip verify of long_long_bit, invalid_p == 0 */
2216 if (gdbarch_debug
>= 2)
2217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2218 return gdbarch
->long_long_bit
;
2222 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2225 gdbarch
->long_long_bit
= long_long_bit
;
2229 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2231 /* Skip verify of float_bit, invalid_p == 0 */
2232 if (gdbarch_debug
>= 2)
2233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2234 return gdbarch
->float_bit
;
2238 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2241 gdbarch
->float_bit
= float_bit
;
2245 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2247 /* Skip verify of double_bit, invalid_p == 0 */
2248 if (gdbarch_debug
>= 2)
2249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2250 return gdbarch
->double_bit
;
2254 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2257 gdbarch
->double_bit
= double_bit
;
2261 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2263 /* Skip verify of long_double_bit, invalid_p == 0 */
2264 if (gdbarch_debug
>= 2)
2265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2266 return gdbarch
->long_double_bit
;
2270 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2271 int long_double_bit
)
2273 gdbarch
->long_double_bit
= long_double_bit
;
2277 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2279 /* Skip verify of ptr_bit, invalid_p == 0 */
2280 if (gdbarch_debug
>= 2)
2281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2282 return gdbarch
->ptr_bit
;
2286 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2289 gdbarch
->ptr_bit
= ptr_bit
;
2293 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2295 if (gdbarch
->addr_bit
== 0)
2296 internal_error (__FILE__
, __LINE__
,
2297 "gdbarch: gdbarch_addr_bit invalid");
2298 if (gdbarch_debug
>= 2)
2299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2300 return gdbarch
->addr_bit
;
2304 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2307 gdbarch
->addr_bit
= addr_bit
;
2311 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2313 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2314 if (gdbarch_debug
>= 2)
2315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2316 return gdbarch
->bfd_vma_bit
;
2320 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2323 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2327 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2329 if (gdbarch
->char_signed
== -1)
2330 internal_error (__FILE__
, __LINE__
,
2331 "gdbarch: gdbarch_char_signed invalid");
2332 if (gdbarch_debug
>= 2)
2333 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2334 return gdbarch
->char_signed
;
2338 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2341 gdbarch
->char_signed
= char_signed
;
2345 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2347 if (gdbarch
->read_pc
== 0)
2348 internal_error (__FILE__
, __LINE__
,
2349 "gdbarch: gdbarch_read_pc invalid");
2350 if (gdbarch_debug
>= 2)
2351 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2352 return gdbarch
->read_pc (ptid
);
2356 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2357 gdbarch_read_pc_ftype read_pc
)
2359 gdbarch
->read_pc
= read_pc
;
2363 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2365 if (gdbarch
->write_pc
== 0)
2366 internal_error (__FILE__
, __LINE__
,
2367 "gdbarch: gdbarch_write_pc invalid");
2368 if (gdbarch_debug
>= 2)
2369 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2370 gdbarch
->write_pc (val
, ptid
);
2374 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2375 gdbarch_write_pc_ftype write_pc
)
2377 gdbarch
->write_pc
= write_pc
;
2381 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2383 if (gdbarch
->read_fp
== 0)
2384 internal_error (__FILE__
, __LINE__
,
2385 "gdbarch: gdbarch_read_fp invalid");
2386 if (gdbarch_debug
>= 2)
2387 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2388 return gdbarch
->read_fp ();
2392 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2393 gdbarch_read_fp_ftype read_fp
)
2395 gdbarch
->read_fp
= read_fp
;
2399 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2401 if (gdbarch
->read_sp
== 0)
2402 internal_error (__FILE__
, __LINE__
,
2403 "gdbarch: gdbarch_read_sp invalid");
2404 if (gdbarch_debug
>= 2)
2405 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2406 return gdbarch
->read_sp ();
2410 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2411 gdbarch_read_sp_ftype read_sp
)
2413 gdbarch
->read_sp
= read_sp
;
2417 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2419 if (gdbarch
->write_sp
== 0)
2420 internal_error (__FILE__
, __LINE__
,
2421 "gdbarch: gdbarch_write_sp invalid");
2422 if (gdbarch_debug
>= 2)
2423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2424 gdbarch
->write_sp (val
);
2428 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2429 gdbarch_write_sp_ftype write_sp
)
2431 gdbarch
->write_sp
= write_sp
;
2435 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2437 if (gdbarch
->virtual_frame_pointer
== 0)
2438 internal_error (__FILE__
, __LINE__
,
2439 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2440 if (gdbarch_debug
>= 2)
2441 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2442 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2446 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2447 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2449 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2453 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2455 return gdbarch
->register_read
!= 0;
2459 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2461 if (gdbarch
->register_read
== 0)
2462 internal_error (__FILE__
, __LINE__
,
2463 "gdbarch: gdbarch_register_read invalid");
2464 if (gdbarch_debug
>= 2)
2465 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2466 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2470 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2471 gdbarch_register_read_ftype register_read
)
2473 gdbarch
->register_read
= register_read
;
2477 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2479 return gdbarch
->register_write
!= 0;
2483 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2485 if (gdbarch
->register_write
== 0)
2486 internal_error (__FILE__
, __LINE__
,
2487 "gdbarch: gdbarch_register_write invalid");
2488 if (gdbarch_debug
>= 2)
2489 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2490 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2494 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2495 gdbarch_register_write_ftype register_write
)
2497 gdbarch
->register_write
= register_write
;
2501 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2503 if (gdbarch
->num_regs
== -1)
2504 internal_error (__FILE__
, __LINE__
,
2505 "gdbarch: gdbarch_num_regs invalid");
2506 if (gdbarch_debug
>= 2)
2507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2508 return gdbarch
->num_regs
;
2512 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2515 gdbarch
->num_regs
= num_regs
;
2519 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2521 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2522 if (gdbarch_debug
>= 2)
2523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2524 return gdbarch
->num_pseudo_regs
;
2528 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2529 int num_pseudo_regs
)
2531 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2535 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2537 if (gdbarch
->sp_regnum
== -1)
2538 internal_error (__FILE__
, __LINE__
,
2539 "gdbarch: gdbarch_sp_regnum invalid");
2540 if (gdbarch_debug
>= 2)
2541 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2542 return gdbarch
->sp_regnum
;
2546 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2549 gdbarch
->sp_regnum
= sp_regnum
;
2553 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2555 if (gdbarch
->fp_regnum
== -1)
2556 internal_error (__FILE__
, __LINE__
,
2557 "gdbarch: gdbarch_fp_regnum invalid");
2558 if (gdbarch_debug
>= 2)
2559 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2560 return gdbarch
->fp_regnum
;
2564 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2567 gdbarch
->fp_regnum
= fp_regnum
;
2571 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2573 if (gdbarch
->pc_regnum
== -1)
2574 internal_error (__FILE__
, __LINE__
,
2575 "gdbarch: gdbarch_pc_regnum invalid");
2576 if (gdbarch_debug
>= 2)
2577 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2578 return gdbarch
->pc_regnum
;
2582 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2585 gdbarch
->pc_regnum
= pc_regnum
;
2589 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2591 /* Skip verify of fp0_regnum, invalid_p == 0 */
2592 if (gdbarch_debug
>= 2)
2593 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2594 return gdbarch
->fp0_regnum
;
2598 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2601 gdbarch
->fp0_regnum
= fp0_regnum
;
2605 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2607 /* Skip verify of npc_regnum, invalid_p == 0 */
2608 if (gdbarch_debug
>= 2)
2609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2610 return gdbarch
->npc_regnum
;
2614 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2617 gdbarch
->npc_regnum
= npc_regnum
;
2621 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2623 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2624 if (gdbarch_debug
>= 2)
2625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2626 return gdbarch
->nnpc_regnum
;
2630 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2633 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2637 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2639 if (gdbarch
->stab_reg_to_regnum
== 0)
2640 internal_error (__FILE__
, __LINE__
,
2641 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2642 if (gdbarch_debug
>= 2)
2643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2644 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2648 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2649 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2651 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2655 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2657 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2658 internal_error (__FILE__
, __LINE__
,
2659 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2660 if (gdbarch_debug
>= 2)
2661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2662 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2666 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2667 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2669 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2673 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2675 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2676 internal_error (__FILE__
, __LINE__
,
2677 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2678 if (gdbarch_debug
>= 2)
2679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2680 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2684 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2685 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2687 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2691 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2693 if (gdbarch
->sdb_reg_to_regnum
== 0)
2694 internal_error (__FILE__
, __LINE__
,
2695 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2696 if (gdbarch_debug
>= 2)
2697 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2698 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2702 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2703 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2705 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2709 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2711 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2712 internal_error (__FILE__
, __LINE__
,
2713 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2714 if (gdbarch_debug
>= 2)
2715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2716 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2720 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2721 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2723 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2727 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2729 if (gdbarch
->register_name
== 0)
2730 internal_error (__FILE__
, __LINE__
,
2731 "gdbarch: gdbarch_register_name invalid");
2732 if (gdbarch_debug
>= 2)
2733 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2734 return gdbarch
->register_name (regnr
);
2738 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2739 gdbarch_register_name_ftype register_name
)
2741 gdbarch
->register_name
= register_name
;
2745 gdbarch_register_size (struct gdbarch
*gdbarch
)
2747 if (gdbarch
->register_size
== -1)
2748 internal_error (__FILE__
, __LINE__
,
2749 "gdbarch: gdbarch_register_size invalid");
2750 if (gdbarch_debug
>= 2)
2751 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2752 return gdbarch
->register_size
;
2756 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2759 gdbarch
->register_size
= register_size
;
2763 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2765 if (gdbarch
->register_bytes
== -1)
2766 internal_error (__FILE__
, __LINE__
,
2767 "gdbarch: gdbarch_register_bytes invalid");
2768 if (gdbarch_debug
>= 2)
2769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2770 return gdbarch
->register_bytes
;
2774 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2777 gdbarch
->register_bytes
= register_bytes
;
2781 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2783 if (gdbarch
->register_byte
== 0)
2784 internal_error (__FILE__
, __LINE__
,
2785 "gdbarch: gdbarch_register_byte invalid");
2786 if (gdbarch_debug
>= 2)
2787 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2788 return gdbarch
->register_byte (reg_nr
);
2792 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2793 gdbarch_register_byte_ftype register_byte
)
2795 gdbarch
->register_byte
= register_byte
;
2799 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2801 if (gdbarch
->register_raw_size
== 0)
2802 internal_error (__FILE__
, __LINE__
,
2803 "gdbarch: gdbarch_register_raw_size invalid");
2804 if (gdbarch_debug
>= 2)
2805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2806 return gdbarch
->register_raw_size (reg_nr
);
2810 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2811 gdbarch_register_raw_size_ftype register_raw_size
)
2813 gdbarch
->register_raw_size
= register_raw_size
;
2817 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2819 if (gdbarch
->max_register_raw_size
== -1)
2820 internal_error (__FILE__
, __LINE__
,
2821 "gdbarch: gdbarch_max_register_raw_size invalid");
2822 if (gdbarch_debug
>= 2)
2823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2824 return gdbarch
->max_register_raw_size
;
2828 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2829 int max_register_raw_size
)
2831 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2835 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2837 if (gdbarch
->register_virtual_size
== 0)
2838 internal_error (__FILE__
, __LINE__
,
2839 "gdbarch: gdbarch_register_virtual_size invalid");
2840 if (gdbarch_debug
>= 2)
2841 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2842 return gdbarch
->register_virtual_size (reg_nr
);
2846 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2847 gdbarch_register_virtual_size_ftype register_virtual_size
)
2849 gdbarch
->register_virtual_size
= register_virtual_size
;
2853 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2855 if (gdbarch
->max_register_virtual_size
== -1)
2856 internal_error (__FILE__
, __LINE__
,
2857 "gdbarch: gdbarch_max_register_virtual_size invalid");
2858 if (gdbarch_debug
>= 2)
2859 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2860 return gdbarch
->max_register_virtual_size
;
2864 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2865 int max_register_virtual_size
)
2867 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2871 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2873 if (gdbarch
->register_virtual_type
== 0)
2874 internal_error (__FILE__
, __LINE__
,
2875 "gdbarch: gdbarch_register_virtual_type invalid");
2876 if (gdbarch_debug
>= 2)
2877 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2878 return gdbarch
->register_virtual_type (reg_nr
);
2882 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2883 gdbarch_register_virtual_type_ftype register_virtual_type
)
2885 gdbarch
->register_virtual_type
= register_virtual_type
;
2889 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2891 if (gdbarch
->do_registers_info
== 0)
2892 internal_error (__FILE__
, __LINE__
,
2893 "gdbarch: gdbarch_do_registers_info invalid");
2894 if (gdbarch_debug
>= 2)
2895 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2896 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2900 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2901 gdbarch_do_registers_info_ftype do_registers_info
)
2903 gdbarch
->do_registers_info
= do_registers_info
;
2907 gdbarch_print_float_info (struct gdbarch
*gdbarch
)
2909 if (gdbarch
->print_float_info
== 0)
2910 internal_error (__FILE__
, __LINE__
,
2911 "gdbarch: gdbarch_print_float_info invalid");
2912 if (gdbarch_debug
>= 2)
2913 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2914 gdbarch
->print_float_info ();
2918 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2919 gdbarch_print_float_info_ftype print_float_info
)
2921 gdbarch
->print_float_info
= print_float_info
;
2925 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2927 if (gdbarch
->register_sim_regno
== 0)
2928 internal_error (__FILE__
, __LINE__
,
2929 "gdbarch: gdbarch_register_sim_regno invalid");
2930 if (gdbarch_debug
>= 2)
2931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2932 return gdbarch
->register_sim_regno (reg_nr
);
2936 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2937 gdbarch_register_sim_regno_ftype register_sim_regno
)
2939 gdbarch
->register_sim_regno
= register_sim_regno
;
2943 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2945 return gdbarch
->register_bytes_ok
!= 0;
2949 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2951 if (gdbarch
->register_bytes_ok
== 0)
2952 internal_error (__FILE__
, __LINE__
,
2953 "gdbarch: gdbarch_register_bytes_ok invalid");
2954 if (gdbarch_debug
>= 2)
2955 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2956 return gdbarch
->register_bytes_ok (nr_bytes
);
2960 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2961 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2963 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2967 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2969 if (gdbarch
->cannot_fetch_register
== 0)
2970 internal_error (__FILE__
, __LINE__
,
2971 "gdbarch: gdbarch_cannot_fetch_register invalid");
2972 if (gdbarch_debug
>= 2)
2973 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2974 return gdbarch
->cannot_fetch_register (regnum
);
2978 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2979 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2981 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2985 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2987 if (gdbarch
->cannot_store_register
== 0)
2988 internal_error (__FILE__
, __LINE__
,
2989 "gdbarch: gdbarch_cannot_store_register invalid");
2990 if (gdbarch_debug
>= 2)
2991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2992 return gdbarch
->cannot_store_register (regnum
);
2996 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2997 gdbarch_cannot_store_register_ftype cannot_store_register
)
2999 gdbarch
->cannot_store_register
= cannot_store_register
;
3003 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3005 return gdbarch
->get_longjmp_target
!= 0;
3009 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3011 if (gdbarch
->get_longjmp_target
== 0)
3012 internal_error (__FILE__
, __LINE__
,
3013 "gdbarch: gdbarch_get_longjmp_target invalid");
3014 if (gdbarch_debug
>= 2)
3015 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3016 return gdbarch
->get_longjmp_target (pc
);
3020 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3021 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3023 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3027 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3029 if (gdbarch
->use_generic_dummy_frames
== -1)
3030 internal_error (__FILE__
, __LINE__
,
3031 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3032 if (gdbarch_debug
>= 2)
3033 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3034 return gdbarch
->use_generic_dummy_frames
;
3038 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3039 int use_generic_dummy_frames
)
3041 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3045 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3047 if (gdbarch
->call_dummy_location
== 0)
3048 internal_error (__FILE__
, __LINE__
,
3049 "gdbarch: gdbarch_call_dummy_location invalid");
3050 if (gdbarch_debug
>= 2)
3051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3052 return gdbarch
->call_dummy_location
;
3056 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3057 int call_dummy_location
)
3059 gdbarch
->call_dummy_location
= call_dummy_location
;
3063 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3065 if (gdbarch
->call_dummy_address
== 0)
3066 internal_error (__FILE__
, __LINE__
,
3067 "gdbarch: gdbarch_call_dummy_address invalid");
3068 if (gdbarch_debug
>= 2)
3069 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3070 return gdbarch
->call_dummy_address ();
3074 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3075 gdbarch_call_dummy_address_ftype call_dummy_address
)
3077 gdbarch
->call_dummy_address
= call_dummy_address
;
3081 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3083 if (gdbarch
->call_dummy_start_offset
== -1)
3084 internal_error (__FILE__
, __LINE__
,
3085 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3086 if (gdbarch_debug
>= 2)
3087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3088 return gdbarch
->call_dummy_start_offset
;
3092 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3093 CORE_ADDR call_dummy_start_offset
)
3095 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3099 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3101 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3102 internal_error (__FILE__
, __LINE__
,
3103 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3104 if (gdbarch_debug
>= 2)
3105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3106 return gdbarch
->call_dummy_breakpoint_offset
;
3110 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3111 CORE_ADDR call_dummy_breakpoint_offset
)
3113 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3117 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3119 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3120 internal_error (__FILE__
, __LINE__
,
3121 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3122 if (gdbarch_debug
>= 2)
3123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3124 return gdbarch
->call_dummy_breakpoint_offset_p
;
3128 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3129 int call_dummy_breakpoint_offset_p
)
3131 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3135 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3137 if (gdbarch
->call_dummy_length
== -1)
3138 internal_error (__FILE__
, __LINE__
,
3139 "gdbarch: gdbarch_call_dummy_length invalid");
3140 if (gdbarch_debug
>= 2)
3141 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3142 return gdbarch
->call_dummy_length
;
3146 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3147 int call_dummy_length
)
3149 gdbarch
->call_dummy_length
= call_dummy_length
;
3153 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3155 if (gdbarch
->pc_in_call_dummy
== 0)
3156 internal_error (__FILE__
, __LINE__
,
3157 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3158 if (gdbarch_debug
>= 2)
3159 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3160 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3164 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3165 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3167 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3171 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3173 if (gdbarch
->call_dummy_p
== -1)
3174 internal_error (__FILE__
, __LINE__
,
3175 "gdbarch: gdbarch_call_dummy_p invalid");
3176 if (gdbarch_debug
>= 2)
3177 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3178 return gdbarch
->call_dummy_p
;
3182 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3185 gdbarch
->call_dummy_p
= call_dummy_p
;
3189 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3191 /* Skip verify of call_dummy_words, invalid_p == 0 */
3192 if (gdbarch_debug
>= 2)
3193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3194 return gdbarch
->call_dummy_words
;
3198 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3199 LONGEST
* call_dummy_words
)
3201 gdbarch
->call_dummy_words
= call_dummy_words
;
3205 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3207 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3208 if (gdbarch_debug
>= 2)
3209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3210 return gdbarch
->sizeof_call_dummy_words
;
3214 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3215 int sizeof_call_dummy_words
)
3217 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3221 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3223 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3224 internal_error (__FILE__
, __LINE__
,
3225 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3226 if (gdbarch_debug
>= 2)
3227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3228 return gdbarch
->call_dummy_stack_adjust_p
;
3232 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3233 int call_dummy_stack_adjust_p
)
3235 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3239 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3241 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3242 internal_error (__FILE__
, __LINE__
,
3243 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3244 if (gdbarch_debug
>= 2)
3245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3246 return gdbarch
->call_dummy_stack_adjust
;
3250 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3251 int call_dummy_stack_adjust
)
3253 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3257 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
)
3259 if (gdbarch
->fix_call_dummy
== 0)
3260 internal_error (__FILE__
, __LINE__
,
3261 "gdbarch: gdbarch_fix_call_dummy invalid");
3262 if (gdbarch_debug
>= 2)
3263 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3264 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3268 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3269 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3271 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3275 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3277 if (gdbarch
->init_frame_pc_first
== 0)
3278 internal_error (__FILE__
, __LINE__
,
3279 "gdbarch: gdbarch_init_frame_pc_first invalid");
3280 if (gdbarch_debug
>= 2)
3281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3282 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3286 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3287 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3289 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3293 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3295 if (gdbarch
->init_frame_pc
== 0)
3296 internal_error (__FILE__
, __LINE__
,
3297 "gdbarch: gdbarch_init_frame_pc invalid");
3298 if (gdbarch_debug
>= 2)
3299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3300 gdbarch
->init_frame_pc (fromleaf
, prev
);
3304 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3305 gdbarch_init_frame_pc_ftype init_frame_pc
)
3307 gdbarch
->init_frame_pc
= init_frame_pc
;
3311 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3313 if (gdbarch_debug
>= 2)
3314 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3315 return gdbarch
->believe_pcc_promotion
;
3319 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3320 int believe_pcc_promotion
)
3322 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3326 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3328 if (gdbarch_debug
>= 2)
3329 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3330 return gdbarch
->believe_pcc_promotion_type
;
3334 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3335 int believe_pcc_promotion_type
)
3337 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3341 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3343 if (gdbarch
->coerce_float_to_double
== 0)
3344 internal_error (__FILE__
, __LINE__
,
3345 "gdbarch: gdbarch_coerce_float_to_double invalid");
3346 if (gdbarch_debug
>= 2)
3347 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3348 return gdbarch
->coerce_float_to_double (formal
, actual
);
3352 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3353 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3355 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3359 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
)
3361 if (gdbarch
->get_saved_register
== 0)
3362 internal_error (__FILE__
, __LINE__
,
3363 "gdbarch: gdbarch_get_saved_register invalid");
3364 if (gdbarch_debug
>= 2)
3365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3366 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3370 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3371 gdbarch_get_saved_register_ftype get_saved_register
)
3373 gdbarch
->get_saved_register
= get_saved_register
;
3377 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3379 if (gdbarch
->register_convertible
== 0)
3380 internal_error (__FILE__
, __LINE__
,
3381 "gdbarch: gdbarch_register_convertible invalid");
3382 if (gdbarch_debug
>= 2)
3383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3384 return gdbarch
->register_convertible (nr
);
3388 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3389 gdbarch_register_convertible_ftype register_convertible
)
3391 gdbarch
->register_convertible
= register_convertible
;
3395 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3397 if (gdbarch
->register_convert_to_virtual
== 0)
3398 internal_error (__FILE__
, __LINE__
,
3399 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3400 if (gdbarch_debug
>= 2)
3401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3402 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3406 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3407 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3409 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3413 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3415 if (gdbarch
->register_convert_to_raw
== 0)
3416 internal_error (__FILE__
, __LINE__
,
3417 "gdbarch: gdbarch_register_convert_to_raw invalid");
3418 if (gdbarch_debug
>= 2)
3419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3420 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3424 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3425 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3427 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3431 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3433 return gdbarch
->fetch_pseudo_register
!= 0;
3437 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3439 if (gdbarch
->fetch_pseudo_register
== 0)
3440 internal_error (__FILE__
, __LINE__
,
3441 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3442 if (gdbarch_debug
>= 2)
3443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3444 gdbarch
->fetch_pseudo_register (regnum
);
3448 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3449 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3451 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3455 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3457 return gdbarch
->store_pseudo_register
!= 0;
3461 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3463 if (gdbarch
->store_pseudo_register
== 0)
3464 internal_error (__FILE__
, __LINE__
,
3465 "gdbarch: gdbarch_store_pseudo_register invalid");
3466 if (gdbarch_debug
>= 2)
3467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3468 gdbarch
->store_pseudo_register (regnum
);
3472 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3473 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3475 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3479 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3481 if (gdbarch
->pointer_to_address
== 0)
3482 internal_error (__FILE__
, __LINE__
,
3483 "gdbarch: gdbarch_pointer_to_address invalid");
3484 if (gdbarch_debug
>= 2)
3485 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3486 return gdbarch
->pointer_to_address (type
, buf
);
3490 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3491 gdbarch_pointer_to_address_ftype pointer_to_address
)
3493 gdbarch
->pointer_to_address
= pointer_to_address
;
3497 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3499 if (gdbarch
->address_to_pointer
== 0)
3500 internal_error (__FILE__
, __LINE__
,
3501 "gdbarch: gdbarch_address_to_pointer invalid");
3502 if (gdbarch_debug
>= 2)
3503 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3504 gdbarch
->address_to_pointer (type
, buf
, addr
);
3508 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3509 gdbarch_address_to_pointer_ftype address_to_pointer
)
3511 gdbarch
->address_to_pointer
= address_to_pointer
;
3515 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3517 return gdbarch
->integer_to_address
!= 0;
3521 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3523 if (gdbarch
->integer_to_address
== 0)
3524 internal_error (__FILE__
, __LINE__
,
3525 "gdbarch: gdbarch_integer_to_address invalid");
3526 if (gdbarch_debug
>= 2)
3527 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3528 return gdbarch
->integer_to_address (type
, buf
);
3532 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3533 gdbarch_integer_to_address_ftype integer_to_address
)
3535 gdbarch
->integer_to_address
= integer_to_address
;
3539 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3541 if (gdbarch
->return_value_on_stack
== 0)
3542 internal_error (__FILE__
, __LINE__
,
3543 "gdbarch: gdbarch_return_value_on_stack invalid");
3544 if (gdbarch_debug
>= 2)
3545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3546 return gdbarch
->return_value_on_stack (type
);
3550 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3551 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3553 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3557 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3559 if (gdbarch
->extract_return_value
== 0)
3560 internal_error (__FILE__
, __LINE__
,
3561 "gdbarch: gdbarch_extract_return_value invalid");
3562 if (gdbarch_debug
>= 2)
3563 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3564 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3568 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3569 gdbarch_extract_return_value_ftype extract_return_value
)
3571 gdbarch
->extract_return_value
= extract_return_value
;
3575 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3577 if (gdbarch
->push_arguments
== 0)
3578 internal_error (__FILE__
, __LINE__
,
3579 "gdbarch: gdbarch_push_arguments invalid");
3580 if (gdbarch_debug
>= 2)
3581 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3582 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3586 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3587 gdbarch_push_arguments_ftype push_arguments
)
3589 gdbarch
->push_arguments
= push_arguments
;
3593 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3595 if (gdbarch
->push_dummy_frame
== 0)
3596 internal_error (__FILE__
, __LINE__
,
3597 "gdbarch: gdbarch_push_dummy_frame invalid");
3598 if (gdbarch_debug
>= 2)
3599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3600 gdbarch
->push_dummy_frame ();
3604 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3605 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3607 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3611 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3613 return gdbarch
->push_return_address
!= 0;
3617 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3619 if (gdbarch
->push_return_address
== 0)
3620 internal_error (__FILE__
, __LINE__
,
3621 "gdbarch: gdbarch_push_return_address invalid");
3622 if (gdbarch_debug
>= 2)
3623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3624 return gdbarch
->push_return_address (pc
, sp
);
3628 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3629 gdbarch_push_return_address_ftype push_return_address
)
3631 gdbarch
->push_return_address
= push_return_address
;
3635 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3637 if (gdbarch
->pop_frame
== 0)
3638 internal_error (__FILE__
, __LINE__
,
3639 "gdbarch: gdbarch_pop_frame invalid");
3640 if (gdbarch_debug
>= 2)
3641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3642 gdbarch
->pop_frame ();
3646 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3647 gdbarch_pop_frame_ftype pop_frame
)
3649 gdbarch
->pop_frame
= pop_frame
;
3653 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3655 if (gdbarch
->store_struct_return
== 0)
3656 internal_error (__FILE__
, __LINE__
,
3657 "gdbarch: gdbarch_store_struct_return invalid");
3658 if (gdbarch_debug
>= 2)
3659 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3660 gdbarch
->store_struct_return (addr
, sp
);
3664 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3665 gdbarch_store_struct_return_ftype store_struct_return
)
3667 gdbarch
->store_struct_return
= store_struct_return
;
3671 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3673 if (gdbarch
->store_return_value
== 0)
3674 internal_error (__FILE__
, __LINE__
,
3675 "gdbarch: gdbarch_store_return_value invalid");
3676 if (gdbarch_debug
>= 2)
3677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3678 gdbarch
->store_return_value (type
, valbuf
);
3682 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3683 gdbarch_store_return_value_ftype store_return_value
)
3685 gdbarch
->store_return_value
= store_return_value
;
3689 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3691 return gdbarch
->extract_struct_value_address
!= 0;
3695 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3697 if (gdbarch
->extract_struct_value_address
== 0)
3698 internal_error (__FILE__
, __LINE__
,
3699 "gdbarch: gdbarch_extract_struct_value_address invalid");
3700 if (gdbarch_debug
>= 2)
3701 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3702 return gdbarch
->extract_struct_value_address (regbuf
);
3706 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3707 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3709 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3713 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3715 if (gdbarch
->use_struct_convention
== 0)
3716 internal_error (__FILE__
, __LINE__
,
3717 "gdbarch: gdbarch_use_struct_convention invalid");
3718 if (gdbarch_debug
>= 2)
3719 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3720 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3724 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3725 gdbarch_use_struct_convention_ftype use_struct_convention
)
3727 gdbarch
->use_struct_convention
= use_struct_convention
;
3731 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3733 if (gdbarch
->frame_init_saved_regs
== 0)
3734 internal_error (__FILE__
, __LINE__
,
3735 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3736 if (gdbarch_debug
>= 2)
3737 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3738 gdbarch
->frame_init_saved_regs (frame
);
3742 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3743 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3745 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3749 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3751 return gdbarch
->init_extra_frame_info
!= 0;
3755 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3757 if (gdbarch
->init_extra_frame_info
== 0)
3758 internal_error (__FILE__
, __LINE__
,
3759 "gdbarch: gdbarch_init_extra_frame_info invalid");
3760 if (gdbarch_debug
>= 2)
3761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3762 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3766 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3767 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3769 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3773 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3775 if (gdbarch
->skip_prologue
== 0)
3776 internal_error (__FILE__
, __LINE__
,
3777 "gdbarch: gdbarch_skip_prologue invalid");
3778 if (gdbarch_debug
>= 2)
3779 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3780 return gdbarch
->skip_prologue (ip
);
3784 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3785 gdbarch_skip_prologue_ftype skip_prologue
)
3787 gdbarch
->skip_prologue
= skip_prologue
;
3791 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3793 if (gdbarch
->prologue_frameless_p
== 0)
3794 internal_error (__FILE__
, __LINE__
,
3795 "gdbarch: gdbarch_prologue_frameless_p invalid");
3796 if (gdbarch_debug
>= 2)
3797 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3798 return gdbarch
->prologue_frameless_p (ip
);
3802 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3803 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3805 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3809 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3811 if (gdbarch
->inner_than
== 0)
3812 internal_error (__FILE__
, __LINE__
,
3813 "gdbarch: gdbarch_inner_than invalid");
3814 if (gdbarch_debug
>= 2)
3815 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3816 return gdbarch
->inner_than (lhs
, rhs
);
3820 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3821 gdbarch_inner_than_ftype inner_than
)
3823 gdbarch
->inner_than
= inner_than
;
3827 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3829 if (gdbarch
->breakpoint_from_pc
== 0)
3830 internal_error (__FILE__
, __LINE__
,
3831 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3832 if (gdbarch_debug
>= 2)
3833 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3834 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3838 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3839 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3841 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3845 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3847 if (gdbarch
->memory_insert_breakpoint
== 0)
3848 internal_error (__FILE__
, __LINE__
,
3849 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3850 if (gdbarch_debug
>= 2)
3851 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3852 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3856 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3857 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3859 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3863 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3865 if (gdbarch
->memory_remove_breakpoint
== 0)
3866 internal_error (__FILE__
, __LINE__
,
3867 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3868 if (gdbarch_debug
>= 2)
3869 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3870 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3874 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3875 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3877 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3881 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3883 if (gdbarch
->decr_pc_after_break
== -1)
3884 internal_error (__FILE__
, __LINE__
,
3885 "gdbarch: gdbarch_decr_pc_after_break invalid");
3886 if (gdbarch_debug
>= 2)
3887 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3888 return gdbarch
->decr_pc_after_break
;
3892 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3893 CORE_ADDR decr_pc_after_break
)
3895 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3899 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3901 if (gdbarch
->prepare_to_proceed
== 0)
3902 internal_error (__FILE__
, __LINE__
,
3903 "gdbarch: gdbarch_prepare_to_proceed invalid");
3904 if (gdbarch_debug
>= 2)
3905 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3906 return gdbarch
->prepare_to_proceed (select_it
);
3910 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3911 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3913 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3917 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3919 if (gdbarch
->function_start_offset
== -1)
3920 internal_error (__FILE__
, __LINE__
,
3921 "gdbarch: gdbarch_function_start_offset invalid");
3922 if (gdbarch_debug
>= 2)
3923 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3924 return gdbarch
->function_start_offset
;
3928 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3929 CORE_ADDR function_start_offset
)
3931 gdbarch
->function_start_offset
= function_start_offset
;
3935 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3937 if (gdbarch
->remote_translate_xfer_address
== 0)
3938 internal_error (__FILE__
, __LINE__
,
3939 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3940 if (gdbarch_debug
>= 2)
3941 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3942 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3946 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3947 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3949 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3953 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3955 if (gdbarch
->frame_args_skip
== -1)
3956 internal_error (__FILE__
, __LINE__
,
3957 "gdbarch: gdbarch_frame_args_skip invalid");
3958 if (gdbarch_debug
>= 2)
3959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3960 return gdbarch
->frame_args_skip
;
3964 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3965 CORE_ADDR frame_args_skip
)
3967 gdbarch
->frame_args_skip
= frame_args_skip
;
3971 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3973 if (gdbarch
->frameless_function_invocation
== 0)
3974 internal_error (__FILE__
, __LINE__
,
3975 "gdbarch: gdbarch_frameless_function_invocation invalid");
3976 if (gdbarch_debug
>= 2)
3977 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3978 return gdbarch
->frameless_function_invocation (fi
);
3982 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3983 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3985 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3989 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3991 if (gdbarch
->frame_chain
== 0)
3992 internal_error (__FILE__
, __LINE__
,
3993 "gdbarch: gdbarch_frame_chain invalid");
3994 if (gdbarch_debug
>= 2)
3995 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3996 return gdbarch
->frame_chain (frame
);
4000 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4001 gdbarch_frame_chain_ftype frame_chain
)
4003 gdbarch
->frame_chain
= frame_chain
;
4007 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4009 if (gdbarch
->frame_chain_valid
== 0)
4010 internal_error (__FILE__
, __LINE__
,
4011 "gdbarch: gdbarch_frame_chain_valid invalid");
4012 if (gdbarch_debug
>= 2)
4013 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4014 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4018 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4019 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4021 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4025 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4027 if (gdbarch
->frame_saved_pc
== 0)
4028 internal_error (__FILE__
, __LINE__
,
4029 "gdbarch: gdbarch_frame_saved_pc invalid");
4030 if (gdbarch_debug
>= 2)
4031 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4032 return gdbarch
->frame_saved_pc (fi
);
4036 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4037 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4039 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4043 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4045 if (gdbarch
->frame_args_address
== 0)
4046 internal_error (__FILE__
, __LINE__
,
4047 "gdbarch: gdbarch_frame_args_address invalid");
4048 if (gdbarch_debug
>= 2)
4049 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4050 return gdbarch
->frame_args_address (fi
);
4054 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4055 gdbarch_frame_args_address_ftype frame_args_address
)
4057 gdbarch
->frame_args_address
= frame_args_address
;
4061 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4063 if (gdbarch
->frame_locals_address
== 0)
4064 internal_error (__FILE__
, __LINE__
,
4065 "gdbarch: gdbarch_frame_locals_address invalid");
4066 if (gdbarch_debug
>= 2)
4067 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4068 return gdbarch
->frame_locals_address (fi
);
4072 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4073 gdbarch_frame_locals_address_ftype frame_locals_address
)
4075 gdbarch
->frame_locals_address
= frame_locals_address
;
4079 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4081 if (gdbarch
->saved_pc_after_call
== 0)
4082 internal_error (__FILE__
, __LINE__
,
4083 "gdbarch: gdbarch_saved_pc_after_call invalid");
4084 if (gdbarch_debug
>= 2)
4085 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4086 return gdbarch
->saved_pc_after_call (frame
);
4090 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4091 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4093 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4097 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4099 if (gdbarch
->frame_num_args
== 0)
4100 internal_error (__FILE__
, __LINE__
,
4101 "gdbarch: gdbarch_frame_num_args invalid");
4102 if (gdbarch_debug
>= 2)
4103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4104 return gdbarch
->frame_num_args (frame
);
4108 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4109 gdbarch_frame_num_args_ftype frame_num_args
)
4111 gdbarch
->frame_num_args
= frame_num_args
;
4115 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4117 return gdbarch
->stack_align
!= 0;
4121 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4123 if (gdbarch
->stack_align
== 0)
4124 internal_error (__FILE__
, __LINE__
,
4125 "gdbarch: gdbarch_stack_align invalid");
4126 if (gdbarch_debug
>= 2)
4127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4128 return gdbarch
->stack_align (sp
);
4132 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4133 gdbarch_stack_align_ftype stack_align
)
4135 gdbarch
->stack_align
= stack_align
;
4139 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4141 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4142 if (gdbarch_debug
>= 2)
4143 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4144 return gdbarch
->extra_stack_alignment_needed
;
4148 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4149 int extra_stack_alignment_needed
)
4151 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4155 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4157 return gdbarch
->reg_struct_has_addr
!= 0;
4161 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4163 if (gdbarch
->reg_struct_has_addr
== 0)
4164 internal_error (__FILE__
, __LINE__
,
4165 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4166 if (gdbarch_debug
>= 2)
4167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4168 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4172 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4173 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4175 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4179 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4181 return gdbarch
->save_dummy_frame_tos
!= 0;
4185 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4187 if (gdbarch
->save_dummy_frame_tos
== 0)
4188 internal_error (__FILE__
, __LINE__
,
4189 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4190 if (gdbarch_debug
>= 2)
4191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4192 gdbarch
->save_dummy_frame_tos (sp
);
4196 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4197 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4199 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4203 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4205 if (gdbarch_debug
>= 2)
4206 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4207 return gdbarch
->parm_boundary
;
4211 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4214 gdbarch
->parm_boundary
= parm_boundary
;
4217 const struct floatformat
*
4218 gdbarch_float_format (struct gdbarch
*gdbarch
)
4220 if (gdbarch_debug
>= 2)
4221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4222 return gdbarch
->float_format
;
4226 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4227 const struct floatformat
* float_format
)
4229 gdbarch
->float_format
= float_format
;
4232 const struct floatformat
*
4233 gdbarch_double_format (struct gdbarch
*gdbarch
)
4235 if (gdbarch_debug
>= 2)
4236 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4237 return gdbarch
->double_format
;
4241 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4242 const struct floatformat
* double_format
)
4244 gdbarch
->double_format
= double_format
;
4247 const struct floatformat
*
4248 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4250 if (gdbarch_debug
>= 2)
4251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4252 return gdbarch
->long_double_format
;
4256 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4257 const struct floatformat
* long_double_format
)
4259 gdbarch
->long_double_format
= long_double_format
;
4263 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4265 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4266 internal_error (__FILE__
, __LINE__
,
4267 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4268 if (gdbarch_debug
>= 2)
4269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4270 return gdbarch
->convert_from_func_ptr_addr (addr
);
4274 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4275 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4277 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4281 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4283 if (gdbarch
->addr_bits_remove
== 0)
4284 internal_error (__FILE__
, __LINE__
,
4285 "gdbarch: gdbarch_addr_bits_remove invalid");
4286 if (gdbarch_debug
>= 2)
4287 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4288 return gdbarch
->addr_bits_remove (addr
);
4292 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4293 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4295 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4299 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4301 if (gdbarch
->smash_text_address
== 0)
4302 internal_error (__FILE__
, __LINE__
,
4303 "gdbarch: gdbarch_smash_text_address invalid");
4304 if (gdbarch_debug
>= 2)
4305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4306 return gdbarch
->smash_text_address (addr
);
4310 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4311 gdbarch_smash_text_address_ftype smash_text_address
)
4313 gdbarch
->smash_text_address
= smash_text_address
;
4317 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4319 return gdbarch
->software_single_step
!= 0;
4323 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4325 if (gdbarch
->software_single_step
== 0)
4326 internal_error (__FILE__
, __LINE__
,
4327 "gdbarch: gdbarch_software_single_step invalid");
4328 if (gdbarch_debug
>= 2)
4329 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4330 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4334 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4335 gdbarch_software_single_step_ftype software_single_step
)
4337 gdbarch
->software_single_step
= software_single_step
;
4341 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4343 if (gdbarch
->print_insn
== 0)
4344 internal_error (__FILE__
, __LINE__
,
4345 "gdbarch: gdbarch_print_insn invalid");
4346 if (gdbarch_debug
>= 2)
4347 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4348 return gdbarch
->print_insn (vma
, info
);
4352 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4353 gdbarch_print_insn_ftype print_insn
)
4355 gdbarch
->print_insn
= print_insn
;
4359 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4361 if (gdbarch
->skip_trampoline_code
== 0)
4362 internal_error (__FILE__
, __LINE__
,
4363 "gdbarch: gdbarch_skip_trampoline_code invalid");
4364 if (gdbarch_debug
>= 2)
4365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4366 return gdbarch
->skip_trampoline_code (pc
);
4370 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4371 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4373 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4377 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4379 if (gdbarch
->in_solib_call_trampoline
== 0)
4380 internal_error (__FILE__
, __LINE__
,
4381 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4382 if (gdbarch_debug
>= 2)
4383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4384 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4388 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4389 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4391 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4395 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4397 if (gdbarch
->in_function_epilogue_p
== 0)
4398 internal_error (__FILE__
, __LINE__
,
4399 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4400 if (gdbarch_debug
>= 2)
4401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4402 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4406 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4407 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4409 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4413 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4415 if (gdbarch
->construct_inferior_arguments
== 0)
4416 internal_error (__FILE__
, __LINE__
,
4417 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4418 if (gdbarch_debug
>= 2)
4419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4420 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4424 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4425 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4427 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4431 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4433 return gdbarch
->dwarf2_build_frame_info
!= 0;
4437 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4439 if (gdbarch
->dwarf2_build_frame_info
== 0)
4440 internal_error (__FILE__
, __LINE__
,
4441 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4442 if (gdbarch_debug
>= 2)
4443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4444 gdbarch
->dwarf2_build_frame_info (objfile
);
4448 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4449 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4451 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4455 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4457 if (gdbarch
->elf_make_msymbol_special
== 0)
4458 internal_error (__FILE__
, __LINE__
,
4459 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4460 if (gdbarch_debug
>= 2)
4461 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4462 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4466 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4467 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4469 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4473 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4475 if (gdbarch
->coff_make_msymbol_special
== 0)
4476 internal_error (__FILE__
, __LINE__
,
4477 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4478 if (gdbarch_debug
>= 2)
4479 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4480 gdbarch
->coff_make_msymbol_special (val
, msym
);
4484 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4485 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4487 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4491 /* Keep a registry of per-architecture data-pointers required by GDB
4497 gdbarch_data_init_ftype
*init
;
4498 gdbarch_data_free_ftype
*free
;
4501 struct gdbarch_data_registration
4503 struct gdbarch_data
*data
;
4504 struct gdbarch_data_registration
*next
;
4507 struct gdbarch_data_registry
4510 struct gdbarch_data_registration
*registrations
;
4513 struct gdbarch_data_registry gdbarch_data_registry
=
4518 struct gdbarch_data
*
4519 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4520 gdbarch_data_free_ftype
*free
)
4522 struct gdbarch_data_registration
**curr
;
4523 for (curr
= &gdbarch_data_registry
.registrations
;
4525 curr
= &(*curr
)->next
);
4526 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4527 (*curr
)->next
= NULL
;
4528 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4529 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4530 (*curr
)->data
->init
= init
;
4531 (*curr
)->data
->free
= free
;
4532 return (*curr
)->data
;
4536 /* Walk through all the registered users initializing each in turn. */
4539 init_gdbarch_data (struct gdbarch
*gdbarch
)
4541 struct gdbarch_data_registration
*rego
;
4542 for (rego
= gdbarch_data_registry
.registrations
;
4546 struct gdbarch_data
*data
= rego
->data
;
4547 gdb_assert (data
->index
< gdbarch
->nr_data
);
4548 if (data
->init
!= NULL
)
4550 void *pointer
= data
->init (gdbarch
);
4551 set_gdbarch_data (gdbarch
, data
, pointer
);
4556 /* Create/delete the gdbarch data vector. */
4559 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4561 gdb_assert (gdbarch
->data
== NULL
);
4562 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4563 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4567 free_gdbarch_data (struct gdbarch
*gdbarch
)
4569 struct gdbarch_data_registration
*rego
;
4570 gdb_assert (gdbarch
->data
!= NULL
);
4571 for (rego
= gdbarch_data_registry
.registrations
;
4575 struct gdbarch_data
*data
= rego
->data
;
4576 gdb_assert (data
->index
< gdbarch
->nr_data
);
4577 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4579 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4580 gdbarch
->data
[data
->index
] = NULL
;
4583 xfree (gdbarch
->data
);
4584 gdbarch
->data
= NULL
;
4588 /* Initialize the current value of thee specified per-architecture
4592 set_gdbarch_data (struct gdbarch
*gdbarch
,
4593 struct gdbarch_data
*data
,
4596 gdb_assert (data
->index
< gdbarch
->nr_data
);
4597 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4598 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4599 gdbarch
->data
[data
->index
] = pointer
;
4602 /* Return the current value of the specified per-architecture
4606 gdbarch_data (struct gdbarch_data
*data
)
4608 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4609 return current_gdbarch
->data
[data
->index
];
4614 /* Keep a registry of swapped data required by GDB modules. */
4619 struct gdbarch_swap_registration
*source
;
4620 struct gdbarch_swap
*next
;
4623 struct gdbarch_swap_registration
4626 unsigned long sizeof_data
;
4627 gdbarch_swap_ftype
*init
;
4628 struct gdbarch_swap_registration
*next
;
4631 struct gdbarch_swap_registry
4634 struct gdbarch_swap_registration
*registrations
;
4637 struct gdbarch_swap_registry gdbarch_swap_registry
=
4643 register_gdbarch_swap (void *data
,
4644 unsigned long sizeof_data
,
4645 gdbarch_swap_ftype
*init
)
4647 struct gdbarch_swap_registration
**rego
;
4648 for (rego
= &gdbarch_swap_registry
.registrations
;
4650 rego
= &(*rego
)->next
);
4651 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4652 (*rego
)->next
= NULL
;
4653 (*rego
)->init
= init
;
4654 (*rego
)->data
= data
;
4655 (*rego
)->sizeof_data
= sizeof_data
;
4660 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4662 struct gdbarch_swap_registration
*rego
;
4663 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4664 for (rego
= gdbarch_swap_registry
.registrations
;
4668 if (rego
->data
!= NULL
)
4670 (*curr
) = XMALLOC (struct gdbarch_swap
);
4671 (*curr
)->source
= rego
;
4672 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4673 (*curr
)->next
= NULL
;
4674 memset (rego
->data
, 0, rego
->sizeof_data
);
4675 curr
= &(*curr
)->next
;
4677 if (rego
->init
!= NULL
)
4683 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4685 struct gdbarch_swap
*curr
;
4686 for (curr
= gdbarch
->swap
;
4689 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4693 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4695 struct gdbarch_swap
*curr
;
4696 for (curr
= gdbarch
->swap
;
4699 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4703 /* Keep a registry of the architectures known by GDB. */
4705 struct gdbarch_registration
4707 enum bfd_architecture bfd_architecture
;
4708 gdbarch_init_ftype
*init
;
4709 gdbarch_dump_tdep_ftype
*dump_tdep
;
4710 struct gdbarch_list
*arches
;
4711 struct gdbarch_registration
*next
;
4714 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4717 append_name (const char ***buf
, int *nr
, const char *name
)
4719 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4725 gdbarch_printable_names (void)
4729 /* Accumulate a list of names based on the registed list of
4731 enum bfd_architecture a
;
4733 const char **arches
= NULL
;
4734 struct gdbarch_registration
*rego
;
4735 for (rego
= gdbarch_registry
;
4739 const struct bfd_arch_info
*ap
;
4740 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4742 internal_error (__FILE__
, __LINE__
,
4743 "gdbarch_architecture_names: multi-arch unknown");
4746 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4751 append_name (&arches
, &nr_arches
, NULL
);
4755 /* Just return all the architectures that BFD knows. Assume that
4756 the legacy architecture framework supports them. */
4757 return bfd_arch_list ();
4762 gdbarch_register (enum bfd_architecture bfd_architecture
,
4763 gdbarch_init_ftype
*init
,
4764 gdbarch_dump_tdep_ftype
*dump_tdep
)
4766 struct gdbarch_registration
**curr
;
4767 const struct bfd_arch_info
*bfd_arch_info
;
4768 /* Check that BFD recognizes this architecture */
4769 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4770 if (bfd_arch_info
== NULL
)
4772 internal_error (__FILE__
, __LINE__
,
4773 "gdbarch: Attempt to register unknown architecture (%d)",
4776 /* Check that we haven't seen this architecture before */
4777 for (curr
= &gdbarch_registry
;
4779 curr
= &(*curr
)->next
)
4781 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4782 internal_error (__FILE__
, __LINE__
,
4783 "gdbarch: Duplicate registraration of architecture (%s)",
4784 bfd_arch_info
->printable_name
);
4788 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4789 bfd_arch_info
->printable_name
,
4792 (*curr
) = XMALLOC (struct gdbarch_registration
);
4793 (*curr
)->bfd_architecture
= bfd_architecture
;
4794 (*curr
)->init
= init
;
4795 (*curr
)->dump_tdep
= dump_tdep
;
4796 (*curr
)->arches
= NULL
;
4797 (*curr
)->next
= NULL
;
4798 /* When non- multi-arch, install whatever target dump routine we've
4799 been provided - hopefully that routine has been written correctly
4800 and works regardless of multi-arch. */
4801 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4802 && startup_gdbarch
.dump_tdep
== NULL
)
4803 startup_gdbarch
.dump_tdep
= dump_tdep
;
4807 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4808 gdbarch_init_ftype
*init
)
4810 gdbarch_register (bfd_architecture
, init
, NULL
);
4814 /* Look for an architecture using gdbarch_info. Base search on only
4815 BFD_ARCH_INFO and BYTE_ORDER. */
4817 struct gdbarch_list
*
4818 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4819 const struct gdbarch_info
*info
)
4821 for (; arches
!= NULL
; arches
= arches
->next
)
4823 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4825 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4833 /* Update the current architecture. Return ZERO if the update request
4837 gdbarch_update_p (struct gdbarch_info info
)
4839 struct gdbarch
*new_gdbarch
;
4840 struct gdbarch_list
**list
;
4841 struct gdbarch_registration
*rego
;
4843 /* Fill in missing parts of the INFO struct using a number of
4844 sources: ``set ...''; INFOabfd supplied; existing target. */
4846 /* ``(gdb) set architecture ...'' */
4847 if (info
.bfd_arch_info
== NULL
4848 && !TARGET_ARCHITECTURE_AUTO
)
4849 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4850 if (info
.bfd_arch_info
== NULL
4851 && info
.abfd
!= NULL
4852 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4853 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4854 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4855 if (info
.bfd_arch_info
== NULL
)
4856 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4858 /* ``(gdb) set byte-order ...'' */
4859 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4860 && !TARGET_BYTE_ORDER_AUTO
)
4861 info
.byte_order
= TARGET_BYTE_ORDER
;
4862 /* From the INFO struct. */
4863 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4864 && info
.abfd
!= NULL
)
4865 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
4866 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
4867 : BFD_ENDIAN_UNKNOWN
);
4868 /* From the current target. */
4869 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
4870 info
.byte_order
= TARGET_BYTE_ORDER
;
4872 /* Must have found some sort of architecture. */
4873 gdb_assert (info
.bfd_arch_info
!= NULL
);
4877 fprintf_unfiltered (gdb_stdlog
,
4878 "gdbarch_update: info.bfd_arch_info %s\n",
4879 (info
.bfd_arch_info
!= NULL
4880 ? info
.bfd_arch_info
->printable_name
4882 fprintf_unfiltered (gdb_stdlog
,
4883 "gdbarch_update: info.byte_order %d (%s)\n",
4885 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4886 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4888 fprintf_unfiltered (gdb_stdlog
,
4889 "gdbarch_update: info.abfd 0x%lx\n",
4891 fprintf_unfiltered (gdb_stdlog
,
4892 "gdbarch_update: info.tdep_info 0x%lx\n",
4893 (long) info
.tdep_info
);
4896 /* Find the target that knows about this architecture. */
4897 for (rego
= gdbarch_registry
;
4900 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4905 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4909 /* Ask the target for a replacement architecture. */
4910 new_gdbarch
= rego
->init (info
, rego
->arches
);
4912 /* Did the target like it? No. Reject the change. */
4913 if (new_gdbarch
== NULL
)
4916 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4920 /* Did the architecture change? No. Do nothing. */
4921 if (current_gdbarch
== new_gdbarch
)
4924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4926 new_gdbarch
->bfd_arch_info
->printable_name
);
4930 /* Swap all data belonging to the old target out */
4931 swapout_gdbarch_swap (current_gdbarch
);
4933 /* Is this a pre-existing architecture? Yes. Swap it in. */
4934 for (list
= ®o
->arches
;
4936 list
= &(*list
)->next
)
4938 if ((*list
)->gdbarch
== new_gdbarch
)
4941 fprintf_unfiltered (gdb_stdlog
,
4942 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4944 new_gdbarch
->bfd_arch_info
->printable_name
);
4945 current_gdbarch
= new_gdbarch
;
4946 swapin_gdbarch_swap (new_gdbarch
);
4947 architecture_changed_event ();
4952 /* Append this new architecture to this targets list. */
4953 (*list
) = XMALLOC (struct gdbarch_list
);
4954 (*list
)->next
= NULL
;
4955 (*list
)->gdbarch
= new_gdbarch
;
4957 /* Switch to this new architecture. Dump it out. */
4958 current_gdbarch
= new_gdbarch
;
4961 fprintf_unfiltered (gdb_stdlog
,
4962 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4964 new_gdbarch
->bfd_arch_info
->printable_name
);
4967 /* Check that the newly installed architecture is valid. Plug in
4968 any post init values. */
4969 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4970 verify_gdbarch (new_gdbarch
);
4972 /* Initialize the per-architecture memory (swap) areas.
4973 CURRENT_GDBARCH must be update before these modules are
4975 init_gdbarch_swap (new_gdbarch
);
4977 /* Initialize the per-architecture data-pointer of all parties that
4978 registered an interest in this architecture. CURRENT_GDBARCH
4979 must be updated before these modules are called. */
4980 init_gdbarch_data (new_gdbarch
);
4981 architecture_changed_event ();
4984 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4992 /* Pointer to the target-dependent disassembly function. */
4993 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4994 disassemble_info tm_print_insn_info
;
4997 extern void _initialize_gdbarch (void);
5000 _initialize_gdbarch (void)
5002 struct cmd_list_element
*c
;
5004 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5005 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5006 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5007 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5008 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5010 add_show_from_set (add_set_cmd ("arch",
5013 (char *)&gdbarch_debug
,
5014 "Set architecture debugging.\n\
5015 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5017 c
= add_set_cmd ("archdebug",
5020 (char *)&gdbarch_debug
,
5021 "Set architecture debugging.\n\
5022 When non-zero, architecture debugging is enabled.", &setlist
);
5024 deprecate_cmd (c
, "set debug arch");
5025 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");