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_string.h"
66 #include "gdb-events.h"
68 /* Static function declarations */
70 static void verify_gdbarch (struct gdbarch
*gdbarch
);
71 static void alloc_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void clear_gdbarch_swap (struct gdbarch
*);
75 static void swapout_gdbarch_swap (struct gdbarch
*);
76 static void swapin_gdbarch_swap (struct gdbarch
*);
78 /* Non-zero if we want to trace architecture code. */
81 #define GDBARCH_DEBUG 0
83 int gdbarch_debug
= GDBARCH_DEBUG
;
86 /* Maintain the struct gdbarch object */
90 /* Has this architecture been fully initialized? */
92 /* basic architectural information */
93 const struct bfd_arch_info
* bfd_arch_info
;
96 /* target specific vector. */
97 struct gdbarch_tdep
*tdep
;
98 gdbarch_dump_tdep_ftype
*dump_tdep
;
100 /* per-architecture data-pointers */
104 /* per-architecture swap-regions */
105 struct gdbarch_swap
*swap
;
107 /* Multi-arch values.
109 When extending this structure you must:
113 Declare set/get functions and define the corresponding
116 gdbarch_alloc(): If zero/NULL is not a suitable default,
117 initialize the new field.
119 verify_gdbarch(): Confirm that the target updated the field
122 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
125 ``startup_gdbarch()'': Append an initial value to the static
126 variable (base values on the host's c-type system).
128 get_gdbarch(): Implement the set/get functions (probably using
129 the macro's as shortcuts).
144 gdbarch_read_pc_ftype
*read_pc
;
145 gdbarch_write_pc_ftype
*write_pc
;
146 gdbarch_read_fp_ftype
*read_fp
;
147 gdbarch_read_sp_ftype
*read_sp
;
148 gdbarch_write_sp_ftype
*write_sp
;
149 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
150 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
151 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
160 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
161 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
162 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
163 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
164 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
165 gdbarch_register_name_ftype
*register_name
;
168 gdbarch_register_byte_ftype
*register_byte
;
169 gdbarch_register_raw_size_ftype
*register_raw_size
;
170 int max_register_raw_size
;
171 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
172 int max_register_virtual_size
;
173 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
174 gdbarch_do_registers_info_ftype
*do_registers_info
;
175 gdbarch_print_registers_info_ftype
*print_registers_info
;
176 gdbarch_print_float_info_ftype
*print_float_info
;
177 gdbarch_print_vector_info_ftype
*print_vector_info
;
178 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
179 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
180 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
181 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
182 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
183 int use_generic_dummy_frames
;
184 int call_dummy_location
;
185 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
186 CORE_ADDR call_dummy_start_offset
;
187 CORE_ADDR call_dummy_breakpoint_offset
;
188 int call_dummy_breakpoint_offset_p
;
189 int call_dummy_length
;
190 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
192 LONGEST
* call_dummy_words
;
193 int sizeof_call_dummy_words
;
194 int call_dummy_stack_adjust_p
;
195 int call_dummy_stack_adjust
;
196 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
197 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
198 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
199 int believe_pcc_promotion
;
200 int believe_pcc_promotion_type
;
201 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
202 gdbarch_get_saved_register_ftype
*get_saved_register
;
203 gdbarch_register_convertible_ftype
*register_convertible
;
204 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
205 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
206 gdbarch_convert_register_p_ftype
*convert_register_p
;
207 gdbarch_register_to_value_ftype
*register_to_value
;
208 gdbarch_value_to_register_ftype
*value_to_register
;
209 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
210 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
211 gdbarch_integer_to_address_ftype
*integer_to_address
;
212 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
213 gdbarch_push_arguments_ftype
*push_arguments
;
214 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
215 gdbarch_push_return_address_ftype
*push_return_address
;
216 gdbarch_pop_frame_ftype
*pop_frame
;
217 gdbarch_store_struct_return_ftype
*store_struct_return
;
218 gdbarch_extract_return_value_ftype
*extract_return_value
;
219 gdbarch_store_return_value_ftype
*store_return_value
;
220 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
221 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
222 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
223 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
224 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
225 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
226 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
227 gdbarch_skip_prologue_ftype
*skip_prologue
;
228 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
229 gdbarch_inner_than_ftype
*inner_than
;
230 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
231 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
232 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
233 CORE_ADDR decr_pc_after_break
;
234 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
235 CORE_ADDR function_start_offset
;
236 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
237 CORE_ADDR frame_args_skip
;
238 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
239 gdbarch_frame_chain_ftype
*frame_chain
;
240 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
241 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
242 gdbarch_frame_args_address_ftype
*frame_args_address
;
243 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
244 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
245 gdbarch_frame_num_args_ftype
*frame_num_args
;
246 gdbarch_stack_align_ftype
*stack_align
;
247 gdbarch_frame_align_ftype
*frame_align
;
248 int extra_stack_alignment_needed
;
249 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
250 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
252 const struct floatformat
* float_format
;
253 const struct floatformat
* double_format
;
254 const struct floatformat
* long_double_format
;
255 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
256 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
257 gdbarch_smash_text_address_ftype
*smash_text_address
;
258 gdbarch_software_single_step_ftype
*software_single_step
;
259 gdbarch_print_insn_ftype
*print_insn
;
260 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
261 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
262 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
263 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
264 gdbarch_sigtramp_start_ftype
*sigtramp_start
;
265 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
266 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
267 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
268 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
269 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
270 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
271 const char * name_of_malloc
;
272 int cannot_step_breakpoint
;
276 /* The default architecture uses host values (for want of a better
279 extern const struct bfd_arch_info bfd_default_arch_struct
;
281 struct gdbarch startup_gdbarch
=
283 1, /* Always initialized. */
284 /* basic architecture information */
285 &bfd_default_arch_struct
,
287 /* target specific vector and its dump routine */
289 /*per-architecture data-pointers and swap regions */
291 /* Multi-arch values */
295 8 * sizeof (LONGEST
),
298 8 * sizeof (long double),
327 generic_register_byte
,
328 generic_register_size
,
330 generic_register_size
,
334 default_print_registers_info
,
425 generic_in_function_epilogue_p
,
426 construct_inferior_arguments
,
432 /* startup_gdbarch() */
435 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
437 /* Do any initialization needed for a non-multiarch configuration
438 after the _initialize_MODULE functions have been run. */
440 initialize_non_multiarch (void)
442 alloc_gdbarch_data (&startup_gdbarch
);
443 /* Ensure that all swap areas are zeroed so that they again think
444 they are starting from scratch. */
445 clear_gdbarch_swap (&startup_gdbarch
);
446 init_gdbarch_swap (&startup_gdbarch
);
450 /* Create a new ``struct gdbarch'' based on information provided by
451 ``struct gdbarch_info''. */
454 gdbarch_alloc (const struct gdbarch_info
*info
,
455 struct gdbarch_tdep
*tdep
)
457 /* NOTE: The new architecture variable is named ``current_gdbarch''
458 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
459 the current local architecture and not the previous global
460 architecture. This ensures that the new architectures initial
461 values are not influenced by the previous architecture. Once
462 everything is parameterised with gdbarch, this will go away. */
463 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
464 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
466 alloc_gdbarch_data (current_gdbarch
);
468 current_gdbarch
->tdep
= tdep
;
470 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
471 current_gdbarch
->byte_order
= info
->byte_order
;
473 /* Force the explicit initialization of these. */
474 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
475 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
476 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
477 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
478 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
479 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
480 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
481 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
482 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
483 current_gdbarch
->char_signed
= -1;
484 current_gdbarch
->read_pc
= generic_target_read_pc
;
485 current_gdbarch
->write_pc
= generic_target_write_pc
;
486 current_gdbarch
->read_fp
= generic_target_read_fp
;
487 current_gdbarch
->read_sp
= generic_target_read_sp
;
488 current_gdbarch
->write_sp
= generic_target_write_sp
;
489 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
490 current_gdbarch
->num_regs
= -1;
491 current_gdbarch
->sp_regnum
= -1;
492 current_gdbarch
->fp_regnum
= -1;
493 current_gdbarch
->pc_regnum
= -1;
494 current_gdbarch
->ps_regnum
= -1;
495 current_gdbarch
->fp0_regnum
= -1;
496 current_gdbarch
->npc_regnum
= -1;
497 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
498 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
499 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
500 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
501 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
502 current_gdbarch
->register_name
= legacy_register_name
;
503 current_gdbarch
->register_size
= -1;
504 current_gdbarch
->register_bytes
= -1;
505 current_gdbarch
->register_byte
= generic_register_byte
;
506 current_gdbarch
->register_raw_size
= generic_register_size
;
507 current_gdbarch
->max_register_raw_size
= -1;
508 current_gdbarch
->register_virtual_size
= generic_register_size
;
509 current_gdbarch
->max_register_virtual_size
= -1;
510 current_gdbarch
->print_registers_info
= default_print_registers_info
;
511 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
512 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
513 current_gdbarch
->cannot_store_register
= cannot_register_not
;
514 current_gdbarch
->use_generic_dummy_frames
= -1;
515 current_gdbarch
->call_dummy_start_offset
= -1;
516 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
517 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
518 current_gdbarch
->call_dummy_length
= -1;
519 current_gdbarch
->call_dummy_p
= -1;
520 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
521 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
522 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
523 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
524 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
525 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
526 current_gdbarch
->get_saved_register
= generic_unwind_get_saved_register
;
527 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
528 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
529 current_gdbarch
->register_to_value
= legacy_register_to_value
;
530 current_gdbarch
->value_to_register
= legacy_value_to_register
;
531 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
532 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
533 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
534 current_gdbarch
->push_arguments
= default_push_arguments
;
535 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
536 current_gdbarch
->store_return_value
= legacy_store_return_value
;
537 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
538 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
539 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
540 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
541 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
542 current_gdbarch
->decr_pc_after_break
= -1;
543 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
544 current_gdbarch
->function_start_offset
= -1;
545 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
546 current_gdbarch
->frame_args_skip
= -1;
547 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
548 current_gdbarch
->frame_chain_valid
= generic_func_frame_chain_valid
;
549 current_gdbarch
->extra_stack_alignment_needed
= 1;
550 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
551 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
552 current_gdbarch
->smash_text_address
= core_addr_identity
;
553 current_gdbarch
->print_insn
= legacy_print_insn
;
554 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
555 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
556 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
557 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
558 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
559 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
560 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
561 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
562 current_gdbarch
->name_of_malloc
= "malloc";
563 /* gdbarch_alloc() */
565 return current_gdbarch
;
569 /* Free a gdbarch struct. This should never happen in normal
570 operation --- once you've created a gdbarch, you keep it around.
571 However, if an architecture's init function encounters an error
572 building the structure, it may need to clean up a partially
573 constructed gdbarch. */
576 gdbarch_free (struct gdbarch
*arch
)
578 gdb_assert (arch
!= NULL
);
579 free_gdbarch_data (arch
);
584 /* Ensure that all values in a GDBARCH are reasonable. */
587 verify_gdbarch (struct gdbarch
*gdbarch
)
590 struct cleanup
*cleanups
;
593 /* Only perform sanity checks on a multi-arch target. */
596 log
= mem_fileopen ();
597 cleanups
= make_cleanup_ui_file_delete (log
);
599 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
600 fprintf_unfiltered (log
, "\n\tbyte-order");
601 if (gdbarch
->bfd_arch_info
== NULL
)
602 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
603 /* Check those that need to be defined for the given multi-arch level. */
604 /* Skip verify of short_bit, invalid_p == 0 */
605 /* Skip verify of int_bit, invalid_p == 0 */
606 /* Skip verify of long_bit, invalid_p == 0 */
607 /* Skip verify of long_long_bit, invalid_p == 0 */
608 /* Skip verify of float_bit, invalid_p == 0 */
609 /* Skip verify of double_bit, invalid_p == 0 */
610 /* Skip verify of long_double_bit, invalid_p == 0 */
611 /* Skip verify of ptr_bit, invalid_p == 0 */
612 if (gdbarch
->addr_bit
== 0)
613 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
614 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
615 if (gdbarch
->char_signed
== -1)
616 gdbarch
->char_signed
= 1;
617 /* Skip verify of read_pc, invalid_p == 0 */
618 /* Skip verify of write_pc, invalid_p == 0 */
619 /* Skip verify of read_fp, invalid_p == 0 */
620 /* Skip verify of read_sp, invalid_p == 0 */
621 /* Skip verify of write_sp, invalid_p == 0 */
622 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
623 /* Skip verify of pseudo_register_read, has predicate */
624 /* Skip verify of pseudo_register_write, has predicate */
625 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
626 && (gdbarch
->num_regs
== -1))
627 fprintf_unfiltered (log
, "\n\tnum_regs");
628 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
629 /* Skip verify of sp_regnum, invalid_p == 0 */
630 /* Skip verify of fp_regnum, invalid_p == 0 */
631 /* Skip verify of pc_regnum, invalid_p == 0 */
632 /* Skip verify of ps_regnum, invalid_p == 0 */
633 /* Skip verify of fp0_regnum, invalid_p == 0 */
634 /* Skip verify of npc_regnum, invalid_p == 0 */
635 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
636 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
637 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
638 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
639 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
640 /* Skip verify of register_name, invalid_p == 0 */
641 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
642 && (gdbarch
->register_size
== -1))
643 fprintf_unfiltered (log
, "\n\tregister_size");
644 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
645 && (gdbarch
->register_bytes
== -1))
646 fprintf_unfiltered (log
, "\n\tregister_bytes");
647 /* Skip verify of register_byte, invalid_p == 0 */
648 /* Skip verify of register_raw_size, invalid_p == 0 */
649 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
650 && (gdbarch
->max_register_raw_size
== -1))
651 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
652 /* Skip verify of register_virtual_size, invalid_p == 0 */
653 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
654 && (gdbarch
->max_register_virtual_size
== -1))
655 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
656 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
657 && (gdbarch
->register_virtual_type
== 0))
658 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
659 /* Skip verify of do_registers_info, has predicate */
660 /* Skip verify of print_registers_info, invalid_p == 0 */
661 /* Skip verify of print_float_info, has predicate */
662 /* Skip verify of print_vector_info, has predicate */
663 /* Skip verify of register_sim_regno, invalid_p == 0 */
664 /* Skip verify of register_bytes_ok, has predicate */
665 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
666 /* Skip verify of cannot_store_register, invalid_p == 0 */
667 /* Skip verify of get_longjmp_target, has predicate */
668 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
669 && (gdbarch
->use_generic_dummy_frames
== -1))
670 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
671 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
672 && (gdbarch
->call_dummy_location
== 0))
673 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
674 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
675 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
676 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
677 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
678 && (gdbarch
->call_dummy_start_offset
== -1))
679 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
680 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
681 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
682 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
683 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
684 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
685 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
686 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
687 && (gdbarch
->call_dummy_length
== -1))
688 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
689 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
690 && (gdbarch
->pc_in_call_dummy
== 0))
691 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
692 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
693 && (gdbarch
->call_dummy_p
== -1))
694 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
695 /* Skip verify of call_dummy_words, invalid_p == 0 */
696 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
697 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
698 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
699 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
700 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
701 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
702 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
703 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
704 && (gdbarch
->fix_call_dummy
== 0))
705 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
706 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
707 /* Skip verify of init_frame_pc, invalid_p == 0 */
708 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
709 /* Skip verify of get_saved_register, invalid_p == 0 */
710 /* Skip verify of register_convertible, invalid_p == 0 */
711 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
712 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
713 /* Skip verify of convert_register_p, invalid_p == 0 */
714 /* Skip verify of register_to_value, invalid_p == 0 */
715 /* Skip verify of value_to_register, invalid_p == 0 */
716 /* Skip verify of pointer_to_address, invalid_p == 0 */
717 /* Skip verify of address_to_pointer, invalid_p == 0 */
718 /* Skip verify of integer_to_address, has predicate */
719 /* Skip verify of return_value_on_stack, invalid_p == 0 */
720 /* Skip verify of push_arguments, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
722 && (gdbarch
->push_dummy_frame
== 0))
723 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
724 /* Skip verify of push_return_address, has predicate */
725 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
726 && (gdbarch
->pop_frame
== 0))
727 fprintf_unfiltered (log
, "\n\tpop_frame");
728 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
729 && (gdbarch
->store_struct_return
== 0))
730 fprintf_unfiltered (log
, "\n\tstore_struct_return");
731 /* Skip verify of extract_return_value, invalid_p == 0 */
732 /* Skip verify of store_return_value, invalid_p == 0 */
733 /* Skip verify of extract_struct_value_address, has predicate */
734 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
735 /* Skip verify of use_struct_convention, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
737 && (gdbarch
->frame_init_saved_regs
== 0))
738 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
739 /* Skip verify of init_extra_frame_info, has predicate */
740 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
741 && (gdbarch
->skip_prologue
== 0))
742 fprintf_unfiltered (log
, "\n\tskip_prologue");
743 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
744 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
745 && (gdbarch
->inner_than
== 0))
746 fprintf_unfiltered (log
, "\n\tinner_than");
747 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
748 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
749 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
750 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
751 && (gdbarch
->decr_pc_after_break
== -1))
752 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
753 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
754 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
755 && (gdbarch
->function_start_offset
== -1))
756 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
757 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
758 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
759 && (gdbarch
->frame_args_skip
== -1))
760 fprintf_unfiltered (log
, "\n\tframe_args_skip");
761 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
762 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
763 && (gdbarch
->frame_chain
== 0))
764 fprintf_unfiltered (log
, "\n\tframe_chain");
765 /* Skip verify of frame_chain_valid, invalid_p == 0 */
766 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
767 && (gdbarch
->frame_saved_pc
== 0))
768 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
769 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
770 && (gdbarch
->frame_args_address
== 0))
771 fprintf_unfiltered (log
, "\n\tframe_args_address");
772 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
773 && (gdbarch
->frame_locals_address
== 0))
774 fprintf_unfiltered (log
, "\n\tframe_locals_address");
775 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
776 && (gdbarch
->saved_pc_after_call
== 0))
777 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
778 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
779 && (gdbarch
->frame_num_args
== 0))
780 fprintf_unfiltered (log
, "\n\tframe_num_args");
781 /* Skip verify of stack_align, has predicate */
782 /* Skip verify of frame_align, has predicate */
783 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
784 /* Skip verify of reg_struct_has_addr, has predicate */
785 /* Skip verify of save_dummy_frame_tos, has predicate */
786 if (gdbarch
->float_format
== 0)
787 gdbarch
->float_format
= default_float_format (gdbarch
);
788 if (gdbarch
->double_format
== 0)
789 gdbarch
->double_format
= default_double_format (gdbarch
);
790 if (gdbarch
->long_double_format
== 0)
791 gdbarch
->long_double_format
= default_double_format (gdbarch
);
792 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
793 /* Skip verify of addr_bits_remove, invalid_p == 0 */
794 /* Skip verify of smash_text_address, invalid_p == 0 */
795 /* Skip verify of software_single_step, has predicate */
796 /* Skip verify of print_insn, invalid_p == 0 */
797 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
798 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
799 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
800 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
801 /* Skip verify of sigtramp_start, has predicate */
802 /* Skip verify of sigtramp_end, has predicate */
803 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
804 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
805 /* Skip verify of dwarf2_build_frame_info, has predicate */
806 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
807 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
808 /* Skip verify of name_of_malloc, invalid_p == 0 */
809 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
810 buf
= ui_file_xstrdup (log
, &dummy
);
811 make_cleanup (xfree
, buf
);
812 if (strlen (buf
) > 0)
813 internal_error (__FILE__
, __LINE__
,
814 "verify_gdbarch: the following are invalid ...%s",
816 do_cleanups (cleanups
);
820 /* Print out the details of the current architecture. */
822 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
823 just happens to match the global variable ``current_gdbarch''. That
824 way macros refering to that variable get the local and not the global
825 version - ulgh. Once everything is parameterised with gdbarch, this
829 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: frame_align = 0x%08lx\n",
837 (long) current_gdbarch
->frame_align
);
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
841 (long) current_gdbarch
->in_function_epilogue_p
);
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
845 (long) current_gdbarch
->pseudo_register_read
);
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
849 (long) current_gdbarch
->pseudo_register_write
);
850 #ifdef ADDRESS_TO_POINTER
852 /* Macro might contain `[{}]' when not multi-arch */
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: %s # %s\n",
855 "ADDRESS_TO_POINTER(type, buf, addr)",
856 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
861 (long) current_gdbarch
->address_to_pointer
862 /*ADDRESS_TO_POINTER ()*/);
864 #ifdef ADDR_BITS_REMOVE
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: %s # %s\n",
867 "ADDR_BITS_REMOVE(addr)",
868 XSTRING (ADDR_BITS_REMOVE (addr
)));
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
872 (long) current_gdbarch
->addr_bits_remove
873 /*ADDR_BITS_REMOVE ()*/);
875 #ifdef BELIEVE_PCC_PROMOTION
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
878 XSTRING (BELIEVE_PCC_PROMOTION
));
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
881 BELIEVE_PCC_PROMOTION
);
883 #ifdef BELIEVE_PCC_PROMOTION_TYPE
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
886 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
889 BELIEVE_PCC_PROMOTION_TYPE
);
891 #ifdef BREAKPOINT_FROM_PC
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: %s # %s\n",
894 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
895 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
899 (long) current_gdbarch
->breakpoint_from_pc
900 /*BREAKPOINT_FROM_PC ()*/);
902 #ifdef CALL_DUMMY_ADDRESS
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: %s # %s\n",
905 "CALL_DUMMY_ADDRESS()",
906 XSTRING (CALL_DUMMY_ADDRESS ()));
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
910 (long) current_gdbarch
->call_dummy_address
911 /*CALL_DUMMY_ADDRESS ()*/);
913 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
916 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
917 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
920 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
922 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
925 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
928 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
930 #ifdef CALL_DUMMY_LENGTH
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
933 XSTRING (CALL_DUMMY_LENGTH
));
934 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
939 #ifdef CALL_DUMMY_LOCATION
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
942 XSTRING (CALL_DUMMY_LOCATION
));
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
945 CALL_DUMMY_LOCATION
);
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: CALL_DUMMY_P # %s\n",
950 XSTRING (CALL_DUMMY_P
));
951 fprintf_unfiltered (file
,
952 "gdbarch_dump: CALL_DUMMY_P = %d\n",
955 #ifdef CALL_DUMMY_STACK_ADJUST
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
958 XSTRING (CALL_DUMMY_STACK_ADJUST
));
959 if (CALL_DUMMY_STACK_ADJUST_P
)
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
962 (long) CALL_DUMMY_STACK_ADJUST
);
964 #ifdef CALL_DUMMY_STACK_ADJUST_P
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
967 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
970 (long) CALL_DUMMY_STACK_ADJUST_P
);
972 #ifdef CALL_DUMMY_START_OFFSET
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
975 XSTRING (CALL_DUMMY_START_OFFSET
));
976 fprintf_unfiltered (file
,
977 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
978 (long) CALL_DUMMY_START_OFFSET
);
980 #ifdef CALL_DUMMY_WORDS
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
983 XSTRING (CALL_DUMMY_WORDS
));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
986 (long) CALL_DUMMY_WORDS
);
988 #ifdef CANNOT_FETCH_REGISTER
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: %s # %s\n",
991 "CANNOT_FETCH_REGISTER(regnum)",
992 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
996 (long) current_gdbarch
->cannot_fetch_register
997 /*CANNOT_FETCH_REGISTER ()*/);
999 #ifdef CANNOT_STEP_BREAKPOINT
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1002 XSTRING (CANNOT_STEP_BREAKPOINT
));
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1005 CANNOT_STEP_BREAKPOINT
);
1007 #ifdef CANNOT_STORE_REGISTER
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: %s # %s\n",
1010 "CANNOT_STORE_REGISTER(regnum)",
1011 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1015 (long) current_gdbarch
->cannot_store_register
1016 /*CANNOT_STORE_REGISTER ()*/);
1018 #ifdef COERCE_FLOAT_TO_DOUBLE
1019 fprintf_unfiltered (file
,
1020 "gdbarch_dump: %s # %s\n",
1021 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1022 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1026 (long) current_gdbarch
->coerce_float_to_double
1027 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1029 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1031 /* Macro might contain `[{}]' when not multi-arch */
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: %s # %s\n",
1034 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1035 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1040 (long) current_gdbarch
->coff_make_msymbol_special
1041 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1046 (long) current_gdbarch
->construct_inferior_arguments
);
1047 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: %s # %s\n",
1050 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1051 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1055 (long) current_gdbarch
->convert_from_func_ptr_addr
1056 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1058 #ifdef CONVERT_REGISTER_P
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: %s # %s\n",
1061 "CONVERT_REGISTER_P(regnum)",
1062 XSTRING (CONVERT_REGISTER_P (regnum
)));
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1066 (long) current_gdbarch
->convert_register_p
1067 /*CONVERT_REGISTER_P ()*/);
1069 #ifdef DECR_PC_AFTER_BREAK
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1072 XSTRING (DECR_PC_AFTER_BREAK
));
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1075 (long) DECR_PC_AFTER_BREAK
);
1077 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1079 /* Macro might contain `[{}]' when not multi-arch */
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: %s # %s\n",
1082 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1083 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1088 (long) current_gdbarch
->deprecated_extract_return_value
1089 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1091 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: %s # %s\n",
1094 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1095 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1097 fprintf_unfiltered (file
,
1098 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1099 (long) current_gdbarch
->deprecated_extract_struct_value_address
1100 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1102 #ifdef DEPRECATED_STORE_RETURN_VALUE
1104 /* Macro might contain `[{}]' when not multi-arch */
1105 fprintf_unfiltered (file
,
1106 "gdbarch_dump: %s # %s\n",
1107 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1108 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = 0x%08lx\n",
1113 (long) current_gdbarch
->deprecated_store_return_value
1114 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1116 #ifdef DO_REGISTERS_INFO
1118 /* Macro might contain `[{}]' when not multi-arch */
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: %s # %s\n",
1121 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1122 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1127 (long) current_gdbarch
->do_registers_info
1128 /*DO_REGISTERS_INFO ()*/);
1130 #ifdef DWARF2_BUILD_FRAME_INFO
1132 /* Macro might contain `[{}]' when not multi-arch */
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: %s # %s\n",
1135 "DWARF2_BUILD_FRAME_INFO(objfile)",
1136 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1141 (long) current_gdbarch
->dwarf2_build_frame_info
1142 /*DWARF2_BUILD_FRAME_INFO ()*/);
1144 #ifdef DWARF2_REG_TO_REGNUM
1145 fprintf_unfiltered (file
,
1146 "gdbarch_dump: %s # %s\n",
1147 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1148 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1152 (long) current_gdbarch
->dwarf2_reg_to_regnum
1153 /*DWARF2_REG_TO_REGNUM ()*/);
1155 #ifdef DWARF_REG_TO_REGNUM
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: %s # %s\n",
1158 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1159 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1163 (long) current_gdbarch
->dwarf_reg_to_regnum
1164 /*DWARF_REG_TO_REGNUM ()*/);
1166 #ifdef ECOFF_REG_TO_REGNUM
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: %s # %s\n",
1169 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1170 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1174 (long) current_gdbarch
->ecoff_reg_to_regnum
1175 /*ECOFF_REG_TO_REGNUM ()*/);
1177 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1179 /* Macro might contain `[{}]' when not multi-arch */
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: %s # %s\n",
1182 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1183 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1188 (long) current_gdbarch
->elf_make_msymbol_special
1189 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1191 #ifdef EXTRACT_RETURN_VALUE
1193 /* Macro might contain `[{}]' when not multi-arch */
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: %s # %s\n",
1196 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1197 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1202 (long) current_gdbarch
->extract_return_value
1203 /*EXTRACT_RETURN_VALUE ()*/);
1205 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: %s # %s\n",
1208 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1209 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1213 (long) current_gdbarch
->extract_struct_value_address
1214 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1216 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1219 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1222 EXTRA_STACK_ALIGNMENT_NEEDED
);
1224 #ifdef FIX_CALL_DUMMY
1226 /* Macro might contain `[{}]' when not multi-arch */
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: %s # %s\n",
1229 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1230 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1235 (long) current_gdbarch
->fix_call_dummy
1236 /*FIX_CALL_DUMMY ()*/);
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: FP0_REGNUM # %s\n",
1241 XSTRING (FP0_REGNUM
));
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: FP0_REGNUM = %d\n",
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: FP_REGNUM # %s\n",
1249 XSTRING (FP_REGNUM
));
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: FP_REGNUM = %d\n",
1254 #ifdef FRAMELESS_FUNCTION_INVOCATION
1255 fprintf_unfiltered (file
,
1256 "gdbarch_dump: %s # %s\n",
1257 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1258 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1262 (long) current_gdbarch
->frameless_function_invocation
1263 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1265 #ifdef FRAME_ARGS_ADDRESS
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: %s # %s\n",
1268 "FRAME_ARGS_ADDRESS(fi)",
1269 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1273 (long) current_gdbarch
->frame_args_address
1274 /*FRAME_ARGS_ADDRESS ()*/);
1276 #ifdef FRAME_ARGS_SKIP
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1279 XSTRING (FRAME_ARGS_SKIP
));
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1282 (long) FRAME_ARGS_SKIP
);
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: %s # %s\n",
1287 "FRAME_CHAIN(frame)",
1288 XSTRING (FRAME_CHAIN (frame
)));
1290 fprintf_unfiltered (file
,
1291 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1292 (long) current_gdbarch
->frame_chain
1293 /*FRAME_CHAIN ()*/);
1295 #ifdef FRAME_CHAIN_VALID
1296 fprintf_unfiltered (file
,
1297 "gdbarch_dump: %s # %s\n",
1298 "FRAME_CHAIN_VALID(chain, thisframe)",
1299 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1301 fprintf_unfiltered (file
,
1302 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1303 (long) current_gdbarch
->frame_chain_valid
1304 /*FRAME_CHAIN_VALID ()*/);
1306 #ifdef FRAME_INIT_SAVED_REGS
1308 /* Macro might contain `[{}]' when not multi-arch */
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: %s # %s\n",
1311 "FRAME_INIT_SAVED_REGS(frame)",
1312 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1317 (long) current_gdbarch
->frame_init_saved_regs
1318 /*FRAME_INIT_SAVED_REGS ()*/);
1320 #ifdef FRAME_LOCALS_ADDRESS
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: %s # %s\n",
1323 "FRAME_LOCALS_ADDRESS(fi)",
1324 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1328 (long) current_gdbarch
->frame_locals_address
1329 /*FRAME_LOCALS_ADDRESS ()*/);
1331 #ifdef FRAME_NUM_ARGS
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: %s # %s\n",
1334 "FRAME_NUM_ARGS(frame)",
1335 XSTRING (FRAME_NUM_ARGS (frame
)));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1339 (long) current_gdbarch
->frame_num_args
1340 /*FRAME_NUM_ARGS ()*/);
1342 #ifdef FRAME_SAVED_PC
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: %s # %s\n",
1345 "FRAME_SAVED_PC(fi)",
1346 XSTRING (FRAME_SAVED_PC (fi
)));
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1350 (long) current_gdbarch
->frame_saved_pc
1351 /*FRAME_SAVED_PC ()*/);
1353 #ifdef FUNCTION_START_OFFSET
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1356 XSTRING (FUNCTION_START_OFFSET
));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1359 (long) FUNCTION_START_OFFSET
);
1361 #ifdef GET_LONGJMP_TARGET
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: %s # %s\n",
1364 "GET_LONGJMP_TARGET(pc)",
1365 XSTRING (GET_LONGJMP_TARGET (pc
)));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1369 (long) current_gdbarch
->get_longjmp_target
1370 /*GET_LONGJMP_TARGET ()*/);
1372 #ifdef GET_SAVED_REGISTER
1374 /* Macro might contain `[{}]' when not multi-arch */
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: %s # %s\n",
1377 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1378 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1383 (long) current_gdbarch
->get_saved_register
1384 /*GET_SAVED_REGISTER ()*/);
1386 #ifdef INIT_EXTRA_FRAME_INFO
1388 /* Macro might contain `[{}]' when not multi-arch */
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: %s # %s\n",
1391 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1392 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1397 (long) current_gdbarch
->init_extra_frame_info
1398 /*INIT_EXTRA_FRAME_INFO ()*/);
1400 #ifdef INIT_FRAME_PC
1402 /* Macro might contain `[{}]' when not multi-arch */
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: %s # %s\n",
1405 "INIT_FRAME_PC(fromleaf, prev)",
1406 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1411 (long) current_gdbarch
->init_frame_pc
1412 /*INIT_FRAME_PC ()*/);
1414 #ifdef INIT_FRAME_PC_FIRST
1416 /* Macro might contain `[{}]' when not multi-arch */
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: %s # %s\n",
1419 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1420 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1425 (long) current_gdbarch
->init_frame_pc_first
1426 /*INIT_FRAME_PC_FIRST ()*/);
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: %s # %s\n",
1431 "INNER_THAN(lhs, rhs)",
1432 XSTRING (INNER_THAN (lhs
, rhs
)));
1434 fprintf_unfiltered (file
,
1435 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1436 (long) current_gdbarch
->inner_than
1439 #ifdef INTEGER_TO_ADDRESS
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: %s # %s\n",
1442 "INTEGER_TO_ADDRESS(type, buf)",
1443 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1447 (long) current_gdbarch
->integer_to_address
1448 /*INTEGER_TO_ADDRESS ()*/);
1450 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: %s # %s\n",
1453 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1454 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1458 (long) current_gdbarch
->in_solib_call_trampoline
1459 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1461 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: %s # %s\n",
1464 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1465 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
1469 (long) current_gdbarch
->in_solib_return_trampoline
1470 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1472 #ifdef MAX_REGISTER_RAW_SIZE
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1475 XSTRING (MAX_REGISTER_RAW_SIZE
));
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1478 MAX_REGISTER_RAW_SIZE
);
1480 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1483 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1484 fprintf_unfiltered (file
,
1485 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1486 MAX_REGISTER_VIRTUAL_SIZE
);
1488 #ifdef MEMORY_INSERT_BREAKPOINT
1489 fprintf_unfiltered (file
,
1490 "gdbarch_dump: %s # %s\n",
1491 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1492 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1494 fprintf_unfiltered (file
,
1495 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1496 (long) current_gdbarch
->memory_insert_breakpoint
1497 /*MEMORY_INSERT_BREAKPOINT ()*/);
1499 #ifdef MEMORY_REMOVE_BREAKPOINT
1500 fprintf_unfiltered (file
,
1501 "gdbarch_dump: %s # %s\n",
1502 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1503 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1507 (long) current_gdbarch
->memory_remove_breakpoint
1508 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1510 #ifdef NAME_OF_MALLOC
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1513 XSTRING (NAME_OF_MALLOC
));
1514 fprintf_unfiltered (file
,
1515 "gdbarch_dump: NAME_OF_MALLOC = %ld\n",
1516 (long) NAME_OF_MALLOC
);
1519 fprintf_unfiltered (file
,
1520 "gdbarch_dump: NPC_REGNUM # %s\n",
1521 XSTRING (NPC_REGNUM
));
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: NPC_REGNUM = %d\n",
1526 #ifdef NUM_PSEUDO_REGS
1527 fprintf_unfiltered (file
,
1528 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1529 XSTRING (NUM_PSEUDO_REGS
));
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1535 fprintf_unfiltered (file
,
1536 "gdbarch_dump: NUM_REGS # %s\n",
1537 XSTRING (NUM_REGS
));
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: NUM_REGS = %d\n",
1542 #ifdef PARM_BOUNDARY
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1545 XSTRING (PARM_BOUNDARY
));
1546 fprintf_unfiltered (file
,
1547 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1550 #ifdef PC_IN_CALL_DUMMY
1551 fprintf_unfiltered (file
,
1552 "gdbarch_dump: %s # %s\n",
1553 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1554 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1556 fprintf_unfiltered (file
,
1557 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1558 (long) current_gdbarch
->pc_in_call_dummy
1559 /*PC_IN_CALL_DUMMY ()*/);
1561 #ifdef PC_IN_SIGTRAMP
1562 fprintf_unfiltered (file
,
1563 "gdbarch_dump: %s # %s\n",
1564 "PC_IN_SIGTRAMP(pc, name)",
1565 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1569 (long) current_gdbarch
->pc_in_sigtramp
1570 /*PC_IN_SIGTRAMP ()*/);
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: PC_REGNUM # %s\n",
1575 XSTRING (PC_REGNUM
));
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: PC_REGNUM = %d\n",
1580 #ifdef POINTER_TO_ADDRESS
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: %s # %s\n",
1583 "POINTER_TO_ADDRESS(type, buf)",
1584 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1588 (long) current_gdbarch
->pointer_to_address
1589 /*POINTER_TO_ADDRESS ()*/);
1593 /* Macro might contain `[{}]' when not multi-arch */
1594 fprintf_unfiltered (file
,
1595 "gdbarch_dump: %s # %s\n",
1597 XSTRING (POP_FRAME (-)));
1600 fprintf_unfiltered (file
,
1601 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1602 (long) current_gdbarch
->pop_frame
1605 #ifdef PREPARE_TO_PROCEED
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: %s # %s\n",
1608 "PREPARE_TO_PROCEED(select_it)",
1609 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1613 (long) current_gdbarch
->prepare_to_proceed
1614 /*PREPARE_TO_PROCEED ()*/);
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: print_float_info = 0x%08lx\n",
1619 (long) current_gdbarch
->print_float_info
);
1621 fprintf_unfiltered (file
,
1622 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1623 (long) current_gdbarch
->print_registers_info
);
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1627 (long) current_gdbarch
->print_vector_info
);
1628 #ifdef PROLOGUE_FRAMELESS_P
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: %s # %s\n",
1631 "PROLOGUE_FRAMELESS_P(ip)",
1632 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1634 fprintf_unfiltered (file
,
1635 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1636 (long) current_gdbarch
->prologue_frameless_p
1637 /*PROLOGUE_FRAMELESS_P ()*/);
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: PS_REGNUM # %s\n",
1642 XSTRING (PS_REGNUM
));
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: PS_REGNUM = %d\n",
1647 #ifdef PUSH_ARGUMENTS
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: %s # %s\n",
1650 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1651 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1655 (long) current_gdbarch
->push_arguments
1656 /*PUSH_ARGUMENTS ()*/);
1658 #ifdef PUSH_DUMMY_FRAME
1660 /* Macro might contain `[{}]' when not multi-arch */
1661 fprintf_unfiltered (file
,
1662 "gdbarch_dump: %s # %s\n",
1663 "PUSH_DUMMY_FRAME(-)",
1664 XSTRING (PUSH_DUMMY_FRAME (-)));
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1669 (long) current_gdbarch
->push_dummy_frame
1670 /*PUSH_DUMMY_FRAME ()*/);
1672 #ifdef PUSH_RETURN_ADDRESS
1673 fprintf_unfiltered (file
,
1674 "gdbarch_dump: %s # %s\n",
1675 "PUSH_RETURN_ADDRESS(pc, sp)",
1676 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1680 (long) current_gdbarch
->push_return_address
1681 /*PUSH_RETURN_ADDRESS ()*/);
1683 #ifdef REGISTER_BYTE
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: %s # %s\n",
1686 "REGISTER_BYTE(reg_nr)",
1687 XSTRING (REGISTER_BYTE (reg_nr
)));
1689 fprintf_unfiltered (file
,
1690 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1691 (long) current_gdbarch
->register_byte
1692 /*REGISTER_BYTE ()*/);
1694 #ifdef REGISTER_BYTES
1695 fprintf_unfiltered (file
,
1696 "gdbarch_dump: REGISTER_BYTES # %s\n",
1697 XSTRING (REGISTER_BYTES
));
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: REGISTER_BYTES = %d\n",
1702 #ifdef REGISTER_BYTES_OK
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: %s # %s\n",
1705 "REGISTER_BYTES_OK(nr_bytes)",
1706 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1710 (long) current_gdbarch
->register_bytes_ok
1711 /*REGISTER_BYTES_OK ()*/);
1713 #ifdef REGISTER_CONVERTIBLE
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: %s # %s\n",
1716 "REGISTER_CONVERTIBLE(nr)",
1717 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1721 (long) current_gdbarch
->register_convertible
1722 /*REGISTER_CONVERTIBLE ()*/);
1724 #ifdef REGISTER_CONVERT_TO_RAW
1726 /* Macro might contain `[{}]' when not multi-arch */
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: %s # %s\n",
1729 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1730 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1735 (long) current_gdbarch
->register_convert_to_raw
1736 /*REGISTER_CONVERT_TO_RAW ()*/);
1738 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1740 /* Macro might contain `[{}]' when not multi-arch */
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: %s # %s\n",
1743 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1744 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1749 (long) current_gdbarch
->register_convert_to_virtual
1750 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1752 #ifdef REGISTER_NAME
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: %s # %s\n",
1755 "REGISTER_NAME(regnr)",
1756 XSTRING (REGISTER_NAME (regnr
)));
1758 fprintf_unfiltered (file
,
1759 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1760 (long) current_gdbarch
->register_name
1761 /*REGISTER_NAME ()*/);
1763 #ifdef REGISTER_RAW_SIZE
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: %s # %s\n",
1766 "REGISTER_RAW_SIZE(reg_nr)",
1767 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1771 (long) current_gdbarch
->register_raw_size
1772 /*REGISTER_RAW_SIZE ()*/);
1774 #ifdef REGISTER_SIM_REGNO
1775 fprintf_unfiltered (file
,
1776 "gdbarch_dump: %s # %s\n",
1777 "REGISTER_SIM_REGNO(reg_nr)",
1778 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1780 fprintf_unfiltered (file
,
1781 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1782 (long) current_gdbarch
->register_sim_regno
1783 /*REGISTER_SIM_REGNO ()*/);
1785 #ifdef REGISTER_SIZE
1786 fprintf_unfiltered (file
,
1787 "gdbarch_dump: REGISTER_SIZE # %s\n",
1788 XSTRING (REGISTER_SIZE
));
1789 fprintf_unfiltered (file
,
1790 "gdbarch_dump: REGISTER_SIZE = %d\n",
1793 #ifdef REGISTER_TO_VALUE
1795 /* Macro might contain `[{}]' when not multi-arch */
1796 fprintf_unfiltered (file
,
1797 "gdbarch_dump: %s # %s\n",
1798 "REGISTER_TO_VALUE(regnum, type, from, to)",
1799 XSTRING (REGISTER_TO_VALUE (regnum
, type
, from
, to
)));
1802 fprintf_unfiltered (file
,
1803 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1804 (long) current_gdbarch
->register_to_value
1805 /*REGISTER_TO_VALUE ()*/);
1807 #ifdef REGISTER_VIRTUAL_SIZE
1808 fprintf_unfiltered (file
,
1809 "gdbarch_dump: %s # %s\n",
1810 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1811 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1815 (long) current_gdbarch
->register_virtual_size
1816 /*REGISTER_VIRTUAL_SIZE ()*/);
1818 #ifdef REGISTER_VIRTUAL_TYPE
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: %s # %s\n",
1821 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1822 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1826 (long) current_gdbarch
->register_virtual_type
1827 /*REGISTER_VIRTUAL_TYPE ()*/);
1829 #ifdef REG_STRUCT_HAS_ADDR
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: %s # %s\n",
1832 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1833 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1837 (long) current_gdbarch
->reg_struct_has_addr
1838 /*REG_STRUCT_HAS_ADDR ()*/);
1840 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1842 /* Macro might contain `[{}]' when not multi-arch */
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: %s # %s\n",
1845 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1846 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1851 (long) current_gdbarch
->remote_translate_xfer_address
1852 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1854 #ifdef RETURN_VALUE_ON_STACK
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: %s # %s\n",
1857 "RETURN_VALUE_ON_STACK(type)",
1858 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1862 (long) current_gdbarch
->return_value_on_stack
1863 /*RETURN_VALUE_ON_STACK ()*/);
1865 #ifdef SAVED_PC_AFTER_CALL
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: %s # %s\n",
1868 "SAVED_PC_AFTER_CALL(frame)",
1869 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1873 (long) current_gdbarch
->saved_pc_after_call
1874 /*SAVED_PC_AFTER_CALL ()*/);
1876 #ifdef SAVE_DUMMY_FRAME_TOS
1878 /* Macro might contain `[{}]' when not multi-arch */
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: %s # %s\n",
1881 "SAVE_DUMMY_FRAME_TOS(sp)",
1882 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1885 fprintf_unfiltered (file
,
1886 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1887 (long) current_gdbarch
->save_dummy_frame_tos
1888 /*SAVE_DUMMY_FRAME_TOS ()*/);
1890 #ifdef SDB_REG_TO_REGNUM
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: %s # %s\n",
1893 "SDB_REG_TO_REGNUM(sdb_regnr)",
1894 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1896 fprintf_unfiltered (file
,
1897 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1898 (long) current_gdbarch
->sdb_reg_to_regnum
1899 /*SDB_REG_TO_REGNUM ()*/);
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: %s # %s\n",
1905 XSTRING (SIGTRAMP_END (pc
)));
1907 fprintf_unfiltered (file
,
1908 "gdbarch_dump: SIGTRAMP_END = 0x%08lx\n",
1909 (long) current_gdbarch
->sigtramp_end
1910 /*SIGTRAMP_END ()*/);
1912 #ifdef SIGTRAMP_START
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: %s # %s\n",
1915 "SIGTRAMP_START(pc)",
1916 XSTRING (SIGTRAMP_START (pc
)));
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: SIGTRAMP_START = 0x%08lx\n",
1920 (long) current_gdbarch
->sigtramp_start
1921 /*SIGTRAMP_START ()*/);
1923 #ifdef SIZEOF_CALL_DUMMY_WORDS
1924 fprintf_unfiltered (file
,
1925 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1926 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1929 (long) SIZEOF_CALL_DUMMY_WORDS
);
1931 #ifdef SKIP_PROLOGUE
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: %s # %s\n",
1934 "SKIP_PROLOGUE(ip)",
1935 XSTRING (SKIP_PROLOGUE (ip
)));
1937 fprintf_unfiltered (file
,
1938 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1939 (long) current_gdbarch
->skip_prologue
1940 /*SKIP_PROLOGUE ()*/);
1942 #ifdef SKIP_TRAMPOLINE_CODE
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: %s # %s\n",
1945 "SKIP_TRAMPOLINE_CODE(pc)",
1946 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1950 (long) current_gdbarch
->skip_trampoline_code
1951 /*SKIP_TRAMPOLINE_CODE ()*/);
1953 #ifdef SMASH_TEXT_ADDRESS
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: %s # %s\n",
1956 "SMASH_TEXT_ADDRESS(addr)",
1957 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1961 (long) current_gdbarch
->smash_text_address
1962 /*SMASH_TEXT_ADDRESS ()*/);
1964 #ifdef SOFTWARE_SINGLE_STEP
1966 /* Macro might contain `[{}]' when not multi-arch */
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: %s # %s\n",
1969 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1970 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1975 (long) current_gdbarch
->software_single_step
1976 /*SOFTWARE_SINGLE_STEP ()*/);
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: SP_REGNUM # %s\n",
1981 XSTRING (SP_REGNUM
));
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: SP_REGNUM = %d\n",
1986 #ifdef STAB_REG_TO_REGNUM
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: %s # %s\n",
1989 "STAB_REG_TO_REGNUM(stab_regnr)",
1990 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1992 fprintf_unfiltered (file
,
1993 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1994 (long) current_gdbarch
->stab_reg_to_regnum
1995 /*STAB_REG_TO_REGNUM ()*/);
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: %s # %s\n",
2001 XSTRING (STACK_ALIGN (sp
)));
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2005 (long) current_gdbarch
->stack_align
2006 /*STACK_ALIGN ()*/);
2008 #ifdef STORE_RETURN_VALUE
2010 /* Macro might contain `[{}]' when not multi-arch */
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: %s # %s\n",
2013 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2014 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
2019 (long) current_gdbarch
->store_return_value
2020 /*STORE_RETURN_VALUE ()*/);
2022 #ifdef STORE_STRUCT_RETURN
2024 /* Macro might contain `[{}]' when not multi-arch */
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: %s # %s\n",
2027 "STORE_STRUCT_RETURN(addr, sp)",
2028 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
2033 (long) current_gdbarch
->store_struct_return
2034 /*STORE_STRUCT_RETURN ()*/);
2036 #ifdef TARGET_ADDR_BIT
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2039 XSTRING (TARGET_ADDR_BIT
));
2040 fprintf_unfiltered (file
,
2041 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2044 #ifdef TARGET_ARCHITECTURE
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2047 XSTRING (TARGET_ARCHITECTURE
));
2048 if (TARGET_ARCHITECTURE
!= NULL
)
2049 fprintf_unfiltered (file
,
2050 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2051 TARGET_ARCHITECTURE
->printable_name
);
2053 #ifdef TARGET_BFD_VMA_BIT
2054 fprintf_unfiltered (file
,
2055 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2056 XSTRING (TARGET_BFD_VMA_BIT
));
2057 fprintf_unfiltered (file
,
2058 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2059 TARGET_BFD_VMA_BIT
);
2061 #ifdef TARGET_BYTE_ORDER
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2064 XSTRING (TARGET_BYTE_ORDER
));
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2067 (long) TARGET_BYTE_ORDER
);
2069 #ifdef TARGET_CHAR_SIGNED
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2072 XSTRING (TARGET_CHAR_SIGNED
));
2073 fprintf_unfiltered (file
,
2074 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2075 TARGET_CHAR_SIGNED
);
2077 #ifdef TARGET_DOUBLE_BIT
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2080 XSTRING (TARGET_DOUBLE_BIT
));
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2085 #ifdef TARGET_DOUBLE_FORMAT
2086 fprintf_unfiltered (file
,
2087 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2088 XSTRING (TARGET_DOUBLE_FORMAT
));
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2091 (long) TARGET_DOUBLE_FORMAT
);
2093 #ifdef TARGET_FLOAT_BIT
2094 fprintf_unfiltered (file
,
2095 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2096 XSTRING (TARGET_FLOAT_BIT
));
2097 fprintf_unfiltered (file
,
2098 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2101 #ifdef TARGET_FLOAT_FORMAT
2102 fprintf_unfiltered (file
,
2103 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2104 XSTRING (TARGET_FLOAT_FORMAT
));
2105 fprintf_unfiltered (file
,
2106 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2107 (long) TARGET_FLOAT_FORMAT
);
2109 #ifdef TARGET_INT_BIT
2110 fprintf_unfiltered (file
,
2111 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2112 XSTRING (TARGET_INT_BIT
));
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2117 #ifdef TARGET_LONG_BIT
2118 fprintf_unfiltered (file
,
2119 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2120 XSTRING (TARGET_LONG_BIT
));
2121 fprintf_unfiltered (file
,
2122 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2125 #ifdef TARGET_LONG_DOUBLE_BIT
2126 fprintf_unfiltered (file
,
2127 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2128 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2129 fprintf_unfiltered (file
,
2130 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2131 TARGET_LONG_DOUBLE_BIT
);
2133 #ifdef TARGET_LONG_DOUBLE_FORMAT
2134 fprintf_unfiltered (file
,
2135 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2136 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2139 (long) TARGET_LONG_DOUBLE_FORMAT
);
2141 #ifdef TARGET_LONG_LONG_BIT
2142 fprintf_unfiltered (file
,
2143 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2144 XSTRING (TARGET_LONG_LONG_BIT
));
2145 fprintf_unfiltered (file
,
2146 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2147 TARGET_LONG_LONG_BIT
);
2149 #ifdef TARGET_PRINT_INSN
2150 fprintf_unfiltered (file
,
2151 "gdbarch_dump: %s # %s\n",
2152 "TARGET_PRINT_INSN(vma, info)",
2153 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2155 fprintf_unfiltered (file
,
2156 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2157 (long) current_gdbarch
->print_insn
2158 /*TARGET_PRINT_INSN ()*/);
2160 #ifdef TARGET_PTR_BIT
2161 fprintf_unfiltered (file
,
2162 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2163 XSTRING (TARGET_PTR_BIT
));
2164 fprintf_unfiltered (file
,
2165 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2168 #ifdef TARGET_READ_FP
2169 fprintf_unfiltered (file
,
2170 "gdbarch_dump: %s # %s\n",
2172 XSTRING (TARGET_READ_FP ()));
2174 fprintf_unfiltered (file
,
2175 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2176 (long) current_gdbarch
->read_fp
2177 /*TARGET_READ_FP ()*/);
2179 #ifdef TARGET_READ_PC
2180 fprintf_unfiltered (file
,
2181 "gdbarch_dump: %s # %s\n",
2182 "TARGET_READ_PC(ptid)",
2183 XSTRING (TARGET_READ_PC (ptid
)));
2185 fprintf_unfiltered (file
,
2186 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2187 (long) current_gdbarch
->read_pc
2188 /*TARGET_READ_PC ()*/);
2190 #ifdef TARGET_READ_SP
2191 fprintf_unfiltered (file
,
2192 "gdbarch_dump: %s # %s\n",
2194 XSTRING (TARGET_READ_SP ()));
2196 fprintf_unfiltered (file
,
2197 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2198 (long) current_gdbarch
->read_sp
2199 /*TARGET_READ_SP ()*/);
2201 #ifdef TARGET_SHORT_BIT
2202 fprintf_unfiltered (file
,
2203 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2204 XSTRING (TARGET_SHORT_BIT
));
2205 fprintf_unfiltered (file
,
2206 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2209 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2211 /* Macro might contain `[{}]' when not multi-arch */
2212 fprintf_unfiltered (file
,
2213 "gdbarch_dump: %s # %s\n",
2214 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2215 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2218 fprintf_unfiltered (file
,
2219 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2220 (long) current_gdbarch
->virtual_frame_pointer
2221 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2223 #ifdef TARGET_WRITE_PC
2225 /* Macro might contain `[{}]' when not multi-arch */
2226 fprintf_unfiltered (file
,
2227 "gdbarch_dump: %s # %s\n",
2228 "TARGET_WRITE_PC(val, ptid)",
2229 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2232 fprintf_unfiltered (file
,
2233 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2234 (long) current_gdbarch
->write_pc
2235 /*TARGET_WRITE_PC ()*/);
2237 #ifdef TARGET_WRITE_SP
2239 /* Macro might contain `[{}]' when not multi-arch */
2240 fprintf_unfiltered (file
,
2241 "gdbarch_dump: %s # %s\n",
2242 "TARGET_WRITE_SP(val)",
2243 XSTRING (TARGET_WRITE_SP (val
)));
2246 fprintf_unfiltered (file
,
2247 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2248 (long) current_gdbarch
->write_sp
2249 /*TARGET_WRITE_SP ()*/);
2251 #ifdef USE_GENERIC_DUMMY_FRAMES
2252 fprintf_unfiltered (file
,
2253 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2254 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2255 fprintf_unfiltered (file
,
2256 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2257 USE_GENERIC_DUMMY_FRAMES
);
2259 #ifdef USE_STRUCT_CONVENTION
2260 fprintf_unfiltered (file
,
2261 "gdbarch_dump: %s # %s\n",
2262 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2263 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2265 fprintf_unfiltered (file
,
2266 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2267 (long) current_gdbarch
->use_struct_convention
2268 /*USE_STRUCT_CONVENTION ()*/);
2270 #ifdef VALUE_TO_REGISTER
2272 /* Macro might contain `[{}]' when not multi-arch */
2273 fprintf_unfiltered (file
,
2274 "gdbarch_dump: %s # %s\n",
2275 "VALUE_TO_REGISTER(type, regnum, from, to)",
2276 XSTRING (VALUE_TO_REGISTER (type
, regnum
, from
, to
)));
2279 fprintf_unfiltered (file
,
2280 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2281 (long) current_gdbarch
->value_to_register
2282 /*VALUE_TO_REGISTER ()*/);
2284 if (current_gdbarch
->dump_tdep
!= NULL
)
2285 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2288 struct gdbarch_tdep
*
2289 gdbarch_tdep (struct gdbarch
*gdbarch
)
2291 if (gdbarch_debug
>= 2)
2292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2293 return gdbarch
->tdep
;
2297 const struct bfd_arch_info
*
2298 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2300 gdb_assert (gdbarch
!= NULL
);
2301 if (gdbarch_debug
>= 2)
2302 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2303 return gdbarch
->bfd_arch_info
;
2307 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2309 gdb_assert (gdbarch
!= NULL
);
2310 if (gdbarch_debug
>= 2)
2311 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2312 return gdbarch
->byte_order
;
2316 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2318 gdb_assert (gdbarch
!= NULL
);
2319 /* Skip verify of short_bit, invalid_p == 0 */
2320 if (gdbarch_debug
>= 2)
2321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2322 return gdbarch
->short_bit
;
2326 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2329 gdbarch
->short_bit
= short_bit
;
2333 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2335 gdb_assert (gdbarch
!= NULL
);
2336 /* Skip verify of int_bit, invalid_p == 0 */
2337 if (gdbarch_debug
>= 2)
2338 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2339 return gdbarch
->int_bit
;
2343 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2346 gdbarch
->int_bit
= int_bit
;
2350 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2352 gdb_assert (gdbarch
!= NULL
);
2353 /* Skip verify of long_bit, invalid_p == 0 */
2354 if (gdbarch_debug
>= 2)
2355 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2356 return gdbarch
->long_bit
;
2360 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2363 gdbarch
->long_bit
= long_bit
;
2367 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2369 gdb_assert (gdbarch
!= NULL
);
2370 /* Skip verify of long_long_bit, invalid_p == 0 */
2371 if (gdbarch_debug
>= 2)
2372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2373 return gdbarch
->long_long_bit
;
2377 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2380 gdbarch
->long_long_bit
= long_long_bit
;
2384 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2386 gdb_assert (gdbarch
!= NULL
);
2387 /* Skip verify of float_bit, invalid_p == 0 */
2388 if (gdbarch_debug
>= 2)
2389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2390 return gdbarch
->float_bit
;
2394 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2397 gdbarch
->float_bit
= float_bit
;
2401 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2403 gdb_assert (gdbarch
!= NULL
);
2404 /* Skip verify of double_bit, invalid_p == 0 */
2405 if (gdbarch_debug
>= 2)
2406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2407 return gdbarch
->double_bit
;
2411 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2414 gdbarch
->double_bit
= double_bit
;
2418 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2420 gdb_assert (gdbarch
!= NULL
);
2421 /* Skip verify of long_double_bit, invalid_p == 0 */
2422 if (gdbarch_debug
>= 2)
2423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2424 return gdbarch
->long_double_bit
;
2428 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2429 int long_double_bit
)
2431 gdbarch
->long_double_bit
= long_double_bit
;
2435 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2437 gdb_assert (gdbarch
!= NULL
);
2438 /* Skip verify of ptr_bit, invalid_p == 0 */
2439 if (gdbarch_debug
>= 2)
2440 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2441 return gdbarch
->ptr_bit
;
2445 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2448 gdbarch
->ptr_bit
= ptr_bit
;
2452 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2454 gdb_assert (gdbarch
!= NULL
);
2455 if (gdbarch
->addr_bit
== 0)
2456 internal_error (__FILE__
, __LINE__
,
2457 "gdbarch: gdbarch_addr_bit invalid");
2458 if (gdbarch_debug
>= 2)
2459 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2460 return gdbarch
->addr_bit
;
2464 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2467 gdbarch
->addr_bit
= addr_bit
;
2471 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2473 gdb_assert (gdbarch
!= NULL
);
2474 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2475 if (gdbarch_debug
>= 2)
2476 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2477 return gdbarch
->bfd_vma_bit
;
2481 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2484 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2488 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2490 gdb_assert (gdbarch
!= NULL
);
2491 if (gdbarch
->char_signed
== -1)
2492 internal_error (__FILE__
, __LINE__
,
2493 "gdbarch: gdbarch_char_signed invalid");
2494 if (gdbarch_debug
>= 2)
2495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2496 return gdbarch
->char_signed
;
2500 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2503 gdbarch
->char_signed
= char_signed
;
2507 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2509 gdb_assert (gdbarch
!= NULL
);
2510 if (gdbarch
->read_pc
== 0)
2511 internal_error (__FILE__
, __LINE__
,
2512 "gdbarch: gdbarch_read_pc invalid");
2513 if (gdbarch_debug
>= 2)
2514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2515 return gdbarch
->read_pc (ptid
);
2519 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2520 gdbarch_read_pc_ftype read_pc
)
2522 gdbarch
->read_pc
= read_pc
;
2526 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2528 gdb_assert (gdbarch
!= NULL
);
2529 if (gdbarch
->write_pc
== 0)
2530 internal_error (__FILE__
, __LINE__
,
2531 "gdbarch: gdbarch_write_pc invalid");
2532 if (gdbarch_debug
>= 2)
2533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2534 gdbarch
->write_pc (val
, ptid
);
2538 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2539 gdbarch_write_pc_ftype write_pc
)
2541 gdbarch
->write_pc
= write_pc
;
2545 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2547 gdb_assert (gdbarch
!= NULL
);
2548 if (gdbarch
->read_fp
== 0)
2549 internal_error (__FILE__
, __LINE__
,
2550 "gdbarch: gdbarch_read_fp invalid");
2551 if (gdbarch_debug
>= 2)
2552 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2553 return gdbarch
->read_fp ();
2557 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2558 gdbarch_read_fp_ftype read_fp
)
2560 gdbarch
->read_fp
= read_fp
;
2564 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2566 gdb_assert (gdbarch
!= NULL
);
2567 if (gdbarch
->read_sp
== 0)
2568 internal_error (__FILE__
, __LINE__
,
2569 "gdbarch: gdbarch_read_sp invalid");
2570 if (gdbarch_debug
>= 2)
2571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2572 return gdbarch
->read_sp ();
2576 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2577 gdbarch_read_sp_ftype read_sp
)
2579 gdbarch
->read_sp
= read_sp
;
2583 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2585 gdb_assert (gdbarch
!= NULL
);
2586 if (gdbarch
->write_sp
== 0)
2587 internal_error (__FILE__
, __LINE__
,
2588 "gdbarch: gdbarch_write_sp invalid");
2589 if (gdbarch_debug
>= 2)
2590 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2591 gdbarch
->write_sp (val
);
2595 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2596 gdbarch_write_sp_ftype write_sp
)
2598 gdbarch
->write_sp
= write_sp
;
2602 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2604 gdb_assert (gdbarch
!= NULL
);
2605 if (gdbarch
->virtual_frame_pointer
== 0)
2606 internal_error (__FILE__
, __LINE__
,
2607 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2608 if (gdbarch_debug
>= 2)
2609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2610 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2614 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2615 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2617 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2621 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2623 gdb_assert (gdbarch
!= NULL
);
2624 return gdbarch
->pseudo_register_read
!= 0;
2628 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2630 gdb_assert (gdbarch
!= NULL
);
2631 if (gdbarch
->pseudo_register_read
== 0)
2632 internal_error (__FILE__
, __LINE__
,
2633 "gdbarch: gdbarch_pseudo_register_read invalid");
2634 if (gdbarch_debug
>= 2)
2635 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2636 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2640 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2641 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2643 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2647 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2649 gdb_assert (gdbarch
!= NULL
);
2650 return gdbarch
->pseudo_register_write
!= 0;
2654 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2656 gdb_assert (gdbarch
!= NULL
);
2657 if (gdbarch
->pseudo_register_write
== 0)
2658 internal_error (__FILE__
, __LINE__
,
2659 "gdbarch: gdbarch_pseudo_register_write invalid");
2660 if (gdbarch_debug
>= 2)
2661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2662 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2666 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2667 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2669 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2673 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2675 gdb_assert (gdbarch
!= NULL
);
2676 if (gdbarch
->num_regs
== -1)
2677 internal_error (__FILE__
, __LINE__
,
2678 "gdbarch: gdbarch_num_regs invalid");
2679 if (gdbarch_debug
>= 2)
2680 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2681 return gdbarch
->num_regs
;
2685 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2688 gdbarch
->num_regs
= num_regs
;
2692 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2694 gdb_assert (gdbarch
!= NULL
);
2695 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2696 if (gdbarch_debug
>= 2)
2697 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2698 return gdbarch
->num_pseudo_regs
;
2702 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2703 int num_pseudo_regs
)
2705 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2709 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2711 gdb_assert (gdbarch
!= NULL
);
2712 /* Skip verify of sp_regnum, invalid_p == 0 */
2713 if (gdbarch_debug
>= 2)
2714 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2715 return gdbarch
->sp_regnum
;
2719 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2722 gdbarch
->sp_regnum
= sp_regnum
;
2726 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2728 gdb_assert (gdbarch
!= NULL
);
2729 /* Skip verify of fp_regnum, invalid_p == 0 */
2730 if (gdbarch_debug
>= 2)
2731 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2732 return gdbarch
->fp_regnum
;
2736 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2739 gdbarch
->fp_regnum
= fp_regnum
;
2743 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2745 gdb_assert (gdbarch
!= NULL
);
2746 /* Skip verify of pc_regnum, invalid_p == 0 */
2747 if (gdbarch_debug
>= 2)
2748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2749 return gdbarch
->pc_regnum
;
2753 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2756 gdbarch
->pc_regnum
= pc_regnum
;
2760 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2762 gdb_assert (gdbarch
!= NULL
);
2763 /* Skip verify of ps_regnum, invalid_p == 0 */
2764 if (gdbarch_debug
>= 2)
2765 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2766 return gdbarch
->ps_regnum
;
2770 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2773 gdbarch
->ps_regnum
= ps_regnum
;
2777 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2779 gdb_assert (gdbarch
!= NULL
);
2780 /* Skip verify of fp0_regnum, invalid_p == 0 */
2781 if (gdbarch_debug
>= 2)
2782 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2783 return gdbarch
->fp0_regnum
;
2787 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2790 gdbarch
->fp0_regnum
= fp0_regnum
;
2794 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2796 gdb_assert (gdbarch
!= NULL
);
2797 /* Skip verify of npc_regnum, invalid_p == 0 */
2798 if (gdbarch_debug
>= 2)
2799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2800 return gdbarch
->npc_regnum
;
2804 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2807 gdbarch
->npc_regnum
= npc_regnum
;
2811 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2813 gdb_assert (gdbarch
!= NULL
);
2814 if (gdbarch
->stab_reg_to_regnum
== 0)
2815 internal_error (__FILE__
, __LINE__
,
2816 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2817 if (gdbarch_debug
>= 2)
2818 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2819 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2823 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2824 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2826 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2830 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2832 gdb_assert (gdbarch
!= NULL
);
2833 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2834 internal_error (__FILE__
, __LINE__
,
2835 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2836 if (gdbarch_debug
>= 2)
2837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2838 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2842 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2843 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2845 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2849 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2851 gdb_assert (gdbarch
!= NULL
);
2852 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2853 internal_error (__FILE__
, __LINE__
,
2854 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2855 if (gdbarch_debug
>= 2)
2856 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2857 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2861 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2862 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2864 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2868 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2870 gdb_assert (gdbarch
!= NULL
);
2871 if (gdbarch
->sdb_reg_to_regnum
== 0)
2872 internal_error (__FILE__
, __LINE__
,
2873 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2874 if (gdbarch_debug
>= 2)
2875 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2876 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2880 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2881 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2883 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2887 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2889 gdb_assert (gdbarch
!= NULL
);
2890 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2891 internal_error (__FILE__
, __LINE__
,
2892 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2893 if (gdbarch_debug
>= 2)
2894 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2895 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2899 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2900 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2902 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2906 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2908 gdb_assert (gdbarch
!= NULL
);
2909 if (gdbarch
->register_name
== 0)
2910 internal_error (__FILE__
, __LINE__
,
2911 "gdbarch: gdbarch_register_name invalid");
2912 if (gdbarch_debug
>= 2)
2913 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2914 return gdbarch
->register_name (regnr
);
2918 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2919 gdbarch_register_name_ftype register_name
)
2921 gdbarch
->register_name
= register_name
;
2925 gdbarch_register_size (struct gdbarch
*gdbarch
)
2927 gdb_assert (gdbarch
!= NULL
);
2928 if (gdbarch
->register_size
== -1)
2929 internal_error (__FILE__
, __LINE__
,
2930 "gdbarch: gdbarch_register_size invalid");
2931 if (gdbarch_debug
>= 2)
2932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2933 return gdbarch
->register_size
;
2937 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2940 gdbarch
->register_size
= register_size
;
2944 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2946 gdb_assert (gdbarch
!= NULL
);
2947 if (gdbarch
->register_bytes
== -1)
2948 internal_error (__FILE__
, __LINE__
,
2949 "gdbarch: gdbarch_register_bytes invalid");
2950 if (gdbarch_debug
>= 2)
2951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2952 return gdbarch
->register_bytes
;
2956 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2959 gdbarch
->register_bytes
= register_bytes
;
2963 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2965 gdb_assert (gdbarch
!= NULL
);
2966 if (gdbarch
->register_byte
== 0)
2967 internal_error (__FILE__
, __LINE__
,
2968 "gdbarch: gdbarch_register_byte invalid");
2969 if (gdbarch_debug
>= 2)
2970 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2971 return gdbarch
->register_byte (reg_nr
);
2975 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2976 gdbarch_register_byte_ftype register_byte
)
2978 gdbarch
->register_byte
= register_byte
;
2982 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2984 gdb_assert (gdbarch
!= NULL
);
2985 if (gdbarch
->register_raw_size
== 0)
2986 internal_error (__FILE__
, __LINE__
,
2987 "gdbarch: gdbarch_register_raw_size invalid");
2988 if (gdbarch_debug
>= 2)
2989 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2990 return gdbarch
->register_raw_size (reg_nr
);
2994 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2995 gdbarch_register_raw_size_ftype register_raw_size
)
2997 gdbarch
->register_raw_size
= register_raw_size
;
3001 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
3003 gdb_assert (gdbarch
!= NULL
);
3004 if (gdbarch
->max_register_raw_size
== -1)
3005 internal_error (__FILE__
, __LINE__
,
3006 "gdbarch: gdbarch_max_register_raw_size invalid");
3007 if (gdbarch_debug
>= 2)
3008 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
3009 return gdbarch
->max_register_raw_size
;
3013 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
3014 int max_register_raw_size
)
3016 gdbarch
->max_register_raw_size
= max_register_raw_size
;
3020 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3022 gdb_assert (gdbarch
!= NULL
);
3023 if (gdbarch
->register_virtual_size
== 0)
3024 internal_error (__FILE__
, __LINE__
,
3025 "gdbarch: gdbarch_register_virtual_size invalid");
3026 if (gdbarch_debug
>= 2)
3027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
3028 return gdbarch
->register_virtual_size (reg_nr
);
3032 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
3033 gdbarch_register_virtual_size_ftype register_virtual_size
)
3035 gdbarch
->register_virtual_size
= register_virtual_size
;
3039 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
3041 gdb_assert (gdbarch
!= NULL
);
3042 if (gdbarch
->max_register_virtual_size
== -1)
3043 internal_error (__FILE__
, __LINE__
,
3044 "gdbarch: gdbarch_max_register_virtual_size invalid");
3045 if (gdbarch_debug
>= 2)
3046 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
3047 return gdbarch
->max_register_virtual_size
;
3051 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
3052 int max_register_virtual_size
)
3054 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
3058 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3060 gdb_assert (gdbarch
!= NULL
);
3061 if (gdbarch
->register_virtual_type
== 0)
3062 internal_error (__FILE__
, __LINE__
,
3063 "gdbarch: gdbarch_register_virtual_type invalid");
3064 if (gdbarch_debug
>= 2)
3065 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3066 return gdbarch
->register_virtual_type (reg_nr
);
3070 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3071 gdbarch_register_virtual_type_ftype register_virtual_type
)
3073 gdbarch
->register_virtual_type
= register_virtual_type
;
3077 gdbarch_do_registers_info_p (struct gdbarch
*gdbarch
)
3079 gdb_assert (gdbarch
!= NULL
);
3080 return gdbarch
->do_registers_info
!= 0;
3084 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3086 gdb_assert (gdbarch
!= NULL
);
3087 if (gdbarch
->do_registers_info
== 0)
3088 internal_error (__FILE__
, __LINE__
,
3089 "gdbarch: gdbarch_do_registers_info invalid");
3090 if (gdbarch_debug
>= 2)
3091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
3092 gdbarch
->do_registers_info (reg_nr
, fpregs
);
3096 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
3097 gdbarch_do_registers_info_ftype do_registers_info
)
3099 gdbarch
->do_registers_info
= do_registers_info
;
3103 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3105 gdb_assert (gdbarch
!= NULL
);
3106 if (gdbarch
->print_registers_info
== 0)
3107 internal_error (__FILE__
, __LINE__
,
3108 "gdbarch: gdbarch_print_registers_info invalid");
3109 if (gdbarch_debug
>= 2)
3110 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3111 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3115 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3116 gdbarch_print_registers_info_ftype print_registers_info
)
3118 gdbarch
->print_registers_info
= print_registers_info
;
3122 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3124 gdb_assert (gdbarch
!= NULL
);
3125 return gdbarch
->print_float_info
!= 0;
3129 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3131 gdb_assert (gdbarch
!= NULL
);
3132 if (gdbarch
->print_float_info
== 0)
3133 internal_error (__FILE__
, __LINE__
,
3134 "gdbarch: gdbarch_print_float_info invalid");
3135 if (gdbarch_debug
>= 2)
3136 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3137 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3141 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3142 gdbarch_print_float_info_ftype print_float_info
)
3144 gdbarch
->print_float_info
= print_float_info
;
3148 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3150 gdb_assert (gdbarch
!= NULL
);
3151 return gdbarch
->print_vector_info
!= 0;
3155 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3157 gdb_assert (gdbarch
!= NULL
);
3158 if (gdbarch
->print_vector_info
== 0)
3159 internal_error (__FILE__
, __LINE__
,
3160 "gdbarch: gdbarch_print_vector_info invalid");
3161 if (gdbarch_debug
>= 2)
3162 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3163 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3167 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3168 gdbarch_print_vector_info_ftype print_vector_info
)
3170 gdbarch
->print_vector_info
= print_vector_info
;
3174 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3176 gdb_assert (gdbarch
!= NULL
);
3177 if (gdbarch
->register_sim_regno
== 0)
3178 internal_error (__FILE__
, __LINE__
,
3179 "gdbarch: gdbarch_register_sim_regno invalid");
3180 if (gdbarch_debug
>= 2)
3181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3182 return gdbarch
->register_sim_regno (reg_nr
);
3186 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3187 gdbarch_register_sim_regno_ftype register_sim_regno
)
3189 gdbarch
->register_sim_regno
= register_sim_regno
;
3193 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3195 gdb_assert (gdbarch
!= NULL
);
3196 return gdbarch
->register_bytes_ok
!= 0;
3200 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3202 gdb_assert (gdbarch
!= NULL
);
3203 if (gdbarch
->register_bytes_ok
== 0)
3204 internal_error (__FILE__
, __LINE__
,
3205 "gdbarch: gdbarch_register_bytes_ok invalid");
3206 if (gdbarch_debug
>= 2)
3207 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3208 return gdbarch
->register_bytes_ok (nr_bytes
);
3212 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3213 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3215 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3219 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3221 gdb_assert (gdbarch
!= NULL
);
3222 if (gdbarch
->cannot_fetch_register
== 0)
3223 internal_error (__FILE__
, __LINE__
,
3224 "gdbarch: gdbarch_cannot_fetch_register invalid");
3225 if (gdbarch_debug
>= 2)
3226 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3227 return gdbarch
->cannot_fetch_register (regnum
);
3231 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3232 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3234 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3238 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3240 gdb_assert (gdbarch
!= NULL
);
3241 if (gdbarch
->cannot_store_register
== 0)
3242 internal_error (__FILE__
, __LINE__
,
3243 "gdbarch: gdbarch_cannot_store_register invalid");
3244 if (gdbarch_debug
>= 2)
3245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3246 return gdbarch
->cannot_store_register (regnum
);
3250 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3251 gdbarch_cannot_store_register_ftype cannot_store_register
)
3253 gdbarch
->cannot_store_register
= cannot_store_register
;
3257 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3259 gdb_assert (gdbarch
!= NULL
);
3260 return gdbarch
->get_longjmp_target
!= 0;
3264 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3266 gdb_assert (gdbarch
!= NULL
);
3267 if (gdbarch
->get_longjmp_target
== 0)
3268 internal_error (__FILE__
, __LINE__
,
3269 "gdbarch: gdbarch_get_longjmp_target invalid");
3270 if (gdbarch_debug
>= 2)
3271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3272 return gdbarch
->get_longjmp_target (pc
);
3276 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3277 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3279 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3283 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3285 gdb_assert (gdbarch
!= NULL
);
3286 if (gdbarch
->use_generic_dummy_frames
== -1)
3287 internal_error (__FILE__
, __LINE__
,
3288 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3289 if (gdbarch_debug
>= 2)
3290 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3291 return gdbarch
->use_generic_dummy_frames
;
3295 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3296 int use_generic_dummy_frames
)
3298 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3302 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3304 gdb_assert (gdbarch
!= NULL
);
3305 if (gdbarch
->call_dummy_location
== 0)
3306 internal_error (__FILE__
, __LINE__
,
3307 "gdbarch: gdbarch_call_dummy_location invalid");
3308 if (gdbarch_debug
>= 2)
3309 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3310 return gdbarch
->call_dummy_location
;
3314 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3315 int call_dummy_location
)
3317 gdbarch
->call_dummy_location
= call_dummy_location
;
3321 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3323 gdb_assert (gdbarch
!= NULL
);
3324 if (gdbarch
->call_dummy_address
== 0)
3325 internal_error (__FILE__
, __LINE__
,
3326 "gdbarch: gdbarch_call_dummy_address invalid");
3327 if (gdbarch_debug
>= 2)
3328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3329 return gdbarch
->call_dummy_address ();
3333 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3334 gdbarch_call_dummy_address_ftype call_dummy_address
)
3336 gdbarch
->call_dummy_address
= call_dummy_address
;
3340 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3342 gdb_assert (gdbarch
!= NULL
);
3343 if (gdbarch
->call_dummy_start_offset
== -1)
3344 internal_error (__FILE__
, __LINE__
,
3345 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3346 if (gdbarch_debug
>= 2)
3347 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3348 return gdbarch
->call_dummy_start_offset
;
3352 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3353 CORE_ADDR call_dummy_start_offset
)
3355 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3359 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3361 gdb_assert (gdbarch
!= NULL
);
3362 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3363 internal_error (__FILE__
, __LINE__
,
3364 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3365 if (gdbarch_debug
>= 2)
3366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3367 return gdbarch
->call_dummy_breakpoint_offset
;
3371 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3372 CORE_ADDR call_dummy_breakpoint_offset
)
3374 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3378 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3380 gdb_assert (gdbarch
!= NULL
);
3381 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3382 internal_error (__FILE__
, __LINE__
,
3383 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3384 if (gdbarch_debug
>= 2)
3385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3386 return gdbarch
->call_dummy_breakpoint_offset_p
;
3390 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3391 int call_dummy_breakpoint_offset_p
)
3393 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3397 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3399 gdb_assert (gdbarch
!= NULL
);
3400 if (gdbarch
->call_dummy_length
== -1)
3401 internal_error (__FILE__
, __LINE__
,
3402 "gdbarch: gdbarch_call_dummy_length invalid");
3403 if (gdbarch_debug
>= 2)
3404 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3405 return gdbarch
->call_dummy_length
;
3409 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3410 int call_dummy_length
)
3412 gdbarch
->call_dummy_length
= call_dummy_length
;
3416 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3418 gdb_assert (gdbarch
!= NULL
);
3419 if (gdbarch
->pc_in_call_dummy
== 0)
3420 internal_error (__FILE__
, __LINE__
,
3421 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3422 if (gdbarch_debug
>= 2)
3423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3424 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3428 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3429 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3431 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3435 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3437 gdb_assert (gdbarch
!= NULL
);
3438 if (gdbarch
->call_dummy_p
== -1)
3439 internal_error (__FILE__
, __LINE__
,
3440 "gdbarch: gdbarch_call_dummy_p invalid");
3441 if (gdbarch_debug
>= 2)
3442 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3443 return gdbarch
->call_dummy_p
;
3447 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3450 gdbarch
->call_dummy_p
= call_dummy_p
;
3454 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3456 gdb_assert (gdbarch
!= NULL
);
3457 /* Skip verify of call_dummy_words, invalid_p == 0 */
3458 if (gdbarch_debug
>= 2)
3459 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3460 return gdbarch
->call_dummy_words
;
3464 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3465 LONGEST
* call_dummy_words
)
3467 gdbarch
->call_dummy_words
= call_dummy_words
;
3471 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3473 gdb_assert (gdbarch
!= NULL
);
3474 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3475 if (gdbarch_debug
>= 2)
3476 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3477 return gdbarch
->sizeof_call_dummy_words
;
3481 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3482 int sizeof_call_dummy_words
)
3484 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3488 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3490 gdb_assert (gdbarch
!= NULL
);
3491 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3492 internal_error (__FILE__
, __LINE__
,
3493 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3494 if (gdbarch_debug
>= 2)
3495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3496 return gdbarch
->call_dummy_stack_adjust_p
;
3500 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3501 int call_dummy_stack_adjust_p
)
3503 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3507 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3509 gdb_assert (gdbarch
!= NULL
);
3510 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3511 internal_error (__FILE__
, __LINE__
,
3512 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3513 if (gdbarch_debug
>= 2)
3514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3515 return gdbarch
->call_dummy_stack_adjust
;
3519 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3520 int call_dummy_stack_adjust
)
3522 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3526 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
)
3528 gdb_assert (gdbarch
!= NULL
);
3529 if (gdbarch
->fix_call_dummy
== 0)
3530 internal_error (__FILE__
, __LINE__
,
3531 "gdbarch: gdbarch_fix_call_dummy invalid");
3532 if (gdbarch_debug
>= 2)
3533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3534 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3538 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3539 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3541 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3545 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3547 gdb_assert (gdbarch
!= NULL
);
3548 if (gdbarch
->init_frame_pc_first
== 0)
3549 internal_error (__FILE__
, __LINE__
,
3550 "gdbarch: gdbarch_init_frame_pc_first invalid");
3551 if (gdbarch_debug
>= 2)
3552 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3553 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3557 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3558 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3560 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3564 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3566 gdb_assert (gdbarch
!= NULL
);
3567 if (gdbarch
->init_frame_pc
== 0)
3568 internal_error (__FILE__
, __LINE__
,
3569 "gdbarch: gdbarch_init_frame_pc invalid");
3570 if (gdbarch_debug
>= 2)
3571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3572 gdbarch
->init_frame_pc (fromleaf
, prev
);
3576 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3577 gdbarch_init_frame_pc_ftype init_frame_pc
)
3579 gdbarch
->init_frame_pc
= init_frame_pc
;
3583 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3585 gdb_assert (gdbarch
!= NULL
);
3586 if (gdbarch_debug
>= 2)
3587 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3588 return gdbarch
->believe_pcc_promotion
;
3592 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3593 int believe_pcc_promotion
)
3595 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3599 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3601 gdb_assert (gdbarch
!= NULL
);
3602 if (gdbarch_debug
>= 2)
3603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3604 return gdbarch
->believe_pcc_promotion_type
;
3608 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3609 int believe_pcc_promotion_type
)
3611 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3615 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3617 gdb_assert (gdbarch
!= NULL
);
3618 if (gdbarch
->coerce_float_to_double
== 0)
3619 internal_error (__FILE__
, __LINE__
,
3620 "gdbarch: gdbarch_coerce_float_to_double invalid");
3621 if (gdbarch_debug
>= 2)
3622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3623 return gdbarch
->coerce_float_to_double (formal
, actual
);
3627 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3628 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3630 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3634 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
)
3636 gdb_assert (gdbarch
!= NULL
);
3637 if (gdbarch
->get_saved_register
== 0)
3638 internal_error (__FILE__
, __LINE__
,
3639 "gdbarch: gdbarch_get_saved_register invalid");
3640 if (gdbarch_debug
>= 2)
3641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3642 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3646 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3647 gdbarch_get_saved_register_ftype get_saved_register
)
3649 gdbarch
->get_saved_register
= get_saved_register
;
3653 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3655 gdb_assert (gdbarch
!= NULL
);
3656 if (gdbarch
->register_convertible
== 0)
3657 internal_error (__FILE__
, __LINE__
,
3658 "gdbarch: gdbarch_register_convertible invalid");
3659 if (gdbarch_debug
>= 2)
3660 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3661 return gdbarch
->register_convertible (nr
);
3665 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3666 gdbarch_register_convertible_ftype register_convertible
)
3668 gdbarch
->register_convertible
= register_convertible
;
3672 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3674 gdb_assert (gdbarch
!= NULL
);
3675 if (gdbarch
->register_convert_to_virtual
== 0)
3676 internal_error (__FILE__
, __LINE__
,
3677 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3678 if (gdbarch_debug
>= 2)
3679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3680 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3684 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3685 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3687 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3691 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3693 gdb_assert (gdbarch
!= NULL
);
3694 if (gdbarch
->register_convert_to_raw
== 0)
3695 internal_error (__FILE__
, __LINE__
,
3696 "gdbarch: gdbarch_register_convert_to_raw invalid");
3697 if (gdbarch_debug
>= 2)
3698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3699 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3703 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3704 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3706 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3710 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
)
3712 gdb_assert (gdbarch
!= NULL
);
3713 if (gdbarch
->convert_register_p
== 0)
3714 internal_error (__FILE__
, __LINE__
,
3715 "gdbarch: gdbarch_convert_register_p invalid");
3716 if (gdbarch_debug
>= 2)
3717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3718 return gdbarch
->convert_register_p (regnum
);
3722 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3723 gdbarch_convert_register_p_ftype convert_register_p
)
3725 gdbarch
->convert_register_p
= convert_register_p
;
3729 gdbarch_register_to_value (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3731 gdb_assert (gdbarch
!= NULL
);
3732 if (gdbarch
->register_to_value
== 0)
3733 internal_error (__FILE__
, __LINE__
,
3734 "gdbarch: gdbarch_register_to_value invalid");
3735 if (gdbarch_debug
>= 2)
3736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3737 gdbarch
->register_to_value (regnum
, type
, from
, to
);
3741 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3742 gdbarch_register_to_value_ftype register_to_value
)
3744 gdbarch
->register_to_value
= register_to_value
;
3748 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3750 gdb_assert (gdbarch
!= NULL
);
3751 if (gdbarch
->value_to_register
== 0)
3752 internal_error (__FILE__
, __LINE__
,
3753 "gdbarch: gdbarch_value_to_register invalid");
3754 if (gdbarch_debug
>= 2)
3755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3756 gdbarch
->value_to_register (type
, regnum
, from
, to
);
3760 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3761 gdbarch_value_to_register_ftype value_to_register
)
3763 gdbarch
->value_to_register
= value_to_register
;
3767 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3769 gdb_assert (gdbarch
!= NULL
);
3770 if (gdbarch
->pointer_to_address
== 0)
3771 internal_error (__FILE__
, __LINE__
,
3772 "gdbarch: gdbarch_pointer_to_address invalid");
3773 if (gdbarch_debug
>= 2)
3774 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3775 return gdbarch
->pointer_to_address (type
, buf
);
3779 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3780 gdbarch_pointer_to_address_ftype pointer_to_address
)
3782 gdbarch
->pointer_to_address
= pointer_to_address
;
3786 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3788 gdb_assert (gdbarch
!= NULL
);
3789 if (gdbarch
->address_to_pointer
== 0)
3790 internal_error (__FILE__
, __LINE__
,
3791 "gdbarch: gdbarch_address_to_pointer invalid");
3792 if (gdbarch_debug
>= 2)
3793 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3794 gdbarch
->address_to_pointer (type
, buf
, addr
);
3798 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3799 gdbarch_address_to_pointer_ftype address_to_pointer
)
3801 gdbarch
->address_to_pointer
= address_to_pointer
;
3805 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3807 gdb_assert (gdbarch
!= NULL
);
3808 return gdbarch
->integer_to_address
!= 0;
3812 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3814 gdb_assert (gdbarch
!= NULL
);
3815 if (gdbarch
->integer_to_address
== 0)
3816 internal_error (__FILE__
, __LINE__
,
3817 "gdbarch: gdbarch_integer_to_address invalid");
3818 if (gdbarch_debug
>= 2)
3819 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3820 return gdbarch
->integer_to_address (type
, buf
);
3824 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3825 gdbarch_integer_to_address_ftype integer_to_address
)
3827 gdbarch
->integer_to_address
= integer_to_address
;
3831 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3833 gdb_assert (gdbarch
!= NULL
);
3834 if (gdbarch
->return_value_on_stack
== 0)
3835 internal_error (__FILE__
, __LINE__
,
3836 "gdbarch: gdbarch_return_value_on_stack invalid");
3837 if (gdbarch_debug
>= 2)
3838 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3839 return gdbarch
->return_value_on_stack (type
);
3843 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3844 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3846 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3850 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3852 gdb_assert (gdbarch
!= NULL
);
3853 if (gdbarch
->push_arguments
== 0)
3854 internal_error (__FILE__
, __LINE__
,
3855 "gdbarch: gdbarch_push_arguments invalid");
3856 if (gdbarch_debug
>= 2)
3857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3858 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3862 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3863 gdbarch_push_arguments_ftype push_arguments
)
3865 gdbarch
->push_arguments
= push_arguments
;
3869 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3871 gdb_assert (gdbarch
!= NULL
);
3872 if (gdbarch
->push_dummy_frame
== 0)
3873 internal_error (__FILE__
, __LINE__
,
3874 "gdbarch: gdbarch_push_dummy_frame invalid");
3875 if (gdbarch_debug
>= 2)
3876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3877 gdbarch
->push_dummy_frame ();
3881 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3882 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3884 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3888 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3890 gdb_assert (gdbarch
!= NULL
);
3891 return gdbarch
->push_return_address
!= 0;
3895 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3897 gdb_assert (gdbarch
!= NULL
);
3898 if (gdbarch
->push_return_address
== 0)
3899 internal_error (__FILE__
, __LINE__
,
3900 "gdbarch: gdbarch_push_return_address invalid");
3901 if (gdbarch_debug
>= 2)
3902 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3903 return gdbarch
->push_return_address (pc
, sp
);
3907 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3908 gdbarch_push_return_address_ftype push_return_address
)
3910 gdbarch
->push_return_address
= push_return_address
;
3914 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3916 gdb_assert (gdbarch
!= NULL
);
3917 if (gdbarch
->pop_frame
== 0)
3918 internal_error (__FILE__
, __LINE__
,
3919 "gdbarch: gdbarch_pop_frame invalid");
3920 if (gdbarch_debug
>= 2)
3921 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3922 gdbarch
->pop_frame ();
3926 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3927 gdbarch_pop_frame_ftype pop_frame
)
3929 gdbarch
->pop_frame
= pop_frame
;
3933 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3935 gdb_assert (gdbarch
!= NULL
);
3936 if (gdbarch
->store_struct_return
== 0)
3937 internal_error (__FILE__
, __LINE__
,
3938 "gdbarch: gdbarch_store_struct_return invalid");
3939 if (gdbarch_debug
>= 2)
3940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3941 gdbarch
->store_struct_return (addr
, sp
);
3945 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3946 gdbarch_store_struct_return_ftype store_struct_return
)
3948 gdbarch
->store_struct_return
= store_struct_return
;
3952 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
3954 gdb_assert (gdbarch
!= NULL
);
3955 if (gdbarch
->extract_return_value
== 0)
3956 internal_error (__FILE__
, __LINE__
,
3957 "gdbarch: gdbarch_extract_return_value invalid");
3958 if (gdbarch_debug
>= 2)
3959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3960 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3964 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3965 gdbarch_extract_return_value_ftype extract_return_value
)
3967 gdbarch
->extract_return_value
= extract_return_value
;
3971 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
3973 gdb_assert (gdbarch
!= NULL
);
3974 if (gdbarch
->store_return_value
== 0)
3975 internal_error (__FILE__
, __LINE__
,
3976 "gdbarch: gdbarch_store_return_value invalid");
3977 if (gdbarch_debug
>= 2)
3978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3979 gdbarch
->store_return_value (type
, regcache
, valbuf
);
3983 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3984 gdbarch_store_return_value_ftype store_return_value
)
3986 gdbarch
->store_return_value
= store_return_value
;
3990 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3992 gdb_assert (gdbarch
!= NULL
);
3993 if (gdbarch
->deprecated_extract_return_value
== 0)
3994 internal_error (__FILE__
, __LINE__
,
3995 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
3996 if (gdbarch_debug
>= 2)
3997 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3998 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4002 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4003 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4005 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4009 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4011 gdb_assert (gdbarch
!= NULL
);
4012 if (gdbarch
->deprecated_store_return_value
== 0)
4013 internal_error (__FILE__
, __LINE__
,
4014 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4015 if (gdbarch_debug
>= 2)
4016 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4017 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4021 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4022 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4024 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4028 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4030 gdb_assert (gdbarch
!= NULL
);
4031 return gdbarch
->extract_struct_value_address
!= 0;
4035 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4037 gdb_assert (gdbarch
!= NULL
);
4038 if (gdbarch
->extract_struct_value_address
== 0)
4039 internal_error (__FILE__
, __LINE__
,
4040 "gdbarch: gdbarch_extract_struct_value_address invalid");
4041 if (gdbarch_debug
>= 2)
4042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
4043 return gdbarch
->extract_struct_value_address (regcache
);
4047 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
4048 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
4050 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
4054 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4056 gdb_assert (gdbarch
!= NULL
);
4057 return gdbarch
->deprecated_extract_struct_value_address
!= 0;
4061 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
4063 gdb_assert (gdbarch
!= NULL
);
4064 if (gdbarch
->deprecated_extract_struct_value_address
== 0)
4065 internal_error (__FILE__
, __LINE__
,
4066 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4067 if (gdbarch_debug
>= 2)
4068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4069 return gdbarch
->deprecated_extract_struct_value_address (regbuf
);
4073 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4074 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4076 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4080 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4082 gdb_assert (gdbarch
!= NULL
);
4083 if (gdbarch
->use_struct_convention
== 0)
4084 internal_error (__FILE__
, __LINE__
,
4085 "gdbarch: gdbarch_use_struct_convention invalid");
4086 if (gdbarch_debug
>= 2)
4087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4088 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4092 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4093 gdbarch_use_struct_convention_ftype use_struct_convention
)
4095 gdbarch
->use_struct_convention
= use_struct_convention
;
4099 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4101 gdb_assert (gdbarch
!= NULL
);
4102 if (gdbarch
->frame_init_saved_regs
== 0)
4103 internal_error (__FILE__
, __LINE__
,
4104 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4105 if (gdbarch_debug
>= 2)
4106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
4107 gdbarch
->frame_init_saved_regs (frame
);
4111 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4112 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
4114 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
4118 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4120 gdb_assert (gdbarch
!= NULL
);
4121 return gdbarch
->init_extra_frame_info
!= 0;
4125 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4127 gdb_assert (gdbarch
!= NULL
);
4128 if (gdbarch
->init_extra_frame_info
== 0)
4129 internal_error (__FILE__
, __LINE__
,
4130 "gdbarch: gdbarch_init_extra_frame_info invalid");
4131 if (gdbarch_debug
>= 2)
4132 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
4133 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
4137 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
4138 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
4140 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
4144 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4146 gdb_assert (gdbarch
!= NULL
);
4147 if (gdbarch
->skip_prologue
== 0)
4148 internal_error (__FILE__
, __LINE__
,
4149 "gdbarch: gdbarch_skip_prologue invalid");
4150 if (gdbarch_debug
>= 2)
4151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4152 return gdbarch
->skip_prologue (ip
);
4156 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4157 gdbarch_skip_prologue_ftype skip_prologue
)
4159 gdbarch
->skip_prologue
= skip_prologue
;
4163 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4165 gdb_assert (gdbarch
!= NULL
);
4166 if (gdbarch
->prologue_frameless_p
== 0)
4167 internal_error (__FILE__
, __LINE__
,
4168 "gdbarch: gdbarch_prologue_frameless_p invalid");
4169 if (gdbarch_debug
>= 2)
4170 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
4171 return gdbarch
->prologue_frameless_p (ip
);
4175 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
4176 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
4178 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
4182 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4184 gdb_assert (gdbarch
!= NULL
);
4185 if (gdbarch
->inner_than
== 0)
4186 internal_error (__FILE__
, __LINE__
,
4187 "gdbarch: gdbarch_inner_than invalid");
4188 if (gdbarch_debug
>= 2)
4189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4190 return gdbarch
->inner_than (lhs
, rhs
);
4194 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4195 gdbarch_inner_than_ftype inner_than
)
4197 gdbarch
->inner_than
= inner_than
;
4200 const unsigned char *
4201 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4203 gdb_assert (gdbarch
!= NULL
);
4204 if (gdbarch
->breakpoint_from_pc
== 0)
4205 internal_error (__FILE__
, __LINE__
,
4206 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4207 if (gdbarch_debug
>= 2)
4208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4209 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4213 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4214 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4216 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4220 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4222 gdb_assert (gdbarch
!= NULL
);
4223 if (gdbarch
->memory_insert_breakpoint
== 0)
4224 internal_error (__FILE__
, __LINE__
,
4225 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4226 if (gdbarch_debug
>= 2)
4227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4228 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4232 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4233 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4235 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4239 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4241 gdb_assert (gdbarch
!= NULL
);
4242 if (gdbarch
->memory_remove_breakpoint
== 0)
4243 internal_error (__FILE__
, __LINE__
,
4244 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4245 if (gdbarch_debug
>= 2)
4246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4247 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4251 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4252 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4254 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4258 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4260 gdb_assert (gdbarch
!= NULL
);
4261 if (gdbarch
->decr_pc_after_break
== -1)
4262 internal_error (__FILE__
, __LINE__
,
4263 "gdbarch: gdbarch_decr_pc_after_break invalid");
4264 if (gdbarch_debug
>= 2)
4265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4266 return gdbarch
->decr_pc_after_break
;
4270 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4271 CORE_ADDR decr_pc_after_break
)
4273 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4277 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4279 gdb_assert (gdbarch
!= NULL
);
4280 if (gdbarch
->prepare_to_proceed
== 0)
4281 internal_error (__FILE__
, __LINE__
,
4282 "gdbarch: gdbarch_prepare_to_proceed invalid");
4283 if (gdbarch_debug
>= 2)
4284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4285 return gdbarch
->prepare_to_proceed (select_it
);
4289 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4290 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4292 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4296 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4298 gdb_assert (gdbarch
!= NULL
);
4299 if (gdbarch
->function_start_offset
== -1)
4300 internal_error (__FILE__
, __LINE__
,
4301 "gdbarch: gdbarch_function_start_offset invalid");
4302 if (gdbarch_debug
>= 2)
4303 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4304 return gdbarch
->function_start_offset
;
4308 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4309 CORE_ADDR function_start_offset
)
4311 gdbarch
->function_start_offset
= function_start_offset
;
4315 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4317 gdb_assert (gdbarch
!= NULL
);
4318 if (gdbarch
->remote_translate_xfer_address
== 0)
4319 internal_error (__FILE__
, __LINE__
,
4320 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4321 if (gdbarch_debug
>= 2)
4322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4323 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4327 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4328 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4330 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4334 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4336 gdb_assert (gdbarch
!= NULL
);
4337 if (gdbarch
->frame_args_skip
== -1)
4338 internal_error (__FILE__
, __LINE__
,
4339 "gdbarch: gdbarch_frame_args_skip invalid");
4340 if (gdbarch_debug
>= 2)
4341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4342 return gdbarch
->frame_args_skip
;
4346 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4347 CORE_ADDR frame_args_skip
)
4349 gdbarch
->frame_args_skip
= frame_args_skip
;
4353 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4355 gdb_assert (gdbarch
!= NULL
);
4356 if (gdbarch
->frameless_function_invocation
== 0)
4357 internal_error (__FILE__
, __LINE__
,
4358 "gdbarch: gdbarch_frameless_function_invocation invalid");
4359 if (gdbarch_debug
>= 2)
4360 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4361 return gdbarch
->frameless_function_invocation (fi
);
4365 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4366 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4368 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4372 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4374 gdb_assert (gdbarch
!= NULL
);
4375 if (gdbarch
->frame_chain
== 0)
4376 internal_error (__FILE__
, __LINE__
,
4377 "gdbarch: gdbarch_frame_chain invalid");
4378 if (gdbarch_debug
>= 2)
4379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4380 return gdbarch
->frame_chain (frame
);
4384 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4385 gdbarch_frame_chain_ftype frame_chain
)
4387 gdbarch
->frame_chain
= frame_chain
;
4391 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4393 gdb_assert (gdbarch
!= NULL
);
4394 if (gdbarch
->frame_chain_valid
== 0)
4395 internal_error (__FILE__
, __LINE__
,
4396 "gdbarch: gdbarch_frame_chain_valid invalid");
4397 if (gdbarch_debug
>= 2)
4398 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4399 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4403 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4404 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4406 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4410 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4412 gdb_assert (gdbarch
!= NULL
);
4413 if (gdbarch
->frame_saved_pc
== 0)
4414 internal_error (__FILE__
, __LINE__
,
4415 "gdbarch: gdbarch_frame_saved_pc invalid");
4416 if (gdbarch_debug
>= 2)
4417 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4418 return gdbarch
->frame_saved_pc (fi
);
4422 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4423 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4425 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4429 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4431 gdb_assert (gdbarch
!= NULL
);
4432 if (gdbarch
->frame_args_address
== 0)
4433 internal_error (__FILE__
, __LINE__
,
4434 "gdbarch: gdbarch_frame_args_address invalid");
4435 if (gdbarch_debug
>= 2)
4436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4437 return gdbarch
->frame_args_address (fi
);
4441 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4442 gdbarch_frame_args_address_ftype frame_args_address
)
4444 gdbarch
->frame_args_address
= frame_args_address
;
4448 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4450 gdb_assert (gdbarch
!= NULL
);
4451 if (gdbarch
->frame_locals_address
== 0)
4452 internal_error (__FILE__
, __LINE__
,
4453 "gdbarch: gdbarch_frame_locals_address invalid");
4454 if (gdbarch_debug
>= 2)
4455 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4456 return gdbarch
->frame_locals_address (fi
);
4460 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4461 gdbarch_frame_locals_address_ftype frame_locals_address
)
4463 gdbarch
->frame_locals_address
= frame_locals_address
;
4467 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4469 gdb_assert (gdbarch
!= NULL
);
4470 if (gdbarch
->saved_pc_after_call
== 0)
4471 internal_error (__FILE__
, __LINE__
,
4472 "gdbarch: gdbarch_saved_pc_after_call invalid");
4473 if (gdbarch_debug
>= 2)
4474 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4475 return gdbarch
->saved_pc_after_call (frame
);
4479 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4480 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4482 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4486 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4488 gdb_assert (gdbarch
!= NULL
);
4489 if (gdbarch
->frame_num_args
== 0)
4490 internal_error (__FILE__
, __LINE__
,
4491 "gdbarch: gdbarch_frame_num_args invalid");
4492 if (gdbarch_debug
>= 2)
4493 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4494 return gdbarch
->frame_num_args (frame
);
4498 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4499 gdbarch_frame_num_args_ftype frame_num_args
)
4501 gdbarch
->frame_num_args
= frame_num_args
;
4505 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4507 gdb_assert (gdbarch
!= NULL
);
4508 return gdbarch
->stack_align
!= 0;
4512 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4514 gdb_assert (gdbarch
!= NULL
);
4515 if (gdbarch
->stack_align
== 0)
4516 internal_error (__FILE__
, __LINE__
,
4517 "gdbarch: gdbarch_stack_align invalid");
4518 if (gdbarch_debug
>= 2)
4519 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4520 return gdbarch
->stack_align (sp
);
4524 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4525 gdbarch_stack_align_ftype stack_align
)
4527 gdbarch
->stack_align
= stack_align
;
4531 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4533 gdb_assert (gdbarch
!= NULL
);
4534 return gdbarch
->frame_align
!= 0;
4538 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4540 gdb_assert (gdbarch
!= NULL
);
4541 if (gdbarch
->frame_align
== 0)
4542 internal_error (__FILE__
, __LINE__
,
4543 "gdbarch: gdbarch_frame_align invalid");
4544 if (gdbarch_debug
>= 2)
4545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4546 return gdbarch
->frame_align (gdbarch
, address
);
4550 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4551 gdbarch_frame_align_ftype frame_align
)
4553 gdbarch
->frame_align
= frame_align
;
4557 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4559 gdb_assert (gdbarch
!= NULL
);
4560 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4561 if (gdbarch_debug
>= 2)
4562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4563 return gdbarch
->extra_stack_alignment_needed
;
4567 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4568 int extra_stack_alignment_needed
)
4570 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4574 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4576 gdb_assert (gdbarch
!= NULL
);
4577 return gdbarch
->reg_struct_has_addr
!= 0;
4581 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4583 gdb_assert (gdbarch
!= NULL
);
4584 if (gdbarch
->reg_struct_has_addr
== 0)
4585 internal_error (__FILE__
, __LINE__
,
4586 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4587 if (gdbarch_debug
>= 2)
4588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4589 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4593 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4594 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4596 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4600 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4602 gdb_assert (gdbarch
!= NULL
);
4603 return gdbarch
->save_dummy_frame_tos
!= 0;
4607 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4609 gdb_assert (gdbarch
!= NULL
);
4610 if (gdbarch
->save_dummy_frame_tos
== 0)
4611 internal_error (__FILE__
, __LINE__
,
4612 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4613 if (gdbarch_debug
>= 2)
4614 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4615 gdbarch
->save_dummy_frame_tos (sp
);
4619 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4620 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4622 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4626 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4628 gdb_assert (gdbarch
!= NULL
);
4629 if (gdbarch_debug
>= 2)
4630 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4631 return gdbarch
->parm_boundary
;
4635 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4638 gdbarch
->parm_boundary
= parm_boundary
;
4641 const struct floatformat
*
4642 gdbarch_float_format (struct gdbarch
*gdbarch
)
4644 gdb_assert (gdbarch
!= NULL
);
4645 if (gdbarch_debug
>= 2)
4646 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4647 return gdbarch
->float_format
;
4651 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4652 const struct floatformat
* float_format
)
4654 gdbarch
->float_format
= float_format
;
4657 const struct floatformat
*
4658 gdbarch_double_format (struct gdbarch
*gdbarch
)
4660 gdb_assert (gdbarch
!= NULL
);
4661 if (gdbarch_debug
>= 2)
4662 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4663 return gdbarch
->double_format
;
4667 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4668 const struct floatformat
* double_format
)
4670 gdbarch
->double_format
= double_format
;
4673 const struct floatformat
*
4674 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4676 gdb_assert (gdbarch
!= NULL
);
4677 if (gdbarch_debug
>= 2)
4678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4679 return gdbarch
->long_double_format
;
4683 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4684 const struct floatformat
* long_double_format
)
4686 gdbarch
->long_double_format
= long_double_format
;
4690 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4692 gdb_assert (gdbarch
!= NULL
);
4693 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4694 internal_error (__FILE__
, __LINE__
,
4695 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4696 if (gdbarch_debug
>= 2)
4697 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4698 return gdbarch
->convert_from_func_ptr_addr (addr
);
4702 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4703 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4705 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4709 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4711 gdb_assert (gdbarch
!= NULL
);
4712 if (gdbarch
->addr_bits_remove
== 0)
4713 internal_error (__FILE__
, __LINE__
,
4714 "gdbarch: gdbarch_addr_bits_remove invalid");
4715 if (gdbarch_debug
>= 2)
4716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4717 return gdbarch
->addr_bits_remove (addr
);
4721 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4722 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4724 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4728 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4730 gdb_assert (gdbarch
!= NULL
);
4731 if (gdbarch
->smash_text_address
== 0)
4732 internal_error (__FILE__
, __LINE__
,
4733 "gdbarch: gdbarch_smash_text_address invalid");
4734 if (gdbarch_debug
>= 2)
4735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4736 return gdbarch
->smash_text_address (addr
);
4740 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4741 gdbarch_smash_text_address_ftype smash_text_address
)
4743 gdbarch
->smash_text_address
= smash_text_address
;
4747 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4749 gdb_assert (gdbarch
!= NULL
);
4750 return gdbarch
->software_single_step
!= 0;
4754 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4756 gdb_assert (gdbarch
!= NULL
);
4757 if (gdbarch
->software_single_step
== 0)
4758 internal_error (__FILE__
, __LINE__
,
4759 "gdbarch: gdbarch_software_single_step invalid");
4760 if (gdbarch_debug
>= 2)
4761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4762 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4766 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4767 gdbarch_software_single_step_ftype software_single_step
)
4769 gdbarch
->software_single_step
= software_single_step
;
4773 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4775 gdb_assert (gdbarch
!= NULL
);
4776 if (gdbarch
->print_insn
== 0)
4777 internal_error (__FILE__
, __LINE__
,
4778 "gdbarch: gdbarch_print_insn invalid");
4779 if (gdbarch_debug
>= 2)
4780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4781 return gdbarch
->print_insn (vma
, info
);
4785 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4786 gdbarch_print_insn_ftype print_insn
)
4788 gdbarch
->print_insn
= print_insn
;
4792 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4794 gdb_assert (gdbarch
!= NULL
);
4795 if (gdbarch
->skip_trampoline_code
== 0)
4796 internal_error (__FILE__
, __LINE__
,
4797 "gdbarch: gdbarch_skip_trampoline_code invalid");
4798 if (gdbarch_debug
>= 2)
4799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4800 return gdbarch
->skip_trampoline_code (pc
);
4804 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4805 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4807 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4811 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4813 gdb_assert (gdbarch
!= NULL
);
4814 if (gdbarch
->in_solib_call_trampoline
== 0)
4815 internal_error (__FILE__
, __LINE__
,
4816 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4817 if (gdbarch_debug
>= 2)
4818 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4819 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4823 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4824 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4826 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4830 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4832 gdb_assert (gdbarch
!= NULL
);
4833 if (gdbarch
->in_solib_return_trampoline
== 0)
4834 internal_error (__FILE__
, __LINE__
,
4835 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
4836 if (gdbarch_debug
>= 2)
4837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
4838 return gdbarch
->in_solib_return_trampoline (pc
, name
);
4842 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
4843 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
4845 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
4849 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4851 gdb_assert (gdbarch
!= NULL
);
4852 if (gdbarch
->pc_in_sigtramp
== 0)
4853 internal_error (__FILE__
, __LINE__
,
4854 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4855 if (gdbarch_debug
>= 2)
4856 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4857 return gdbarch
->pc_in_sigtramp (pc
, name
);
4861 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4862 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4864 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4868 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
4870 gdb_assert (gdbarch
!= NULL
);
4871 return gdbarch
->sigtramp_start
!= 0;
4875 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4877 gdb_assert (gdbarch
!= NULL
);
4878 if (gdbarch
->sigtramp_start
== 0)
4879 internal_error (__FILE__
, __LINE__
,
4880 "gdbarch: gdbarch_sigtramp_start invalid");
4881 if (gdbarch_debug
>= 2)
4882 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
4883 return gdbarch
->sigtramp_start (pc
);
4887 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
4888 gdbarch_sigtramp_start_ftype sigtramp_start
)
4890 gdbarch
->sigtramp_start
= sigtramp_start
;
4894 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
4896 gdb_assert (gdbarch
!= NULL
);
4897 return gdbarch
->sigtramp_end
!= 0;
4901 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4903 gdb_assert (gdbarch
!= NULL
);
4904 if (gdbarch
->sigtramp_end
== 0)
4905 internal_error (__FILE__
, __LINE__
,
4906 "gdbarch: gdbarch_sigtramp_end invalid");
4907 if (gdbarch_debug
>= 2)
4908 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
4909 return gdbarch
->sigtramp_end (pc
);
4913 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
4914 gdbarch_sigtramp_end_ftype sigtramp_end
)
4916 gdbarch
->sigtramp_end
= sigtramp_end
;
4920 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4922 gdb_assert (gdbarch
!= NULL
);
4923 if (gdbarch
->in_function_epilogue_p
== 0)
4924 internal_error (__FILE__
, __LINE__
,
4925 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4926 if (gdbarch_debug
>= 2)
4927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4928 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4932 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4933 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4935 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4939 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4941 gdb_assert (gdbarch
!= NULL
);
4942 if (gdbarch
->construct_inferior_arguments
== 0)
4943 internal_error (__FILE__
, __LINE__
,
4944 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4945 if (gdbarch_debug
>= 2)
4946 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4947 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4951 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4952 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4954 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4958 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4960 gdb_assert (gdbarch
!= NULL
);
4961 return gdbarch
->dwarf2_build_frame_info
!= 0;
4965 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4967 gdb_assert (gdbarch
!= NULL
);
4968 if (gdbarch
->dwarf2_build_frame_info
== 0)
4969 internal_error (__FILE__
, __LINE__
,
4970 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4971 if (gdbarch_debug
>= 2)
4972 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4973 gdbarch
->dwarf2_build_frame_info (objfile
);
4977 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4978 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4980 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4984 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4986 gdb_assert (gdbarch
!= NULL
);
4987 if (gdbarch
->elf_make_msymbol_special
== 0)
4988 internal_error (__FILE__
, __LINE__
,
4989 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4990 if (gdbarch_debug
>= 2)
4991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4992 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4996 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4997 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4999 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5003 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5005 gdb_assert (gdbarch
!= NULL
);
5006 if (gdbarch
->coff_make_msymbol_special
== 0)
5007 internal_error (__FILE__
, __LINE__
,
5008 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5009 if (gdbarch_debug
>= 2)
5010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5011 gdbarch
->coff_make_msymbol_special (val
, msym
);
5015 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5016 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5018 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5022 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5024 gdb_assert (gdbarch
!= NULL
);
5025 /* Skip verify of name_of_malloc, invalid_p == 0 */
5026 if (gdbarch_debug
>= 2)
5027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5028 return gdbarch
->name_of_malloc
;
5032 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5033 const char * name_of_malloc
)
5035 gdbarch
->name_of_malloc
= name_of_malloc
;
5039 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5041 gdb_assert (gdbarch
!= NULL
);
5042 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5043 if (gdbarch_debug
>= 2)
5044 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5045 return gdbarch
->cannot_step_breakpoint
;
5049 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5050 int cannot_step_breakpoint
)
5052 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5056 /* Keep a registry of per-architecture data-pointers required by GDB
5063 gdbarch_data_init_ftype
*init
;
5064 gdbarch_data_free_ftype
*free
;
5067 struct gdbarch_data_registration
5069 struct gdbarch_data
*data
;
5070 struct gdbarch_data_registration
*next
;
5073 struct gdbarch_data_registry
5076 struct gdbarch_data_registration
*registrations
;
5079 struct gdbarch_data_registry gdbarch_data_registry
=
5084 struct gdbarch_data
*
5085 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
5086 gdbarch_data_free_ftype
*free
)
5088 struct gdbarch_data_registration
**curr
;
5089 /* Append the new registraration. */
5090 for (curr
= &gdbarch_data_registry
.registrations
;
5092 curr
= &(*curr
)->next
);
5093 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5094 (*curr
)->next
= NULL
;
5095 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5096 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5097 (*curr
)->data
->init
= init
;
5098 (*curr
)->data
->init_p
= 1;
5099 (*curr
)->data
->free
= free
;
5100 return (*curr
)->data
;
5104 /* Create/delete the gdbarch data vector. */
5107 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5109 gdb_assert (gdbarch
->data
== NULL
);
5110 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5111 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
5115 free_gdbarch_data (struct gdbarch
*gdbarch
)
5117 struct gdbarch_data_registration
*rego
;
5118 gdb_assert (gdbarch
->data
!= NULL
);
5119 for (rego
= gdbarch_data_registry
.registrations
;
5123 struct gdbarch_data
*data
= rego
->data
;
5124 gdb_assert (data
->index
< gdbarch
->nr_data
);
5125 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
5127 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5128 gdbarch
->data
[data
->index
] = NULL
;
5131 xfree (gdbarch
->data
);
5132 gdbarch
->data
= NULL
;
5136 /* Initialize the current value of the specified per-architecture
5140 set_gdbarch_data (struct gdbarch
*gdbarch
,
5141 struct gdbarch_data
*data
,
5144 gdb_assert (data
->index
< gdbarch
->nr_data
);
5145 if (gdbarch
->data
[data
->index
] != NULL
)
5147 gdb_assert (data
->free
!= NULL
);
5148 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
5150 gdbarch
->data
[data
->index
] = pointer
;
5153 /* Return the current value of the specified per-architecture
5157 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5159 gdb_assert (data
->index
< gdbarch
->nr_data
);
5160 /* The data-pointer isn't initialized, call init() to get a value but
5161 only if the architecture initializaiton has completed. Otherwise
5162 punt - hope that the caller knows what they are doing. */
5163 if (gdbarch
->data
[data
->index
] == NULL
5164 && gdbarch
->initialized_p
)
5166 /* Be careful to detect an initialization cycle. */
5167 gdb_assert (data
->init_p
);
5169 gdb_assert (data
->init
!= NULL
);
5170 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5172 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5174 return gdbarch
->data
[data
->index
];
5179 /* Keep a registry of swapped data required by GDB modules. */
5184 struct gdbarch_swap_registration
*source
;
5185 struct gdbarch_swap
*next
;
5188 struct gdbarch_swap_registration
5191 unsigned long sizeof_data
;
5192 gdbarch_swap_ftype
*init
;
5193 struct gdbarch_swap_registration
*next
;
5196 struct gdbarch_swap_registry
5199 struct gdbarch_swap_registration
*registrations
;
5202 struct gdbarch_swap_registry gdbarch_swap_registry
=
5208 register_gdbarch_swap (void *data
,
5209 unsigned long sizeof_data
,
5210 gdbarch_swap_ftype
*init
)
5212 struct gdbarch_swap_registration
**rego
;
5213 for (rego
= &gdbarch_swap_registry
.registrations
;
5215 rego
= &(*rego
)->next
);
5216 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5217 (*rego
)->next
= NULL
;
5218 (*rego
)->init
= init
;
5219 (*rego
)->data
= data
;
5220 (*rego
)->sizeof_data
= sizeof_data
;
5224 clear_gdbarch_swap (struct gdbarch
*gdbarch
)
5226 struct gdbarch_swap
*curr
;
5227 for (curr
= gdbarch
->swap
;
5231 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5236 init_gdbarch_swap (struct gdbarch
*gdbarch
)
5238 struct gdbarch_swap_registration
*rego
;
5239 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
5240 for (rego
= gdbarch_swap_registry
.registrations
;
5244 if (rego
->data
!= NULL
)
5246 (*curr
) = XMALLOC (struct gdbarch_swap
);
5247 (*curr
)->source
= rego
;
5248 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
5249 (*curr
)->next
= NULL
;
5250 curr
= &(*curr
)->next
;
5252 if (rego
->init
!= NULL
)
5258 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
5260 struct gdbarch_swap
*curr
;
5261 for (curr
= gdbarch
->swap
;
5264 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5268 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
5270 struct gdbarch_swap
*curr
;
5271 for (curr
= gdbarch
->swap
;
5274 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5278 /* Keep a registry of the architectures known by GDB. */
5280 struct gdbarch_registration
5282 enum bfd_architecture bfd_architecture
;
5283 gdbarch_init_ftype
*init
;
5284 gdbarch_dump_tdep_ftype
*dump_tdep
;
5285 struct gdbarch_list
*arches
;
5286 struct gdbarch_registration
*next
;
5289 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5292 append_name (const char ***buf
, int *nr
, const char *name
)
5294 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5300 gdbarch_printable_names (void)
5304 /* Accumulate a list of names based on the registed list of
5306 enum bfd_architecture a
;
5308 const char **arches
= NULL
;
5309 struct gdbarch_registration
*rego
;
5310 for (rego
= gdbarch_registry
;
5314 const struct bfd_arch_info
*ap
;
5315 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5317 internal_error (__FILE__
, __LINE__
,
5318 "gdbarch_architecture_names: multi-arch unknown");
5321 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5326 append_name (&arches
, &nr_arches
, NULL
);
5330 /* Just return all the architectures that BFD knows. Assume that
5331 the legacy architecture framework supports them. */
5332 return bfd_arch_list ();
5337 gdbarch_register (enum bfd_architecture bfd_architecture
,
5338 gdbarch_init_ftype
*init
,
5339 gdbarch_dump_tdep_ftype
*dump_tdep
)
5341 struct gdbarch_registration
**curr
;
5342 const struct bfd_arch_info
*bfd_arch_info
;
5343 /* Check that BFD recognizes this architecture */
5344 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5345 if (bfd_arch_info
== NULL
)
5347 internal_error (__FILE__
, __LINE__
,
5348 "gdbarch: Attempt to register unknown architecture (%d)",
5351 /* Check that we haven't seen this architecture before */
5352 for (curr
= &gdbarch_registry
;
5354 curr
= &(*curr
)->next
)
5356 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5357 internal_error (__FILE__
, __LINE__
,
5358 "gdbarch: Duplicate registraration of architecture (%s)",
5359 bfd_arch_info
->printable_name
);
5363 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5364 bfd_arch_info
->printable_name
,
5367 (*curr
) = XMALLOC (struct gdbarch_registration
);
5368 (*curr
)->bfd_architecture
= bfd_architecture
;
5369 (*curr
)->init
= init
;
5370 (*curr
)->dump_tdep
= dump_tdep
;
5371 (*curr
)->arches
= NULL
;
5372 (*curr
)->next
= NULL
;
5373 /* When non- multi-arch, install whatever target dump routine we've
5374 been provided - hopefully that routine has been written correctly
5375 and works regardless of multi-arch. */
5376 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
5377 && startup_gdbarch
.dump_tdep
== NULL
)
5378 startup_gdbarch
.dump_tdep
= dump_tdep
;
5382 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5383 gdbarch_init_ftype
*init
)
5385 gdbarch_register (bfd_architecture
, init
, NULL
);
5389 /* Look for an architecture using gdbarch_info. Base search on only
5390 BFD_ARCH_INFO and BYTE_ORDER. */
5392 struct gdbarch_list
*
5393 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5394 const struct gdbarch_info
*info
)
5396 for (; arches
!= NULL
; arches
= arches
->next
)
5398 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5400 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5408 /* Update the current architecture. Return ZERO if the update request
5412 gdbarch_update_p (struct gdbarch_info info
)
5414 struct gdbarch
*new_gdbarch
;
5415 struct gdbarch
*old_gdbarch
;
5416 struct gdbarch_registration
*rego
;
5418 /* Fill in missing parts of the INFO struct using a number of
5419 sources: ``set ...''; INFOabfd supplied; existing target. */
5421 /* ``(gdb) set architecture ...'' */
5422 if (info
.bfd_arch_info
== NULL
5423 && !TARGET_ARCHITECTURE_AUTO
)
5424 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5425 if (info
.bfd_arch_info
== NULL
5426 && info
.abfd
!= NULL
5427 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
5428 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
5429 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
5430 if (info
.bfd_arch_info
== NULL
)
5431 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
5433 /* ``(gdb) set byte-order ...'' */
5434 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5435 && !TARGET_BYTE_ORDER_AUTO
)
5436 info
.byte_order
= TARGET_BYTE_ORDER
;
5437 /* From the INFO struct. */
5438 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
5439 && info
.abfd
!= NULL
)
5440 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
5441 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
5442 : BFD_ENDIAN_UNKNOWN
);
5443 /* From the current target. */
5444 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
5445 info
.byte_order
= TARGET_BYTE_ORDER
;
5447 /* Must have found some sort of architecture. */
5448 gdb_assert (info
.bfd_arch_info
!= NULL
);
5452 fprintf_unfiltered (gdb_stdlog
,
5453 "gdbarch_update: info.bfd_arch_info %s\n",
5454 (info
.bfd_arch_info
!= NULL
5455 ? info
.bfd_arch_info
->printable_name
5457 fprintf_unfiltered (gdb_stdlog
,
5458 "gdbarch_update: info.byte_order %d (%s)\n",
5460 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5461 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5463 fprintf_unfiltered (gdb_stdlog
,
5464 "gdbarch_update: info.abfd 0x%lx\n",
5466 fprintf_unfiltered (gdb_stdlog
,
5467 "gdbarch_update: info.tdep_info 0x%lx\n",
5468 (long) info
.tdep_info
);
5471 /* Find the target that knows about this architecture. */
5472 for (rego
= gdbarch_registry
;
5475 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5480 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
5484 /* Swap the data belonging to the old target out setting the
5485 installed data to zero. This stops the ->init() function trying
5486 to refer to the previous architecture's global data structures. */
5487 swapout_gdbarch_swap (current_gdbarch
);
5488 clear_gdbarch_swap (current_gdbarch
);
5490 /* Save the previously selected architecture, setting the global to
5491 NULL. This stops ->init() trying to use the previous
5492 architecture's configuration. The previous architecture may not
5493 even be of the same architecture family. The most recent
5494 architecture of the same family is found at the head of the
5495 rego->arches list. */
5496 old_gdbarch
= current_gdbarch
;
5497 current_gdbarch
= NULL
;
5499 /* Ask the target for a replacement architecture. */
5500 new_gdbarch
= rego
->init (info
, rego
->arches
);
5502 /* Did the target like it? No. Reject the change and revert to the
5503 old architecture. */
5504 if (new_gdbarch
== NULL
)
5507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
5508 swapin_gdbarch_swap (old_gdbarch
);
5509 current_gdbarch
= old_gdbarch
;
5513 /* Did the architecture change? No. Oops, put the old architecture
5515 if (old_gdbarch
== new_gdbarch
)
5518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5520 new_gdbarch
->bfd_arch_info
->printable_name
);
5521 swapin_gdbarch_swap (old_gdbarch
);
5522 current_gdbarch
= old_gdbarch
;
5526 /* Is this a pre-existing architecture? Yes. Move it to the front
5527 of the list of architectures (keeping the list sorted Most
5528 Recently Used) and then copy it in. */
5530 struct gdbarch_list
**list
;
5531 for (list
= ®o
->arches
;
5533 list
= &(*list
)->next
)
5535 if ((*list
)->gdbarch
== new_gdbarch
)
5537 struct gdbarch_list
*this;
5539 fprintf_unfiltered (gdb_stdlog
,
5540 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5542 new_gdbarch
->bfd_arch_info
->printable_name
);
5545 (*list
) = this->next
;
5546 /* Insert in the front. */
5547 this->next
= rego
->arches
;
5548 rego
->arches
= this;
5549 /* Copy the new architecture in. */
5550 current_gdbarch
= new_gdbarch
;
5551 swapin_gdbarch_swap (new_gdbarch
);
5552 architecture_changed_event ();
5558 /* Prepend this new architecture to the architecture list (keep the
5559 list sorted Most Recently Used). */
5561 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5562 this->next
= rego
->arches
;
5563 this->gdbarch
= new_gdbarch
;
5564 rego
->arches
= this;
5567 /* Switch to this new architecture marking it initialized. */
5568 current_gdbarch
= new_gdbarch
;
5569 current_gdbarch
->initialized_p
= 1;
5572 fprintf_unfiltered (gdb_stdlog
,
5573 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5575 new_gdbarch
->bfd_arch_info
->printable_name
);
5578 /* Check that the newly installed architecture is valid. Plug in
5579 any post init values. */
5580 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5581 verify_gdbarch (new_gdbarch
);
5583 /* Initialize the per-architecture memory (swap) areas.
5584 CURRENT_GDBARCH must be update before these modules are
5586 init_gdbarch_swap (new_gdbarch
);
5588 /* Initialize the per-architecture data. CURRENT_GDBARCH
5589 must be updated before these modules are called. */
5590 architecture_changed_event ();
5593 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5601 /* Pointer to the target-dependent disassembly function. */
5602 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5603 disassemble_info tm_print_insn_info
;
5606 extern void _initialize_gdbarch (void);
5609 _initialize_gdbarch (void)
5611 struct cmd_list_element
*c
;
5613 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5614 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5615 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5616 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5617 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5619 add_show_from_set (add_set_cmd ("arch",
5622 (char *)&gdbarch_debug
,
5623 "Set architecture debugging.\n\
5624 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5626 c
= add_set_cmd ("archdebug",
5629 (char *)&gdbarch_debug
,
5630 "Set architecture debugging.\n\
5631 When non-zero, architecture debugging is enabled.", &setlist
);
5633 deprecate_cmd (c
, "set debug arch");
5634 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");