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
;
158 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
159 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
160 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
161 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
162 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
163 gdbarch_register_name_ftype
*register_name
;
166 gdbarch_register_byte_ftype
*register_byte
;
167 gdbarch_register_raw_size_ftype
*register_raw_size
;
168 int max_register_raw_size
;
169 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
170 int max_register_virtual_size
;
171 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
172 gdbarch_do_registers_info_ftype
*do_registers_info
;
173 gdbarch_print_float_info_ftype
*print_float_info
;
174 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
175 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
176 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
177 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
178 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
179 int use_generic_dummy_frames
;
180 int call_dummy_location
;
181 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
182 CORE_ADDR call_dummy_start_offset
;
183 CORE_ADDR call_dummy_breakpoint_offset
;
184 int call_dummy_breakpoint_offset_p
;
185 int call_dummy_length
;
186 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
188 LONGEST
* call_dummy_words
;
189 int sizeof_call_dummy_words
;
190 int call_dummy_stack_adjust_p
;
191 int call_dummy_stack_adjust
;
192 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
193 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
194 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
195 int believe_pcc_promotion
;
196 int believe_pcc_promotion_type
;
197 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
198 gdbarch_get_saved_register_ftype
*get_saved_register
;
199 gdbarch_register_convertible_ftype
*register_convertible
;
200 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
201 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
202 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
203 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
204 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
205 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
206 gdbarch_integer_to_address_ftype
*integer_to_address
;
207 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
208 gdbarch_extract_return_value_ftype
*extract_return_value
;
209 gdbarch_push_arguments_ftype
*push_arguments
;
210 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
211 gdbarch_push_return_address_ftype
*push_return_address
;
212 gdbarch_pop_frame_ftype
*pop_frame
;
213 gdbarch_store_struct_return_ftype
*store_struct_return
;
214 gdbarch_store_return_value_ftype
*store_return_value
;
215 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
216 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
217 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
218 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
219 gdbarch_skip_prologue_ftype
*skip_prologue
;
220 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
221 gdbarch_inner_than_ftype
*inner_than
;
222 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
223 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
224 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
225 CORE_ADDR decr_pc_after_break
;
226 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
227 CORE_ADDR function_start_offset
;
228 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
229 CORE_ADDR frame_args_skip
;
230 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
231 gdbarch_frame_chain_ftype
*frame_chain
;
232 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
233 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
234 gdbarch_frame_args_address_ftype
*frame_args_address
;
235 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
236 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
237 gdbarch_frame_num_args_ftype
*frame_num_args
;
238 gdbarch_stack_align_ftype
*stack_align
;
239 int extra_stack_alignment_needed
;
240 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
241 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
243 const struct floatformat
* float_format
;
244 const struct floatformat
* double_format
;
245 const struct floatformat
* long_double_format
;
246 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
247 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
248 gdbarch_smash_text_address_ftype
*smash_text_address
;
249 gdbarch_software_single_step_ftype
*software_single_step
;
250 gdbarch_print_insn_ftype
*print_insn
;
251 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
252 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
253 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
254 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
255 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
256 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
257 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
261 /* The default architecture uses host values (for want of a better
264 extern const struct bfd_arch_info bfd_default_arch_struct
;
266 struct gdbarch startup_gdbarch
=
268 /* basic architecture information */
269 &bfd_default_arch_struct
,
271 /* target specific vector and its dump routine */
273 /*per-architecture data-pointers and swap regions */
275 /* Multi-arch values */
279 8 * sizeof (LONGEST
),
282 8 * sizeof (long double),
313 generic_register_raw_size
,
315 generic_register_virtual_size
,
344 generic_get_saved_register
,
399 generic_in_function_epilogue_p
,
400 construct_inferior_arguments
,
404 /* startup_gdbarch() */
407 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
409 /* Do any initialization needed for a non-multiarch configuration
410 after the _initialize_MODULE functions have been run. */
412 initialize_non_multiarch ()
414 alloc_gdbarch_data (&startup_gdbarch
);
415 init_gdbarch_swap (&startup_gdbarch
);
416 init_gdbarch_data (&startup_gdbarch
);
420 /* Create a new ``struct gdbarch'' based on information provided by
421 ``struct gdbarch_info''. */
424 gdbarch_alloc (const struct gdbarch_info
*info
,
425 struct gdbarch_tdep
*tdep
)
427 /* NOTE: The new architecture variable is named ``current_gdbarch''
428 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
429 the current local architecture and not the previous global
430 architecture. This ensures that the new architectures initial
431 values are not influenced by the previous architecture. Once
432 everything is parameterised with gdbarch, this will go away. */
433 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
434 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
436 alloc_gdbarch_data (current_gdbarch
);
438 current_gdbarch
->tdep
= tdep
;
440 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
441 current_gdbarch
->byte_order
= info
->byte_order
;
443 /* Force the explicit initialization of these. */
444 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
445 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
446 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
447 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
448 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
449 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
450 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
451 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
452 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
453 current_gdbarch
->char_signed
= -1;
454 current_gdbarch
->read_pc
= generic_target_read_pc
;
455 current_gdbarch
->write_pc
= generic_target_write_pc
;
456 current_gdbarch
->read_fp
= generic_target_read_fp
;
457 current_gdbarch
->read_sp
= generic_target_read_sp
;
458 current_gdbarch
->write_sp
= generic_target_write_sp
;
459 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
460 current_gdbarch
->num_regs
= -1;
461 current_gdbarch
->sp_regnum
= -1;
462 current_gdbarch
->fp_regnum
= -1;
463 current_gdbarch
->pc_regnum
= -1;
464 current_gdbarch
->ps_regnum
= -1;
465 current_gdbarch
->fp0_regnum
= -1;
466 current_gdbarch
->npc_regnum
= -1;
467 current_gdbarch
->nnpc_regnum
= -1;
468 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
469 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
470 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
471 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
472 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
473 current_gdbarch
->register_name
= legacy_register_name
;
474 current_gdbarch
->register_size
= -1;
475 current_gdbarch
->register_bytes
= -1;
476 current_gdbarch
->max_register_raw_size
= -1;
477 current_gdbarch
->max_register_virtual_size
= -1;
478 current_gdbarch
->do_registers_info
= do_registers_info
;
479 current_gdbarch
->print_float_info
= default_print_float_info
;
480 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
481 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
482 current_gdbarch
->cannot_store_register
= cannot_register_not
;
483 current_gdbarch
->use_generic_dummy_frames
= -1;
484 current_gdbarch
->call_dummy_start_offset
= -1;
485 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
486 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
487 current_gdbarch
->call_dummy_length
= -1;
488 current_gdbarch
->call_dummy_p
= -1;
489 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
490 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
491 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
492 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
493 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
494 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
495 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
496 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
497 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
498 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
499 current_gdbarch
->push_arguments
= default_push_arguments
;
500 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
501 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
502 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
503 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
504 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
505 current_gdbarch
->decr_pc_after_break
= -1;
506 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
507 current_gdbarch
->function_start_offset
= -1;
508 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
509 current_gdbarch
->frame_args_skip
= -1;
510 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
511 current_gdbarch
->frame_chain_valid
= func_frame_chain_valid
;
512 current_gdbarch
->extra_stack_alignment_needed
= 1;
513 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
514 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
515 current_gdbarch
->smash_text_address
= core_addr_identity
;
516 current_gdbarch
->print_insn
= legacy_print_insn
;
517 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
518 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
519 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
520 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
521 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
522 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
523 /* gdbarch_alloc() */
525 return current_gdbarch
;
529 /* Free a gdbarch struct. This should never happen in normal
530 operation --- once you've created a gdbarch, you keep it around.
531 However, if an architecture's init function encounters an error
532 building the structure, it may need to clean up a partially
533 constructed gdbarch. */
536 gdbarch_free (struct gdbarch
*arch
)
538 gdb_assert (arch
!= NULL
);
539 free_gdbarch_data (arch
);
544 /* Ensure that all values in a GDBARCH are reasonable. */
547 verify_gdbarch (struct gdbarch
*gdbarch
)
550 struct cleanup
*cleanups
;
553 /* Only perform sanity checks on a multi-arch target. */
556 log
= mem_fileopen ();
557 cleanups
= make_cleanup_ui_file_delete (log
);
559 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
560 fprintf_unfiltered (log
, "\n\tbyte-order");
561 if (gdbarch
->bfd_arch_info
== NULL
)
562 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
563 /* Check those that need to be defined for the given multi-arch level. */
564 /* Skip verify of short_bit, invalid_p == 0 */
565 /* Skip verify of int_bit, invalid_p == 0 */
566 /* Skip verify of long_bit, invalid_p == 0 */
567 /* Skip verify of long_long_bit, invalid_p == 0 */
568 /* Skip verify of float_bit, invalid_p == 0 */
569 /* Skip verify of double_bit, invalid_p == 0 */
570 /* Skip verify of long_double_bit, invalid_p == 0 */
571 /* Skip verify of ptr_bit, invalid_p == 0 */
572 if (gdbarch
->addr_bit
== 0)
573 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
574 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
575 if (gdbarch
->char_signed
== -1)
576 gdbarch
->char_signed
= 1;
577 /* Skip verify of read_pc, invalid_p == 0 */
578 /* Skip verify of write_pc, invalid_p == 0 */
579 /* Skip verify of read_fp, invalid_p == 0 */
580 /* Skip verify of read_sp, invalid_p == 0 */
581 /* Skip verify of write_sp, invalid_p == 0 */
582 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
583 /* Skip verify of register_read, has predicate */
584 /* Skip verify of register_write, has predicate */
585 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
586 && (gdbarch
->num_regs
== -1))
587 fprintf_unfiltered (log
, "\n\tnum_regs");
588 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
589 /* Skip verify of sp_regnum, invalid_p == 0 */
590 /* Skip verify of fp_regnum, invalid_p == 0 */
591 /* Skip verify of pc_regnum, invalid_p == 0 */
592 /* Skip verify of ps_regnum, invalid_p == 0 */
593 /* Skip verify of fp0_regnum, invalid_p == 0 */
594 /* Skip verify of npc_regnum, invalid_p == 0 */
595 /* Skip verify of nnpc_regnum, invalid_p == 0 */
596 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
597 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
598 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
599 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
600 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
601 /* Skip verify of register_name, invalid_p == 0 */
602 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
603 && (gdbarch
->register_size
== -1))
604 fprintf_unfiltered (log
, "\n\tregister_size");
605 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
606 && (gdbarch
->register_bytes
== -1))
607 fprintf_unfiltered (log
, "\n\tregister_bytes");
608 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
609 && (gdbarch
->register_byte
== 0))
610 fprintf_unfiltered (log
, "\n\tregister_byte");
611 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
612 && (gdbarch
->register_raw_size
== 0))
613 fprintf_unfiltered (log
, "\n\tregister_raw_size");
614 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
615 && (gdbarch
->max_register_raw_size
== -1))
616 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
617 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
618 && (gdbarch
->register_virtual_size
== 0))
619 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
620 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
621 && (gdbarch
->max_register_virtual_size
== -1))
622 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
623 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
624 && (gdbarch
->register_virtual_type
== 0))
625 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
626 /* Skip verify of do_registers_info, invalid_p == 0 */
627 /* Skip verify of print_float_info, invalid_p == 0 */
628 /* Skip verify of register_sim_regno, invalid_p == 0 */
629 /* Skip verify of register_bytes_ok, has predicate */
630 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
631 /* Skip verify of cannot_store_register, invalid_p == 0 */
632 /* Skip verify of get_longjmp_target, has predicate */
633 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
634 && (gdbarch
->use_generic_dummy_frames
== -1))
635 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
636 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
637 && (gdbarch
->call_dummy_location
== 0))
638 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
639 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
640 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
641 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
642 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
643 && (gdbarch
->call_dummy_start_offset
== -1))
644 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
645 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
646 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
647 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
648 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
649 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
650 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
651 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
652 && (gdbarch
->call_dummy_length
== -1))
653 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
654 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
655 && (gdbarch
->pc_in_call_dummy
== 0))
656 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
657 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
658 && (gdbarch
->call_dummy_p
== -1))
659 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
660 /* Skip verify of call_dummy_words, invalid_p == 0 */
661 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
662 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
663 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
664 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
665 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
666 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
667 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
668 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
669 && (gdbarch
->fix_call_dummy
== 0))
670 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
671 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
672 /* Skip verify of init_frame_pc, invalid_p == 0 */
673 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
674 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
675 && (gdbarch
->get_saved_register
== 0))
676 fprintf_unfiltered (log
, "\n\tget_saved_register");
677 /* Skip verify of register_convertible, invalid_p == 0 */
678 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
679 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
680 /* Skip verify of fetch_pseudo_register, has predicate */
681 /* Skip verify of store_pseudo_register, has predicate */
682 /* Skip verify of pointer_to_address, invalid_p == 0 */
683 /* Skip verify of address_to_pointer, invalid_p == 0 */
684 /* Skip verify of integer_to_address, has predicate */
685 /* Skip verify of return_value_on_stack, invalid_p == 0 */
686 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
687 && (gdbarch
->extract_return_value
== 0))
688 fprintf_unfiltered (log
, "\n\textract_return_value");
689 /* Skip verify of push_arguments, invalid_p == 0 */
690 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
691 && (gdbarch
->push_dummy_frame
== 0))
692 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
693 /* Skip verify of push_return_address, has predicate */
694 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
695 && (gdbarch
->pop_frame
== 0))
696 fprintf_unfiltered (log
, "\n\tpop_frame");
697 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
698 && (gdbarch
->store_struct_return
== 0))
699 fprintf_unfiltered (log
, "\n\tstore_struct_return");
700 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
701 && (gdbarch
->store_return_value
== 0))
702 fprintf_unfiltered (log
, "\n\tstore_return_value");
703 /* Skip verify of extract_struct_value_address, has predicate */
704 /* Skip verify of use_struct_convention, invalid_p == 0 */
705 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
706 && (gdbarch
->frame_init_saved_regs
== 0))
707 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
708 /* Skip verify of init_extra_frame_info, has predicate */
709 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
710 && (gdbarch
->skip_prologue
== 0))
711 fprintf_unfiltered (log
, "\n\tskip_prologue");
712 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
713 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
714 && (gdbarch
->inner_than
== 0))
715 fprintf_unfiltered (log
, "\n\tinner_than");
716 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
717 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
718 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
719 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
720 && (gdbarch
->decr_pc_after_break
== -1))
721 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
722 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
723 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
724 && (gdbarch
->function_start_offset
== -1))
725 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
726 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
727 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
728 && (gdbarch
->frame_args_skip
== -1))
729 fprintf_unfiltered (log
, "\n\tframe_args_skip");
730 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
731 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
732 && (gdbarch
->frame_chain
== 0))
733 fprintf_unfiltered (log
, "\n\tframe_chain");
734 /* Skip verify of frame_chain_valid, invalid_p == 0 */
735 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
736 && (gdbarch
->frame_saved_pc
== 0))
737 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
738 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
739 && (gdbarch
->frame_args_address
== 0))
740 fprintf_unfiltered (log
, "\n\tframe_args_address");
741 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
742 && (gdbarch
->frame_locals_address
== 0))
743 fprintf_unfiltered (log
, "\n\tframe_locals_address");
744 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
745 && (gdbarch
->saved_pc_after_call
== 0))
746 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
747 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
748 && (gdbarch
->frame_num_args
== 0))
749 fprintf_unfiltered (log
, "\n\tframe_num_args");
750 /* Skip verify of stack_align, has predicate */
751 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
752 /* Skip verify of reg_struct_has_addr, has predicate */
753 /* Skip verify of save_dummy_frame_tos, has predicate */
754 if (gdbarch
->float_format
== 0)
755 gdbarch
->float_format
= default_float_format (gdbarch
);
756 if (gdbarch
->double_format
== 0)
757 gdbarch
->double_format
= default_double_format (gdbarch
);
758 if (gdbarch
->long_double_format
== 0)
759 gdbarch
->long_double_format
= default_double_format (gdbarch
);
760 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
761 /* Skip verify of addr_bits_remove, invalid_p == 0 */
762 /* Skip verify of smash_text_address, invalid_p == 0 */
763 /* Skip verify of software_single_step, has predicate */
764 /* Skip verify of print_insn, invalid_p == 0 */
765 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
766 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
767 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
768 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
769 /* Skip verify of dwarf2_build_frame_info, has predicate */
770 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
771 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
772 buf
= ui_file_xstrdup (log
, &dummy
);
773 make_cleanup (xfree
, buf
);
774 if (strlen (buf
) > 0)
775 internal_error (__FILE__
, __LINE__
,
776 "verify_gdbarch: the following are invalid ...%s",
778 do_cleanups (cleanups
);
782 /* Print out the details of the current architecture. */
784 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
785 just happens to match the global variable ``current_gdbarch''. That
786 way macros refering to that variable get the local and not the global
787 version - ulgh. Once everything is parameterised with gdbarch, this
791 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
793 fprintf_unfiltered (file
,
794 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
797 fprintf_unfiltered (file
,
798 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
799 (long) current_gdbarch
->in_function_epilogue_p
);
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: register_read = 0x%08lx\n",
803 (long) current_gdbarch
->register_read
);
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: register_write = 0x%08lx\n",
807 (long) current_gdbarch
->register_write
);
808 #ifdef ADDRESS_TO_POINTER
810 /* Macro might contain `[{}]' when not multi-arch */
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: %s # %s\n",
813 "ADDRESS_TO_POINTER(type, buf, addr)",
814 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
817 fprintf_unfiltered (file
,
818 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
819 (long) current_gdbarch
->address_to_pointer
820 /*ADDRESS_TO_POINTER ()*/);
822 #ifdef ADDR_BITS_REMOVE
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: %s # %s\n",
825 "ADDR_BITS_REMOVE(addr)",
826 XSTRING (ADDR_BITS_REMOVE (addr
)));
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
830 (long) current_gdbarch
->addr_bits_remove
831 /*ADDR_BITS_REMOVE ()*/);
833 #ifdef BELIEVE_PCC_PROMOTION
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
836 XSTRING (BELIEVE_PCC_PROMOTION
));
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
839 BELIEVE_PCC_PROMOTION
);
841 #ifdef BELIEVE_PCC_PROMOTION_TYPE
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
844 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
847 BELIEVE_PCC_PROMOTION_TYPE
);
849 #ifdef BREAKPOINT_FROM_PC
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: %s # %s\n",
852 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
853 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
857 (long) current_gdbarch
->breakpoint_from_pc
858 /*BREAKPOINT_FROM_PC ()*/);
860 #ifdef CALL_DUMMY_ADDRESS
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: %s # %s\n",
863 "CALL_DUMMY_ADDRESS()",
864 XSTRING (CALL_DUMMY_ADDRESS ()));
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
868 (long) current_gdbarch
->call_dummy_address
869 /*CALL_DUMMY_ADDRESS ()*/);
871 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
874 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
875 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
878 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
880 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
881 fprintf_unfiltered (file
,
882 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
883 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
886 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
888 #ifdef CALL_DUMMY_LENGTH
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
891 XSTRING (CALL_DUMMY_LENGTH
));
892 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
897 #ifdef CALL_DUMMY_LOCATION
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
900 XSTRING (CALL_DUMMY_LOCATION
));
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
903 CALL_DUMMY_LOCATION
);
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: CALL_DUMMY_P # %s\n",
908 XSTRING (CALL_DUMMY_P
));
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: CALL_DUMMY_P = %d\n",
913 #ifdef CALL_DUMMY_STACK_ADJUST
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
916 XSTRING (CALL_DUMMY_STACK_ADJUST
));
917 if (CALL_DUMMY_STACK_ADJUST_P
)
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
920 (long) CALL_DUMMY_STACK_ADJUST
);
922 #ifdef CALL_DUMMY_STACK_ADJUST_P
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
925 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
928 (long) CALL_DUMMY_STACK_ADJUST_P
);
930 #ifdef CALL_DUMMY_START_OFFSET
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
933 XSTRING (CALL_DUMMY_START_OFFSET
));
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
936 (long) CALL_DUMMY_START_OFFSET
);
938 #ifdef CALL_DUMMY_WORDS
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
941 XSTRING (CALL_DUMMY_WORDS
));
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
944 (long) CALL_DUMMY_WORDS
);
946 #ifdef CANNOT_FETCH_REGISTER
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: %s # %s\n",
949 "CANNOT_FETCH_REGISTER(regnum)",
950 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
954 (long) current_gdbarch
->cannot_fetch_register
955 /*CANNOT_FETCH_REGISTER ()*/);
957 #ifdef CANNOT_STORE_REGISTER
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: %s # %s\n",
960 "CANNOT_STORE_REGISTER(regnum)",
961 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
965 (long) current_gdbarch
->cannot_store_register
966 /*CANNOT_STORE_REGISTER ()*/);
968 #ifdef COERCE_FLOAT_TO_DOUBLE
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: %s # %s\n",
971 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
972 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
976 (long) current_gdbarch
->coerce_float_to_double
977 /*COERCE_FLOAT_TO_DOUBLE ()*/);
979 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
981 /* Macro might contain `[{}]' when not multi-arch */
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: %s # %s\n",
984 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
985 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
990 (long) current_gdbarch
->coff_make_msymbol_special
991 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
996 (long) current_gdbarch
->construct_inferior_arguments
);
997 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: %s # %s\n",
1000 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1001 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1005 (long) current_gdbarch
->convert_from_func_ptr_addr
1006 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1008 #ifdef DECR_PC_AFTER_BREAK
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1011 XSTRING (DECR_PC_AFTER_BREAK
));
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1014 (long) DECR_PC_AFTER_BREAK
);
1016 #ifdef DO_REGISTERS_INFO
1018 /* Macro might contain `[{}]' when not multi-arch */
1019 fprintf_unfiltered (file
,
1020 "gdbarch_dump: %s # %s\n",
1021 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1022 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1027 (long) current_gdbarch
->do_registers_info
1028 /*DO_REGISTERS_INFO ()*/);
1030 #ifdef DWARF2_BUILD_FRAME_INFO
1032 /* Macro might contain `[{}]' when not multi-arch */
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: %s # %s\n",
1035 "DWARF2_BUILD_FRAME_INFO(objfile)",
1036 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1041 (long) current_gdbarch
->dwarf2_build_frame_info
1042 /*DWARF2_BUILD_FRAME_INFO ()*/);
1044 #ifdef DWARF2_REG_TO_REGNUM
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: %s # %s\n",
1047 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1048 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1052 (long) current_gdbarch
->dwarf2_reg_to_regnum
1053 /*DWARF2_REG_TO_REGNUM ()*/);
1055 #ifdef DWARF_REG_TO_REGNUM
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: %s # %s\n",
1058 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1059 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1061 fprintf_unfiltered (file
,
1062 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1063 (long) current_gdbarch
->dwarf_reg_to_regnum
1064 /*DWARF_REG_TO_REGNUM ()*/);
1066 #ifdef ECOFF_REG_TO_REGNUM
1067 fprintf_unfiltered (file
,
1068 "gdbarch_dump: %s # %s\n",
1069 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1070 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1072 fprintf_unfiltered (file
,
1073 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1074 (long) current_gdbarch
->ecoff_reg_to_regnum
1075 /*ECOFF_REG_TO_REGNUM ()*/);
1077 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1079 /* Macro might contain `[{}]' when not multi-arch */
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: %s # %s\n",
1082 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1083 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1088 (long) current_gdbarch
->elf_make_msymbol_special
1089 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1091 #ifdef EXTRACT_RETURN_VALUE
1093 /* Macro might contain `[{}]' when not multi-arch */
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: %s # %s\n",
1096 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1097 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1102 (long) current_gdbarch
->extract_return_value
1103 /*EXTRACT_RETURN_VALUE ()*/);
1105 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: %s # %s\n",
1108 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1109 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1113 (long) current_gdbarch
->extract_struct_value_address
1114 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1116 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1119 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1122 EXTRA_STACK_ALIGNMENT_NEEDED
);
1124 #ifdef FETCH_PSEUDO_REGISTER
1126 /* Macro might contain `[{}]' when not multi-arch */
1127 fprintf_unfiltered (file
,
1128 "gdbarch_dump: %s # %s\n",
1129 "FETCH_PSEUDO_REGISTER(regnum)",
1130 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1135 (long) current_gdbarch
->fetch_pseudo_register
1136 /*FETCH_PSEUDO_REGISTER ()*/);
1138 #ifdef FIX_CALL_DUMMY
1140 /* Macro might contain `[{}]' when not multi-arch */
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: %s # %s\n",
1143 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1144 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1149 (long) current_gdbarch
->fix_call_dummy
1150 /*FIX_CALL_DUMMY ()*/);
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: FP0_REGNUM # %s\n",
1155 XSTRING (FP0_REGNUM
));
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: FP0_REGNUM = %d\n",
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: FP_REGNUM # %s\n",
1163 XSTRING (FP_REGNUM
));
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: FP_REGNUM = %d\n",
1168 #ifdef FRAMELESS_FUNCTION_INVOCATION
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: %s # %s\n",
1171 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1172 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1176 (long) current_gdbarch
->frameless_function_invocation
1177 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1179 #ifdef FRAME_ARGS_ADDRESS
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: %s # %s\n",
1182 "FRAME_ARGS_ADDRESS(fi)",
1183 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1187 (long) current_gdbarch
->frame_args_address
1188 /*FRAME_ARGS_ADDRESS ()*/);
1190 #ifdef FRAME_ARGS_SKIP
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1193 XSTRING (FRAME_ARGS_SKIP
));
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1196 (long) FRAME_ARGS_SKIP
);
1199 fprintf_unfiltered (file
,
1200 "gdbarch_dump: %s # %s\n",
1201 "FRAME_CHAIN(frame)",
1202 XSTRING (FRAME_CHAIN (frame
)));
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1206 (long) current_gdbarch
->frame_chain
1207 /*FRAME_CHAIN ()*/);
1209 #ifdef FRAME_CHAIN_VALID
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: %s # %s\n",
1212 "FRAME_CHAIN_VALID(chain, thisframe)",
1213 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1217 (long) current_gdbarch
->frame_chain_valid
1218 /*FRAME_CHAIN_VALID ()*/);
1220 #ifdef FRAME_INIT_SAVED_REGS
1222 /* Macro might contain `[{}]' when not multi-arch */
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: %s # %s\n",
1225 "FRAME_INIT_SAVED_REGS(frame)",
1226 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1231 (long) current_gdbarch
->frame_init_saved_regs
1232 /*FRAME_INIT_SAVED_REGS ()*/);
1234 #ifdef FRAME_LOCALS_ADDRESS
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: %s # %s\n",
1237 "FRAME_LOCALS_ADDRESS(fi)",
1238 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1240 fprintf_unfiltered (file
,
1241 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1242 (long) current_gdbarch
->frame_locals_address
1243 /*FRAME_LOCALS_ADDRESS ()*/);
1245 #ifdef FRAME_NUM_ARGS
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: %s # %s\n",
1248 "FRAME_NUM_ARGS(frame)",
1249 XSTRING (FRAME_NUM_ARGS (frame
)));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1253 (long) current_gdbarch
->frame_num_args
1254 /*FRAME_NUM_ARGS ()*/);
1256 #ifdef FRAME_SAVED_PC
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: %s # %s\n",
1259 "FRAME_SAVED_PC(fi)",
1260 XSTRING (FRAME_SAVED_PC (fi
)));
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1264 (long) current_gdbarch
->frame_saved_pc
1265 /*FRAME_SAVED_PC ()*/);
1267 #ifdef FUNCTION_START_OFFSET
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1270 XSTRING (FUNCTION_START_OFFSET
));
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1273 (long) FUNCTION_START_OFFSET
);
1275 #ifdef GET_LONGJMP_TARGET
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: %s # %s\n",
1278 "GET_LONGJMP_TARGET(pc)",
1279 XSTRING (GET_LONGJMP_TARGET (pc
)));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1283 (long) current_gdbarch
->get_longjmp_target
1284 /*GET_LONGJMP_TARGET ()*/);
1286 #ifdef GET_SAVED_REGISTER
1288 /* Macro might contain `[{}]' when not multi-arch */
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: %s # %s\n",
1291 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1292 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1295 fprintf_unfiltered (file
,
1296 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1297 (long) current_gdbarch
->get_saved_register
1298 /*GET_SAVED_REGISTER ()*/);
1300 #ifdef INIT_EXTRA_FRAME_INFO
1302 /* Macro might contain `[{}]' when not multi-arch */
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: %s # %s\n",
1305 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1306 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1311 (long) current_gdbarch
->init_extra_frame_info
1312 /*INIT_EXTRA_FRAME_INFO ()*/);
1314 #ifdef INIT_FRAME_PC
1316 /* Macro might contain `[{}]' when not multi-arch */
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: %s # %s\n",
1319 "INIT_FRAME_PC(fromleaf, prev)",
1320 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1323 fprintf_unfiltered (file
,
1324 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1325 (long) current_gdbarch
->init_frame_pc
1326 /*INIT_FRAME_PC ()*/);
1328 #ifdef INIT_FRAME_PC_FIRST
1330 /* Macro might contain `[{}]' when not multi-arch */
1331 fprintf_unfiltered (file
,
1332 "gdbarch_dump: %s # %s\n",
1333 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1334 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1339 (long) current_gdbarch
->init_frame_pc_first
1340 /*INIT_FRAME_PC_FIRST ()*/);
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: %s # %s\n",
1345 "INNER_THAN(lhs, rhs)",
1346 XSTRING (INNER_THAN (lhs
, rhs
)));
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1350 (long) current_gdbarch
->inner_than
1353 #ifdef INTEGER_TO_ADDRESS
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: %s # %s\n",
1356 "INTEGER_TO_ADDRESS(type, buf)",
1357 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1361 (long) current_gdbarch
->integer_to_address
1362 /*INTEGER_TO_ADDRESS ()*/);
1364 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1365 fprintf_unfiltered (file
,
1366 "gdbarch_dump: %s # %s\n",
1367 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1368 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1372 (long) current_gdbarch
->in_solib_call_trampoline
1373 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1375 #ifdef MAX_REGISTER_RAW_SIZE
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1378 XSTRING (MAX_REGISTER_RAW_SIZE
));
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1381 MAX_REGISTER_RAW_SIZE
);
1383 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1386 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1389 MAX_REGISTER_VIRTUAL_SIZE
);
1391 #ifdef MEMORY_INSERT_BREAKPOINT
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: %s # %s\n",
1394 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1395 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1399 (long) current_gdbarch
->memory_insert_breakpoint
1400 /*MEMORY_INSERT_BREAKPOINT ()*/);
1402 #ifdef MEMORY_REMOVE_BREAKPOINT
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: %s # %s\n",
1405 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1406 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1410 (long) current_gdbarch
->memory_remove_breakpoint
1411 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: NNPC_REGNUM # %s\n",
1416 XSTRING (NNPC_REGNUM
));
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: NNPC_REGNUM = %d\n",
1422 fprintf_unfiltered (file
,
1423 "gdbarch_dump: NPC_REGNUM # %s\n",
1424 XSTRING (NPC_REGNUM
));
1425 fprintf_unfiltered (file
,
1426 "gdbarch_dump: NPC_REGNUM = %d\n",
1429 #ifdef NUM_PSEUDO_REGS
1430 fprintf_unfiltered (file
,
1431 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1432 XSTRING (NUM_PSEUDO_REGS
));
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: NUM_REGS # %s\n",
1440 XSTRING (NUM_REGS
));
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: NUM_REGS = %d\n",
1445 #ifdef PARM_BOUNDARY
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1448 XSTRING (PARM_BOUNDARY
));
1449 fprintf_unfiltered (file
,
1450 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1453 #ifdef PC_IN_CALL_DUMMY
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: %s # %s\n",
1456 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1457 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1461 (long) current_gdbarch
->pc_in_call_dummy
1462 /*PC_IN_CALL_DUMMY ()*/);
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: PC_REGNUM # %s\n",
1467 XSTRING (PC_REGNUM
));
1468 fprintf_unfiltered (file
,
1469 "gdbarch_dump: PC_REGNUM = %d\n",
1472 #ifdef POINTER_TO_ADDRESS
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: %s # %s\n",
1475 "POINTER_TO_ADDRESS(type, buf)",
1476 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1478 fprintf_unfiltered (file
,
1479 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1480 (long) current_gdbarch
->pointer_to_address
1481 /*POINTER_TO_ADDRESS ()*/);
1485 /* Macro might contain `[{}]' when not multi-arch */
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: %s # %s\n",
1489 XSTRING (POP_FRAME (-)));
1492 fprintf_unfiltered (file
,
1493 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1494 (long) current_gdbarch
->pop_frame
1497 #ifdef PREPARE_TO_PROCEED
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: %s # %s\n",
1500 "PREPARE_TO_PROCEED(select_it)",
1501 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1505 (long) current_gdbarch
->prepare_to_proceed
1506 /*PREPARE_TO_PROCEED ()*/);
1508 #ifdef PRINT_FLOAT_INFO
1510 /* Macro might contain `[{}]' when not multi-arch */
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: %s # %s\n",
1513 "PRINT_FLOAT_INFO()",
1514 XSTRING (PRINT_FLOAT_INFO ()));
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1519 (long) current_gdbarch
->print_float_info
1520 /*PRINT_FLOAT_INFO ()*/);
1522 #ifdef PROLOGUE_FRAMELESS_P
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: %s # %s\n",
1525 "PROLOGUE_FRAMELESS_P(ip)",
1526 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1530 (long) current_gdbarch
->prologue_frameless_p
1531 /*PROLOGUE_FRAMELESS_P ()*/);
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: PS_REGNUM # %s\n",
1536 XSTRING (PS_REGNUM
));
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: PS_REGNUM = %d\n",
1541 #ifdef PUSH_ARGUMENTS
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: %s # %s\n",
1544 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1545 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1547 fprintf_unfiltered (file
,
1548 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1549 (long) current_gdbarch
->push_arguments
1550 /*PUSH_ARGUMENTS ()*/);
1552 #ifdef PUSH_DUMMY_FRAME
1554 /* Macro might contain `[{}]' when not multi-arch */
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: %s # %s\n",
1557 "PUSH_DUMMY_FRAME(-)",
1558 XSTRING (PUSH_DUMMY_FRAME (-)));
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1563 (long) current_gdbarch
->push_dummy_frame
1564 /*PUSH_DUMMY_FRAME ()*/);
1566 #ifdef PUSH_RETURN_ADDRESS
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: %s # %s\n",
1569 "PUSH_RETURN_ADDRESS(pc, sp)",
1570 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1574 (long) current_gdbarch
->push_return_address
1575 /*PUSH_RETURN_ADDRESS ()*/);
1577 #ifdef REGISTER_BYTE
1578 fprintf_unfiltered (file
,
1579 "gdbarch_dump: %s # %s\n",
1580 "REGISTER_BYTE(reg_nr)",
1581 XSTRING (REGISTER_BYTE (reg_nr
)));
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1585 (long) current_gdbarch
->register_byte
1586 /*REGISTER_BYTE ()*/);
1588 #ifdef REGISTER_BYTES
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: REGISTER_BYTES # %s\n",
1591 XSTRING (REGISTER_BYTES
));
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: REGISTER_BYTES = %d\n",
1596 #ifdef REGISTER_BYTES_OK
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: %s # %s\n",
1599 "REGISTER_BYTES_OK(nr_bytes)",
1600 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1604 (long) current_gdbarch
->register_bytes_ok
1605 /*REGISTER_BYTES_OK ()*/);
1607 #ifdef REGISTER_CONVERTIBLE
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: %s # %s\n",
1610 "REGISTER_CONVERTIBLE(nr)",
1611 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1613 fprintf_unfiltered (file
,
1614 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1615 (long) current_gdbarch
->register_convertible
1616 /*REGISTER_CONVERTIBLE ()*/);
1618 #ifdef REGISTER_CONVERT_TO_RAW
1620 /* Macro might contain `[{}]' when not multi-arch */
1621 fprintf_unfiltered (file
,
1622 "gdbarch_dump: %s # %s\n",
1623 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1624 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1627 fprintf_unfiltered (file
,
1628 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1629 (long) current_gdbarch
->register_convert_to_raw
1630 /*REGISTER_CONVERT_TO_RAW ()*/);
1632 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1634 /* Macro might contain `[{}]' when not multi-arch */
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: %s # %s\n",
1637 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1638 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1643 (long) current_gdbarch
->register_convert_to_virtual
1644 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1646 #ifdef REGISTER_NAME
1647 fprintf_unfiltered (file
,
1648 "gdbarch_dump: %s # %s\n",
1649 "REGISTER_NAME(regnr)",
1650 XSTRING (REGISTER_NAME (regnr
)));
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1654 (long) current_gdbarch
->register_name
1655 /*REGISTER_NAME ()*/);
1657 #ifdef REGISTER_RAW_SIZE
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: %s # %s\n",
1660 "REGISTER_RAW_SIZE(reg_nr)",
1661 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1665 (long) current_gdbarch
->register_raw_size
1666 /*REGISTER_RAW_SIZE ()*/);
1668 #ifdef REGISTER_SIM_REGNO
1669 fprintf_unfiltered (file
,
1670 "gdbarch_dump: %s # %s\n",
1671 "REGISTER_SIM_REGNO(reg_nr)",
1672 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1676 (long) current_gdbarch
->register_sim_regno
1677 /*REGISTER_SIM_REGNO ()*/);
1679 #ifdef REGISTER_SIZE
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: REGISTER_SIZE # %s\n",
1682 XSTRING (REGISTER_SIZE
));
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: REGISTER_SIZE = %d\n",
1687 #ifdef REGISTER_VIRTUAL_SIZE
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: %s # %s\n",
1690 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1691 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1695 (long) current_gdbarch
->register_virtual_size
1696 /*REGISTER_VIRTUAL_SIZE ()*/);
1698 #ifdef REGISTER_VIRTUAL_TYPE
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: %s # %s\n",
1701 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1702 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1704 fprintf_unfiltered (file
,
1705 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1706 (long) current_gdbarch
->register_virtual_type
1707 /*REGISTER_VIRTUAL_TYPE ()*/);
1709 #ifdef REG_STRUCT_HAS_ADDR
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: %s # %s\n",
1712 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1713 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1715 fprintf_unfiltered (file
,
1716 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1717 (long) current_gdbarch
->reg_struct_has_addr
1718 /*REG_STRUCT_HAS_ADDR ()*/);
1720 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1722 /* Macro might contain `[{}]' when not multi-arch */
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: %s # %s\n",
1725 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1726 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1731 (long) current_gdbarch
->remote_translate_xfer_address
1732 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1734 #ifdef RETURN_VALUE_ON_STACK
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: %s # %s\n",
1737 "RETURN_VALUE_ON_STACK(type)",
1738 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1742 (long) current_gdbarch
->return_value_on_stack
1743 /*RETURN_VALUE_ON_STACK ()*/);
1745 #ifdef SAVED_PC_AFTER_CALL
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: %s # %s\n",
1748 "SAVED_PC_AFTER_CALL(frame)",
1749 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1751 fprintf_unfiltered (file
,
1752 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1753 (long) current_gdbarch
->saved_pc_after_call
1754 /*SAVED_PC_AFTER_CALL ()*/);
1756 #ifdef SAVE_DUMMY_FRAME_TOS
1758 /* Macro might contain `[{}]' when not multi-arch */
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: %s # %s\n",
1761 "SAVE_DUMMY_FRAME_TOS(sp)",
1762 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1767 (long) current_gdbarch
->save_dummy_frame_tos
1768 /*SAVE_DUMMY_FRAME_TOS ()*/);
1770 #ifdef SDB_REG_TO_REGNUM
1771 fprintf_unfiltered (file
,
1772 "gdbarch_dump: %s # %s\n",
1773 "SDB_REG_TO_REGNUM(sdb_regnr)",
1774 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1778 (long) current_gdbarch
->sdb_reg_to_regnum
1779 /*SDB_REG_TO_REGNUM ()*/);
1781 #ifdef SIZEOF_CALL_DUMMY_WORDS
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1784 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1787 (long) SIZEOF_CALL_DUMMY_WORDS
);
1789 #ifdef SKIP_PROLOGUE
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: %s # %s\n",
1792 "SKIP_PROLOGUE(ip)",
1793 XSTRING (SKIP_PROLOGUE (ip
)));
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1797 (long) current_gdbarch
->skip_prologue
1798 /*SKIP_PROLOGUE ()*/);
1800 #ifdef SKIP_TRAMPOLINE_CODE
1801 fprintf_unfiltered (file
,
1802 "gdbarch_dump: %s # %s\n",
1803 "SKIP_TRAMPOLINE_CODE(pc)",
1804 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1808 (long) current_gdbarch
->skip_trampoline_code
1809 /*SKIP_TRAMPOLINE_CODE ()*/);
1811 #ifdef SMASH_TEXT_ADDRESS
1812 fprintf_unfiltered (file
,
1813 "gdbarch_dump: %s # %s\n",
1814 "SMASH_TEXT_ADDRESS(addr)",
1815 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1817 fprintf_unfiltered (file
,
1818 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1819 (long) current_gdbarch
->smash_text_address
1820 /*SMASH_TEXT_ADDRESS ()*/);
1822 #ifdef SOFTWARE_SINGLE_STEP
1824 /* Macro might contain `[{}]' when not multi-arch */
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: %s # %s\n",
1827 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1828 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1833 (long) current_gdbarch
->software_single_step
1834 /*SOFTWARE_SINGLE_STEP ()*/);
1837 fprintf_unfiltered (file
,
1838 "gdbarch_dump: SP_REGNUM # %s\n",
1839 XSTRING (SP_REGNUM
));
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: SP_REGNUM = %d\n",
1844 #ifdef STAB_REG_TO_REGNUM
1845 fprintf_unfiltered (file
,
1846 "gdbarch_dump: %s # %s\n",
1847 "STAB_REG_TO_REGNUM(stab_regnr)",
1848 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1852 (long) current_gdbarch
->stab_reg_to_regnum
1853 /*STAB_REG_TO_REGNUM ()*/);
1856 fprintf_unfiltered (file
,
1857 "gdbarch_dump: %s # %s\n",
1859 XSTRING (STACK_ALIGN (sp
)));
1861 fprintf_unfiltered (file
,
1862 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1863 (long) current_gdbarch
->stack_align
1864 /*STACK_ALIGN ()*/);
1866 #ifdef STORE_PSEUDO_REGISTER
1868 /* Macro might contain `[{}]' when not multi-arch */
1869 fprintf_unfiltered (file
,
1870 "gdbarch_dump: %s # %s\n",
1871 "STORE_PSEUDO_REGISTER(regnum)",
1872 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1877 (long) current_gdbarch
->store_pseudo_register
1878 /*STORE_PSEUDO_REGISTER ()*/);
1880 #ifdef STORE_RETURN_VALUE
1882 /* Macro might contain `[{}]' when not multi-arch */
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: %s # %s\n",
1885 "STORE_RETURN_VALUE(type, valbuf)",
1886 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1891 (long) current_gdbarch
->store_return_value
1892 /*STORE_RETURN_VALUE ()*/);
1894 #ifdef STORE_STRUCT_RETURN
1896 /* Macro might contain `[{}]' when not multi-arch */
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: %s # %s\n",
1899 "STORE_STRUCT_RETURN(addr, sp)",
1900 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1905 (long) current_gdbarch
->store_struct_return
1906 /*STORE_STRUCT_RETURN ()*/);
1908 #ifdef TARGET_ADDR_BIT
1909 fprintf_unfiltered (file
,
1910 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1911 XSTRING (TARGET_ADDR_BIT
));
1912 fprintf_unfiltered (file
,
1913 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1916 #ifdef TARGET_ARCHITECTURE
1917 fprintf_unfiltered (file
,
1918 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1919 XSTRING (TARGET_ARCHITECTURE
));
1920 if (TARGET_ARCHITECTURE
!= NULL
)
1921 fprintf_unfiltered (file
,
1922 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1923 TARGET_ARCHITECTURE
->printable_name
);
1925 #ifdef TARGET_BFD_VMA_BIT
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1928 XSTRING (TARGET_BFD_VMA_BIT
));
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1931 TARGET_BFD_VMA_BIT
);
1933 #ifdef TARGET_BYTE_ORDER
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1936 XSTRING (TARGET_BYTE_ORDER
));
1937 fprintf_unfiltered (file
,
1938 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1939 (long) TARGET_BYTE_ORDER
);
1941 #ifdef TARGET_CHAR_SIGNED
1942 fprintf_unfiltered (file
,
1943 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1944 XSTRING (TARGET_CHAR_SIGNED
));
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1947 TARGET_CHAR_SIGNED
);
1949 #ifdef TARGET_DOUBLE_BIT
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1952 XSTRING (TARGET_DOUBLE_BIT
));
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1957 #ifdef TARGET_DOUBLE_FORMAT
1958 fprintf_unfiltered (file
,
1959 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1960 XSTRING (TARGET_DOUBLE_FORMAT
));
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1963 (long) TARGET_DOUBLE_FORMAT
);
1965 #ifdef TARGET_FLOAT_BIT
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1968 XSTRING (TARGET_FLOAT_BIT
));
1969 fprintf_unfiltered (file
,
1970 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1973 #ifdef TARGET_FLOAT_FORMAT
1974 fprintf_unfiltered (file
,
1975 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1976 XSTRING (TARGET_FLOAT_FORMAT
));
1977 fprintf_unfiltered (file
,
1978 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1979 (long) TARGET_FLOAT_FORMAT
);
1981 #ifdef TARGET_INT_BIT
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1984 XSTRING (TARGET_INT_BIT
));
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1989 #ifdef TARGET_LONG_BIT
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1992 XSTRING (TARGET_LONG_BIT
));
1993 fprintf_unfiltered (file
,
1994 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
1997 #ifdef TARGET_LONG_DOUBLE_BIT
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2000 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2001 fprintf_unfiltered (file
,
2002 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2003 TARGET_LONG_DOUBLE_BIT
);
2005 #ifdef TARGET_LONG_DOUBLE_FORMAT
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2008 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2009 fprintf_unfiltered (file
,
2010 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2011 (long) TARGET_LONG_DOUBLE_FORMAT
);
2013 #ifdef TARGET_LONG_LONG_BIT
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2016 XSTRING (TARGET_LONG_LONG_BIT
));
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2019 TARGET_LONG_LONG_BIT
);
2021 #ifdef TARGET_PRINT_INSN
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: %s # %s\n",
2024 "TARGET_PRINT_INSN(vma, info)",
2025 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2029 (long) current_gdbarch
->print_insn
2030 /*TARGET_PRINT_INSN ()*/);
2032 #ifdef TARGET_PTR_BIT
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2035 XSTRING (TARGET_PTR_BIT
));
2036 fprintf_unfiltered (file
,
2037 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2040 #ifdef TARGET_READ_FP
2041 fprintf_unfiltered (file
,
2042 "gdbarch_dump: %s # %s\n",
2044 XSTRING (TARGET_READ_FP ()));
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2048 (long) current_gdbarch
->read_fp
2049 /*TARGET_READ_FP ()*/);
2051 #ifdef TARGET_READ_PC
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: %s # %s\n",
2054 "TARGET_READ_PC(ptid)",
2055 XSTRING (TARGET_READ_PC (ptid
)));
2057 fprintf_unfiltered (file
,
2058 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2059 (long) current_gdbarch
->read_pc
2060 /*TARGET_READ_PC ()*/);
2062 #ifdef TARGET_READ_SP
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: %s # %s\n",
2066 XSTRING (TARGET_READ_SP ()));
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2070 (long) current_gdbarch
->read_sp
2071 /*TARGET_READ_SP ()*/);
2073 #ifdef TARGET_SHORT_BIT
2074 fprintf_unfiltered (file
,
2075 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2076 XSTRING (TARGET_SHORT_BIT
));
2077 fprintf_unfiltered (file
,
2078 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2081 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2083 /* Macro might contain `[{}]' when not multi-arch */
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: %s # %s\n",
2086 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2087 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2090 fprintf_unfiltered (file
,
2091 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2092 (long) current_gdbarch
->virtual_frame_pointer
2093 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2095 #ifdef TARGET_WRITE_PC
2097 /* Macro might contain `[{}]' when not multi-arch */
2098 fprintf_unfiltered (file
,
2099 "gdbarch_dump: %s # %s\n",
2100 "TARGET_WRITE_PC(val, ptid)",
2101 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2104 fprintf_unfiltered (file
,
2105 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2106 (long) current_gdbarch
->write_pc
2107 /*TARGET_WRITE_PC ()*/);
2109 #ifdef TARGET_WRITE_SP
2111 /* Macro might contain `[{}]' when not multi-arch */
2112 fprintf_unfiltered (file
,
2113 "gdbarch_dump: %s # %s\n",
2114 "TARGET_WRITE_SP(val)",
2115 XSTRING (TARGET_WRITE_SP (val
)));
2118 fprintf_unfiltered (file
,
2119 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2120 (long) current_gdbarch
->write_sp
2121 /*TARGET_WRITE_SP ()*/);
2123 #ifdef USE_GENERIC_DUMMY_FRAMES
2124 fprintf_unfiltered (file
,
2125 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2126 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2129 USE_GENERIC_DUMMY_FRAMES
);
2131 #ifdef USE_STRUCT_CONVENTION
2132 fprintf_unfiltered (file
,
2133 "gdbarch_dump: %s # %s\n",
2134 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2135 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2139 (long) current_gdbarch
->use_struct_convention
2140 /*USE_STRUCT_CONVENTION ()*/);
2142 if (current_gdbarch
->dump_tdep
!= NULL
)
2143 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2146 struct gdbarch_tdep
*
2147 gdbarch_tdep (struct gdbarch
*gdbarch
)
2149 if (gdbarch_debug
>= 2)
2150 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2151 return gdbarch
->tdep
;
2155 const struct bfd_arch_info
*
2156 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2158 if (gdbarch_debug
>= 2)
2159 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2160 return gdbarch
->bfd_arch_info
;
2164 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2166 if (gdbarch_debug
>= 2)
2167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2168 return gdbarch
->byte_order
;
2172 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2174 /* Skip verify of short_bit, invalid_p == 0 */
2175 if (gdbarch_debug
>= 2)
2176 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2177 return gdbarch
->short_bit
;
2181 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2184 gdbarch
->short_bit
= short_bit
;
2188 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2190 /* Skip verify of int_bit, invalid_p == 0 */
2191 if (gdbarch_debug
>= 2)
2192 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2193 return gdbarch
->int_bit
;
2197 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2200 gdbarch
->int_bit
= int_bit
;
2204 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2206 /* Skip verify of long_bit, invalid_p == 0 */
2207 if (gdbarch_debug
>= 2)
2208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2209 return gdbarch
->long_bit
;
2213 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2216 gdbarch
->long_bit
= long_bit
;
2220 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2222 /* Skip verify of long_long_bit, invalid_p == 0 */
2223 if (gdbarch_debug
>= 2)
2224 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2225 return gdbarch
->long_long_bit
;
2229 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2232 gdbarch
->long_long_bit
= long_long_bit
;
2236 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2238 /* Skip verify of float_bit, invalid_p == 0 */
2239 if (gdbarch_debug
>= 2)
2240 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2241 return gdbarch
->float_bit
;
2245 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2248 gdbarch
->float_bit
= float_bit
;
2252 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2254 /* Skip verify of double_bit, invalid_p == 0 */
2255 if (gdbarch_debug
>= 2)
2256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2257 return gdbarch
->double_bit
;
2261 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2264 gdbarch
->double_bit
= double_bit
;
2268 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2270 /* Skip verify of long_double_bit, invalid_p == 0 */
2271 if (gdbarch_debug
>= 2)
2272 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2273 return gdbarch
->long_double_bit
;
2277 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2278 int long_double_bit
)
2280 gdbarch
->long_double_bit
= long_double_bit
;
2284 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2286 /* Skip verify of ptr_bit, invalid_p == 0 */
2287 if (gdbarch_debug
>= 2)
2288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2289 return gdbarch
->ptr_bit
;
2293 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2296 gdbarch
->ptr_bit
= ptr_bit
;
2300 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2302 if (gdbarch
->addr_bit
== 0)
2303 internal_error (__FILE__
, __LINE__
,
2304 "gdbarch: gdbarch_addr_bit invalid");
2305 if (gdbarch_debug
>= 2)
2306 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2307 return gdbarch
->addr_bit
;
2311 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2314 gdbarch
->addr_bit
= addr_bit
;
2318 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2320 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2321 if (gdbarch_debug
>= 2)
2322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2323 return gdbarch
->bfd_vma_bit
;
2327 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2330 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2334 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2336 if (gdbarch
->char_signed
== -1)
2337 internal_error (__FILE__
, __LINE__
,
2338 "gdbarch: gdbarch_char_signed invalid");
2339 if (gdbarch_debug
>= 2)
2340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2341 return gdbarch
->char_signed
;
2345 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2348 gdbarch
->char_signed
= char_signed
;
2352 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2354 if (gdbarch
->read_pc
== 0)
2355 internal_error (__FILE__
, __LINE__
,
2356 "gdbarch: gdbarch_read_pc invalid");
2357 if (gdbarch_debug
>= 2)
2358 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2359 return gdbarch
->read_pc (ptid
);
2363 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2364 gdbarch_read_pc_ftype read_pc
)
2366 gdbarch
->read_pc
= read_pc
;
2370 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2372 if (gdbarch
->write_pc
== 0)
2373 internal_error (__FILE__
, __LINE__
,
2374 "gdbarch: gdbarch_write_pc invalid");
2375 if (gdbarch_debug
>= 2)
2376 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2377 gdbarch
->write_pc (val
, ptid
);
2381 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2382 gdbarch_write_pc_ftype write_pc
)
2384 gdbarch
->write_pc
= write_pc
;
2388 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2390 if (gdbarch
->read_fp
== 0)
2391 internal_error (__FILE__
, __LINE__
,
2392 "gdbarch: gdbarch_read_fp invalid");
2393 if (gdbarch_debug
>= 2)
2394 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2395 return gdbarch
->read_fp ();
2399 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2400 gdbarch_read_fp_ftype read_fp
)
2402 gdbarch
->read_fp
= read_fp
;
2406 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2408 if (gdbarch
->read_sp
== 0)
2409 internal_error (__FILE__
, __LINE__
,
2410 "gdbarch: gdbarch_read_sp invalid");
2411 if (gdbarch_debug
>= 2)
2412 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2413 return gdbarch
->read_sp ();
2417 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2418 gdbarch_read_sp_ftype read_sp
)
2420 gdbarch
->read_sp
= read_sp
;
2424 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2426 if (gdbarch
->write_sp
== 0)
2427 internal_error (__FILE__
, __LINE__
,
2428 "gdbarch: gdbarch_write_sp invalid");
2429 if (gdbarch_debug
>= 2)
2430 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2431 gdbarch
->write_sp (val
);
2435 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2436 gdbarch_write_sp_ftype write_sp
)
2438 gdbarch
->write_sp
= write_sp
;
2442 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2444 if (gdbarch
->virtual_frame_pointer
== 0)
2445 internal_error (__FILE__
, __LINE__
,
2446 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2447 if (gdbarch_debug
>= 2)
2448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2449 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2453 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2454 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2456 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2460 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2462 return gdbarch
->register_read
!= 0;
2466 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2468 if (gdbarch
->register_read
== 0)
2469 internal_error (__FILE__
, __LINE__
,
2470 "gdbarch: gdbarch_register_read invalid");
2471 if (gdbarch_debug
>= 2)
2472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2473 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2477 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2478 gdbarch_register_read_ftype register_read
)
2480 gdbarch
->register_read
= register_read
;
2484 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2486 return gdbarch
->register_write
!= 0;
2490 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2492 if (gdbarch
->register_write
== 0)
2493 internal_error (__FILE__
, __LINE__
,
2494 "gdbarch: gdbarch_register_write invalid");
2495 if (gdbarch_debug
>= 2)
2496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2497 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2501 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2502 gdbarch_register_write_ftype register_write
)
2504 gdbarch
->register_write
= register_write
;
2508 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2510 if (gdbarch
->num_regs
== -1)
2511 internal_error (__FILE__
, __LINE__
,
2512 "gdbarch: gdbarch_num_regs invalid");
2513 if (gdbarch_debug
>= 2)
2514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2515 return gdbarch
->num_regs
;
2519 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2522 gdbarch
->num_regs
= num_regs
;
2526 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2528 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2529 if (gdbarch_debug
>= 2)
2530 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2531 return gdbarch
->num_pseudo_regs
;
2535 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2536 int num_pseudo_regs
)
2538 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2542 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2544 /* Skip verify of sp_regnum, invalid_p == 0 */
2545 if (gdbarch_debug
>= 2)
2546 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2547 return gdbarch
->sp_regnum
;
2551 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2554 gdbarch
->sp_regnum
= sp_regnum
;
2558 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2560 /* Skip verify of fp_regnum, invalid_p == 0 */
2561 if (gdbarch_debug
>= 2)
2562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2563 return gdbarch
->fp_regnum
;
2567 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2570 gdbarch
->fp_regnum
= fp_regnum
;
2574 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2576 /* Skip verify of pc_regnum, invalid_p == 0 */
2577 if (gdbarch_debug
>= 2)
2578 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2579 return gdbarch
->pc_regnum
;
2583 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2586 gdbarch
->pc_regnum
= pc_regnum
;
2590 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2592 /* Skip verify of ps_regnum, invalid_p == 0 */
2593 if (gdbarch_debug
>= 2)
2594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2595 return gdbarch
->ps_regnum
;
2599 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2602 gdbarch
->ps_regnum
= ps_regnum
;
2606 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2608 /* Skip verify of fp0_regnum, invalid_p == 0 */
2609 if (gdbarch_debug
>= 2)
2610 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2611 return gdbarch
->fp0_regnum
;
2615 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2618 gdbarch
->fp0_regnum
= fp0_regnum
;
2622 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2624 /* Skip verify of npc_regnum, invalid_p == 0 */
2625 if (gdbarch_debug
>= 2)
2626 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2627 return gdbarch
->npc_regnum
;
2631 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2634 gdbarch
->npc_regnum
= npc_regnum
;
2638 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2640 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2641 if (gdbarch_debug
>= 2)
2642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2643 return gdbarch
->nnpc_regnum
;
2647 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2650 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2654 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2656 if (gdbarch
->stab_reg_to_regnum
== 0)
2657 internal_error (__FILE__
, __LINE__
,
2658 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2659 if (gdbarch_debug
>= 2)
2660 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2661 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2665 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2666 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2668 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2672 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2674 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2675 internal_error (__FILE__
, __LINE__
,
2676 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2677 if (gdbarch_debug
>= 2)
2678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2679 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2683 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2684 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2686 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2690 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2692 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2693 internal_error (__FILE__
, __LINE__
,
2694 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2695 if (gdbarch_debug
>= 2)
2696 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2697 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2701 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2702 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2704 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2708 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2710 if (gdbarch
->sdb_reg_to_regnum
== 0)
2711 internal_error (__FILE__
, __LINE__
,
2712 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2713 if (gdbarch_debug
>= 2)
2714 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2715 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2719 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2720 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2722 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2726 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2728 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2729 internal_error (__FILE__
, __LINE__
,
2730 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2731 if (gdbarch_debug
>= 2)
2732 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2733 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2737 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2738 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2740 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2744 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2746 if (gdbarch
->register_name
== 0)
2747 internal_error (__FILE__
, __LINE__
,
2748 "gdbarch: gdbarch_register_name invalid");
2749 if (gdbarch_debug
>= 2)
2750 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2751 return gdbarch
->register_name (regnr
);
2755 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2756 gdbarch_register_name_ftype register_name
)
2758 gdbarch
->register_name
= register_name
;
2762 gdbarch_register_size (struct gdbarch
*gdbarch
)
2764 if (gdbarch
->register_size
== -1)
2765 internal_error (__FILE__
, __LINE__
,
2766 "gdbarch: gdbarch_register_size invalid");
2767 if (gdbarch_debug
>= 2)
2768 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2769 return gdbarch
->register_size
;
2773 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2776 gdbarch
->register_size
= register_size
;
2780 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2782 if (gdbarch
->register_bytes
== -1)
2783 internal_error (__FILE__
, __LINE__
,
2784 "gdbarch: gdbarch_register_bytes invalid");
2785 if (gdbarch_debug
>= 2)
2786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2787 return gdbarch
->register_bytes
;
2791 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2794 gdbarch
->register_bytes
= register_bytes
;
2798 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2800 if (gdbarch
->register_byte
== 0)
2801 internal_error (__FILE__
, __LINE__
,
2802 "gdbarch: gdbarch_register_byte invalid");
2803 if (gdbarch_debug
>= 2)
2804 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2805 return gdbarch
->register_byte (reg_nr
);
2809 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2810 gdbarch_register_byte_ftype register_byte
)
2812 gdbarch
->register_byte
= register_byte
;
2816 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2818 if (gdbarch
->register_raw_size
== 0)
2819 internal_error (__FILE__
, __LINE__
,
2820 "gdbarch: gdbarch_register_raw_size invalid");
2821 if (gdbarch_debug
>= 2)
2822 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2823 return gdbarch
->register_raw_size (reg_nr
);
2827 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2828 gdbarch_register_raw_size_ftype register_raw_size
)
2830 gdbarch
->register_raw_size
= register_raw_size
;
2834 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2836 if (gdbarch
->max_register_raw_size
== -1)
2837 internal_error (__FILE__
, __LINE__
,
2838 "gdbarch: gdbarch_max_register_raw_size invalid");
2839 if (gdbarch_debug
>= 2)
2840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2841 return gdbarch
->max_register_raw_size
;
2845 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2846 int max_register_raw_size
)
2848 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2852 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2854 if (gdbarch
->register_virtual_size
== 0)
2855 internal_error (__FILE__
, __LINE__
,
2856 "gdbarch: gdbarch_register_virtual_size invalid");
2857 if (gdbarch_debug
>= 2)
2858 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2859 return gdbarch
->register_virtual_size (reg_nr
);
2863 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2864 gdbarch_register_virtual_size_ftype register_virtual_size
)
2866 gdbarch
->register_virtual_size
= register_virtual_size
;
2870 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2872 if (gdbarch
->max_register_virtual_size
== -1)
2873 internal_error (__FILE__
, __LINE__
,
2874 "gdbarch: gdbarch_max_register_virtual_size invalid");
2875 if (gdbarch_debug
>= 2)
2876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2877 return gdbarch
->max_register_virtual_size
;
2881 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2882 int max_register_virtual_size
)
2884 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2888 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2890 if (gdbarch
->register_virtual_type
== 0)
2891 internal_error (__FILE__
, __LINE__
,
2892 "gdbarch: gdbarch_register_virtual_type invalid");
2893 if (gdbarch_debug
>= 2)
2894 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2895 return gdbarch
->register_virtual_type (reg_nr
);
2899 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2900 gdbarch_register_virtual_type_ftype register_virtual_type
)
2902 gdbarch
->register_virtual_type
= register_virtual_type
;
2906 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2908 if (gdbarch
->do_registers_info
== 0)
2909 internal_error (__FILE__
, __LINE__
,
2910 "gdbarch: gdbarch_do_registers_info invalid");
2911 if (gdbarch_debug
>= 2)
2912 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2913 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2917 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2918 gdbarch_do_registers_info_ftype do_registers_info
)
2920 gdbarch
->do_registers_info
= do_registers_info
;
2924 gdbarch_print_float_info (struct gdbarch
*gdbarch
)
2926 if (gdbarch
->print_float_info
== 0)
2927 internal_error (__FILE__
, __LINE__
,
2928 "gdbarch: gdbarch_print_float_info invalid");
2929 if (gdbarch_debug
>= 2)
2930 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2931 gdbarch
->print_float_info ();
2935 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2936 gdbarch_print_float_info_ftype print_float_info
)
2938 gdbarch
->print_float_info
= print_float_info
;
2942 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2944 if (gdbarch
->register_sim_regno
== 0)
2945 internal_error (__FILE__
, __LINE__
,
2946 "gdbarch: gdbarch_register_sim_regno invalid");
2947 if (gdbarch_debug
>= 2)
2948 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2949 return gdbarch
->register_sim_regno (reg_nr
);
2953 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2954 gdbarch_register_sim_regno_ftype register_sim_regno
)
2956 gdbarch
->register_sim_regno
= register_sim_regno
;
2960 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2962 return gdbarch
->register_bytes_ok
!= 0;
2966 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2968 if (gdbarch
->register_bytes_ok
== 0)
2969 internal_error (__FILE__
, __LINE__
,
2970 "gdbarch: gdbarch_register_bytes_ok invalid");
2971 if (gdbarch_debug
>= 2)
2972 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2973 return gdbarch
->register_bytes_ok (nr_bytes
);
2977 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2978 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2980 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2984 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2986 if (gdbarch
->cannot_fetch_register
== 0)
2987 internal_error (__FILE__
, __LINE__
,
2988 "gdbarch: gdbarch_cannot_fetch_register invalid");
2989 if (gdbarch_debug
>= 2)
2990 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2991 return gdbarch
->cannot_fetch_register (regnum
);
2995 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2996 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2998 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3002 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3004 if (gdbarch
->cannot_store_register
== 0)
3005 internal_error (__FILE__
, __LINE__
,
3006 "gdbarch: gdbarch_cannot_store_register invalid");
3007 if (gdbarch_debug
>= 2)
3008 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3009 return gdbarch
->cannot_store_register (regnum
);
3013 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3014 gdbarch_cannot_store_register_ftype cannot_store_register
)
3016 gdbarch
->cannot_store_register
= cannot_store_register
;
3020 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3022 return gdbarch
->get_longjmp_target
!= 0;
3026 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3028 if (gdbarch
->get_longjmp_target
== 0)
3029 internal_error (__FILE__
, __LINE__
,
3030 "gdbarch: gdbarch_get_longjmp_target invalid");
3031 if (gdbarch_debug
>= 2)
3032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3033 return gdbarch
->get_longjmp_target (pc
);
3037 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3038 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3040 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3044 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3046 if (gdbarch
->use_generic_dummy_frames
== -1)
3047 internal_error (__FILE__
, __LINE__
,
3048 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3049 if (gdbarch_debug
>= 2)
3050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3051 return gdbarch
->use_generic_dummy_frames
;
3055 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3056 int use_generic_dummy_frames
)
3058 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3062 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3064 if (gdbarch
->call_dummy_location
== 0)
3065 internal_error (__FILE__
, __LINE__
,
3066 "gdbarch: gdbarch_call_dummy_location invalid");
3067 if (gdbarch_debug
>= 2)
3068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3069 return gdbarch
->call_dummy_location
;
3073 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3074 int call_dummy_location
)
3076 gdbarch
->call_dummy_location
= call_dummy_location
;
3080 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3082 if (gdbarch
->call_dummy_address
== 0)
3083 internal_error (__FILE__
, __LINE__
,
3084 "gdbarch: gdbarch_call_dummy_address invalid");
3085 if (gdbarch_debug
>= 2)
3086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3087 return gdbarch
->call_dummy_address ();
3091 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3092 gdbarch_call_dummy_address_ftype call_dummy_address
)
3094 gdbarch
->call_dummy_address
= call_dummy_address
;
3098 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3100 if (gdbarch
->call_dummy_start_offset
== -1)
3101 internal_error (__FILE__
, __LINE__
,
3102 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3103 if (gdbarch_debug
>= 2)
3104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3105 return gdbarch
->call_dummy_start_offset
;
3109 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3110 CORE_ADDR call_dummy_start_offset
)
3112 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3116 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3118 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3119 internal_error (__FILE__
, __LINE__
,
3120 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3121 if (gdbarch_debug
>= 2)
3122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3123 return gdbarch
->call_dummy_breakpoint_offset
;
3127 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3128 CORE_ADDR call_dummy_breakpoint_offset
)
3130 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3134 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3136 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3137 internal_error (__FILE__
, __LINE__
,
3138 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3139 if (gdbarch_debug
>= 2)
3140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3141 return gdbarch
->call_dummy_breakpoint_offset_p
;
3145 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3146 int call_dummy_breakpoint_offset_p
)
3148 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3152 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3154 if (gdbarch
->call_dummy_length
== -1)
3155 internal_error (__FILE__
, __LINE__
,
3156 "gdbarch: gdbarch_call_dummy_length invalid");
3157 if (gdbarch_debug
>= 2)
3158 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3159 return gdbarch
->call_dummy_length
;
3163 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3164 int call_dummy_length
)
3166 gdbarch
->call_dummy_length
= call_dummy_length
;
3170 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3172 if (gdbarch
->pc_in_call_dummy
== 0)
3173 internal_error (__FILE__
, __LINE__
,
3174 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3175 if (gdbarch_debug
>= 2)
3176 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3177 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3181 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3182 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3184 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3188 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3190 if (gdbarch
->call_dummy_p
== -1)
3191 internal_error (__FILE__
, __LINE__
,
3192 "gdbarch: gdbarch_call_dummy_p invalid");
3193 if (gdbarch_debug
>= 2)
3194 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3195 return gdbarch
->call_dummy_p
;
3199 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3202 gdbarch
->call_dummy_p
= call_dummy_p
;
3206 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3208 /* Skip verify of call_dummy_words, invalid_p == 0 */
3209 if (gdbarch_debug
>= 2)
3210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3211 return gdbarch
->call_dummy_words
;
3215 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3216 LONGEST
* call_dummy_words
)
3218 gdbarch
->call_dummy_words
= call_dummy_words
;
3222 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3224 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3225 if (gdbarch_debug
>= 2)
3226 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3227 return gdbarch
->sizeof_call_dummy_words
;
3231 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3232 int sizeof_call_dummy_words
)
3234 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3238 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3240 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3241 internal_error (__FILE__
, __LINE__
,
3242 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3243 if (gdbarch_debug
>= 2)
3244 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3245 return gdbarch
->call_dummy_stack_adjust_p
;
3249 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3250 int call_dummy_stack_adjust_p
)
3252 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3256 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3258 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3259 internal_error (__FILE__
, __LINE__
,
3260 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3261 if (gdbarch_debug
>= 2)
3262 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3263 return gdbarch
->call_dummy_stack_adjust
;
3267 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3268 int call_dummy_stack_adjust
)
3270 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3274 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
)
3276 if (gdbarch
->fix_call_dummy
== 0)
3277 internal_error (__FILE__
, __LINE__
,
3278 "gdbarch: gdbarch_fix_call_dummy invalid");
3279 if (gdbarch_debug
>= 2)
3280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3281 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3285 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3286 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3288 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3292 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3294 if (gdbarch
->init_frame_pc_first
== 0)
3295 internal_error (__FILE__
, __LINE__
,
3296 "gdbarch: gdbarch_init_frame_pc_first invalid");
3297 if (gdbarch_debug
>= 2)
3298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3299 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3303 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3304 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3306 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3310 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3312 if (gdbarch
->init_frame_pc
== 0)
3313 internal_error (__FILE__
, __LINE__
,
3314 "gdbarch: gdbarch_init_frame_pc invalid");
3315 if (gdbarch_debug
>= 2)
3316 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3317 gdbarch
->init_frame_pc (fromleaf
, prev
);
3321 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3322 gdbarch_init_frame_pc_ftype init_frame_pc
)
3324 gdbarch
->init_frame_pc
= init_frame_pc
;
3328 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3330 if (gdbarch_debug
>= 2)
3331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3332 return gdbarch
->believe_pcc_promotion
;
3336 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3337 int believe_pcc_promotion
)
3339 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3343 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3345 if (gdbarch_debug
>= 2)
3346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3347 return gdbarch
->believe_pcc_promotion_type
;
3351 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3352 int believe_pcc_promotion_type
)
3354 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3358 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3360 if (gdbarch
->coerce_float_to_double
== 0)
3361 internal_error (__FILE__
, __LINE__
,
3362 "gdbarch: gdbarch_coerce_float_to_double invalid");
3363 if (gdbarch_debug
>= 2)
3364 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3365 return gdbarch
->coerce_float_to_double (formal
, actual
);
3369 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3370 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3372 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3376 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
)
3378 if (gdbarch
->get_saved_register
== 0)
3379 internal_error (__FILE__
, __LINE__
,
3380 "gdbarch: gdbarch_get_saved_register invalid");
3381 if (gdbarch_debug
>= 2)
3382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3383 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3387 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3388 gdbarch_get_saved_register_ftype get_saved_register
)
3390 gdbarch
->get_saved_register
= get_saved_register
;
3394 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3396 if (gdbarch
->register_convertible
== 0)
3397 internal_error (__FILE__
, __LINE__
,
3398 "gdbarch: gdbarch_register_convertible invalid");
3399 if (gdbarch_debug
>= 2)
3400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3401 return gdbarch
->register_convertible (nr
);
3405 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3406 gdbarch_register_convertible_ftype register_convertible
)
3408 gdbarch
->register_convertible
= register_convertible
;
3412 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3414 if (gdbarch
->register_convert_to_virtual
== 0)
3415 internal_error (__FILE__
, __LINE__
,
3416 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3417 if (gdbarch_debug
>= 2)
3418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3419 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3423 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3424 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3426 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3430 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3432 if (gdbarch
->register_convert_to_raw
== 0)
3433 internal_error (__FILE__
, __LINE__
,
3434 "gdbarch: gdbarch_register_convert_to_raw invalid");
3435 if (gdbarch_debug
>= 2)
3436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3437 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3441 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3442 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3444 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3448 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3450 return gdbarch
->fetch_pseudo_register
!= 0;
3454 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3456 if (gdbarch
->fetch_pseudo_register
== 0)
3457 internal_error (__FILE__
, __LINE__
,
3458 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3459 if (gdbarch_debug
>= 2)
3460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3461 gdbarch
->fetch_pseudo_register (regnum
);
3465 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3466 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3468 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3472 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3474 return gdbarch
->store_pseudo_register
!= 0;
3478 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3480 if (gdbarch
->store_pseudo_register
== 0)
3481 internal_error (__FILE__
, __LINE__
,
3482 "gdbarch: gdbarch_store_pseudo_register invalid");
3483 if (gdbarch_debug
>= 2)
3484 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3485 gdbarch
->store_pseudo_register (regnum
);
3489 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3490 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3492 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3496 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3498 if (gdbarch
->pointer_to_address
== 0)
3499 internal_error (__FILE__
, __LINE__
,
3500 "gdbarch: gdbarch_pointer_to_address invalid");
3501 if (gdbarch_debug
>= 2)
3502 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3503 return gdbarch
->pointer_to_address (type
, buf
);
3507 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3508 gdbarch_pointer_to_address_ftype pointer_to_address
)
3510 gdbarch
->pointer_to_address
= pointer_to_address
;
3514 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3516 if (gdbarch
->address_to_pointer
== 0)
3517 internal_error (__FILE__
, __LINE__
,
3518 "gdbarch: gdbarch_address_to_pointer invalid");
3519 if (gdbarch_debug
>= 2)
3520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3521 gdbarch
->address_to_pointer (type
, buf
, addr
);
3525 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3526 gdbarch_address_to_pointer_ftype address_to_pointer
)
3528 gdbarch
->address_to_pointer
= address_to_pointer
;
3532 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3534 return gdbarch
->integer_to_address
!= 0;
3538 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3540 if (gdbarch
->integer_to_address
== 0)
3541 internal_error (__FILE__
, __LINE__
,
3542 "gdbarch: gdbarch_integer_to_address invalid");
3543 if (gdbarch_debug
>= 2)
3544 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3545 return gdbarch
->integer_to_address (type
, buf
);
3549 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3550 gdbarch_integer_to_address_ftype integer_to_address
)
3552 gdbarch
->integer_to_address
= integer_to_address
;
3556 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3558 if (gdbarch
->return_value_on_stack
== 0)
3559 internal_error (__FILE__
, __LINE__
,
3560 "gdbarch: gdbarch_return_value_on_stack invalid");
3561 if (gdbarch_debug
>= 2)
3562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3563 return gdbarch
->return_value_on_stack (type
);
3567 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3568 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3570 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3574 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3576 if (gdbarch
->extract_return_value
== 0)
3577 internal_error (__FILE__
, __LINE__
,
3578 "gdbarch: gdbarch_extract_return_value invalid");
3579 if (gdbarch_debug
>= 2)
3580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3581 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3585 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3586 gdbarch_extract_return_value_ftype extract_return_value
)
3588 gdbarch
->extract_return_value
= extract_return_value
;
3592 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3594 if (gdbarch
->push_arguments
== 0)
3595 internal_error (__FILE__
, __LINE__
,
3596 "gdbarch: gdbarch_push_arguments invalid");
3597 if (gdbarch_debug
>= 2)
3598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3599 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3603 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3604 gdbarch_push_arguments_ftype push_arguments
)
3606 gdbarch
->push_arguments
= push_arguments
;
3610 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3612 if (gdbarch
->push_dummy_frame
== 0)
3613 internal_error (__FILE__
, __LINE__
,
3614 "gdbarch: gdbarch_push_dummy_frame invalid");
3615 if (gdbarch_debug
>= 2)
3616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3617 gdbarch
->push_dummy_frame ();
3621 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3622 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3624 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3628 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3630 return gdbarch
->push_return_address
!= 0;
3634 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3636 if (gdbarch
->push_return_address
== 0)
3637 internal_error (__FILE__
, __LINE__
,
3638 "gdbarch: gdbarch_push_return_address invalid");
3639 if (gdbarch_debug
>= 2)
3640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3641 return gdbarch
->push_return_address (pc
, sp
);
3645 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3646 gdbarch_push_return_address_ftype push_return_address
)
3648 gdbarch
->push_return_address
= push_return_address
;
3652 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3654 if (gdbarch
->pop_frame
== 0)
3655 internal_error (__FILE__
, __LINE__
,
3656 "gdbarch: gdbarch_pop_frame invalid");
3657 if (gdbarch_debug
>= 2)
3658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3659 gdbarch
->pop_frame ();
3663 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3664 gdbarch_pop_frame_ftype pop_frame
)
3666 gdbarch
->pop_frame
= pop_frame
;
3670 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3672 if (gdbarch
->store_struct_return
== 0)
3673 internal_error (__FILE__
, __LINE__
,
3674 "gdbarch: gdbarch_store_struct_return invalid");
3675 if (gdbarch_debug
>= 2)
3676 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3677 gdbarch
->store_struct_return (addr
, sp
);
3681 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3682 gdbarch_store_struct_return_ftype store_struct_return
)
3684 gdbarch
->store_struct_return
= store_struct_return
;
3688 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3690 if (gdbarch
->store_return_value
== 0)
3691 internal_error (__FILE__
, __LINE__
,
3692 "gdbarch: gdbarch_store_return_value invalid");
3693 if (gdbarch_debug
>= 2)
3694 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3695 gdbarch
->store_return_value (type
, valbuf
);
3699 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3700 gdbarch_store_return_value_ftype store_return_value
)
3702 gdbarch
->store_return_value
= store_return_value
;
3706 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3708 return gdbarch
->extract_struct_value_address
!= 0;
3712 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3714 if (gdbarch
->extract_struct_value_address
== 0)
3715 internal_error (__FILE__
, __LINE__
,
3716 "gdbarch: gdbarch_extract_struct_value_address invalid");
3717 if (gdbarch_debug
>= 2)
3718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3719 return gdbarch
->extract_struct_value_address (regbuf
);
3723 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3724 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3726 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3730 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3732 if (gdbarch
->use_struct_convention
== 0)
3733 internal_error (__FILE__
, __LINE__
,
3734 "gdbarch: gdbarch_use_struct_convention invalid");
3735 if (gdbarch_debug
>= 2)
3736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3737 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3741 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3742 gdbarch_use_struct_convention_ftype use_struct_convention
)
3744 gdbarch
->use_struct_convention
= use_struct_convention
;
3748 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3750 if (gdbarch
->frame_init_saved_regs
== 0)
3751 internal_error (__FILE__
, __LINE__
,
3752 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3753 if (gdbarch_debug
>= 2)
3754 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3755 gdbarch
->frame_init_saved_regs (frame
);
3759 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3760 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3762 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3766 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3768 return gdbarch
->init_extra_frame_info
!= 0;
3772 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3774 if (gdbarch
->init_extra_frame_info
== 0)
3775 internal_error (__FILE__
, __LINE__
,
3776 "gdbarch: gdbarch_init_extra_frame_info invalid");
3777 if (gdbarch_debug
>= 2)
3778 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3779 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3783 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3784 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3786 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3790 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3792 if (gdbarch
->skip_prologue
== 0)
3793 internal_error (__FILE__
, __LINE__
,
3794 "gdbarch: gdbarch_skip_prologue invalid");
3795 if (gdbarch_debug
>= 2)
3796 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3797 return gdbarch
->skip_prologue (ip
);
3801 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3802 gdbarch_skip_prologue_ftype skip_prologue
)
3804 gdbarch
->skip_prologue
= skip_prologue
;
3808 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3810 if (gdbarch
->prologue_frameless_p
== 0)
3811 internal_error (__FILE__
, __LINE__
,
3812 "gdbarch: gdbarch_prologue_frameless_p invalid");
3813 if (gdbarch_debug
>= 2)
3814 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3815 return gdbarch
->prologue_frameless_p (ip
);
3819 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3820 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3822 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3826 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3828 if (gdbarch
->inner_than
== 0)
3829 internal_error (__FILE__
, __LINE__
,
3830 "gdbarch: gdbarch_inner_than invalid");
3831 if (gdbarch_debug
>= 2)
3832 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3833 return gdbarch
->inner_than (lhs
, rhs
);
3837 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3838 gdbarch_inner_than_ftype inner_than
)
3840 gdbarch
->inner_than
= inner_than
;
3844 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3846 if (gdbarch
->breakpoint_from_pc
== 0)
3847 internal_error (__FILE__
, __LINE__
,
3848 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3849 if (gdbarch_debug
>= 2)
3850 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3851 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3855 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3856 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3858 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3862 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3864 if (gdbarch
->memory_insert_breakpoint
== 0)
3865 internal_error (__FILE__
, __LINE__
,
3866 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3867 if (gdbarch_debug
>= 2)
3868 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3869 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3873 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3874 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3876 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3880 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3882 if (gdbarch
->memory_remove_breakpoint
== 0)
3883 internal_error (__FILE__
, __LINE__
,
3884 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3885 if (gdbarch_debug
>= 2)
3886 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3887 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3891 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3892 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3894 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3898 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3900 if (gdbarch
->decr_pc_after_break
== -1)
3901 internal_error (__FILE__
, __LINE__
,
3902 "gdbarch: gdbarch_decr_pc_after_break invalid");
3903 if (gdbarch_debug
>= 2)
3904 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3905 return gdbarch
->decr_pc_after_break
;
3909 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3910 CORE_ADDR decr_pc_after_break
)
3912 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3916 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3918 if (gdbarch
->prepare_to_proceed
== 0)
3919 internal_error (__FILE__
, __LINE__
,
3920 "gdbarch: gdbarch_prepare_to_proceed invalid");
3921 if (gdbarch_debug
>= 2)
3922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3923 return gdbarch
->prepare_to_proceed (select_it
);
3927 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3928 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3930 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3934 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3936 if (gdbarch
->function_start_offset
== -1)
3937 internal_error (__FILE__
, __LINE__
,
3938 "gdbarch: gdbarch_function_start_offset invalid");
3939 if (gdbarch_debug
>= 2)
3940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3941 return gdbarch
->function_start_offset
;
3945 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3946 CORE_ADDR function_start_offset
)
3948 gdbarch
->function_start_offset
= function_start_offset
;
3952 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3954 if (gdbarch
->remote_translate_xfer_address
== 0)
3955 internal_error (__FILE__
, __LINE__
,
3956 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3957 if (gdbarch_debug
>= 2)
3958 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3959 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3963 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3964 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3966 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3970 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3972 if (gdbarch
->frame_args_skip
== -1)
3973 internal_error (__FILE__
, __LINE__
,
3974 "gdbarch: gdbarch_frame_args_skip invalid");
3975 if (gdbarch_debug
>= 2)
3976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3977 return gdbarch
->frame_args_skip
;
3981 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3982 CORE_ADDR frame_args_skip
)
3984 gdbarch
->frame_args_skip
= frame_args_skip
;
3988 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3990 if (gdbarch
->frameless_function_invocation
== 0)
3991 internal_error (__FILE__
, __LINE__
,
3992 "gdbarch: gdbarch_frameless_function_invocation invalid");
3993 if (gdbarch_debug
>= 2)
3994 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3995 return gdbarch
->frameless_function_invocation (fi
);
3999 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4000 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4002 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4006 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4008 if (gdbarch
->frame_chain
== 0)
4009 internal_error (__FILE__
, __LINE__
,
4010 "gdbarch: gdbarch_frame_chain invalid");
4011 if (gdbarch_debug
>= 2)
4012 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4013 return gdbarch
->frame_chain (frame
);
4017 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4018 gdbarch_frame_chain_ftype frame_chain
)
4020 gdbarch
->frame_chain
= frame_chain
;
4024 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4026 if (gdbarch
->frame_chain_valid
== 0)
4027 internal_error (__FILE__
, __LINE__
,
4028 "gdbarch: gdbarch_frame_chain_valid invalid");
4029 if (gdbarch_debug
>= 2)
4030 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4031 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4035 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4036 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4038 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4042 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4044 if (gdbarch
->frame_saved_pc
== 0)
4045 internal_error (__FILE__
, __LINE__
,
4046 "gdbarch: gdbarch_frame_saved_pc invalid");
4047 if (gdbarch_debug
>= 2)
4048 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4049 return gdbarch
->frame_saved_pc (fi
);
4053 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4054 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4056 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4060 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4062 if (gdbarch
->frame_args_address
== 0)
4063 internal_error (__FILE__
, __LINE__
,
4064 "gdbarch: gdbarch_frame_args_address invalid");
4065 if (gdbarch_debug
>= 2)
4066 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4067 return gdbarch
->frame_args_address (fi
);
4071 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4072 gdbarch_frame_args_address_ftype frame_args_address
)
4074 gdbarch
->frame_args_address
= frame_args_address
;
4078 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4080 if (gdbarch
->frame_locals_address
== 0)
4081 internal_error (__FILE__
, __LINE__
,
4082 "gdbarch: gdbarch_frame_locals_address invalid");
4083 if (gdbarch_debug
>= 2)
4084 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4085 return gdbarch
->frame_locals_address (fi
);
4089 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4090 gdbarch_frame_locals_address_ftype frame_locals_address
)
4092 gdbarch
->frame_locals_address
= frame_locals_address
;
4096 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4098 if (gdbarch
->saved_pc_after_call
== 0)
4099 internal_error (__FILE__
, __LINE__
,
4100 "gdbarch: gdbarch_saved_pc_after_call invalid");
4101 if (gdbarch_debug
>= 2)
4102 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4103 return gdbarch
->saved_pc_after_call (frame
);
4107 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4108 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4110 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4114 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4116 if (gdbarch
->frame_num_args
== 0)
4117 internal_error (__FILE__
, __LINE__
,
4118 "gdbarch: gdbarch_frame_num_args invalid");
4119 if (gdbarch_debug
>= 2)
4120 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4121 return gdbarch
->frame_num_args (frame
);
4125 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4126 gdbarch_frame_num_args_ftype frame_num_args
)
4128 gdbarch
->frame_num_args
= frame_num_args
;
4132 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4134 return gdbarch
->stack_align
!= 0;
4138 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4140 if (gdbarch
->stack_align
== 0)
4141 internal_error (__FILE__
, __LINE__
,
4142 "gdbarch: gdbarch_stack_align invalid");
4143 if (gdbarch_debug
>= 2)
4144 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4145 return gdbarch
->stack_align (sp
);
4149 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4150 gdbarch_stack_align_ftype stack_align
)
4152 gdbarch
->stack_align
= stack_align
;
4156 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4158 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4159 if (gdbarch_debug
>= 2)
4160 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4161 return gdbarch
->extra_stack_alignment_needed
;
4165 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4166 int extra_stack_alignment_needed
)
4168 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4172 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4174 return gdbarch
->reg_struct_has_addr
!= 0;
4178 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4180 if (gdbarch
->reg_struct_has_addr
== 0)
4181 internal_error (__FILE__
, __LINE__
,
4182 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4183 if (gdbarch_debug
>= 2)
4184 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4185 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4189 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4190 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4192 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4196 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4198 return gdbarch
->save_dummy_frame_tos
!= 0;
4202 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4204 if (gdbarch
->save_dummy_frame_tos
== 0)
4205 internal_error (__FILE__
, __LINE__
,
4206 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4207 if (gdbarch_debug
>= 2)
4208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4209 gdbarch
->save_dummy_frame_tos (sp
);
4213 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4214 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4216 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4220 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4222 if (gdbarch_debug
>= 2)
4223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4224 return gdbarch
->parm_boundary
;
4228 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4231 gdbarch
->parm_boundary
= parm_boundary
;
4234 const struct floatformat
*
4235 gdbarch_float_format (struct gdbarch
*gdbarch
)
4237 if (gdbarch_debug
>= 2)
4238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4239 return gdbarch
->float_format
;
4243 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4244 const struct floatformat
* float_format
)
4246 gdbarch
->float_format
= float_format
;
4249 const struct floatformat
*
4250 gdbarch_double_format (struct gdbarch
*gdbarch
)
4252 if (gdbarch_debug
>= 2)
4253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4254 return gdbarch
->double_format
;
4258 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4259 const struct floatformat
* double_format
)
4261 gdbarch
->double_format
= double_format
;
4264 const struct floatformat
*
4265 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4267 if (gdbarch_debug
>= 2)
4268 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4269 return gdbarch
->long_double_format
;
4273 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4274 const struct floatformat
* long_double_format
)
4276 gdbarch
->long_double_format
= long_double_format
;
4280 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4282 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4283 internal_error (__FILE__
, __LINE__
,
4284 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4285 if (gdbarch_debug
>= 2)
4286 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4287 return gdbarch
->convert_from_func_ptr_addr (addr
);
4291 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4292 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4294 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4298 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4300 if (gdbarch
->addr_bits_remove
== 0)
4301 internal_error (__FILE__
, __LINE__
,
4302 "gdbarch: gdbarch_addr_bits_remove invalid");
4303 if (gdbarch_debug
>= 2)
4304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4305 return gdbarch
->addr_bits_remove (addr
);
4309 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4310 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4312 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4316 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4318 if (gdbarch
->smash_text_address
== 0)
4319 internal_error (__FILE__
, __LINE__
,
4320 "gdbarch: gdbarch_smash_text_address invalid");
4321 if (gdbarch_debug
>= 2)
4322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4323 return gdbarch
->smash_text_address (addr
);
4327 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4328 gdbarch_smash_text_address_ftype smash_text_address
)
4330 gdbarch
->smash_text_address
= smash_text_address
;
4334 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4336 return gdbarch
->software_single_step
!= 0;
4340 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4342 if (gdbarch
->software_single_step
== 0)
4343 internal_error (__FILE__
, __LINE__
,
4344 "gdbarch: gdbarch_software_single_step invalid");
4345 if (gdbarch_debug
>= 2)
4346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4347 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4351 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4352 gdbarch_software_single_step_ftype software_single_step
)
4354 gdbarch
->software_single_step
= software_single_step
;
4358 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4360 if (gdbarch
->print_insn
== 0)
4361 internal_error (__FILE__
, __LINE__
,
4362 "gdbarch: gdbarch_print_insn invalid");
4363 if (gdbarch_debug
>= 2)
4364 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4365 return gdbarch
->print_insn (vma
, info
);
4369 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4370 gdbarch_print_insn_ftype print_insn
)
4372 gdbarch
->print_insn
= print_insn
;
4376 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4378 if (gdbarch
->skip_trampoline_code
== 0)
4379 internal_error (__FILE__
, __LINE__
,
4380 "gdbarch: gdbarch_skip_trampoline_code invalid");
4381 if (gdbarch_debug
>= 2)
4382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4383 return gdbarch
->skip_trampoline_code (pc
);
4387 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4388 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4390 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4394 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4396 if (gdbarch
->in_solib_call_trampoline
== 0)
4397 internal_error (__FILE__
, __LINE__
,
4398 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4399 if (gdbarch_debug
>= 2)
4400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4401 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4405 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4406 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4408 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4412 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4414 if (gdbarch
->in_function_epilogue_p
== 0)
4415 internal_error (__FILE__
, __LINE__
,
4416 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4417 if (gdbarch_debug
>= 2)
4418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4419 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4423 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4424 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4426 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4430 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4432 if (gdbarch
->construct_inferior_arguments
== 0)
4433 internal_error (__FILE__
, __LINE__
,
4434 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4435 if (gdbarch_debug
>= 2)
4436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4437 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4441 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4442 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4444 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4448 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4450 return gdbarch
->dwarf2_build_frame_info
!= 0;
4454 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4456 if (gdbarch
->dwarf2_build_frame_info
== 0)
4457 internal_error (__FILE__
, __LINE__
,
4458 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4459 if (gdbarch_debug
>= 2)
4460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4461 gdbarch
->dwarf2_build_frame_info (objfile
);
4465 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4466 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4468 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4472 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4474 if (gdbarch
->elf_make_msymbol_special
== 0)
4475 internal_error (__FILE__
, __LINE__
,
4476 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4477 if (gdbarch_debug
>= 2)
4478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4479 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4483 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4484 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4486 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4490 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4492 if (gdbarch
->coff_make_msymbol_special
== 0)
4493 internal_error (__FILE__
, __LINE__
,
4494 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4495 if (gdbarch_debug
>= 2)
4496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4497 gdbarch
->coff_make_msymbol_special (val
, msym
);
4501 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4502 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4504 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4508 /* Keep a registry of per-architecture data-pointers required by GDB
4514 gdbarch_data_init_ftype
*init
;
4515 gdbarch_data_free_ftype
*free
;
4518 struct gdbarch_data_registration
4520 struct gdbarch_data
*data
;
4521 struct gdbarch_data_registration
*next
;
4524 struct gdbarch_data_registry
4527 struct gdbarch_data_registration
*registrations
;
4530 struct gdbarch_data_registry gdbarch_data_registry
=
4535 struct gdbarch_data
*
4536 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4537 gdbarch_data_free_ftype
*free
)
4539 struct gdbarch_data_registration
**curr
;
4540 for (curr
= &gdbarch_data_registry
.registrations
;
4542 curr
= &(*curr
)->next
);
4543 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4544 (*curr
)->next
= NULL
;
4545 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4546 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4547 (*curr
)->data
->init
= init
;
4548 (*curr
)->data
->free
= free
;
4549 return (*curr
)->data
;
4553 /* Walk through all the registered users initializing each in turn. */
4556 init_gdbarch_data (struct gdbarch
*gdbarch
)
4558 struct gdbarch_data_registration
*rego
;
4559 for (rego
= gdbarch_data_registry
.registrations
;
4563 struct gdbarch_data
*data
= rego
->data
;
4564 gdb_assert (data
->index
< gdbarch
->nr_data
);
4565 if (data
->init
!= NULL
)
4567 void *pointer
= data
->init (gdbarch
);
4568 set_gdbarch_data (gdbarch
, data
, pointer
);
4573 /* Create/delete the gdbarch data vector. */
4576 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4578 gdb_assert (gdbarch
->data
== NULL
);
4579 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4580 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4584 free_gdbarch_data (struct gdbarch
*gdbarch
)
4586 struct gdbarch_data_registration
*rego
;
4587 gdb_assert (gdbarch
->data
!= NULL
);
4588 for (rego
= gdbarch_data_registry
.registrations
;
4592 struct gdbarch_data
*data
= rego
->data
;
4593 gdb_assert (data
->index
< gdbarch
->nr_data
);
4594 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4596 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4597 gdbarch
->data
[data
->index
] = NULL
;
4600 xfree (gdbarch
->data
);
4601 gdbarch
->data
= NULL
;
4605 /* Initialize the current value of thee specified per-architecture
4609 set_gdbarch_data (struct gdbarch
*gdbarch
,
4610 struct gdbarch_data
*data
,
4613 gdb_assert (data
->index
< gdbarch
->nr_data
);
4614 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4615 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4616 gdbarch
->data
[data
->index
] = pointer
;
4619 /* Return the current value of the specified per-architecture
4623 gdbarch_data (struct gdbarch_data
*data
)
4625 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4626 return current_gdbarch
->data
[data
->index
];
4631 /* Keep a registry of swapped data required by GDB modules. */
4636 struct gdbarch_swap_registration
*source
;
4637 struct gdbarch_swap
*next
;
4640 struct gdbarch_swap_registration
4643 unsigned long sizeof_data
;
4644 gdbarch_swap_ftype
*init
;
4645 struct gdbarch_swap_registration
*next
;
4648 struct gdbarch_swap_registry
4651 struct gdbarch_swap_registration
*registrations
;
4654 struct gdbarch_swap_registry gdbarch_swap_registry
=
4660 register_gdbarch_swap (void *data
,
4661 unsigned long sizeof_data
,
4662 gdbarch_swap_ftype
*init
)
4664 struct gdbarch_swap_registration
**rego
;
4665 for (rego
= &gdbarch_swap_registry
.registrations
;
4667 rego
= &(*rego
)->next
);
4668 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4669 (*rego
)->next
= NULL
;
4670 (*rego
)->init
= init
;
4671 (*rego
)->data
= data
;
4672 (*rego
)->sizeof_data
= sizeof_data
;
4677 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4679 struct gdbarch_swap_registration
*rego
;
4680 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4681 for (rego
= gdbarch_swap_registry
.registrations
;
4685 if (rego
->data
!= NULL
)
4687 (*curr
) = XMALLOC (struct gdbarch_swap
);
4688 (*curr
)->source
= rego
;
4689 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4690 (*curr
)->next
= NULL
;
4691 memset (rego
->data
, 0, rego
->sizeof_data
);
4692 curr
= &(*curr
)->next
;
4694 if (rego
->init
!= NULL
)
4700 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4702 struct gdbarch_swap
*curr
;
4703 for (curr
= gdbarch
->swap
;
4706 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4710 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4712 struct gdbarch_swap
*curr
;
4713 for (curr
= gdbarch
->swap
;
4716 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4720 /* Keep a registry of the architectures known by GDB. */
4722 struct gdbarch_registration
4724 enum bfd_architecture bfd_architecture
;
4725 gdbarch_init_ftype
*init
;
4726 gdbarch_dump_tdep_ftype
*dump_tdep
;
4727 struct gdbarch_list
*arches
;
4728 struct gdbarch_registration
*next
;
4731 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4734 append_name (const char ***buf
, int *nr
, const char *name
)
4736 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4742 gdbarch_printable_names (void)
4746 /* Accumulate a list of names based on the registed list of
4748 enum bfd_architecture a
;
4750 const char **arches
= NULL
;
4751 struct gdbarch_registration
*rego
;
4752 for (rego
= gdbarch_registry
;
4756 const struct bfd_arch_info
*ap
;
4757 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4759 internal_error (__FILE__
, __LINE__
,
4760 "gdbarch_architecture_names: multi-arch unknown");
4763 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4768 append_name (&arches
, &nr_arches
, NULL
);
4772 /* Just return all the architectures that BFD knows. Assume that
4773 the legacy architecture framework supports them. */
4774 return bfd_arch_list ();
4779 gdbarch_register (enum bfd_architecture bfd_architecture
,
4780 gdbarch_init_ftype
*init
,
4781 gdbarch_dump_tdep_ftype
*dump_tdep
)
4783 struct gdbarch_registration
**curr
;
4784 const struct bfd_arch_info
*bfd_arch_info
;
4785 /* Check that BFD recognizes this architecture */
4786 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4787 if (bfd_arch_info
== NULL
)
4789 internal_error (__FILE__
, __LINE__
,
4790 "gdbarch: Attempt to register unknown architecture (%d)",
4793 /* Check that we haven't seen this architecture before */
4794 for (curr
= &gdbarch_registry
;
4796 curr
= &(*curr
)->next
)
4798 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4799 internal_error (__FILE__
, __LINE__
,
4800 "gdbarch: Duplicate registraration of architecture (%s)",
4801 bfd_arch_info
->printable_name
);
4805 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4806 bfd_arch_info
->printable_name
,
4809 (*curr
) = XMALLOC (struct gdbarch_registration
);
4810 (*curr
)->bfd_architecture
= bfd_architecture
;
4811 (*curr
)->init
= init
;
4812 (*curr
)->dump_tdep
= dump_tdep
;
4813 (*curr
)->arches
= NULL
;
4814 (*curr
)->next
= NULL
;
4815 /* When non- multi-arch, install whatever target dump routine we've
4816 been provided - hopefully that routine has been written correctly
4817 and works regardless of multi-arch. */
4818 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4819 && startup_gdbarch
.dump_tdep
== NULL
)
4820 startup_gdbarch
.dump_tdep
= dump_tdep
;
4824 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4825 gdbarch_init_ftype
*init
)
4827 gdbarch_register (bfd_architecture
, init
, NULL
);
4831 /* Look for an architecture using gdbarch_info. Base search on only
4832 BFD_ARCH_INFO and BYTE_ORDER. */
4834 struct gdbarch_list
*
4835 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4836 const struct gdbarch_info
*info
)
4838 for (; arches
!= NULL
; arches
= arches
->next
)
4840 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4842 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4850 /* Update the current architecture. Return ZERO if the update request
4854 gdbarch_update_p (struct gdbarch_info info
)
4856 struct gdbarch
*new_gdbarch
;
4857 struct gdbarch_list
**list
;
4858 struct gdbarch_registration
*rego
;
4860 /* Fill in missing parts of the INFO struct using a number of
4861 sources: ``set ...''; INFOabfd supplied; existing target. */
4863 /* ``(gdb) set architecture ...'' */
4864 if (info
.bfd_arch_info
== NULL
4865 && !TARGET_ARCHITECTURE_AUTO
)
4866 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4867 if (info
.bfd_arch_info
== NULL
4868 && info
.abfd
!= NULL
4869 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4870 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4871 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4872 if (info
.bfd_arch_info
== NULL
)
4873 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4875 /* ``(gdb) set byte-order ...'' */
4876 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4877 && !TARGET_BYTE_ORDER_AUTO
)
4878 info
.byte_order
= TARGET_BYTE_ORDER
;
4879 /* From the INFO struct. */
4880 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4881 && info
.abfd
!= NULL
)
4882 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
4883 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
4884 : BFD_ENDIAN_UNKNOWN
);
4885 /* From the current target. */
4886 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
4887 info
.byte_order
= TARGET_BYTE_ORDER
;
4889 /* Must have found some sort of architecture. */
4890 gdb_assert (info
.bfd_arch_info
!= NULL
);
4894 fprintf_unfiltered (gdb_stdlog
,
4895 "gdbarch_update: info.bfd_arch_info %s\n",
4896 (info
.bfd_arch_info
!= NULL
4897 ? info
.bfd_arch_info
->printable_name
4899 fprintf_unfiltered (gdb_stdlog
,
4900 "gdbarch_update: info.byte_order %d (%s)\n",
4902 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4903 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4905 fprintf_unfiltered (gdb_stdlog
,
4906 "gdbarch_update: info.abfd 0x%lx\n",
4908 fprintf_unfiltered (gdb_stdlog
,
4909 "gdbarch_update: info.tdep_info 0x%lx\n",
4910 (long) info
.tdep_info
);
4913 /* Find the target that knows about this architecture. */
4914 for (rego
= gdbarch_registry
;
4917 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4926 /* Ask the target for a replacement architecture. */
4927 new_gdbarch
= rego
->init (info
, rego
->arches
);
4929 /* Did the target like it? No. Reject the change. */
4930 if (new_gdbarch
== NULL
)
4933 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4937 /* Did the architecture change? No. Do nothing. */
4938 if (current_gdbarch
== new_gdbarch
)
4941 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4943 new_gdbarch
->bfd_arch_info
->printable_name
);
4947 /* Swap all data belonging to the old target out */
4948 swapout_gdbarch_swap (current_gdbarch
);
4950 /* Is this a pre-existing architecture? Yes. Swap it in. */
4951 for (list
= ®o
->arches
;
4953 list
= &(*list
)->next
)
4955 if ((*list
)->gdbarch
== new_gdbarch
)
4958 fprintf_unfiltered (gdb_stdlog
,
4959 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4961 new_gdbarch
->bfd_arch_info
->printable_name
);
4962 current_gdbarch
= new_gdbarch
;
4963 swapin_gdbarch_swap (new_gdbarch
);
4964 architecture_changed_event ();
4969 /* Append this new architecture to this targets list. */
4970 (*list
) = XMALLOC (struct gdbarch_list
);
4971 (*list
)->next
= NULL
;
4972 (*list
)->gdbarch
= new_gdbarch
;
4974 /* Switch to this new architecture. Dump it out. */
4975 current_gdbarch
= new_gdbarch
;
4978 fprintf_unfiltered (gdb_stdlog
,
4979 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4981 new_gdbarch
->bfd_arch_info
->printable_name
);
4984 /* Check that the newly installed architecture is valid. Plug in
4985 any post init values. */
4986 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4987 verify_gdbarch (new_gdbarch
);
4989 /* Initialize the per-architecture memory (swap) areas.
4990 CURRENT_GDBARCH must be update before these modules are
4992 init_gdbarch_swap (new_gdbarch
);
4994 /* Initialize the per-architecture data-pointer of all parties that
4995 registered an interest in this architecture. CURRENT_GDBARCH
4996 must be updated before these modules are called. */
4997 init_gdbarch_data (new_gdbarch
);
4998 architecture_changed_event ();
5001 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5009 /* Pointer to the target-dependent disassembly function. */
5010 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5011 disassemble_info tm_print_insn_info
;
5014 extern void _initialize_gdbarch (void);
5017 _initialize_gdbarch (void)
5019 struct cmd_list_element
*c
;
5021 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5022 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5023 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5024 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5025 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5027 add_show_from_set (add_set_cmd ("arch",
5030 (char *)&gdbarch_debug
,
5031 "Set architecture debugging.\n\
5032 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5034 c
= add_set_cmd ("archdebug",
5037 (char *)&gdbarch_debug
,
5038 "Set architecture debugging.\n\
5039 When non-zero, architecture debugging is enabled.", &setlist
);
5041 deprecate_cmd (c
, "set debug arch");
5042 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");