1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch
*gdbarch
);
70 static void alloc_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void swapout_gdbarch_swap (struct gdbarch
*);
75 static void swapin_gdbarch_swap (struct gdbarch
*);
77 /* Convenience macro for allocting typesafe memory. */
80 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
84 /* Non-zero if we want to trace architecture code. */
87 #define GDBARCH_DEBUG 0
89 int gdbarch_debug
= GDBARCH_DEBUG
;
92 /* Maintain the struct gdbarch object */
96 /* basic architectural information */
97 const struct bfd_arch_info
* bfd_arch_info
;
100 /* target specific vector. */
101 struct gdbarch_tdep
*tdep
;
102 gdbarch_dump_tdep_ftype
*dump_tdep
;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap
*swap
;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype
*read_pc
;
149 gdbarch_write_pc_ftype
*write_pc
;
150 gdbarch_read_fp_ftype
*read_fp
;
151 gdbarch_write_fp_ftype
*write_fp
;
152 gdbarch_read_sp_ftype
*read_sp
;
153 gdbarch_write_sp_ftype
*write_sp
;
154 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
155 gdbarch_register_read_ftype
*register_read
;
156 gdbarch_register_write_ftype
*register_write
;
165 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
166 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
167 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
168 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
169 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
170 gdbarch_register_name_ftype
*register_name
;
173 gdbarch_register_byte_ftype
*register_byte
;
174 gdbarch_register_raw_size_ftype
*register_raw_size
;
175 int max_register_raw_size
;
176 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
177 int max_register_virtual_size
;
178 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
179 gdbarch_do_registers_info_ftype
*do_registers_info
;
180 gdbarch_print_float_info_ftype
*print_float_info
;
181 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
182 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
183 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
184 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
185 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
186 int use_generic_dummy_frames
;
187 int call_dummy_location
;
188 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
189 CORE_ADDR call_dummy_start_offset
;
190 CORE_ADDR call_dummy_breakpoint_offset
;
191 int call_dummy_breakpoint_offset_p
;
192 int call_dummy_length
;
193 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
195 LONGEST
* call_dummy_words
;
196 int sizeof_call_dummy_words
;
197 int call_dummy_stack_adjust_p
;
198 int call_dummy_stack_adjust
;
199 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
200 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
201 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
202 int believe_pcc_promotion
;
203 int believe_pcc_promotion_type
;
204 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
205 gdbarch_get_saved_register_ftype
*get_saved_register
;
206 gdbarch_register_convertible_ftype
*register_convertible
;
207 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
208 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
209 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
210 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
211 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
212 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
213 gdbarch_integer_to_address_ftype
*integer_to_address
;
214 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
215 gdbarch_extract_return_value_ftype
*extract_return_value
;
216 gdbarch_push_arguments_ftype
*push_arguments
;
217 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
218 gdbarch_push_return_address_ftype
*push_return_address
;
219 gdbarch_pop_frame_ftype
*pop_frame
;
220 gdbarch_store_struct_return_ftype
*store_struct_return
;
221 gdbarch_store_return_value_ftype
*store_return_value
;
222 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
223 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
224 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
225 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
226 gdbarch_skip_prologue_ftype
*skip_prologue
;
227 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
228 gdbarch_inner_than_ftype
*inner_than
;
229 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
230 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
231 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
232 CORE_ADDR decr_pc_after_break
;
233 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
234 CORE_ADDR function_start_offset
;
235 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
236 CORE_ADDR frame_args_skip
;
237 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
238 gdbarch_frame_chain_ftype
*frame_chain
;
239 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
240 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
241 gdbarch_frame_args_address_ftype
*frame_args_address
;
242 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
243 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
244 gdbarch_frame_num_args_ftype
*frame_num_args
;
245 gdbarch_stack_align_ftype
*stack_align
;
246 int extra_stack_alignment_needed
;
247 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
248 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
250 const struct floatformat
* float_format
;
251 const struct floatformat
* double_format
;
252 const struct floatformat
* long_double_format
;
253 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
254 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
255 gdbarch_smash_text_address_ftype
*smash_text_address
;
256 gdbarch_software_single_step_ftype
*software_single_step
;
257 gdbarch_print_insn_ftype
*print_insn
;
258 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
259 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
260 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
261 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
262 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
263 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
264 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
268 /* The default architecture uses host values (for want of a better
271 extern const struct bfd_arch_info bfd_default_arch_struct
;
273 struct gdbarch startup_gdbarch
=
275 /* basic architecture information */
276 &bfd_default_arch_struct
,
278 /* target specific vector and its dump routine */
280 /*per-architecture data-pointers and swap regions */
282 /* Multi-arch values */
286 8 * sizeof (LONGEST
),
289 8 * sizeof (long double),
320 generic_register_raw_size
,
322 generic_register_virtual_size
,
351 generic_get_saved_register
,
406 generic_in_function_epilogue_p
,
407 construct_inferior_arguments
,
411 /* startup_gdbarch() */
414 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
416 /* Do any initialization needed for a non-multiarch configuration
417 after the _initialize_MODULE functions have been run. */
419 initialize_non_multiarch ()
421 alloc_gdbarch_data (&startup_gdbarch
);
422 init_gdbarch_data (&startup_gdbarch
);
426 /* Create a new ``struct gdbarch'' based on information provided by
427 ``struct gdbarch_info''. */
430 gdbarch_alloc (const struct gdbarch_info
*info
,
431 struct gdbarch_tdep
*tdep
)
433 /* NOTE: The new architecture variable is named ``current_gdbarch''
434 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
435 the current local architecture and not the previous global
436 architecture. This ensures that the new architectures initial
437 values are not influenced by the previous architecture. Once
438 everything is parameterised with gdbarch, this will go away. */
439 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
440 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
442 alloc_gdbarch_data (current_gdbarch
);
444 current_gdbarch
->tdep
= tdep
;
446 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
447 current_gdbarch
->byte_order
= info
->byte_order
;
449 /* Force the explicit initialization of these. */
450 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
451 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
452 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
453 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
454 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
455 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
456 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
457 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
458 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
459 current_gdbarch
->char_signed
= -1;
460 current_gdbarch
->read_pc
= generic_target_read_pc
;
461 current_gdbarch
->write_pc
= generic_target_write_pc
;
462 current_gdbarch
->read_fp
= generic_target_read_fp
;
463 current_gdbarch
->write_fp
= generic_target_write_fp
;
464 current_gdbarch
->read_sp
= generic_target_read_sp
;
465 current_gdbarch
->write_sp
= generic_target_write_sp
;
466 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
467 current_gdbarch
->num_regs
= -1;
468 current_gdbarch
->sp_regnum
= -1;
469 current_gdbarch
->fp_regnum
= -1;
470 current_gdbarch
->pc_regnum
= -1;
471 current_gdbarch
->fp0_regnum
= -1;
472 current_gdbarch
->npc_regnum
= -1;
473 current_gdbarch
->nnpc_regnum
= -1;
474 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
475 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
476 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
477 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
478 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
479 current_gdbarch
->register_name
= legacy_register_name
;
480 current_gdbarch
->register_size
= -1;
481 current_gdbarch
->register_bytes
= -1;
482 current_gdbarch
->max_register_raw_size
= -1;
483 current_gdbarch
->max_register_virtual_size
= -1;
484 current_gdbarch
->do_registers_info
= do_registers_info
;
485 current_gdbarch
->print_float_info
= default_print_float_info
;
486 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
487 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
488 current_gdbarch
->cannot_store_register
= cannot_register_not
;
489 current_gdbarch
->use_generic_dummy_frames
= -1;
490 current_gdbarch
->call_dummy_start_offset
= -1;
491 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
492 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
493 current_gdbarch
->call_dummy_length
= -1;
494 current_gdbarch
->call_dummy_p
= -1;
495 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
496 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
497 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
498 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
499 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
500 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
501 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
502 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
503 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
504 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
505 current_gdbarch
->push_arguments
= default_push_arguments
;
506 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
507 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
508 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
509 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
510 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
511 current_gdbarch
->decr_pc_after_break
= -1;
512 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
513 current_gdbarch
->function_start_offset
= -1;
514 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
515 current_gdbarch
->frame_args_skip
= -1;
516 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
517 current_gdbarch
->extra_stack_alignment_needed
= 1;
518 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
519 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
520 current_gdbarch
->smash_text_address
= core_addr_identity
;
521 current_gdbarch
->print_insn
= legacy_print_insn
;
522 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
523 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
524 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
525 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
526 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
527 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
528 /* gdbarch_alloc() */
530 return current_gdbarch
;
534 /* Free a gdbarch struct. This should never happen in normal
535 operation --- once you've created a gdbarch, you keep it around.
536 However, if an architecture's init function encounters an error
537 building the structure, it may need to clean up a partially
538 constructed gdbarch. */
541 gdbarch_free (struct gdbarch
*arch
)
543 gdb_assert (arch
!= NULL
);
544 free_gdbarch_data (arch
);
549 /* Ensure that all values in a GDBARCH are reasonable. */
552 verify_gdbarch (struct gdbarch
*gdbarch
)
555 struct cleanup
*cleanups
;
558 /* Only perform sanity checks on a multi-arch target. */
561 log
= mem_fileopen ();
562 cleanups
= make_cleanup_ui_file_delete (log
);
564 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
565 fprintf_unfiltered (log
, "\n\tbyte-order");
566 if (gdbarch
->bfd_arch_info
== NULL
)
567 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
568 /* Check those that need to be defined for the given multi-arch level. */
569 /* Skip verify of short_bit, invalid_p == 0 */
570 /* Skip verify of int_bit, invalid_p == 0 */
571 /* Skip verify of long_bit, invalid_p == 0 */
572 /* Skip verify of long_long_bit, invalid_p == 0 */
573 /* Skip verify of float_bit, invalid_p == 0 */
574 /* Skip verify of double_bit, invalid_p == 0 */
575 /* Skip verify of long_double_bit, invalid_p == 0 */
576 /* Skip verify of ptr_bit, invalid_p == 0 */
577 if (gdbarch
->addr_bit
== 0)
578 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
579 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
580 if (gdbarch
->char_signed
== -1)
581 gdbarch
->char_signed
= 1;
582 /* Skip verify of read_pc, invalid_p == 0 */
583 /* Skip verify of write_pc, invalid_p == 0 */
584 /* Skip verify of read_fp, invalid_p == 0 */
585 /* Skip verify of write_fp, invalid_p == 0 */
586 /* Skip verify of read_sp, invalid_p == 0 */
587 /* Skip verify of write_sp, invalid_p == 0 */
588 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
589 /* Skip verify of register_read, has predicate */
590 /* Skip verify of register_write, has predicate */
591 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
592 && (gdbarch
->num_regs
== -1))
593 fprintf_unfiltered (log
, "\n\tnum_regs");
594 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
595 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
596 && (gdbarch
->sp_regnum
== -1))
597 fprintf_unfiltered (log
, "\n\tsp_regnum");
598 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
599 && (gdbarch
->fp_regnum
== -1))
600 fprintf_unfiltered (log
, "\n\tfp_regnum");
601 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
602 && (gdbarch
->pc_regnum
== -1))
603 fprintf_unfiltered (log
, "\n\tpc_regnum");
604 /* Skip verify of fp0_regnum, invalid_p == 0 */
605 /* Skip verify of npc_regnum, invalid_p == 0 */
606 /* Skip verify of nnpc_regnum, invalid_p == 0 */
607 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
608 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
609 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
610 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
611 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
612 /* Skip verify of register_name, invalid_p == 0 */
613 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
614 && (gdbarch
->register_size
== -1))
615 fprintf_unfiltered (log
, "\n\tregister_size");
616 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
617 && (gdbarch
->register_bytes
== -1))
618 fprintf_unfiltered (log
, "\n\tregister_bytes");
619 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
620 && (gdbarch
->register_byte
== 0))
621 fprintf_unfiltered (log
, "\n\tregister_byte");
622 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
623 && (gdbarch
->register_raw_size
== 0))
624 fprintf_unfiltered (log
, "\n\tregister_raw_size");
625 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
626 && (gdbarch
->max_register_raw_size
== -1))
627 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
628 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
629 && (gdbarch
->register_virtual_size
== 0))
630 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
631 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
632 && (gdbarch
->max_register_virtual_size
== -1))
633 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
634 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
635 && (gdbarch
->register_virtual_type
== 0))
636 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
637 /* Skip verify of do_registers_info, invalid_p == 0 */
638 /* Skip verify of print_float_info, invalid_p == 0 */
639 /* Skip verify of register_sim_regno, invalid_p == 0 */
640 /* Skip verify of register_bytes_ok, has predicate */
641 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
642 /* Skip verify of cannot_store_register, invalid_p == 0 */
643 /* Skip verify of get_longjmp_target, has predicate */
644 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
645 && (gdbarch
->use_generic_dummy_frames
== -1))
646 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
647 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
648 && (gdbarch
->call_dummy_location
== 0))
649 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
650 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
651 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
652 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
653 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
654 && (gdbarch
->call_dummy_start_offset
== -1))
655 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
656 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
657 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
658 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
659 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
660 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
661 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
662 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
663 && (gdbarch
->call_dummy_length
== -1))
664 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
665 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
666 && (gdbarch
->pc_in_call_dummy
== 0))
667 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
668 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
669 && (gdbarch
->call_dummy_p
== -1))
670 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
671 /* Skip verify of call_dummy_words, invalid_p == 0 */
672 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
673 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
674 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
675 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
676 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
677 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
678 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
679 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
680 && (gdbarch
->fix_call_dummy
== 0))
681 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
682 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
683 /* Skip verify of init_frame_pc, invalid_p == 0 */
684 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
685 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
686 && (gdbarch
->get_saved_register
== 0))
687 fprintf_unfiltered (log
, "\n\tget_saved_register");
688 /* Skip verify of register_convertible, invalid_p == 0 */
689 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
690 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
691 /* Skip verify of fetch_pseudo_register, has predicate */
692 /* Skip verify of store_pseudo_register, has predicate */
693 /* Skip verify of pointer_to_address, invalid_p == 0 */
694 /* Skip verify of address_to_pointer, invalid_p == 0 */
695 /* Skip verify of integer_to_address, has predicate */
696 /* Skip verify of return_value_on_stack, invalid_p == 0 */
697 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
698 && (gdbarch
->extract_return_value
== 0))
699 fprintf_unfiltered (log
, "\n\textract_return_value");
700 /* Skip verify of push_arguments, invalid_p == 0 */
701 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
702 && (gdbarch
->push_dummy_frame
== 0))
703 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
704 /* Skip verify of push_return_address, has predicate */
705 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
706 && (gdbarch
->pop_frame
== 0))
707 fprintf_unfiltered (log
, "\n\tpop_frame");
708 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
709 && (gdbarch
->store_struct_return
== 0))
710 fprintf_unfiltered (log
, "\n\tstore_struct_return");
711 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
712 && (gdbarch
->store_return_value
== 0))
713 fprintf_unfiltered (log
, "\n\tstore_return_value");
714 /* Skip verify of extract_struct_value_address, has predicate */
715 /* Skip verify of use_struct_convention, invalid_p == 0 */
716 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
717 && (gdbarch
->frame_init_saved_regs
== 0))
718 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
719 /* Skip verify of init_extra_frame_info, has predicate */
720 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
721 && (gdbarch
->skip_prologue
== 0))
722 fprintf_unfiltered (log
, "\n\tskip_prologue");
723 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
724 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
725 && (gdbarch
->inner_than
== 0))
726 fprintf_unfiltered (log
, "\n\tinner_than");
727 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
728 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
729 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
730 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
731 && (gdbarch
->decr_pc_after_break
== -1))
732 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
733 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
734 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
735 && (gdbarch
->function_start_offset
== -1))
736 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
737 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
738 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
739 && (gdbarch
->frame_args_skip
== -1))
740 fprintf_unfiltered (log
, "\n\tframe_args_skip");
741 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
742 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
743 && (gdbarch
->frame_chain
== 0))
744 fprintf_unfiltered (log
, "\n\tframe_chain");
745 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
746 && (gdbarch
->frame_chain_valid
== 0))
747 fprintf_unfiltered (log
, "\n\tframe_chain_valid");
748 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
749 && (gdbarch
->frame_saved_pc
== 0))
750 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
751 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
752 && (gdbarch
->frame_args_address
== 0))
753 fprintf_unfiltered (log
, "\n\tframe_args_address");
754 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
755 && (gdbarch
->frame_locals_address
== 0))
756 fprintf_unfiltered (log
, "\n\tframe_locals_address");
757 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
758 && (gdbarch
->saved_pc_after_call
== 0))
759 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
760 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
761 && (gdbarch
->frame_num_args
== 0))
762 fprintf_unfiltered (log
, "\n\tframe_num_args");
763 /* Skip verify of stack_align, has predicate */
764 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
765 /* Skip verify of reg_struct_has_addr, has predicate */
766 /* Skip verify of save_dummy_frame_tos, has predicate */
767 if (gdbarch
->float_format
== 0)
768 gdbarch
->float_format
= default_float_format (gdbarch
);
769 if (gdbarch
->double_format
== 0)
770 gdbarch
->double_format
= default_double_format (gdbarch
);
771 if (gdbarch
->long_double_format
== 0)
772 gdbarch
->long_double_format
= default_double_format (gdbarch
);
773 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
774 /* Skip verify of addr_bits_remove, invalid_p == 0 */
775 /* Skip verify of smash_text_address, invalid_p == 0 */
776 /* Skip verify of software_single_step, has predicate */
777 /* Skip verify of print_insn, invalid_p == 0 */
778 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
779 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
780 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
781 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
782 /* Skip verify of dwarf2_build_frame_info, has predicate */
783 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
784 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
785 buf
= ui_file_xstrdup (log
, &dummy
);
786 make_cleanup (xfree
, buf
);
787 if (strlen (buf
) > 0)
788 internal_error (__FILE__
, __LINE__
,
789 "verify_gdbarch: the following are invalid ...%s",
791 do_cleanups (cleanups
);
795 /* Print out the details of the current architecture. */
797 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
798 just happens to match the global variable ``current_gdbarch''. That
799 way macros refering to that variable get the local and not the global
800 version - ulgh. Once everything is parameterised with gdbarch, this
804 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
812 (long) current_gdbarch
->in_function_epilogue_p
);
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: register_read = 0x%08lx\n",
816 (long) current_gdbarch
->register_read
);
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: register_write = 0x%08lx\n",
820 (long) current_gdbarch
->register_write
);
821 #ifdef ADDRESS_TO_POINTER
823 /* Macro might contain `[{}]' when not multi-arch */
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: %s # %s\n",
826 "ADDRESS_TO_POINTER(type, buf, addr)",
827 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
832 (long) current_gdbarch
->address_to_pointer
833 /*ADDRESS_TO_POINTER ()*/);
835 #ifdef ADDR_BITS_REMOVE
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: %s # %s\n",
838 "ADDR_BITS_REMOVE(addr)",
839 XSTRING (ADDR_BITS_REMOVE (addr
)));
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
843 (long) current_gdbarch
->addr_bits_remove
844 /*ADDR_BITS_REMOVE ()*/);
846 #ifdef BELIEVE_PCC_PROMOTION
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
849 XSTRING (BELIEVE_PCC_PROMOTION
));
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
852 BELIEVE_PCC_PROMOTION
);
854 #ifdef BELIEVE_PCC_PROMOTION_TYPE
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
857 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
860 BELIEVE_PCC_PROMOTION_TYPE
);
862 #ifdef BREAKPOINT_FROM_PC
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: %s # %s\n",
865 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
866 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
868 fprintf_unfiltered (file
,
869 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
870 (long) current_gdbarch
->breakpoint_from_pc
871 /*BREAKPOINT_FROM_PC ()*/);
873 #ifdef CALL_DUMMY_ADDRESS
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: %s # %s\n",
876 "CALL_DUMMY_ADDRESS()",
877 XSTRING (CALL_DUMMY_ADDRESS ()));
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
881 (long) current_gdbarch
->call_dummy_address
882 /*CALL_DUMMY_ADDRESS ()*/);
884 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
887 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
888 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
891 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
893 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
896 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
899 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
901 #ifdef CALL_DUMMY_LENGTH
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
904 XSTRING (CALL_DUMMY_LENGTH
));
905 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
910 #ifdef CALL_DUMMY_LOCATION
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
913 XSTRING (CALL_DUMMY_LOCATION
));
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
916 CALL_DUMMY_LOCATION
);
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CALL_DUMMY_P # %s\n",
921 XSTRING (CALL_DUMMY_P
));
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: CALL_DUMMY_P = %d\n",
926 #ifdef CALL_DUMMY_STACK_ADJUST
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
929 XSTRING (CALL_DUMMY_STACK_ADJUST
));
930 if (CALL_DUMMY_STACK_ADJUST_P
)
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
933 (long) CALL_DUMMY_STACK_ADJUST
);
935 #ifdef CALL_DUMMY_STACK_ADJUST_P
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
938 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
941 (long) CALL_DUMMY_STACK_ADJUST_P
);
943 #ifdef CALL_DUMMY_START_OFFSET
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
946 XSTRING (CALL_DUMMY_START_OFFSET
));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
949 (long) CALL_DUMMY_START_OFFSET
);
951 #ifdef CALL_DUMMY_WORDS
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
954 XSTRING (CALL_DUMMY_WORDS
));
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
957 (long) CALL_DUMMY_WORDS
);
959 #ifdef CANNOT_FETCH_REGISTER
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: %s # %s\n",
962 "CANNOT_FETCH_REGISTER(regnum)",
963 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
967 (long) current_gdbarch
->cannot_fetch_register
968 /*CANNOT_FETCH_REGISTER ()*/);
970 #ifdef CANNOT_STORE_REGISTER
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: %s # %s\n",
973 "CANNOT_STORE_REGISTER(regnum)",
974 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
976 fprintf_unfiltered (file
,
977 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
978 (long) current_gdbarch
->cannot_store_register
979 /*CANNOT_STORE_REGISTER ()*/);
981 #ifdef COERCE_FLOAT_TO_DOUBLE
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: %s # %s\n",
984 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
985 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
989 (long) current_gdbarch
->coerce_float_to_double
990 /*COERCE_FLOAT_TO_DOUBLE ()*/);
992 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
994 /* Macro might contain `[{}]' when not multi-arch */
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: %s # %s\n",
997 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
998 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1003 (long) current_gdbarch
->coff_make_msymbol_special
1004 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1009 (long) current_gdbarch
->construct_inferior_arguments
);
1010 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: %s # %s\n",
1013 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1014 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1018 (long) current_gdbarch
->convert_from_func_ptr_addr
1019 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1021 #ifdef DECR_PC_AFTER_BREAK
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1024 XSTRING (DECR_PC_AFTER_BREAK
));
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1027 (long) DECR_PC_AFTER_BREAK
);
1029 #ifdef DO_REGISTERS_INFO
1031 /* Macro might contain `[{}]' when not multi-arch */
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: %s # %s\n",
1034 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1035 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1040 (long) current_gdbarch
->do_registers_info
1041 /*DO_REGISTERS_INFO ()*/);
1043 #ifdef DWARF2_BUILD_FRAME_INFO
1045 /* Macro might contain `[{}]' when not multi-arch */
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: %s # %s\n",
1048 "DWARF2_BUILD_FRAME_INFO(objfile)",
1049 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1054 (long) current_gdbarch
->dwarf2_build_frame_info
1055 /*DWARF2_BUILD_FRAME_INFO ()*/);
1057 #ifdef DWARF2_REG_TO_REGNUM
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: %s # %s\n",
1060 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1061 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1065 (long) current_gdbarch
->dwarf2_reg_to_regnum
1066 /*DWARF2_REG_TO_REGNUM ()*/);
1068 #ifdef DWARF_REG_TO_REGNUM
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: %s # %s\n",
1071 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1072 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1076 (long) current_gdbarch
->dwarf_reg_to_regnum
1077 /*DWARF_REG_TO_REGNUM ()*/);
1079 #ifdef ECOFF_REG_TO_REGNUM
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: %s # %s\n",
1082 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1083 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1087 (long) current_gdbarch
->ecoff_reg_to_regnum
1088 /*ECOFF_REG_TO_REGNUM ()*/);
1090 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1092 /* Macro might contain `[{}]' when not multi-arch */
1093 fprintf_unfiltered (file
,
1094 "gdbarch_dump: %s # %s\n",
1095 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1096 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1101 (long) current_gdbarch
->elf_make_msymbol_special
1102 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1104 #ifdef EXTRACT_RETURN_VALUE
1106 /* Macro might contain `[{}]' when not multi-arch */
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: %s # %s\n",
1109 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1110 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1115 (long) current_gdbarch
->extract_return_value
1116 /*EXTRACT_RETURN_VALUE ()*/);
1118 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: %s # %s\n",
1121 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1122 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1126 (long) current_gdbarch
->extract_struct_value_address
1127 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1129 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1130 fprintf_unfiltered (file
,
1131 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1132 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1135 EXTRA_STACK_ALIGNMENT_NEEDED
);
1137 #ifdef FETCH_PSEUDO_REGISTER
1139 /* Macro might contain `[{}]' when not multi-arch */
1140 fprintf_unfiltered (file
,
1141 "gdbarch_dump: %s # %s\n",
1142 "FETCH_PSEUDO_REGISTER(regnum)",
1143 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1148 (long) current_gdbarch
->fetch_pseudo_register
1149 /*FETCH_PSEUDO_REGISTER ()*/);
1151 #ifdef FIX_CALL_DUMMY
1153 /* Macro might contain `[{}]' when not multi-arch */
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: %s # %s\n",
1156 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1157 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1162 (long) current_gdbarch
->fix_call_dummy
1163 /*FIX_CALL_DUMMY ()*/);
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: FP0_REGNUM # %s\n",
1168 XSTRING (FP0_REGNUM
));
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: FP0_REGNUM = %d\n",
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: FP_REGNUM # %s\n",
1176 XSTRING (FP_REGNUM
));
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: FP_REGNUM = %d\n",
1181 #ifdef FRAMELESS_FUNCTION_INVOCATION
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: %s # %s\n",
1184 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1185 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1187 fprintf_unfiltered (file
,
1188 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1189 (long) current_gdbarch
->frameless_function_invocation
1190 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1192 #ifdef FRAME_ARGS_ADDRESS
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: %s # %s\n",
1195 "FRAME_ARGS_ADDRESS(fi)",
1196 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1200 (long) current_gdbarch
->frame_args_address
1201 /*FRAME_ARGS_ADDRESS ()*/);
1203 #ifdef FRAME_ARGS_SKIP
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1206 XSTRING (FRAME_ARGS_SKIP
));
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1209 (long) FRAME_ARGS_SKIP
);
1212 fprintf_unfiltered (file
,
1213 "gdbarch_dump: %s # %s\n",
1214 "FRAME_CHAIN(frame)",
1215 XSTRING (FRAME_CHAIN (frame
)));
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1219 (long) current_gdbarch
->frame_chain
1220 /*FRAME_CHAIN ()*/);
1222 #ifdef FRAME_CHAIN_VALID
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: %s # %s\n",
1225 "FRAME_CHAIN_VALID(chain, thisframe)",
1226 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1230 (long) current_gdbarch
->frame_chain_valid
1231 /*FRAME_CHAIN_VALID ()*/);
1233 #ifdef FRAME_INIT_SAVED_REGS
1235 /* Macro might contain `[{}]' when not multi-arch */
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: %s # %s\n",
1238 "FRAME_INIT_SAVED_REGS(frame)",
1239 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1244 (long) current_gdbarch
->frame_init_saved_regs
1245 /*FRAME_INIT_SAVED_REGS ()*/);
1247 #ifdef FRAME_LOCALS_ADDRESS
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: %s # %s\n",
1250 "FRAME_LOCALS_ADDRESS(fi)",
1251 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1255 (long) current_gdbarch
->frame_locals_address
1256 /*FRAME_LOCALS_ADDRESS ()*/);
1258 #ifdef FRAME_NUM_ARGS
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: %s # %s\n",
1261 "FRAME_NUM_ARGS(frame)",
1262 XSTRING (FRAME_NUM_ARGS (frame
)));
1264 fprintf_unfiltered (file
,
1265 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1266 (long) current_gdbarch
->frame_num_args
1267 /*FRAME_NUM_ARGS ()*/);
1269 #ifdef FRAME_SAVED_PC
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: %s # %s\n",
1272 "FRAME_SAVED_PC(fi)",
1273 XSTRING (FRAME_SAVED_PC (fi
)));
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1277 (long) current_gdbarch
->frame_saved_pc
1278 /*FRAME_SAVED_PC ()*/);
1280 #ifdef FUNCTION_START_OFFSET
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1283 XSTRING (FUNCTION_START_OFFSET
));
1284 fprintf_unfiltered (file
,
1285 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1286 (long) FUNCTION_START_OFFSET
);
1288 #ifdef GET_LONGJMP_TARGET
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: %s # %s\n",
1291 "GET_LONGJMP_TARGET(pc)",
1292 XSTRING (GET_LONGJMP_TARGET (pc
)));
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1296 (long) current_gdbarch
->get_longjmp_target
1297 /*GET_LONGJMP_TARGET ()*/);
1299 #ifdef GET_SAVED_REGISTER
1301 /* Macro might contain `[{}]' when not multi-arch */
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: %s # %s\n",
1304 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1305 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1310 (long) current_gdbarch
->get_saved_register
1311 /*GET_SAVED_REGISTER ()*/);
1313 #ifdef INIT_EXTRA_FRAME_INFO
1315 /* Macro might contain `[{}]' when not multi-arch */
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: %s # %s\n",
1318 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1319 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1322 fprintf_unfiltered (file
,
1323 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1324 (long) current_gdbarch
->init_extra_frame_info
1325 /*INIT_EXTRA_FRAME_INFO ()*/);
1327 #ifdef INIT_FRAME_PC
1329 /* Macro might contain `[{}]' when not multi-arch */
1330 fprintf_unfiltered (file
,
1331 "gdbarch_dump: %s # %s\n",
1332 "INIT_FRAME_PC(fromleaf, prev)",
1333 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1336 fprintf_unfiltered (file
,
1337 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1338 (long) current_gdbarch
->init_frame_pc
1339 /*INIT_FRAME_PC ()*/);
1341 #ifdef INIT_FRAME_PC_FIRST
1343 /* Macro might contain `[{}]' when not multi-arch */
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: %s # %s\n",
1346 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1347 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1350 fprintf_unfiltered (file
,
1351 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1352 (long) current_gdbarch
->init_frame_pc_first
1353 /*INIT_FRAME_PC_FIRST ()*/);
1356 fprintf_unfiltered (file
,
1357 "gdbarch_dump: %s # %s\n",
1358 "INNER_THAN(lhs, rhs)",
1359 XSTRING (INNER_THAN (lhs
, rhs
)));
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1363 (long) current_gdbarch
->inner_than
1366 #ifdef INTEGER_TO_ADDRESS
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: %s # %s\n",
1369 "INTEGER_TO_ADDRESS(type, buf)",
1370 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1374 (long) current_gdbarch
->integer_to_address
1375 /*INTEGER_TO_ADDRESS ()*/);
1377 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: %s # %s\n",
1380 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1381 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1385 (long) current_gdbarch
->in_solib_call_trampoline
1386 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1388 #ifdef MAX_REGISTER_RAW_SIZE
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1391 XSTRING (MAX_REGISTER_RAW_SIZE
));
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1394 MAX_REGISTER_RAW_SIZE
);
1396 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1399 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1402 MAX_REGISTER_VIRTUAL_SIZE
);
1404 #ifdef MEMORY_INSERT_BREAKPOINT
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: %s # %s\n",
1407 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1408 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1412 (long) current_gdbarch
->memory_insert_breakpoint
1413 /*MEMORY_INSERT_BREAKPOINT ()*/);
1415 #ifdef MEMORY_REMOVE_BREAKPOINT
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: %s # %s\n",
1418 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1419 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1423 (long) current_gdbarch
->memory_remove_breakpoint
1424 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: NNPC_REGNUM # %s\n",
1429 XSTRING (NNPC_REGNUM
));
1430 fprintf_unfiltered (file
,
1431 "gdbarch_dump: NNPC_REGNUM = %d\n",
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: NPC_REGNUM # %s\n",
1437 XSTRING (NPC_REGNUM
));
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: NPC_REGNUM = %d\n",
1442 #ifdef NUM_PSEUDO_REGS
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1445 XSTRING (NUM_PSEUDO_REGS
));
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: NUM_REGS # %s\n",
1453 XSTRING (NUM_REGS
));
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: NUM_REGS = %d\n",
1458 #ifdef PARM_BOUNDARY
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1461 XSTRING (PARM_BOUNDARY
));
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1466 #ifdef PC_IN_CALL_DUMMY
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: %s # %s\n",
1469 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1470 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1472 fprintf_unfiltered (file
,
1473 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1474 (long) current_gdbarch
->pc_in_call_dummy
1475 /*PC_IN_CALL_DUMMY ()*/);
1478 fprintf_unfiltered (file
,
1479 "gdbarch_dump: PC_REGNUM # %s\n",
1480 XSTRING (PC_REGNUM
));
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: PC_REGNUM = %d\n",
1485 #ifdef POINTER_TO_ADDRESS
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: %s # %s\n",
1488 "POINTER_TO_ADDRESS(type, buf)",
1489 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1491 fprintf_unfiltered (file
,
1492 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1493 (long) current_gdbarch
->pointer_to_address
1494 /*POINTER_TO_ADDRESS ()*/);
1498 /* Macro might contain `[{}]' when not multi-arch */
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: %s # %s\n",
1502 XSTRING (POP_FRAME (-)));
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1507 (long) current_gdbarch
->pop_frame
1510 #ifdef PREPARE_TO_PROCEED
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: %s # %s\n",
1513 "PREPARE_TO_PROCEED(select_it)",
1514 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1518 (long) current_gdbarch
->prepare_to_proceed
1519 /*PREPARE_TO_PROCEED ()*/);
1521 #ifdef PRINT_FLOAT_INFO
1523 /* Macro might contain `[{}]' when not multi-arch */
1524 fprintf_unfiltered (file
,
1525 "gdbarch_dump: %s # %s\n",
1526 "PRINT_FLOAT_INFO()",
1527 XSTRING (PRINT_FLOAT_INFO ()));
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1532 (long) current_gdbarch
->print_float_info
1533 /*PRINT_FLOAT_INFO ()*/);
1535 #ifdef PROLOGUE_FRAMELESS_P
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: %s # %s\n",
1538 "PROLOGUE_FRAMELESS_P(ip)",
1539 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1543 (long) current_gdbarch
->prologue_frameless_p
1544 /*PROLOGUE_FRAMELESS_P ()*/);
1546 #ifdef PUSH_ARGUMENTS
1547 fprintf_unfiltered (file
,
1548 "gdbarch_dump: %s # %s\n",
1549 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1550 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1552 fprintf_unfiltered (file
,
1553 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1554 (long) current_gdbarch
->push_arguments
1555 /*PUSH_ARGUMENTS ()*/);
1557 #ifdef PUSH_DUMMY_FRAME
1559 /* Macro might contain `[{}]' when not multi-arch */
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: %s # %s\n",
1562 "PUSH_DUMMY_FRAME(-)",
1563 XSTRING (PUSH_DUMMY_FRAME (-)));
1566 fprintf_unfiltered (file
,
1567 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1568 (long) current_gdbarch
->push_dummy_frame
1569 /*PUSH_DUMMY_FRAME ()*/);
1571 #ifdef PUSH_RETURN_ADDRESS
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: %s # %s\n",
1574 "PUSH_RETURN_ADDRESS(pc, sp)",
1575 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1579 (long) current_gdbarch
->push_return_address
1580 /*PUSH_RETURN_ADDRESS ()*/);
1582 #ifdef REGISTER_BYTE
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: %s # %s\n",
1585 "REGISTER_BYTE(reg_nr)",
1586 XSTRING (REGISTER_BYTE (reg_nr
)));
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1590 (long) current_gdbarch
->register_byte
1591 /*REGISTER_BYTE ()*/);
1593 #ifdef REGISTER_BYTES
1594 fprintf_unfiltered (file
,
1595 "gdbarch_dump: REGISTER_BYTES # %s\n",
1596 XSTRING (REGISTER_BYTES
));
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: REGISTER_BYTES = %d\n",
1601 #ifdef REGISTER_BYTES_OK
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: %s # %s\n",
1604 "REGISTER_BYTES_OK(nr_bytes)",
1605 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1609 (long) current_gdbarch
->register_bytes_ok
1610 /*REGISTER_BYTES_OK ()*/);
1612 #ifdef REGISTER_CONVERTIBLE
1613 fprintf_unfiltered (file
,
1614 "gdbarch_dump: %s # %s\n",
1615 "REGISTER_CONVERTIBLE(nr)",
1616 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1620 (long) current_gdbarch
->register_convertible
1621 /*REGISTER_CONVERTIBLE ()*/);
1623 #ifdef REGISTER_CONVERT_TO_RAW
1625 /* Macro might contain `[{}]' when not multi-arch */
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: %s # %s\n",
1628 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1629 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1632 fprintf_unfiltered (file
,
1633 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1634 (long) current_gdbarch
->register_convert_to_raw
1635 /*REGISTER_CONVERT_TO_RAW ()*/);
1637 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1639 /* Macro might contain `[{}]' when not multi-arch */
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: %s # %s\n",
1642 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1643 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1646 fprintf_unfiltered (file
,
1647 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1648 (long) current_gdbarch
->register_convert_to_virtual
1649 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1651 #ifdef REGISTER_NAME
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: %s # %s\n",
1654 "REGISTER_NAME(regnr)",
1655 XSTRING (REGISTER_NAME (regnr
)));
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1659 (long) current_gdbarch
->register_name
1660 /*REGISTER_NAME ()*/);
1662 #ifdef REGISTER_RAW_SIZE
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: %s # %s\n",
1665 "REGISTER_RAW_SIZE(reg_nr)",
1666 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1670 (long) current_gdbarch
->register_raw_size
1671 /*REGISTER_RAW_SIZE ()*/);
1673 #ifdef REGISTER_SIM_REGNO
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: %s # %s\n",
1676 "REGISTER_SIM_REGNO(reg_nr)",
1677 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1679 fprintf_unfiltered (file
,
1680 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1681 (long) current_gdbarch
->register_sim_regno
1682 /*REGISTER_SIM_REGNO ()*/);
1684 #ifdef REGISTER_SIZE
1685 fprintf_unfiltered (file
,
1686 "gdbarch_dump: REGISTER_SIZE # %s\n",
1687 XSTRING (REGISTER_SIZE
));
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: REGISTER_SIZE = %d\n",
1692 #ifdef REGISTER_VIRTUAL_SIZE
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: %s # %s\n",
1695 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1696 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1700 (long) current_gdbarch
->register_virtual_size
1701 /*REGISTER_VIRTUAL_SIZE ()*/);
1703 #ifdef REGISTER_VIRTUAL_TYPE
1704 fprintf_unfiltered (file
,
1705 "gdbarch_dump: %s # %s\n",
1706 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1707 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1709 fprintf_unfiltered (file
,
1710 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1711 (long) current_gdbarch
->register_virtual_type
1712 /*REGISTER_VIRTUAL_TYPE ()*/);
1714 #ifdef REG_STRUCT_HAS_ADDR
1715 fprintf_unfiltered (file
,
1716 "gdbarch_dump: %s # %s\n",
1717 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1718 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1720 fprintf_unfiltered (file
,
1721 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1722 (long) current_gdbarch
->reg_struct_has_addr
1723 /*REG_STRUCT_HAS_ADDR ()*/);
1725 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1727 /* Macro might contain `[{}]' when not multi-arch */
1728 fprintf_unfiltered (file
,
1729 "gdbarch_dump: %s # %s\n",
1730 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1731 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1736 (long) current_gdbarch
->remote_translate_xfer_address
1737 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1739 #ifdef RETURN_VALUE_ON_STACK
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: %s # %s\n",
1742 "RETURN_VALUE_ON_STACK(type)",
1743 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1745 fprintf_unfiltered (file
,
1746 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1747 (long) current_gdbarch
->return_value_on_stack
1748 /*RETURN_VALUE_ON_STACK ()*/);
1750 #ifdef SAVED_PC_AFTER_CALL
1751 fprintf_unfiltered (file
,
1752 "gdbarch_dump: %s # %s\n",
1753 "SAVED_PC_AFTER_CALL(frame)",
1754 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1756 fprintf_unfiltered (file
,
1757 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1758 (long) current_gdbarch
->saved_pc_after_call
1759 /*SAVED_PC_AFTER_CALL ()*/);
1761 #ifdef SAVE_DUMMY_FRAME_TOS
1763 /* Macro might contain `[{}]' when not multi-arch */
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: %s # %s\n",
1766 "SAVE_DUMMY_FRAME_TOS(sp)",
1767 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1770 fprintf_unfiltered (file
,
1771 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1772 (long) current_gdbarch
->save_dummy_frame_tos
1773 /*SAVE_DUMMY_FRAME_TOS ()*/);
1775 #ifdef SDB_REG_TO_REGNUM
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: %s # %s\n",
1778 "SDB_REG_TO_REGNUM(sdb_regnr)",
1779 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1781 fprintf_unfiltered (file
,
1782 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1783 (long) current_gdbarch
->sdb_reg_to_regnum
1784 /*SDB_REG_TO_REGNUM ()*/);
1786 #ifdef SIZEOF_CALL_DUMMY_WORDS
1787 fprintf_unfiltered (file
,
1788 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1789 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1792 (long) SIZEOF_CALL_DUMMY_WORDS
);
1794 #ifdef SKIP_PROLOGUE
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: %s # %s\n",
1797 "SKIP_PROLOGUE(ip)",
1798 XSTRING (SKIP_PROLOGUE (ip
)));
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1802 (long) current_gdbarch
->skip_prologue
1803 /*SKIP_PROLOGUE ()*/);
1805 #ifdef SKIP_TRAMPOLINE_CODE
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: %s # %s\n",
1808 "SKIP_TRAMPOLINE_CODE(pc)",
1809 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1813 (long) current_gdbarch
->skip_trampoline_code
1814 /*SKIP_TRAMPOLINE_CODE ()*/);
1816 #ifdef SMASH_TEXT_ADDRESS
1817 fprintf_unfiltered (file
,
1818 "gdbarch_dump: %s # %s\n",
1819 "SMASH_TEXT_ADDRESS(addr)",
1820 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1824 (long) current_gdbarch
->smash_text_address
1825 /*SMASH_TEXT_ADDRESS ()*/);
1827 #ifdef SOFTWARE_SINGLE_STEP
1829 /* Macro might contain `[{}]' when not multi-arch */
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: %s # %s\n",
1832 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1833 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1838 (long) current_gdbarch
->software_single_step
1839 /*SOFTWARE_SINGLE_STEP ()*/);
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: SP_REGNUM # %s\n",
1844 XSTRING (SP_REGNUM
));
1845 fprintf_unfiltered (file
,
1846 "gdbarch_dump: SP_REGNUM = %d\n",
1849 #ifdef STAB_REG_TO_REGNUM
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: %s # %s\n",
1852 "STAB_REG_TO_REGNUM(stab_regnr)",
1853 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1857 (long) current_gdbarch
->stab_reg_to_regnum
1858 /*STAB_REG_TO_REGNUM ()*/);
1861 fprintf_unfiltered (file
,
1862 "gdbarch_dump: %s # %s\n",
1864 XSTRING (STACK_ALIGN (sp
)));
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1868 (long) current_gdbarch
->stack_align
1869 /*STACK_ALIGN ()*/);
1871 #ifdef STORE_PSEUDO_REGISTER
1873 /* Macro might contain `[{}]' when not multi-arch */
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: %s # %s\n",
1876 "STORE_PSEUDO_REGISTER(regnum)",
1877 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1882 (long) current_gdbarch
->store_pseudo_register
1883 /*STORE_PSEUDO_REGISTER ()*/);
1885 #ifdef STORE_RETURN_VALUE
1887 /* Macro might contain `[{}]' when not multi-arch */
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: %s # %s\n",
1890 "STORE_RETURN_VALUE(type, valbuf)",
1891 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1896 (long) current_gdbarch
->store_return_value
1897 /*STORE_RETURN_VALUE ()*/);
1899 #ifdef STORE_STRUCT_RETURN
1901 /* Macro might contain `[{}]' when not multi-arch */
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: %s # %s\n",
1904 "STORE_STRUCT_RETURN(addr, sp)",
1905 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1910 (long) current_gdbarch
->store_struct_return
1911 /*STORE_STRUCT_RETURN ()*/);
1913 #ifdef TARGET_ADDR_BIT
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1916 XSTRING (TARGET_ADDR_BIT
));
1917 fprintf_unfiltered (file
,
1918 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1921 #ifdef TARGET_ARCHITECTURE
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1924 XSTRING (TARGET_ARCHITECTURE
));
1925 if (TARGET_ARCHITECTURE
!= NULL
)
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1928 TARGET_ARCHITECTURE
->printable_name
);
1930 #ifdef TARGET_BFD_VMA_BIT
1931 fprintf_unfiltered (file
,
1932 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1933 XSTRING (TARGET_BFD_VMA_BIT
));
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1936 TARGET_BFD_VMA_BIT
);
1938 #ifdef TARGET_BYTE_ORDER
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1941 XSTRING (TARGET_BYTE_ORDER
));
1942 fprintf_unfiltered (file
,
1943 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1944 (long) TARGET_BYTE_ORDER
);
1946 #ifdef TARGET_CHAR_SIGNED
1947 fprintf_unfiltered (file
,
1948 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1949 XSTRING (TARGET_CHAR_SIGNED
));
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1952 TARGET_CHAR_SIGNED
);
1954 #ifdef TARGET_DOUBLE_BIT
1955 fprintf_unfiltered (file
,
1956 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1957 XSTRING (TARGET_DOUBLE_BIT
));
1958 fprintf_unfiltered (file
,
1959 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1962 #ifdef TARGET_DOUBLE_FORMAT
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1965 XSTRING (TARGET_DOUBLE_FORMAT
));
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1968 (long) TARGET_DOUBLE_FORMAT
);
1970 #ifdef TARGET_FLOAT_BIT
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1973 XSTRING (TARGET_FLOAT_BIT
));
1974 fprintf_unfiltered (file
,
1975 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1978 #ifdef TARGET_FLOAT_FORMAT
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1981 XSTRING (TARGET_FLOAT_FORMAT
));
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1984 (long) TARGET_FLOAT_FORMAT
);
1986 #ifdef TARGET_INT_BIT
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1989 XSTRING (TARGET_INT_BIT
));
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1994 #ifdef TARGET_LONG_BIT
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1997 XSTRING (TARGET_LONG_BIT
));
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2002 #ifdef TARGET_LONG_DOUBLE_BIT
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2005 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2008 TARGET_LONG_DOUBLE_BIT
);
2010 #ifdef TARGET_LONG_DOUBLE_FORMAT
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2013 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2016 (long) TARGET_LONG_DOUBLE_FORMAT
);
2018 #ifdef TARGET_LONG_LONG_BIT
2019 fprintf_unfiltered (file
,
2020 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2021 XSTRING (TARGET_LONG_LONG_BIT
));
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2024 TARGET_LONG_LONG_BIT
);
2026 #ifdef TARGET_PRINT_INSN
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: %s # %s\n",
2029 "TARGET_PRINT_INSN(vma, info)",
2030 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2034 (long) current_gdbarch
->print_insn
2035 /*TARGET_PRINT_INSN ()*/);
2037 #ifdef TARGET_PTR_BIT
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2040 XSTRING (TARGET_PTR_BIT
));
2041 fprintf_unfiltered (file
,
2042 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2045 #ifdef TARGET_READ_FP
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: %s # %s\n",
2049 XSTRING (TARGET_READ_FP ()));
2051 fprintf_unfiltered (file
,
2052 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2053 (long) current_gdbarch
->read_fp
2054 /*TARGET_READ_FP ()*/);
2056 #ifdef TARGET_READ_PC
2057 fprintf_unfiltered (file
,
2058 "gdbarch_dump: %s # %s\n",
2059 "TARGET_READ_PC(ptid)",
2060 XSTRING (TARGET_READ_PC (ptid
)));
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2064 (long) current_gdbarch
->read_pc
2065 /*TARGET_READ_PC ()*/);
2067 #ifdef TARGET_READ_SP
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: %s # %s\n",
2071 XSTRING (TARGET_READ_SP ()));
2073 fprintf_unfiltered (file
,
2074 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2075 (long) current_gdbarch
->read_sp
2076 /*TARGET_READ_SP ()*/);
2078 #ifdef TARGET_SHORT_BIT
2079 fprintf_unfiltered (file
,
2080 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2081 XSTRING (TARGET_SHORT_BIT
));
2082 fprintf_unfiltered (file
,
2083 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2086 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2088 /* Macro might contain `[{}]' when not multi-arch */
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: %s # %s\n",
2091 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2092 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2095 fprintf_unfiltered (file
,
2096 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2097 (long) current_gdbarch
->virtual_frame_pointer
2098 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2100 #ifdef TARGET_WRITE_FP
2102 /* Macro might contain `[{}]' when not multi-arch */
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: %s # %s\n",
2105 "TARGET_WRITE_FP(val)",
2106 XSTRING (TARGET_WRITE_FP (val
)));
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2111 (long) current_gdbarch
->write_fp
2112 /*TARGET_WRITE_FP ()*/);
2114 #ifdef TARGET_WRITE_PC
2116 /* Macro might contain `[{}]' when not multi-arch */
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: %s # %s\n",
2119 "TARGET_WRITE_PC(val, ptid)",
2120 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2125 (long) current_gdbarch
->write_pc
2126 /*TARGET_WRITE_PC ()*/);
2128 #ifdef TARGET_WRITE_SP
2130 /* Macro might contain `[{}]' when not multi-arch */
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: %s # %s\n",
2133 "TARGET_WRITE_SP(val)",
2134 XSTRING (TARGET_WRITE_SP (val
)));
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2139 (long) current_gdbarch
->write_sp
2140 /*TARGET_WRITE_SP ()*/);
2142 #ifdef USE_GENERIC_DUMMY_FRAMES
2143 fprintf_unfiltered (file
,
2144 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2145 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2146 fprintf_unfiltered (file
,
2147 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2148 USE_GENERIC_DUMMY_FRAMES
);
2150 #ifdef USE_STRUCT_CONVENTION
2151 fprintf_unfiltered (file
,
2152 "gdbarch_dump: %s # %s\n",
2153 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2154 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2156 fprintf_unfiltered (file
,
2157 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2158 (long) current_gdbarch
->use_struct_convention
2159 /*USE_STRUCT_CONVENTION ()*/);
2161 if (current_gdbarch
->dump_tdep
!= NULL
)
2162 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2165 struct gdbarch_tdep
*
2166 gdbarch_tdep (struct gdbarch
*gdbarch
)
2168 if (gdbarch_debug
>= 2)
2169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2170 return gdbarch
->tdep
;
2174 const struct bfd_arch_info
*
2175 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2177 if (gdbarch_debug
>= 2)
2178 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2179 return gdbarch
->bfd_arch_info
;
2183 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2185 if (gdbarch_debug
>= 2)
2186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2187 return gdbarch
->byte_order
;
2191 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2193 /* Skip verify of short_bit, invalid_p == 0 */
2194 if (gdbarch_debug
>= 2)
2195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2196 return gdbarch
->short_bit
;
2200 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2203 gdbarch
->short_bit
= short_bit
;
2207 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2209 /* Skip verify of int_bit, invalid_p == 0 */
2210 if (gdbarch_debug
>= 2)
2211 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2212 return gdbarch
->int_bit
;
2216 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2219 gdbarch
->int_bit
= int_bit
;
2223 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2225 /* Skip verify of long_bit, invalid_p == 0 */
2226 if (gdbarch_debug
>= 2)
2227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2228 return gdbarch
->long_bit
;
2232 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2235 gdbarch
->long_bit
= long_bit
;
2239 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2241 /* Skip verify of long_long_bit, invalid_p == 0 */
2242 if (gdbarch_debug
>= 2)
2243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2244 return gdbarch
->long_long_bit
;
2248 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2251 gdbarch
->long_long_bit
= long_long_bit
;
2255 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2257 /* Skip verify of float_bit, invalid_p == 0 */
2258 if (gdbarch_debug
>= 2)
2259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2260 return gdbarch
->float_bit
;
2264 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2267 gdbarch
->float_bit
= float_bit
;
2271 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2273 /* Skip verify of double_bit, invalid_p == 0 */
2274 if (gdbarch_debug
>= 2)
2275 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2276 return gdbarch
->double_bit
;
2280 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2283 gdbarch
->double_bit
= double_bit
;
2287 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2289 /* Skip verify of long_double_bit, invalid_p == 0 */
2290 if (gdbarch_debug
>= 2)
2291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2292 return gdbarch
->long_double_bit
;
2296 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2297 int long_double_bit
)
2299 gdbarch
->long_double_bit
= long_double_bit
;
2303 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2305 /* Skip verify of ptr_bit, invalid_p == 0 */
2306 if (gdbarch_debug
>= 2)
2307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2308 return gdbarch
->ptr_bit
;
2312 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2315 gdbarch
->ptr_bit
= ptr_bit
;
2319 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2321 if (gdbarch
->addr_bit
== 0)
2322 internal_error (__FILE__
, __LINE__
,
2323 "gdbarch: gdbarch_addr_bit invalid");
2324 if (gdbarch_debug
>= 2)
2325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2326 return gdbarch
->addr_bit
;
2330 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2333 gdbarch
->addr_bit
= addr_bit
;
2337 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2339 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2340 if (gdbarch_debug
>= 2)
2341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2342 return gdbarch
->bfd_vma_bit
;
2346 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2349 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2353 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2355 if (gdbarch
->char_signed
== -1)
2356 internal_error (__FILE__
, __LINE__
,
2357 "gdbarch: gdbarch_char_signed invalid");
2358 if (gdbarch_debug
>= 2)
2359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2360 return gdbarch
->char_signed
;
2364 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2367 gdbarch
->char_signed
= char_signed
;
2371 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2373 if (gdbarch
->read_pc
== 0)
2374 internal_error (__FILE__
, __LINE__
,
2375 "gdbarch: gdbarch_read_pc invalid");
2376 if (gdbarch_debug
>= 2)
2377 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2378 return gdbarch
->read_pc (ptid
);
2382 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2383 gdbarch_read_pc_ftype read_pc
)
2385 gdbarch
->read_pc
= read_pc
;
2389 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2391 if (gdbarch
->write_pc
== 0)
2392 internal_error (__FILE__
, __LINE__
,
2393 "gdbarch: gdbarch_write_pc invalid");
2394 if (gdbarch_debug
>= 2)
2395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2396 gdbarch
->write_pc (val
, ptid
);
2400 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2401 gdbarch_write_pc_ftype write_pc
)
2403 gdbarch
->write_pc
= write_pc
;
2407 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2409 if (gdbarch
->read_fp
== 0)
2410 internal_error (__FILE__
, __LINE__
,
2411 "gdbarch: gdbarch_read_fp invalid");
2412 if (gdbarch_debug
>= 2)
2413 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2414 return gdbarch
->read_fp ();
2418 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2419 gdbarch_read_fp_ftype read_fp
)
2421 gdbarch
->read_fp
= read_fp
;
2425 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2427 if (gdbarch
->write_fp
== 0)
2428 internal_error (__FILE__
, __LINE__
,
2429 "gdbarch: gdbarch_write_fp invalid");
2430 if (gdbarch_debug
>= 2)
2431 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2432 gdbarch
->write_fp (val
);
2436 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2437 gdbarch_write_fp_ftype write_fp
)
2439 gdbarch
->write_fp
= write_fp
;
2443 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2445 if (gdbarch
->read_sp
== 0)
2446 internal_error (__FILE__
, __LINE__
,
2447 "gdbarch: gdbarch_read_sp invalid");
2448 if (gdbarch_debug
>= 2)
2449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2450 return gdbarch
->read_sp ();
2454 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2455 gdbarch_read_sp_ftype read_sp
)
2457 gdbarch
->read_sp
= read_sp
;
2461 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2463 if (gdbarch
->write_sp
== 0)
2464 internal_error (__FILE__
, __LINE__
,
2465 "gdbarch: gdbarch_write_sp invalid");
2466 if (gdbarch_debug
>= 2)
2467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2468 gdbarch
->write_sp (val
);
2472 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2473 gdbarch_write_sp_ftype write_sp
)
2475 gdbarch
->write_sp
= write_sp
;
2479 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2481 if (gdbarch
->virtual_frame_pointer
== 0)
2482 internal_error (__FILE__
, __LINE__
,
2483 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2484 if (gdbarch_debug
>= 2)
2485 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2486 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2490 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2491 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2493 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2497 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2499 return gdbarch
->register_read
!= 0;
2503 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2505 if (gdbarch
->register_read
== 0)
2506 internal_error (__FILE__
, __LINE__
,
2507 "gdbarch: gdbarch_register_read invalid");
2508 if (gdbarch_debug
>= 2)
2509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2510 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2514 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2515 gdbarch_register_read_ftype register_read
)
2517 gdbarch
->register_read
= register_read
;
2521 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2523 return gdbarch
->register_write
!= 0;
2527 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2529 if (gdbarch
->register_write
== 0)
2530 internal_error (__FILE__
, __LINE__
,
2531 "gdbarch: gdbarch_register_write invalid");
2532 if (gdbarch_debug
>= 2)
2533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2534 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2538 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2539 gdbarch_register_write_ftype register_write
)
2541 gdbarch
->register_write
= register_write
;
2545 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2547 if (gdbarch
->num_regs
== -1)
2548 internal_error (__FILE__
, __LINE__
,
2549 "gdbarch: gdbarch_num_regs invalid");
2550 if (gdbarch_debug
>= 2)
2551 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2552 return gdbarch
->num_regs
;
2556 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2559 gdbarch
->num_regs
= num_regs
;
2563 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2565 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2566 if (gdbarch_debug
>= 2)
2567 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2568 return gdbarch
->num_pseudo_regs
;
2572 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2573 int num_pseudo_regs
)
2575 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2579 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2581 if (gdbarch
->sp_regnum
== -1)
2582 internal_error (__FILE__
, __LINE__
,
2583 "gdbarch: gdbarch_sp_regnum invalid");
2584 if (gdbarch_debug
>= 2)
2585 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2586 return gdbarch
->sp_regnum
;
2590 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2593 gdbarch
->sp_regnum
= sp_regnum
;
2597 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2599 if (gdbarch
->fp_regnum
== -1)
2600 internal_error (__FILE__
, __LINE__
,
2601 "gdbarch: gdbarch_fp_regnum invalid");
2602 if (gdbarch_debug
>= 2)
2603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2604 return gdbarch
->fp_regnum
;
2608 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2611 gdbarch
->fp_regnum
= fp_regnum
;
2615 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2617 if (gdbarch
->pc_regnum
== -1)
2618 internal_error (__FILE__
, __LINE__
,
2619 "gdbarch: gdbarch_pc_regnum invalid");
2620 if (gdbarch_debug
>= 2)
2621 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2622 return gdbarch
->pc_regnum
;
2626 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2629 gdbarch
->pc_regnum
= pc_regnum
;
2633 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2635 /* Skip verify of fp0_regnum, invalid_p == 0 */
2636 if (gdbarch_debug
>= 2)
2637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2638 return gdbarch
->fp0_regnum
;
2642 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2645 gdbarch
->fp0_regnum
= fp0_regnum
;
2649 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2651 /* Skip verify of npc_regnum, invalid_p == 0 */
2652 if (gdbarch_debug
>= 2)
2653 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2654 return gdbarch
->npc_regnum
;
2658 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2661 gdbarch
->npc_regnum
= npc_regnum
;
2665 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2667 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2668 if (gdbarch_debug
>= 2)
2669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2670 return gdbarch
->nnpc_regnum
;
2674 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2677 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2681 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2683 if (gdbarch
->stab_reg_to_regnum
== 0)
2684 internal_error (__FILE__
, __LINE__
,
2685 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2686 if (gdbarch_debug
>= 2)
2687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2688 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2692 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2693 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2695 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2699 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2701 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2702 internal_error (__FILE__
, __LINE__
,
2703 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2704 if (gdbarch_debug
>= 2)
2705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2706 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2710 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2711 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2713 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2717 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2719 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2720 internal_error (__FILE__
, __LINE__
,
2721 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2722 if (gdbarch_debug
>= 2)
2723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2724 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2728 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2729 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2731 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2735 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2737 if (gdbarch
->sdb_reg_to_regnum
== 0)
2738 internal_error (__FILE__
, __LINE__
,
2739 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2740 if (gdbarch_debug
>= 2)
2741 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2742 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2746 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2747 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2749 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2753 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2755 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2756 internal_error (__FILE__
, __LINE__
,
2757 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2758 if (gdbarch_debug
>= 2)
2759 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2760 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2764 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2765 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2767 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2771 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2773 if (gdbarch
->register_name
== 0)
2774 internal_error (__FILE__
, __LINE__
,
2775 "gdbarch: gdbarch_register_name invalid");
2776 if (gdbarch_debug
>= 2)
2777 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2778 return gdbarch
->register_name (regnr
);
2782 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2783 gdbarch_register_name_ftype register_name
)
2785 gdbarch
->register_name
= register_name
;
2789 gdbarch_register_size (struct gdbarch
*gdbarch
)
2791 if (gdbarch
->register_size
== -1)
2792 internal_error (__FILE__
, __LINE__
,
2793 "gdbarch: gdbarch_register_size invalid");
2794 if (gdbarch_debug
>= 2)
2795 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2796 return gdbarch
->register_size
;
2800 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2803 gdbarch
->register_size
= register_size
;
2807 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2809 if (gdbarch
->register_bytes
== -1)
2810 internal_error (__FILE__
, __LINE__
,
2811 "gdbarch: gdbarch_register_bytes invalid");
2812 if (gdbarch_debug
>= 2)
2813 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2814 return gdbarch
->register_bytes
;
2818 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2821 gdbarch
->register_bytes
= register_bytes
;
2825 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2827 if (gdbarch
->register_byte
== 0)
2828 internal_error (__FILE__
, __LINE__
,
2829 "gdbarch: gdbarch_register_byte invalid");
2830 if (gdbarch_debug
>= 2)
2831 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2832 return gdbarch
->register_byte (reg_nr
);
2836 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2837 gdbarch_register_byte_ftype register_byte
)
2839 gdbarch
->register_byte
= register_byte
;
2843 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2845 if (gdbarch
->register_raw_size
== 0)
2846 internal_error (__FILE__
, __LINE__
,
2847 "gdbarch: gdbarch_register_raw_size invalid");
2848 if (gdbarch_debug
>= 2)
2849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2850 return gdbarch
->register_raw_size (reg_nr
);
2854 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2855 gdbarch_register_raw_size_ftype register_raw_size
)
2857 gdbarch
->register_raw_size
= register_raw_size
;
2861 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2863 if (gdbarch
->max_register_raw_size
== -1)
2864 internal_error (__FILE__
, __LINE__
,
2865 "gdbarch: gdbarch_max_register_raw_size invalid");
2866 if (gdbarch_debug
>= 2)
2867 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2868 return gdbarch
->max_register_raw_size
;
2872 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2873 int max_register_raw_size
)
2875 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2879 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2881 if (gdbarch
->register_virtual_size
== 0)
2882 internal_error (__FILE__
, __LINE__
,
2883 "gdbarch: gdbarch_register_virtual_size invalid");
2884 if (gdbarch_debug
>= 2)
2885 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2886 return gdbarch
->register_virtual_size (reg_nr
);
2890 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2891 gdbarch_register_virtual_size_ftype register_virtual_size
)
2893 gdbarch
->register_virtual_size
= register_virtual_size
;
2897 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2899 if (gdbarch
->max_register_virtual_size
== -1)
2900 internal_error (__FILE__
, __LINE__
,
2901 "gdbarch: gdbarch_max_register_virtual_size invalid");
2902 if (gdbarch_debug
>= 2)
2903 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2904 return gdbarch
->max_register_virtual_size
;
2908 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2909 int max_register_virtual_size
)
2911 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2915 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2917 if (gdbarch
->register_virtual_type
== 0)
2918 internal_error (__FILE__
, __LINE__
,
2919 "gdbarch: gdbarch_register_virtual_type invalid");
2920 if (gdbarch_debug
>= 2)
2921 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2922 return gdbarch
->register_virtual_type (reg_nr
);
2926 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2927 gdbarch_register_virtual_type_ftype register_virtual_type
)
2929 gdbarch
->register_virtual_type
= register_virtual_type
;
2933 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2935 if (gdbarch
->do_registers_info
== 0)
2936 internal_error (__FILE__
, __LINE__
,
2937 "gdbarch: gdbarch_do_registers_info invalid");
2938 if (gdbarch_debug
>= 2)
2939 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2940 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2944 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2945 gdbarch_do_registers_info_ftype do_registers_info
)
2947 gdbarch
->do_registers_info
= do_registers_info
;
2951 gdbarch_print_float_info (struct gdbarch
*gdbarch
)
2953 if (gdbarch
->print_float_info
== 0)
2954 internal_error (__FILE__
, __LINE__
,
2955 "gdbarch: gdbarch_print_float_info invalid");
2956 if (gdbarch_debug
>= 2)
2957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2958 gdbarch
->print_float_info ();
2962 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2963 gdbarch_print_float_info_ftype print_float_info
)
2965 gdbarch
->print_float_info
= print_float_info
;
2969 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2971 if (gdbarch
->register_sim_regno
== 0)
2972 internal_error (__FILE__
, __LINE__
,
2973 "gdbarch: gdbarch_register_sim_regno invalid");
2974 if (gdbarch_debug
>= 2)
2975 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2976 return gdbarch
->register_sim_regno (reg_nr
);
2980 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2981 gdbarch_register_sim_regno_ftype register_sim_regno
)
2983 gdbarch
->register_sim_regno
= register_sim_regno
;
2987 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2989 return gdbarch
->register_bytes_ok
!= 0;
2993 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2995 if (gdbarch
->register_bytes_ok
== 0)
2996 internal_error (__FILE__
, __LINE__
,
2997 "gdbarch: gdbarch_register_bytes_ok invalid");
2998 if (gdbarch_debug
>= 2)
2999 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3000 return gdbarch
->register_bytes_ok (nr_bytes
);
3004 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3005 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3007 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3011 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3013 if (gdbarch
->cannot_fetch_register
== 0)
3014 internal_error (__FILE__
, __LINE__
,
3015 "gdbarch: gdbarch_cannot_fetch_register invalid");
3016 if (gdbarch_debug
>= 2)
3017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3018 return gdbarch
->cannot_fetch_register (regnum
);
3022 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3023 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3025 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3029 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3031 if (gdbarch
->cannot_store_register
== 0)
3032 internal_error (__FILE__
, __LINE__
,
3033 "gdbarch: gdbarch_cannot_store_register invalid");
3034 if (gdbarch_debug
>= 2)
3035 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3036 return gdbarch
->cannot_store_register (regnum
);
3040 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3041 gdbarch_cannot_store_register_ftype cannot_store_register
)
3043 gdbarch
->cannot_store_register
= cannot_store_register
;
3047 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3049 return gdbarch
->get_longjmp_target
!= 0;
3053 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3055 if (gdbarch
->get_longjmp_target
== 0)
3056 internal_error (__FILE__
, __LINE__
,
3057 "gdbarch: gdbarch_get_longjmp_target invalid");
3058 if (gdbarch_debug
>= 2)
3059 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3060 return gdbarch
->get_longjmp_target (pc
);
3064 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3065 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3067 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3071 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3073 if (gdbarch
->use_generic_dummy_frames
== -1)
3074 internal_error (__FILE__
, __LINE__
,
3075 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3076 if (gdbarch_debug
>= 2)
3077 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3078 return gdbarch
->use_generic_dummy_frames
;
3082 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3083 int use_generic_dummy_frames
)
3085 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3089 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3091 if (gdbarch
->call_dummy_location
== 0)
3092 internal_error (__FILE__
, __LINE__
,
3093 "gdbarch: gdbarch_call_dummy_location invalid");
3094 if (gdbarch_debug
>= 2)
3095 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3096 return gdbarch
->call_dummy_location
;
3100 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3101 int call_dummy_location
)
3103 gdbarch
->call_dummy_location
= call_dummy_location
;
3107 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3109 if (gdbarch
->call_dummy_address
== 0)
3110 internal_error (__FILE__
, __LINE__
,
3111 "gdbarch: gdbarch_call_dummy_address invalid");
3112 if (gdbarch_debug
>= 2)
3113 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3114 return gdbarch
->call_dummy_address ();
3118 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3119 gdbarch_call_dummy_address_ftype call_dummy_address
)
3121 gdbarch
->call_dummy_address
= call_dummy_address
;
3125 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3127 if (gdbarch
->call_dummy_start_offset
== -1)
3128 internal_error (__FILE__
, __LINE__
,
3129 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3130 if (gdbarch_debug
>= 2)
3131 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3132 return gdbarch
->call_dummy_start_offset
;
3136 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3137 CORE_ADDR call_dummy_start_offset
)
3139 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3143 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3145 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3146 internal_error (__FILE__
, __LINE__
,
3147 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3148 if (gdbarch_debug
>= 2)
3149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3150 return gdbarch
->call_dummy_breakpoint_offset
;
3154 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3155 CORE_ADDR call_dummy_breakpoint_offset
)
3157 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3161 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3163 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3164 internal_error (__FILE__
, __LINE__
,
3165 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3166 if (gdbarch_debug
>= 2)
3167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3168 return gdbarch
->call_dummy_breakpoint_offset_p
;
3172 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3173 int call_dummy_breakpoint_offset_p
)
3175 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3179 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3181 if (gdbarch
->call_dummy_length
== -1)
3182 internal_error (__FILE__
, __LINE__
,
3183 "gdbarch: gdbarch_call_dummy_length invalid");
3184 if (gdbarch_debug
>= 2)
3185 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3186 return gdbarch
->call_dummy_length
;
3190 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3191 int call_dummy_length
)
3193 gdbarch
->call_dummy_length
= call_dummy_length
;
3197 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3199 if (gdbarch
->pc_in_call_dummy
== 0)
3200 internal_error (__FILE__
, __LINE__
,
3201 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3202 if (gdbarch_debug
>= 2)
3203 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3204 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3208 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3209 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3211 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3215 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3217 if (gdbarch
->call_dummy_p
== -1)
3218 internal_error (__FILE__
, __LINE__
,
3219 "gdbarch: gdbarch_call_dummy_p invalid");
3220 if (gdbarch_debug
>= 2)
3221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3222 return gdbarch
->call_dummy_p
;
3226 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3229 gdbarch
->call_dummy_p
= call_dummy_p
;
3233 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3235 /* Skip verify of call_dummy_words, invalid_p == 0 */
3236 if (gdbarch_debug
>= 2)
3237 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3238 return gdbarch
->call_dummy_words
;
3242 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3243 LONGEST
* call_dummy_words
)
3245 gdbarch
->call_dummy_words
= call_dummy_words
;
3249 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3251 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3252 if (gdbarch_debug
>= 2)
3253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3254 return gdbarch
->sizeof_call_dummy_words
;
3258 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3259 int sizeof_call_dummy_words
)
3261 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3265 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3267 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3268 internal_error (__FILE__
, __LINE__
,
3269 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3270 if (gdbarch_debug
>= 2)
3271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3272 return gdbarch
->call_dummy_stack_adjust_p
;
3276 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3277 int call_dummy_stack_adjust_p
)
3279 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3283 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3285 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3286 internal_error (__FILE__
, __LINE__
,
3287 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3288 if (gdbarch_debug
>= 2)
3289 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3290 return gdbarch
->call_dummy_stack_adjust
;
3294 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3295 int call_dummy_stack_adjust
)
3297 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3301 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
)
3303 if (gdbarch
->fix_call_dummy
== 0)
3304 internal_error (__FILE__
, __LINE__
,
3305 "gdbarch: gdbarch_fix_call_dummy invalid");
3306 if (gdbarch_debug
>= 2)
3307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3308 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3312 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3313 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3315 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3319 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3321 if (gdbarch
->init_frame_pc_first
== 0)
3322 internal_error (__FILE__
, __LINE__
,
3323 "gdbarch: gdbarch_init_frame_pc_first invalid");
3324 if (gdbarch_debug
>= 2)
3325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3326 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3330 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3331 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3333 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3337 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3339 if (gdbarch
->init_frame_pc
== 0)
3340 internal_error (__FILE__
, __LINE__
,
3341 "gdbarch: gdbarch_init_frame_pc invalid");
3342 if (gdbarch_debug
>= 2)
3343 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3344 gdbarch
->init_frame_pc (fromleaf
, prev
);
3348 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3349 gdbarch_init_frame_pc_ftype init_frame_pc
)
3351 gdbarch
->init_frame_pc
= init_frame_pc
;
3355 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3357 if (gdbarch_debug
>= 2)
3358 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3359 return gdbarch
->believe_pcc_promotion
;
3363 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3364 int believe_pcc_promotion
)
3366 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3370 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3372 if (gdbarch_debug
>= 2)
3373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3374 return gdbarch
->believe_pcc_promotion_type
;
3378 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3379 int believe_pcc_promotion_type
)
3381 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3385 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3387 if (gdbarch
->coerce_float_to_double
== 0)
3388 internal_error (__FILE__
, __LINE__
,
3389 "gdbarch: gdbarch_coerce_float_to_double invalid");
3390 if (gdbarch_debug
>= 2)
3391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3392 return gdbarch
->coerce_float_to_double (formal
, actual
);
3396 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3397 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3399 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3403 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
)
3405 if (gdbarch
->get_saved_register
== 0)
3406 internal_error (__FILE__
, __LINE__
,
3407 "gdbarch: gdbarch_get_saved_register invalid");
3408 if (gdbarch_debug
>= 2)
3409 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3410 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3414 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3415 gdbarch_get_saved_register_ftype get_saved_register
)
3417 gdbarch
->get_saved_register
= get_saved_register
;
3421 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3423 if (gdbarch
->register_convertible
== 0)
3424 internal_error (__FILE__
, __LINE__
,
3425 "gdbarch: gdbarch_register_convertible invalid");
3426 if (gdbarch_debug
>= 2)
3427 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3428 return gdbarch
->register_convertible (nr
);
3432 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3433 gdbarch_register_convertible_ftype register_convertible
)
3435 gdbarch
->register_convertible
= register_convertible
;
3439 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3441 if (gdbarch
->register_convert_to_virtual
== 0)
3442 internal_error (__FILE__
, __LINE__
,
3443 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3444 if (gdbarch_debug
>= 2)
3445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3446 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3450 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3451 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3453 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3457 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3459 if (gdbarch
->register_convert_to_raw
== 0)
3460 internal_error (__FILE__
, __LINE__
,
3461 "gdbarch: gdbarch_register_convert_to_raw invalid");
3462 if (gdbarch_debug
>= 2)
3463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3464 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3468 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3469 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3471 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3475 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3477 return gdbarch
->fetch_pseudo_register
!= 0;
3481 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3483 if (gdbarch
->fetch_pseudo_register
== 0)
3484 internal_error (__FILE__
, __LINE__
,
3485 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3486 if (gdbarch_debug
>= 2)
3487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3488 gdbarch
->fetch_pseudo_register (regnum
);
3492 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3493 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3495 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3499 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3501 return gdbarch
->store_pseudo_register
!= 0;
3505 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3507 if (gdbarch
->store_pseudo_register
== 0)
3508 internal_error (__FILE__
, __LINE__
,
3509 "gdbarch: gdbarch_store_pseudo_register invalid");
3510 if (gdbarch_debug
>= 2)
3511 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3512 gdbarch
->store_pseudo_register (regnum
);
3516 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3517 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3519 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3523 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3525 if (gdbarch
->pointer_to_address
== 0)
3526 internal_error (__FILE__
, __LINE__
,
3527 "gdbarch: gdbarch_pointer_to_address invalid");
3528 if (gdbarch_debug
>= 2)
3529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3530 return gdbarch
->pointer_to_address (type
, buf
);
3534 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3535 gdbarch_pointer_to_address_ftype pointer_to_address
)
3537 gdbarch
->pointer_to_address
= pointer_to_address
;
3541 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3543 if (gdbarch
->address_to_pointer
== 0)
3544 internal_error (__FILE__
, __LINE__
,
3545 "gdbarch: gdbarch_address_to_pointer invalid");
3546 if (gdbarch_debug
>= 2)
3547 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3548 gdbarch
->address_to_pointer (type
, buf
, addr
);
3552 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3553 gdbarch_address_to_pointer_ftype address_to_pointer
)
3555 gdbarch
->address_to_pointer
= address_to_pointer
;
3559 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3561 return gdbarch
->integer_to_address
!= 0;
3565 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3567 if (gdbarch
->integer_to_address
== 0)
3568 internal_error (__FILE__
, __LINE__
,
3569 "gdbarch: gdbarch_integer_to_address invalid");
3570 if (gdbarch_debug
>= 2)
3571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3572 return gdbarch
->integer_to_address (type
, buf
);
3576 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3577 gdbarch_integer_to_address_ftype integer_to_address
)
3579 gdbarch
->integer_to_address
= integer_to_address
;
3583 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3585 if (gdbarch
->return_value_on_stack
== 0)
3586 internal_error (__FILE__
, __LINE__
,
3587 "gdbarch: gdbarch_return_value_on_stack invalid");
3588 if (gdbarch_debug
>= 2)
3589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3590 return gdbarch
->return_value_on_stack (type
);
3594 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3595 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3597 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3601 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3603 if (gdbarch
->extract_return_value
== 0)
3604 internal_error (__FILE__
, __LINE__
,
3605 "gdbarch: gdbarch_extract_return_value invalid");
3606 if (gdbarch_debug
>= 2)
3607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3608 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3612 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3613 gdbarch_extract_return_value_ftype extract_return_value
)
3615 gdbarch
->extract_return_value
= extract_return_value
;
3619 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3621 if (gdbarch
->push_arguments
== 0)
3622 internal_error (__FILE__
, __LINE__
,
3623 "gdbarch: gdbarch_push_arguments invalid");
3624 if (gdbarch_debug
>= 2)
3625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3626 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3630 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3631 gdbarch_push_arguments_ftype push_arguments
)
3633 gdbarch
->push_arguments
= push_arguments
;
3637 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3639 if (gdbarch
->push_dummy_frame
== 0)
3640 internal_error (__FILE__
, __LINE__
,
3641 "gdbarch: gdbarch_push_dummy_frame invalid");
3642 if (gdbarch_debug
>= 2)
3643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3644 gdbarch
->push_dummy_frame ();
3648 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3649 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3651 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3655 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3657 return gdbarch
->push_return_address
!= 0;
3661 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3663 if (gdbarch
->push_return_address
== 0)
3664 internal_error (__FILE__
, __LINE__
,
3665 "gdbarch: gdbarch_push_return_address invalid");
3666 if (gdbarch_debug
>= 2)
3667 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3668 return gdbarch
->push_return_address (pc
, sp
);
3672 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3673 gdbarch_push_return_address_ftype push_return_address
)
3675 gdbarch
->push_return_address
= push_return_address
;
3679 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3681 if (gdbarch
->pop_frame
== 0)
3682 internal_error (__FILE__
, __LINE__
,
3683 "gdbarch: gdbarch_pop_frame invalid");
3684 if (gdbarch_debug
>= 2)
3685 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3686 gdbarch
->pop_frame ();
3690 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3691 gdbarch_pop_frame_ftype pop_frame
)
3693 gdbarch
->pop_frame
= pop_frame
;
3697 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3699 if (gdbarch
->store_struct_return
== 0)
3700 internal_error (__FILE__
, __LINE__
,
3701 "gdbarch: gdbarch_store_struct_return invalid");
3702 if (gdbarch_debug
>= 2)
3703 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3704 gdbarch
->store_struct_return (addr
, sp
);
3708 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3709 gdbarch_store_struct_return_ftype store_struct_return
)
3711 gdbarch
->store_struct_return
= store_struct_return
;
3715 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3717 if (gdbarch
->store_return_value
== 0)
3718 internal_error (__FILE__
, __LINE__
,
3719 "gdbarch: gdbarch_store_return_value invalid");
3720 if (gdbarch_debug
>= 2)
3721 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3722 gdbarch
->store_return_value (type
, valbuf
);
3726 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3727 gdbarch_store_return_value_ftype store_return_value
)
3729 gdbarch
->store_return_value
= store_return_value
;
3733 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3735 return gdbarch
->extract_struct_value_address
!= 0;
3739 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3741 if (gdbarch
->extract_struct_value_address
== 0)
3742 internal_error (__FILE__
, __LINE__
,
3743 "gdbarch: gdbarch_extract_struct_value_address invalid");
3744 if (gdbarch_debug
>= 2)
3745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3746 return gdbarch
->extract_struct_value_address (regbuf
);
3750 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3751 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3753 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3757 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3759 if (gdbarch
->use_struct_convention
== 0)
3760 internal_error (__FILE__
, __LINE__
,
3761 "gdbarch: gdbarch_use_struct_convention invalid");
3762 if (gdbarch_debug
>= 2)
3763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3764 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3768 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3769 gdbarch_use_struct_convention_ftype use_struct_convention
)
3771 gdbarch
->use_struct_convention
= use_struct_convention
;
3775 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3777 if (gdbarch
->frame_init_saved_regs
== 0)
3778 internal_error (__FILE__
, __LINE__
,
3779 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3780 if (gdbarch_debug
>= 2)
3781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3782 gdbarch
->frame_init_saved_regs (frame
);
3786 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3787 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3789 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3793 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3795 return gdbarch
->init_extra_frame_info
!= 0;
3799 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3801 if (gdbarch
->init_extra_frame_info
== 0)
3802 internal_error (__FILE__
, __LINE__
,
3803 "gdbarch: gdbarch_init_extra_frame_info invalid");
3804 if (gdbarch_debug
>= 2)
3805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3806 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3810 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3811 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3813 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3817 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3819 if (gdbarch
->skip_prologue
== 0)
3820 internal_error (__FILE__
, __LINE__
,
3821 "gdbarch: gdbarch_skip_prologue invalid");
3822 if (gdbarch_debug
>= 2)
3823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3824 return gdbarch
->skip_prologue (ip
);
3828 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3829 gdbarch_skip_prologue_ftype skip_prologue
)
3831 gdbarch
->skip_prologue
= skip_prologue
;
3835 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3837 if (gdbarch
->prologue_frameless_p
== 0)
3838 internal_error (__FILE__
, __LINE__
,
3839 "gdbarch: gdbarch_prologue_frameless_p invalid");
3840 if (gdbarch_debug
>= 2)
3841 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3842 return gdbarch
->prologue_frameless_p (ip
);
3846 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3847 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3849 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3853 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3855 if (gdbarch
->inner_than
== 0)
3856 internal_error (__FILE__
, __LINE__
,
3857 "gdbarch: gdbarch_inner_than invalid");
3858 if (gdbarch_debug
>= 2)
3859 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3860 return gdbarch
->inner_than (lhs
, rhs
);
3864 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3865 gdbarch_inner_than_ftype inner_than
)
3867 gdbarch
->inner_than
= inner_than
;
3871 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3873 if (gdbarch
->breakpoint_from_pc
== 0)
3874 internal_error (__FILE__
, __LINE__
,
3875 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3876 if (gdbarch_debug
>= 2)
3877 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3878 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3882 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3883 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3885 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3889 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3891 if (gdbarch
->memory_insert_breakpoint
== 0)
3892 internal_error (__FILE__
, __LINE__
,
3893 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3894 if (gdbarch_debug
>= 2)
3895 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3896 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3900 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3901 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3903 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3907 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3909 if (gdbarch
->memory_remove_breakpoint
== 0)
3910 internal_error (__FILE__
, __LINE__
,
3911 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3912 if (gdbarch_debug
>= 2)
3913 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3914 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3918 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3919 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3921 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3925 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3927 if (gdbarch
->decr_pc_after_break
== -1)
3928 internal_error (__FILE__
, __LINE__
,
3929 "gdbarch: gdbarch_decr_pc_after_break invalid");
3930 if (gdbarch_debug
>= 2)
3931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3932 return gdbarch
->decr_pc_after_break
;
3936 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3937 CORE_ADDR decr_pc_after_break
)
3939 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3943 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3945 if (gdbarch
->prepare_to_proceed
== 0)
3946 internal_error (__FILE__
, __LINE__
,
3947 "gdbarch: gdbarch_prepare_to_proceed invalid");
3948 if (gdbarch_debug
>= 2)
3949 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3950 return gdbarch
->prepare_to_proceed (select_it
);
3954 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3955 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3957 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3961 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3963 if (gdbarch
->function_start_offset
== -1)
3964 internal_error (__FILE__
, __LINE__
,
3965 "gdbarch: gdbarch_function_start_offset invalid");
3966 if (gdbarch_debug
>= 2)
3967 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3968 return gdbarch
->function_start_offset
;
3972 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3973 CORE_ADDR function_start_offset
)
3975 gdbarch
->function_start_offset
= function_start_offset
;
3979 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3981 if (gdbarch
->remote_translate_xfer_address
== 0)
3982 internal_error (__FILE__
, __LINE__
,
3983 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3984 if (gdbarch_debug
>= 2)
3985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3986 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3990 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3991 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3993 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3997 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3999 if (gdbarch
->frame_args_skip
== -1)
4000 internal_error (__FILE__
, __LINE__
,
4001 "gdbarch: gdbarch_frame_args_skip invalid");
4002 if (gdbarch_debug
>= 2)
4003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4004 return gdbarch
->frame_args_skip
;
4008 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4009 CORE_ADDR frame_args_skip
)
4011 gdbarch
->frame_args_skip
= frame_args_skip
;
4015 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4017 if (gdbarch
->frameless_function_invocation
== 0)
4018 internal_error (__FILE__
, __LINE__
,
4019 "gdbarch: gdbarch_frameless_function_invocation invalid");
4020 if (gdbarch_debug
>= 2)
4021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4022 return gdbarch
->frameless_function_invocation (fi
);
4026 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4027 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4029 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4033 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4035 if (gdbarch
->frame_chain
== 0)
4036 internal_error (__FILE__
, __LINE__
,
4037 "gdbarch: gdbarch_frame_chain invalid");
4038 if (gdbarch_debug
>= 2)
4039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4040 return gdbarch
->frame_chain (frame
);
4044 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4045 gdbarch_frame_chain_ftype frame_chain
)
4047 gdbarch
->frame_chain
= frame_chain
;
4051 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4053 if (gdbarch
->frame_chain_valid
== 0)
4054 internal_error (__FILE__
, __LINE__
,
4055 "gdbarch: gdbarch_frame_chain_valid invalid");
4056 if (gdbarch_debug
>= 2)
4057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4058 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4062 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4063 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4065 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4069 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4071 if (gdbarch
->frame_saved_pc
== 0)
4072 internal_error (__FILE__
, __LINE__
,
4073 "gdbarch: gdbarch_frame_saved_pc invalid");
4074 if (gdbarch_debug
>= 2)
4075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4076 return gdbarch
->frame_saved_pc (fi
);
4080 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4081 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4083 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4087 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4089 if (gdbarch
->frame_args_address
== 0)
4090 internal_error (__FILE__
, __LINE__
,
4091 "gdbarch: gdbarch_frame_args_address invalid");
4092 if (gdbarch_debug
>= 2)
4093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4094 return gdbarch
->frame_args_address (fi
);
4098 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4099 gdbarch_frame_args_address_ftype frame_args_address
)
4101 gdbarch
->frame_args_address
= frame_args_address
;
4105 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4107 if (gdbarch
->frame_locals_address
== 0)
4108 internal_error (__FILE__
, __LINE__
,
4109 "gdbarch: gdbarch_frame_locals_address invalid");
4110 if (gdbarch_debug
>= 2)
4111 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4112 return gdbarch
->frame_locals_address (fi
);
4116 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4117 gdbarch_frame_locals_address_ftype frame_locals_address
)
4119 gdbarch
->frame_locals_address
= frame_locals_address
;
4123 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4125 if (gdbarch
->saved_pc_after_call
== 0)
4126 internal_error (__FILE__
, __LINE__
,
4127 "gdbarch: gdbarch_saved_pc_after_call invalid");
4128 if (gdbarch_debug
>= 2)
4129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4130 return gdbarch
->saved_pc_after_call (frame
);
4134 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4135 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4137 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4141 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4143 if (gdbarch
->frame_num_args
== 0)
4144 internal_error (__FILE__
, __LINE__
,
4145 "gdbarch: gdbarch_frame_num_args invalid");
4146 if (gdbarch_debug
>= 2)
4147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4148 return gdbarch
->frame_num_args (frame
);
4152 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4153 gdbarch_frame_num_args_ftype frame_num_args
)
4155 gdbarch
->frame_num_args
= frame_num_args
;
4159 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4161 return gdbarch
->stack_align
!= 0;
4165 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4167 if (gdbarch
->stack_align
== 0)
4168 internal_error (__FILE__
, __LINE__
,
4169 "gdbarch: gdbarch_stack_align invalid");
4170 if (gdbarch_debug
>= 2)
4171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4172 return gdbarch
->stack_align (sp
);
4176 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4177 gdbarch_stack_align_ftype stack_align
)
4179 gdbarch
->stack_align
= stack_align
;
4183 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4185 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4186 if (gdbarch_debug
>= 2)
4187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4188 return gdbarch
->extra_stack_alignment_needed
;
4192 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4193 int extra_stack_alignment_needed
)
4195 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4199 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4201 return gdbarch
->reg_struct_has_addr
!= 0;
4205 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4207 if (gdbarch
->reg_struct_has_addr
== 0)
4208 internal_error (__FILE__
, __LINE__
,
4209 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4210 if (gdbarch_debug
>= 2)
4211 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4212 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4216 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4217 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4219 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4223 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4225 return gdbarch
->save_dummy_frame_tos
!= 0;
4229 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4231 if (gdbarch
->save_dummy_frame_tos
== 0)
4232 internal_error (__FILE__
, __LINE__
,
4233 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4234 if (gdbarch_debug
>= 2)
4235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4236 gdbarch
->save_dummy_frame_tos (sp
);
4240 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4241 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4243 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4247 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4249 if (gdbarch_debug
>= 2)
4250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4251 return gdbarch
->parm_boundary
;
4255 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4258 gdbarch
->parm_boundary
= parm_boundary
;
4261 const struct floatformat
*
4262 gdbarch_float_format (struct gdbarch
*gdbarch
)
4264 if (gdbarch_debug
>= 2)
4265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4266 return gdbarch
->float_format
;
4270 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4271 const struct floatformat
* float_format
)
4273 gdbarch
->float_format
= float_format
;
4276 const struct floatformat
*
4277 gdbarch_double_format (struct gdbarch
*gdbarch
)
4279 if (gdbarch_debug
>= 2)
4280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4281 return gdbarch
->double_format
;
4285 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4286 const struct floatformat
* double_format
)
4288 gdbarch
->double_format
= double_format
;
4291 const struct floatformat
*
4292 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4294 if (gdbarch_debug
>= 2)
4295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4296 return gdbarch
->long_double_format
;
4300 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4301 const struct floatformat
* long_double_format
)
4303 gdbarch
->long_double_format
= long_double_format
;
4307 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4309 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4310 internal_error (__FILE__
, __LINE__
,
4311 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4312 if (gdbarch_debug
>= 2)
4313 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4314 return gdbarch
->convert_from_func_ptr_addr (addr
);
4318 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4319 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4321 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4325 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4327 if (gdbarch
->addr_bits_remove
== 0)
4328 internal_error (__FILE__
, __LINE__
,
4329 "gdbarch: gdbarch_addr_bits_remove invalid");
4330 if (gdbarch_debug
>= 2)
4331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4332 return gdbarch
->addr_bits_remove (addr
);
4336 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4337 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4339 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4343 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4345 if (gdbarch
->smash_text_address
== 0)
4346 internal_error (__FILE__
, __LINE__
,
4347 "gdbarch: gdbarch_smash_text_address invalid");
4348 if (gdbarch_debug
>= 2)
4349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4350 return gdbarch
->smash_text_address (addr
);
4354 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4355 gdbarch_smash_text_address_ftype smash_text_address
)
4357 gdbarch
->smash_text_address
= smash_text_address
;
4361 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4363 return gdbarch
->software_single_step
!= 0;
4367 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4369 if (gdbarch
->software_single_step
== 0)
4370 internal_error (__FILE__
, __LINE__
,
4371 "gdbarch: gdbarch_software_single_step invalid");
4372 if (gdbarch_debug
>= 2)
4373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4374 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4378 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4379 gdbarch_software_single_step_ftype software_single_step
)
4381 gdbarch
->software_single_step
= software_single_step
;
4385 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4387 if (gdbarch
->print_insn
== 0)
4388 internal_error (__FILE__
, __LINE__
,
4389 "gdbarch: gdbarch_print_insn invalid");
4390 if (gdbarch_debug
>= 2)
4391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4392 return gdbarch
->print_insn (vma
, info
);
4396 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4397 gdbarch_print_insn_ftype print_insn
)
4399 gdbarch
->print_insn
= print_insn
;
4403 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4405 if (gdbarch
->skip_trampoline_code
== 0)
4406 internal_error (__FILE__
, __LINE__
,
4407 "gdbarch: gdbarch_skip_trampoline_code invalid");
4408 if (gdbarch_debug
>= 2)
4409 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4410 return gdbarch
->skip_trampoline_code (pc
);
4414 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4415 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4417 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4421 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4423 if (gdbarch
->in_solib_call_trampoline
== 0)
4424 internal_error (__FILE__
, __LINE__
,
4425 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4426 if (gdbarch_debug
>= 2)
4427 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4428 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4432 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4433 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4435 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4439 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4441 if (gdbarch
->in_function_epilogue_p
== 0)
4442 internal_error (__FILE__
, __LINE__
,
4443 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4444 if (gdbarch_debug
>= 2)
4445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4446 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4450 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4451 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4453 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4457 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4459 if (gdbarch
->construct_inferior_arguments
== 0)
4460 internal_error (__FILE__
, __LINE__
,
4461 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4462 if (gdbarch_debug
>= 2)
4463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4464 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4468 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4469 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4471 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4475 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4477 return gdbarch
->dwarf2_build_frame_info
!= 0;
4481 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4483 if (gdbarch
->dwarf2_build_frame_info
== 0)
4484 internal_error (__FILE__
, __LINE__
,
4485 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4486 if (gdbarch_debug
>= 2)
4487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4488 gdbarch
->dwarf2_build_frame_info (objfile
);
4492 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4493 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4495 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4499 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4501 if (gdbarch
->elf_make_msymbol_special
== 0)
4502 internal_error (__FILE__
, __LINE__
,
4503 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4504 if (gdbarch_debug
>= 2)
4505 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4506 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4510 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4511 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4513 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4517 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4519 if (gdbarch
->coff_make_msymbol_special
== 0)
4520 internal_error (__FILE__
, __LINE__
,
4521 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4522 if (gdbarch_debug
>= 2)
4523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4524 gdbarch
->coff_make_msymbol_special (val
, msym
);
4528 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4529 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4531 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4535 /* Keep a registry of per-architecture data-pointers required by GDB
4541 gdbarch_data_init_ftype
*init
;
4542 gdbarch_data_free_ftype
*free
;
4545 struct gdbarch_data_registration
4547 struct gdbarch_data
*data
;
4548 struct gdbarch_data_registration
*next
;
4551 struct gdbarch_data_registry
4554 struct gdbarch_data_registration
*registrations
;
4557 struct gdbarch_data_registry gdbarch_data_registry
=
4562 struct gdbarch_data
*
4563 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4564 gdbarch_data_free_ftype
*free
)
4566 struct gdbarch_data_registration
**curr
;
4567 for (curr
= &gdbarch_data_registry
.registrations
;
4569 curr
= &(*curr
)->next
);
4570 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4571 (*curr
)->next
= NULL
;
4572 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4573 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4574 (*curr
)->data
->init
= init
;
4575 (*curr
)->data
->free
= free
;
4576 return (*curr
)->data
;
4580 /* Walk through all the registered users initializing each in turn. */
4583 init_gdbarch_data (struct gdbarch
*gdbarch
)
4585 struct gdbarch_data_registration
*rego
;
4586 for (rego
= gdbarch_data_registry
.registrations
;
4590 struct gdbarch_data
*data
= rego
->data
;
4591 gdb_assert (data
->index
< gdbarch
->nr_data
);
4592 if (data
->init
!= NULL
)
4594 void *pointer
= data
->init (gdbarch
);
4595 set_gdbarch_data (gdbarch
, data
, pointer
);
4600 /* Create/delete the gdbarch data vector. */
4603 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4605 gdb_assert (gdbarch
->data
== NULL
);
4606 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4607 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4611 free_gdbarch_data (struct gdbarch
*gdbarch
)
4613 struct gdbarch_data_registration
*rego
;
4614 gdb_assert (gdbarch
->data
!= NULL
);
4615 for (rego
= gdbarch_data_registry
.registrations
;
4619 struct gdbarch_data
*data
= rego
->data
;
4620 gdb_assert (data
->index
< gdbarch
->nr_data
);
4621 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4623 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4624 gdbarch
->data
[data
->index
] = NULL
;
4627 xfree (gdbarch
->data
);
4628 gdbarch
->data
= NULL
;
4632 /* Initialize the current value of thee specified per-architecture
4636 set_gdbarch_data (struct gdbarch
*gdbarch
,
4637 struct gdbarch_data
*data
,
4640 gdb_assert (data
->index
< gdbarch
->nr_data
);
4641 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4642 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4643 gdbarch
->data
[data
->index
] = pointer
;
4646 /* Return the current value of the specified per-architecture
4650 gdbarch_data (struct gdbarch_data
*data
)
4652 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4653 return current_gdbarch
->data
[data
->index
];
4658 /* Keep a registry of swapped data required by GDB modules. */
4663 struct gdbarch_swap_registration
*source
;
4664 struct gdbarch_swap
*next
;
4667 struct gdbarch_swap_registration
4670 unsigned long sizeof_data
;
4671 gdbarch_swap_ftype
*init
;
4672 struct gdbarch_swap_registration
*next
;
4675 struct gdbarch_swap_registry
4678 struct gdbarch_swap_registration
*registrations
;
4681 struct gdbarch_swap_registry gdbarch_swap_registry
=
4687 register_gdbarch_swap (void *data
,
4688 unsigned long sizeof_data
,
4689 gdbarch_swap_ftype
*init
)
4691 struct gdbarch_swap_registration
**rego
;
4692 for (rego
= &gdbarch_swap_registry
.registrations
;
4694 rego
= &(*rego
)->next
);
4695 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4696 (*rego
)->next
= NULL
;
4697 (*rego
)->init
= init
;
4698 (*rego
)->data
= data
;
4699 (*rego
)->sizeof_data
= sizeof_data
;
4704 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4706 struct gdbarch_swap_registration
*rego
;
4707 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4708 for (rego
= gdbarch_swap_registry
.registrations
;
4712 if (rego
->data
!= NULL
)
4714 (*curr
) = XMALLOC (struct gdbarch_swap
);
4715 (*curr
)->source
= rego
;
4716 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4717 (*curr
)->next
= NULL
;
4718 memset (rego
->data
, 0, rego
->sizeof_data
);
4719 curr
= &(*curr
)->next
;
4721 if (rego
->init
!= NULL
)
4727 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4729 struct gdbarch_swap
*curr
;
4730 for (curr
= gdbarch
->swap
;
4733 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4737 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4739 struct gdbarch_swap
*curr
;
4740 for (curr
= gdbarch
->swap
;
4743 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4747 /* Keep a registry of the architectures known by GDB. */
4749 struct gdbarch_registration
4751 enum bfd_architecture bfd_architecture
;
4752 gdbarch_init_ftype
*init
;
4753 gdbarch_dump_tdep_ftype
*dump_tdep
;
4754 struct gdbarch_list
*arches
;
4755 struct gdbarch_registration
*next
;
4758 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4761 append_name (const char ***buf
, int *nr
, const char *name
)
4763 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4769 gdbarch_printable_names (void)
4773 /* Accumulate a list of names based on the registed list of
4775 enum bfd_architecture a
;
4777 const char **arches
= NULL
;
4778 struct gdbarch_registration
*rego
;
4779 for (rego
= gdbarch_registry
;
4783 const struct bfd_arch_info
*ap
;
4784 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4786 internal_error (__FILE__
, __LINE__
,
4787 "gdbarch_architecture_names: multi-arch unknown");
4790 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4795 append_name (&arches
, &nr_arches
, NULL
);
4799 /* Just return all the architectures that BFD knows. Assume that
4800 the legacy architecture framework supports them. */
4801 return bfd_arch_list ();
4806 gdbarch_register (enum bfd_architecture bfd_architecture
,
4807 gdbarch_init_ftype
*init
,
4808 gdbarch_dump_tdep_ftype
*dump_tdep
)
4810 struct gdbarch_registration
**curr
;
4811 const struct bfd_arch_info
*bfd_arch_info
;
4812 /* Check that BFD recognizes this architecture */
4813 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4814 if (bfd_arch_info
== NULL
)
4816 internal_error (__FILE__
, __LINE__
,
4817 "gdbarch: Attempt to register unknown architecture (%d)",
4820 /* Check that we haven't seen this architecture before */
4821 for (curr
= &gdbarch_registry
;
4823 curr
= &(*curr
)->next
)
4825 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4826 internal_error (__FILE__
, __LINE__
,
4827 "gdbarch: Duplicate registraration of architecture (%s)",
4828 bfd_arch_info
->printable_name
);
4832 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4833 bfd_arch_info
->printable_name
,
4836 (*curr
) = XMALLOC (struct gdbarch_registration
);
4837 (*curr
)->bfd_architecture
= bfd_architecture
;
4838 (*curr
)->init
= init
;
4839 (*curr
)->dump_tdep
= dump_tdep
;
4840 (*curr
)->arches
= NULL
;
4841 (*curr
)->next
= NULL
;
4842 /* When non- multi-arch, install whatever target dump routine we've
4843 been provided - hopefully that routine has been written correctly
4844 and works regardless of multi-arch. */
4845 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4846 && startup_gdbarch
.dump_tdep
== NULL
)
4847 startup_gdbarch
.dump_tdep
= dump_tdep
;
4851 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4852 gdbarch_init_ftype
*init
)
4854 gdbarch_register (bfd_architecture
, init
, NULL
);
4858 /* Look for an architecture using gdbarch_info. Base search on only
4859 BFD_ARCH_INFO and BYTE_ORDER. */
4861 struct gdbarch_list
*
4862 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4863 const struct gdbarch_info
*info
)
4865 for (; arches
!= NULL
; arches
= arches
->next
)
4867 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4869 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4877 /* Update the current architecture. Return ZERO if the update request
4881 gdbarch_update_p (struct gdbarch_info info
)
4883 struct gdbarch
*new_gdbarch
;
4884 struct gdbarch_list
**list
;
4885 struct gdbarch_registration
*rego
;
4887 /* Fill in missing parts of the INFO struct using a number of
4888 sources: ``set ...''; INFOabfd supplied; existing target. */
4890 /* ``(gdb) set architecture ...'' */
4891 if (info
.bfd_arch_info
== NULL
4892 && !TARGET_ARCHITECTURE_AUTO
)
4893 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4894 if (info
.bfd_arch_info
== NULL
4895 && info
.abfd
!= NULL
4896 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4897 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4898 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4899 if (info
.bfd_arch_info
== NULL
)
4900 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4902 /* ``(gdb) set byte-order ...'' */
4903 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4904 && !TARGET_BYTE_ORDER_AUTO
)
4905 info
.byte_order
= TARGET_BYTE_ORDER
;
4906 /* From the INFO struct. */
4907 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4908 && info
.abfd
!= NULL
)
4909 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
4910 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
4911 : BFD_ENDIAN_UNKNOWN
);
4912 /* From the current target. */
4913 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
4914 info
.byte_order
= TARGET_BYTE_ORDER
;
4916 /* Must have found some sort of architecture. */
4917 gdb_assert (info
.bfd_arch_info
!= NULL
);
4921 fprintf_unfiltered (gdb_stdlog
,
4922 "gdbarch_update: info.bfd_arch_info %s\n",
4923 (info
.bfd_arch_info
!= NULL
4924 ? info
.bfd_arch_info
->printable_name
4926 fprintf_unfiltered (gdb_stdlog
,
4927 "gdbarch_update: info.byte_order %d (%s)\n",
4929 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4930 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4932 fprintf_unfiltered (gdb_stdlog
,
4933 "gdbarch_update: info.abfd 0x%lx\n",
4935 fprintf_unfiltered (gdb_stdlog
,
4936 "gdbarch_update: info.tdep_info 0x%lx\n",
4937 (long) info
.tdep_info
);
4940 /* Find the target that knows about this architecture. */
4941 for (rego
= gdbarch_registry
;
4944 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4949 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4953 /* Ask the target for a replacement architecture. */
4954 new_gdbarch
= rego
->init (info
, rego
->arches
);
4956 /* Did the target like it? No. Reject the change. */
4957 if (new_gdbarch
== NULL
)
4960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4964 /* Did the architecture change? No. Do nothing. */
4965 if (current_gdbarch
== new_gdbarch
)
4968 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4970 new_gdbarch
->bfd_arch_info
->printable_name
);
4974 /* Swap all data belonging to the old target out */
4975 swapout_gdbarch_swap (current_gdbarch
);
4977 /* Is this a pre-existing architecture? Yes. Swap it in. */
4978 for (list
= ®o
->arches
;
4980 list
= &(*list
)->next
)
4982 if ((*list
)->gdbarch
== new_gdbarch
)
4985 fprintf_unfiltered (gdb_stdlog
,
4986 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4988 new_gdbarch
->bfd_arch_info
->printable_name
);
4989 current_gdbarch
= new_gdbarch
;
4990 swapin_gdbarch_swap (new_gdbarch
);
4991 architecture_changed_event ();
4996 /* Append this new architecture to this targets list. */
4997 (*list
) = XMALLOC (struct gdbarch_list
);
4998 (*list
)->next
= NULL
;
4999 (*list
)->gdbarch
= new_gdbarch
;
5001 /* Switch to this new architecture. Dump it out. */
5002 current_gdbarch
= new_gdbarch
;
5005 fprintf_unfiltered (gdb_stdlog
,
5006 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5008 new_gdbarch
->bfd_arch_info
->printable_name
);
5011 /* Check that the newly installed architecture is valid. Plug in
5012 any post init values. */
5013 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5014 verify_gdbarch (new_gdbarch
);
5016 /* Initialize the per-architecture memory (swap) areas.
5017 CURRENT_GDBARCH must be update before these modules are
5019 init_gdbarch_swap (new_gdbarch
);
5021 /* Initialize the per-architecture data-pointer of all parties that
5022 registered an interest in this architecture. CURRENT_GDBARCH
5023 must be updated before these modules are called. */
5024 init_gdbarch_data (new_gdbarch
);
5025 architecture_changed_event ();
5028 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5036 /* Pointer to the target-dependent disassembly function. */
5037 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5038 disassemble_info tm_print_insn_info
;
5041 extern void _initialize_gdbarch (void);
5044 _initialize_gdbarch (void)
5046 struct cmd_list_element
*c
;
5048 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5049 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5050 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5051 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5052 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5054 add_show_from_set (add_set_cmd ("arch",
5057 (char *)&gdbarch_debug
,
5058 "Set architecture debugging.\n\
5059 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5061 c
= add_set_cmd ("archdebug",
5064 (char *)&gdbarch_debug
,
5065 "Set architecture debugging.\n\
5066 When non-zero, architecture debugging is enabled.", &setlist
);
5068 deprecate_cmd (c
, "set debug arch");
5069 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");