1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch
*gdbarch
);
70 static void alloc_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void swapout_gdbarch_swap (struct gdbarch
*);
75 static void swapin_gdbarch_swap (struct gdbarch
*);
77 /* Convenience macro for allocting typesafe memory. */
80 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
84 /* Non-zero if we want to trace architecture code. */
87 #define GDBARCH_DEBUG 0
89 int gdbarch_debug
= GDBARCH_DEBUG
;
92 /* Maintain the struct gdbarch object */
96 /* basic architectural information */
97 const struct bfd_arch_info
* bfd_arch_info
;
100 /* target specific vector. */
101 struct gdbarch_tdep
*tdep
;
102 gdbarch_dump_tdep_ftype
*dump_tdep
;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap
*swap
;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype
*read_pc
;
149 gdbarch_write_pc_ftype
*write_pc
;
150 gdbarch_read_fp_ftype
*read_fp
;
151 gdbarch_write_fp_ftype
*write_fp
;
152 gdbarch_read_sp_ftype
*read_sp
;
153 gdbarch_write_sp_ftype
*write_sp
;
154 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
155 gdbarch_register_read_ftype
*register_read
;
156 gdbarch_register_write_ftype
*register_write
;
165 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
166 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
167 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
168 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
169 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
170 gdbarch_register_name_ftype
*register_name
;
173 gdbarch_register_byte_ftype
*register_byte
;
174 gdbarch_register_raw_size_ftype
*register_raw_size
;
175 int max_register_raw_size
;
176 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
177 int max_register_virtual_size
;
178 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
179 gdbarch_do_registers_info_ftype
*do_registers_info
;
180 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
181 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
182 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
183 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
184 int use_generic_dummy_frames
;
185 int call_dummy_location
;
186 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
187 CORE_ADDR call_dummy_start_offset
;
188 CORE_ADDR call_dummy_breakpoint_offset
;
189 int call_dummy_breakpoint_offset_p
;
190 int call_dummy_length
;
191 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
193 LONGEST
* call_dummy_words
;
194 int sizeof_call_dummy_words
;
195 int call_dummy_stack_adjust_p
;
196 int call_dummy_stack_adjust
;
197 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
198 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
199 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
200 int believe_pcc_promotion
;
201 int believe_pcc_promotion_type
;
202 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
203 gdbarch_get_saved_register_ftype
*get_saved_register
;
204 gdbarch_register_convertible_ftype
*register_convertible
;
205 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
206 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
207 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
208 gdbarch_store_pseudo_register_ftype
*store_pseudo_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_extract_return_value_ftype
*extract_return_value
;
214 gdbarch_push_arguments_ftype
*push_arguments
;
215 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
216 gdbarch_push_return_address_ftype
*push_return_address
;
217 gdbarch_pop_frame_ftype
*pop_frame
;
218 gdbarch_store_struct_return_ftype
*store_struct_return
;
219 gdbarch_store_return_value_ftype
*store_return_value
;
220 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
221 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
222 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
223 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
224 gdbarch_skip_prologue_ftype
*skip_prologue
;
225 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
226 gdbarch_inner_than_ftype
*inner_than
;
227 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
228 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
229 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
230 CORE_ADDR decr_pc_after_break
;
231 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
232 CORE_ADDR function_start_offset
;
233 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
234 CORE_ADDR frame_args_skip
;
235 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
236 gdbarch_frame_chain_ftype
*frame_chain
;
237 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
238 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
239 gdbarch_frame_args_address_ftype
*frame_args_address
;
240 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
241 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
242 gdbarch_frame_num_args_ftype
*frame_num_args
;
243 gdbarch_stack_align_ftype
*stack_align
;
244 int extra_stack_alignment_needed
;
245 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
246 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
248 const struct floatformat
* float_format
;
249 const struct floatformat
* double_format
;
250 const struct floatformat
* long_double_format
;
251 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
252 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
253 gdbarch_software_single_step_ftype
*software_single_step
;
254 gdbarch_print_insn_ftype
*print_insn
;
255 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
256 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
257 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
261 /* The default architecture uses host values (for want of a better
264 extern const struct bfd_arch_info bfd_default_arch_struct
;
266 struct gdbarch startup_gdbarch
=
268 /* basic architecture information */
269 &bfd_default_arch_struct
,
271 /* target specific vector and its dump routine */
273 /*per-architecture data-pointers and swap regions */
275 /* Multi-arch values */
279 8 * sizeof (LONGEST
),
282 8 * sizeof (long double),
342 generic_get_saved_register
,
397 /* startup_gdbarch() */
400 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
402 /* Do any initialization needed for a non-multiarch configuration
403 after the _initialize_MODULE functions have been run. */
405 initialize_non_multiarch ()
407 alloc_gdbarch_data (&startup_gdbarch
);
408 init_gdbarch_data (&startup_gdbarch
);
412 /* Create a new ``struct gdbarch'' based on information provided by
413 ``struct gdbarch_info''. */
416 gdbarch_alloc (const struct gdbarch_info
*info
,
417 struct gdbarch_tdep
*tdep
)
419 /* NOTE: The new architecture variable is named ``current_gdbarch''
420 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
421 the current local architecture and not the previous global
422 architecture. This ensures that the new architectures initial
423 values are not influenced by the previous architecture. Once
424 everything is parameterised with gdbarch, this will go away. */
425 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
426 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
428 alloc_gdbarch_data (current_gdbarch
);
430 current_gdbarch
->tdep
= tdep
;
432 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
433 current_gdbarch
->byte_order
= info
->byte_order
;
435 /* Force the explicit initialization of these. */
436 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
437 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
438 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
439 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
440 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
441 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
442 current_gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
443 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
444 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
445 current_gdbarch
->read_pc
= generic_target_read_pc
;
446 current_gdbarch
->write_pc
= generic_target_write_pc
;
447 current_gdbarch
->read_fp
= generic_target_read_fp
;
448 current_gdbarch
->write_fp
= generic_target_write_fp
;
449 current_gdbarch
->read_sp
= generic_target_read_sp
;
450 current_gdbarch
->write_sp
= generic_target_write_sp
;
451 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
452 current_gdbarch
->num_regs
= -1;
453 current_gdbarch
->sp_regnum
= -1;
454 current_gdbarch
->fp_regnum
= -1;
455 current_gdbarch
->pc_regnum
= -1;
456 current_gdbarch
->fp0_regnum
= -1;
457 current_gdbarch
->npc_regnum
= -1;
458 current_gdbarch
->nnpc_regnum
= -1;
459 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
460 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
461 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
462 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
463 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
464 current_gdbarch
->register_name
= legacy_register_name
;
465 current_gdbarch
->register_size
= -1;
466 current_gdbarch
->register_bytes
= -1;
467 current_gdbarch
->max_register_raw_size
= -1;
468 current_gdbarch
->max_register_virtual_size
= -1;
469 current_gdbarch
->do_registers_info
= do_registers_info
;
470 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
471 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
472 current_gdbarch
->cannot_store_register
= cannot_register_not
;
473 current_gdbarch
->use_generic_dummy_frames
= -1;
474 current_gdbarch
->call_dummy_start_offset
= -1;
475 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
476 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
477 current_gdbarch
->call_dummy_length
= -1;
478 current_gdbarch
->call_dummy_p
= -1;
479 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
480 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
481 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
482 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
483 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
484 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
485 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
486 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
487 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
488 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
489 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
490 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
491 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
492 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
493 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
494 current_gdbarch
->decr_pc_after_break
= -1;
495 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
496 current_gdbarch
->function_start_offset
= -1;
497 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
498 current_gdbarch
->frame_args_skip
= -1;
499 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
500 current_gdbarch
->extra_stack_alignment_needed
= 1;
501 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
502 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
503 current_gdbarch
->print_insn
= legacy_print_insn
;
504 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
505 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
506 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
507 /* gdbarch_alloc() */
509 return current_gdbarch
;
513 /* Free a gdbarch struct. This should never happen in normal
514 operation --- once you've created a gdbarch, you keep it around.
515 However, if an architecture's init function encounters an error
516 building the structure, it may need to clean up a partially
517 constructed gdbarch. */
520 gdbarch_free (struct gdbarch
*arch
)
522 gdb_assert (arch
!= NULL
);
523 free_gdbarch_data (arch
);
528 /* Ensure that all values in a GDBARCH are reasonable. */
531 verify_gdbarch (struct gdbarch
*gdbarch
)
534 struct cleanup
*cleanups
;
537 /* Only perform sanity checks on a multi-arch target. */
540 log
= mem_fileopen ();
541 cleanups
= make_cleanup_ui_file_delete (log
);
543 if (gdbarch
->byte_order
== 0)
544 fprintf_unfiltered (log
, "\n\tbyte-order");
545 if (gdbarch
->bfd_arch_info
== NULL
)
546 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
547 /* Check those that need to be defined for the given multi-arch level. */
548 /* Skip verify of short_bit, invalid_p == 0 */
549 /* Skip verify of int_bit, invalid_p == 0 */
550 /* Skip verify of long_bit, invalid_p == 0 */
551 /* Skip verify of long_long_bit, invalid_p == 0 */
552 /* Skip verify of float_bit, invalid_p == 0 */
553 /* Skip verify of double_bit, invalid_p == 0 */
554 /* Skip verify of long_double_bit, invalid_p == 0 */
555 /* Skip verify of ptr_bit, invalid_p == 0 */
556 if (gdbarch
->addr_bit
== 0)
557 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
558 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
559 /* Skip verify of ieee_float, invalid_p == 0 */
560 /* Skip verify of read_pc, invalid_p == 0 */
561 /* Skip verify of write_pc, invalid_p == 0 */
562 /* Skip verify of read_fp, invalid_p == 0 */
563 /* Skip verify of write_fp, invalid_p == 0 */
564 /* Skip verify of read_sp, invalid_p == 0 */
565 /* Skip verify of write_sp, invalid_p == 0 */
566 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
567 /* Skip verify of register_read, has predicate */
568 /* Skip verify of register_write, has predicate */
569 if ((GDB_MULTI_ARCH
>= 2)
570 && (gdbarch
->num_regs
== -1))
571 fprintf_unfiltered (log
, "\n\tnum_regs");
572 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
573 if ((GDB_MULTI_ARCH
>= 2)
574 && (gdbarch
->sp_regnum
== -1))
575 fprintf_unfiltered (log
, "\n\tsp_regnum");
576 if ((GDB_MULTI_ARCH
>= 2)
577 && (gdbarch
->fp_regnum
== -1))
578 fprintf_unfiltered (log
, "\n\tfp_regnum");
579 if ((GDB_MULTI_ARCH
>= 2)
580 && (gdbarch
->pc_regnum
== -1))
581 fprintf_unfiltered (log
, "\n\tpc_regnum");
582 /* Skip verify of fp0_regnum, invalid_p == 0 */
583 /* Skip verify of npc_regnum, invalid_p == 0 */
584 /* Skip verify of nnpc_regnum, invalid_p == 0 */
585 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
586 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
587 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
588 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
589 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
590 /* Skip verify of register_name, invalid_p == 0 */
591 if ((GDB_MULTI_ARCH
>= 2)
592 && (gdbarch
->register_size
== -1))
593 fprintf_unfiltered (log
, "\n\tregister_size");
594 if ((GDB_MULTI_ARCH
>= 2)
595 && (gdbarch
->register_bytes
== -1))
596 fprintf_unfiltered (log
, "\n\tregister_bytes");
597 if ((GDB_MULTI_ARCH
>= 2)
598 && (gdbarch
->register_byte
== 0))
599 fprintf_unfiltered (log
, "\n\tregister_byte");
600 if ((GDB_MULTI_ARCH
>= 2)
601 && (gdbarch
->register_raw_size
== 0))
602 fprintf_unfiltered (log
, "\n\tregister_raw_size");
603 if ((GDB_MULTI_ARCH
>= 2)
604 && (gdbarch
->max_register_raw_size
== -1))
605 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
606 if ((GDB_MULTI_ARCH
>= 2)
607 && (gdbarch
->register_virtual_size
== 0))
608 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
609 if ((GDB_MULTI_ARCH
>= 2)
610 && (gdbarch
->max_register_virtual_size
== -1))
611 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
612 if ((GDB_MULTI_ARCH
>= 2)
613 && (gdbarch
->register_virtual_type
== 0))
614 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
615 /* Skip verify of do_registers_info, invalid_p == 0 */
616 /* Skip verify of register_sim_regno, invalid_p == 0 */
617 /* Skip verify of register_bytes_ok, has predicate */
618 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
619 /* Skip verify of cannot_store_register, invalid_p == 0 */
620 if ((GDB_MULTI_ARCH
>= 1)
621 && (gdbarch
->use_generic_dummy_frames
== -1))
622 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
623 if ((GDB_MULTI_ARCH
>= 1)
624 && (gdbarch
->call_dummy_location
== 0))
625 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
626 if ((GDB_MULTI_ARCH
>= 2)
627 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
628 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
629 if ((GDB_MULTI_ARCH
>= 2)
630 && (gdbarch
->call_dummy_start_offset
== -1))
631 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
632 if ((GDB_MULTI_ARCH
>= 2)
633 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
634 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
635 if ((GDB_MULTI_ARCH
>= 1)
636 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
637 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
638 if ((GDB_MULTI_ARCH
>= 2)
639 && (gdbarch
->call_dummy_length
== -1))
640 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
641 if ((GDB_MULTI_ARCH
>= 1)
642 && (gdbarch
->pc_in_call_dummy
== 0))
643 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
644 if ((GDB_MULTI_ARCH
>= 1)
645 && (gdbarch
->call_dummy_p
== -1))
646 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
647 /* Skip verify of call_dummy_words, invalid_p == 0 */
648 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
649 if ((GDB_MULTI_ARCH
>= 1)
650 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
651 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
652 if ((GDB_MULTI_ARCH
>= 2)
653 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
654 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
655 if ((GDB_MULTI_ARCH
>= 2)
656 && (gdbarch
->fix_call_dummy
== 0))
657 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
658 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
659 /* Skip verify of init_frame_pc, invalid_p == 0 */
660 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
661 if ((GDB_MULTI_ARCH
>= 1)
662 && (gdbarch
->get_saved_register
== 0))
663 fprintf_unfiltered (log
, "\n\tget_saved_register");
664 /* Skip verify of register_convertible, invalid_p == 0 */
665 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
666 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
667 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
668 /* Skip verify of store_pseudo_register, invalid_p == 0 */
669 /* Skip verify of pointer_to_address, invalid_p == 0 */
670 /* Skip verify of address_to_pointer, invalid_p == 0 */
671 /* Skip verify of integer_to_address, has predicate */
672 /* Skip verify of return_value_on_stack, invalid_p == 0 */
673 if ((GDB_MULTI_ARCH
>= 2)
674 && (gdbarch
->extract_return_value
== 0))
675 fprintf_unfiltered (log
, "\n\textract_return_value");
676 if ((GDB_MULTI_ARCH
>= 1)
677 && (gdbarch
->push_arguments
== 0))
678 fprintf_unfiltered (log
, "\n\tpush_arguments");
679 if ((GDB_MULTI_ARCH
>= 2)
680 && (gdbarch
->push_dummy_frame
== 0))
681 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
682 /* Skip verify of push_return_address, has predicate */
683 if ((GDB_MULTI_ARCH
>= 2)
684 && (gdbarch
->pop_frame
== 0))
685 fprintf_unfiltered (log
, "\n\tpop_frame");
686 if ((GDB_MULTI_ARCH
>= 2)
687 && (gdbarch
->store_struct_return
== 0))
688 fprintf_unfiltered (log
, "\n\tstore_struct_return");
689 if ((GDB_MULTI_ARCH
>= 2)
690 && (gdbarch
->store_return_value
== 0))
691 fprintf_unfiltered (log
, "\n\tstore_return_value");
692 /* Skip verify of extract_struct_value_address, has predicate */
693 /* Skip verify of use_struct_convention, invalid_p == 0 */
694 if ((GDB_MULTI_ARCH
>= 2)
695 && (gdbarch
->frame_init_saved_regs
== 0))
696 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
697 /* Skip verify of init_extra_frame_info, has predicate */
698 if ((GDB_MULTI_ARCH
>= 2)
699 && (gdbarch
->skip_prologue
== 0))
700 fprintf_unfiltered (log
, "\n\tskip_prologue");
701 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
702 if ((GDB_MULTI_ARCH
>= 2)
703 && (gdbarch
->inner_than
== 0))
704 fprintf_unfiltered (log
, "\n\tinner_than");
705 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
706 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
707 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
708 if ((GDB_MULTI_ARCH
>= 2)
709 && (gdbarch
->decr_pc_after_break
== -1))
710 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
711 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
712 if ((GDB_MULTI_ARCH
>= 2)
713 && (gdbarch
->function_start_offset
== -1))
714 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
715 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
716 if ((GDB_MULTI_ARCH
>= 2)
717 && (gdbarch
->frame_args_skip
== -1))
718 fprintf_unfiltered (log
, "\n\tframe_args_skip");
719 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
720 if ((GDB_MULTI_ARCH
>= 2)
721 && (gdbarch
->frame_chain
== 0))
722 fprintf_unfiltered (log
, "\n\tframe_chain");
723 if ((GDB_MULTI_ARCH
>= 1)
724 && (gdbarch
->frame_chain_valid
== 0))
725 fprintf_unfiltered (log
, "\n\tframe_chain_valid");
726 if ((GDB_MULTI_ARCH
>= 2)
727 && (gdbarch
->frame_saved_pc
== 0))
728 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
729 if ((GDB_MULTI_ARCH
>= 2)
730 && (gdbarch
->frame_args_address
== 0))
731 fprintf_unfiltered (log
, "\n\tframe_args_address");
732 if ((GDB_MULTI_ARCH
>= 2)
733 && (gdbarch
->frame_locals_address
== 0))
734 fprintf_unfiltered (log
, "\n\tframe_locals_address");
735 if ((GDB_MULTI_ARCH
>= 2)
736 && (gdbarch
->saved_pc_after_call
== 0))
737 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
738 if ((GDB_MULTI_ARCH
>= 2)
739 && (gdbarch
->frame_num_args
== 0))
740 fprintf_unfiltered (log
, "\n\tframe_num_args");
741 /* Skip verify of stack_align, has predicate */
742 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
743 /* Skip verify of reg_struct_has_addr, has predicate */
744 /* Skip verify of save_dummy_frame_tos, has predicate */
745 if (gdbarch
->float_format
== 0)
746 gdbarch
->float_format
= default_float_format (gdbarch
);
747 if (gdbarch
->double_format
== 0)
748 gdbarch
->double_format
= default_double_format (gdbarch
);
749 if (gdbarch
->long_double_format
== 0)
750 gdbarch
->long_double_format
= &floatformat_unknown
;
751 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
752 /* Skip verify of addr_bits_remove, invalid_p == 0 */
753 /* Skip verify of software_single_step, has predicate */
754 /* Skip verify of print_insn, invalid_p == 0 */
755 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
756 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
757 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
758 buf
= ui_file_xstrdup (log
, &dummy
);
759 make_cleanup (xfree
, buf
);
760 if (strlen (buf
) > 0)
761 internal_error (__FILE__
, __LINE__
,
762 "verify_gdbarch: the following are invalid ...%s",
764 do_cleanups (cleanups
);
768 /* Print out the details of the current architecture. */
770 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
771 just happens to match the global variable ``current_gdbarch''. That
772 way macros refering to that variable get the local and not the global
773 version - ulgh. Once everything is parameterised with gdbarch, this
777 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
779 fprintf_unfiltered (file
,
780 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
783 fprintf_unfiltered (file
,
784 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
785 (long) current_gdbarch
->in_function_epilogue_p
);
787 fprintf_unfiltered (file
,
788 "gdbarch_dump: register_read = 0x%08lx\n",
789 (long) current_gdbarch
->register_read
);
791 fprintf_unfiltered (file
,
792 "gdbarch_dump: register_write = 0x%08lx\n",
793 (long) current_gdbarch
->register_write
);
794 #ifdef ADDRESS_TO_POINTER
796 /* Macro might contain `[{}]' when not multi-arch */
797 fprintf_unfiltered (file
,
798 "gdbarch_dump: %s # %s\n",
799 "ADDRESS_TO_POINTER(type, buf, addr)",
800 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
803 fprintf_unfiltered (file
,
804 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
805 (long) current_gdbarch
->address_to_pointer
806 /*ADDRESS_TO_POINTER ()*/);
808 #ifdef ADDR_BITS_REMOVE
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: %s # %s\n",
811 "ADDR_BITS_REMOVE(addr)",
812 XSTRING (ADDR_BITS_REMOVE (addr
)));
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
816 (long) current_gdbarch
->addr_bits_remove
817 /*ADDR_BITS_REMOVE ()*/);
819 #ifdef BELIEVE_PCC_PROMOTION
820 fprintf_unfiltered (file
,
821 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
822 XSTRING (BELIEVE_PCC_PROMOTION
));
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
825 (long) BELIEVE_PCC_PROMOTION
);
827 #ifdef BELIEVE_PCC_PROMOTION_TYPE
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
830 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
833 (long) BELIEVE_PCC_PROMOTION_TYPE
);
835 #ifdef BREAKPOINT_FROM_PC
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: %s # %s\n",
838 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
839 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
843 (long) current_gdbarch
->breakpoint_from_pc
844 /*BREAKPOINT_FROM_PC ()*/);
846 #ifdef CALL_DUMMY_ADDRESS
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: %s # %s\n",
849 "CALL_DUMMY_ADDRESS()",
850 XSTRING (CALL_DUMMY_ADDRESS ()));
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
854 (long) current_gdbarch
->call_dummy_address
855 /*CALL_DUMMY_ADDRESS ()*/);
857 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
860 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
861 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
862 fprintf_unfiltered (file
,
863 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
864 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
866 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
869 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
872 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
874 #ifdef CALL_DUMMY_LENGTH
875 fprintf_unfiltered (file
,
876 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
877 XSTRING (CALL_DUMMY_LENGTH
));
878 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
881 (long) CALL_DUMMY_LENGTH
);
883 #ifdef CALL_DUMMY_LOCATION
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
886 XSTRING (CALL_DUMMY_LOCATION
));
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
889 (long) CALL_DUMMY_LOCATION
);
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: CALL_DUMMY_P # %s\n",
894 XSTRING (CALL_DUMMY_P
));
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
897 (long) CALL_DUMMY_P
);
899 #ifdef CALL_DUMMY_STACK_ADJUST
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
902 XSTRING (CALL_DUMMY_STACK_ADJUST
));
903 if (CALL_DUMMY_STACK_ADJUST_P
)
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
906 (long) CALL_DUMMY_STACK_ADJUST
);
908 #ifdef CALL_DUMMY_STACK_ADJUST_P
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
911 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
914 (long) CALL_DUMMY_STACK_ADJUST_P
);
916 #ifdef CALL_DUMMY_START_OFFSET
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
919 XSTRING (CALL_DUMMY_START_OFFSET
));
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
922 (long) CALL_DUMMY_START_OFFSET
);
924 #ifdef CALL_DUMMY_WORDS
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
927 XSTRING (CALL_DUMMY_WORDS
));
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
930 (long) CALL_DUMMY_WORDS
);
932 #ifdef CANNOT_FETCH_REGISTER
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: %s # %s\n",
935 "CANNOT_FETCH_REGISTER(regnum)",
936 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
940 (long) current_gdbarch
->cannot_fetch_register
941 /*CANNOT_FETCH_REGISTER ()*/);
943 #ifdef CANNOT_STORE_REGISTER
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: %s # %s\n",
946 "CANNOT_STORE_REGISTER(regnum)",
947 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
951 (long) current_gdbarch
->cannot_store_register
952 /*CANNOT_STORE_REGISTER ()*/);
954 #ifdef COERCE_FLOAT_TO_DOUBLE
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: %s # %s\n",
957 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
958 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
962 (long) current_gdbarch
->coerce_float_to_double
963 /*COERCE_FLOAT_TO_DOUBLE ()*/);
965 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: %s # %s\n",
968 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
969 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
973 (long) current_gdbarch
->convert_from_func_ptr_addr
974 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
976 #ifdef DECR_PC_AFTER_BREAK
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
979 XSTRING (DECR_PC_AFTER_BREAK
));
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
982 (long) DECR_PC_AFTER_BREAK
);
984 #ifdef DO_REGISTERS_INFO
986 /* Macro might contain `[{}]' when not multi-arch */
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: %s # %s\n",
989 "DO_REGISTERS_INFO(reg_nr, fpregs)",
990 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
995 (long) current_gdbarch
->do_registers_info
996 /*DO_REGISTERS_INFO ()*/);
998 #ifdef DWARF2_REG_TO_REGNUM
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: %s # %s\n",
1001 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1002 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1006 (long) current_gdbarch
->dwarf2_reg_to_regnum
1007 /*DWARF2_REG_TO_REGNUM ()*/);
1009 #ifdef DWARF_REG_TO_REGNUM
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: %s # %s\n",
1012 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1013 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1017 (long) current_gdbarch
->dwarf_reg_to_regnum
1018 /*DWARF_REG_TO_REGNUM ()*/);
1020 #ifdef ECOFF_REG_TO_REGNUM
1021 fprintf_unfiltered (file
,
1022 "gdbarch_dump: %s # %s\n",
1023 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1024 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1028 (long) current_gdbarch
->ecoff_reg_to_regnum
1029 /*ECOFF_REG_TO_REGNUM ()*/);
1031 #ifdef EXTRACT_RETURN_VALUE
1033 /* Macro might contain `[{}]' when not multi-arch */
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: %s # %s\n",
1036 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1037 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1042 (long) current_gdbarch
->extract_return_value
1043 /*EXTRACT_RETURN_VALUE ()*/);
1045 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: %s # %s\n",
1048 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1049 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1053 (long) current_gdbarch
->extract_struct_value_address
1054 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1056 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1057 fprintf_unfiltered (file
,
1058 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1059 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1062 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
1064 #ifdef FETCH_PSEUDO_REGISTER
1066 /* Macro might contain `[{}]' when not multi-arch */
1067 fprintf_unfiltered (file
,
1068 "gdbarch_dump: %s # %s\n",
1069 "FETCH_PSEUDO_REGISTER(regnum)",
1070 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1075 (long) current_gdbarch
->fetch_pseudo_register
1076 /*FETCH_PSEUDO_REGISTER ()*/);
1078 #ifdef FIX_CALL_DUMMY
1080 /* Macro might contain `[{}]' when not multi-arch */
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: %s # %s\n",
1083 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1084 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1089 (long) current_gdbarch
->fix_call_dummy
1090 /*FIX_CALL_DUMMY ()*/);
1093 fprintf_unfiltered (file
,
1094 "gdbarch_dump: FP0_REGNUM # %s\n",
1095 XSTRING (FP0_REGNUM
));
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: FP0_REGNUM = %ld\n",
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: FP_REGNUM # %s\n",
1103 XSTRING (FP_REGNUM
));
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: FP_REGNUM = %ld\n",
1108 #ifdef FRAMELESS_FUNCTION_INVOCATION
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: %s # %s\n",
1111 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1112 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1114 fprintf_unfiltered (file
,
1115 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1116 (long) current_gdbarch
->frameless_function_invocation
1117 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1119 #ifdef FRAME_ARGS_ADDRESS
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: %s # %s\n",
1122 "FRAME_ARGS_ADDRESS(fi)",
1123 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1127 (long) current_gdbarch
->frame_args_address
1128 /*FRAME_ARGS_ADDRESS ()*/);
1130 #ifdef FRAME_ARGS_SKIP
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1133 XSTRING (FRAME_ARGS_SKIP
));
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1136 (long) FRAME_ARGS_SKIP
);
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: %s # %s\n",
1141 "FRAME_CHAIN(frame)",
1142 XSTRING (FRAME_CHAIN (frame
)));
1144 fprintf_unfiltered (file
,
1145 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1146 (long) current_gdbarch
->frame_chain
1147 /*FRAME_CHAIN ()*/);
1149 #ifdef FRAME_CHAIN_VALID
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: %s # %s\n",
1152 "FRAME_CHAIN_VALID(chain, thisframe)",
1153 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1157 (long) current_gdbarch
->frame_chain_valid
1158 /*FRAME_CHAIN_VALID ()*/);
1160 #ifdef FRAME_INIT_SAVED_REGS
1162 /* Macro might contain `[{}]' when not multi-arch */
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: %s # %s\n",
1165 "FRAME_INIT_SAVED_REGS(frame)",
1166 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1171 (long) current_gdbarch
->frame_init_saved_regs
1172 /*FRAME_INIT_SAVED_REGS ()*/);
1174 #ifdef FRAME_LOCALS_ADDRESS
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: %s # %s\n",
1177 "FRAME_LOCALS_ADDRESS(fi)",
1178 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1182 (long) current_gdbarch
->frame_locals_address
1183 /*FRAME_LOCALS_ADDRESS ()*/);
1185 #ifdef FRAME_NUM_ARGS
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: %s # %s\n",
1188 "FRAME_NUM_ARGS(frame)",
1189 XSTRING (FRAME_NUM_ARGS (frame
)));
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1193 (long) current_gdbarch
->frame_num_args
1194 /*FRAME_NUM_ARGS ()*/);
1196 #ifdef FRAME_SAVED_PC
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: %s # %s\n",
1199 "FRAME_SAVED_PC(fi)",
1200 XSTRING (FRAME_SAVED_PC (fi
)));
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1204 (long) current_gdbarch
->frame_saved_pc
1205 /*FRAME_SAVED_PC ()*/);
1207 #ifdef FUNCTION_START_OFFSET
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1210 XSTRING (FUNCTION_START_OFFSET
));
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1213 (long) FUNCTION_START_OFFSET
);
1215 #ifdef GET_SAVED_REGISTER
1217 /* Macro might contain `[{}]' when not multi-arch */
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: %s # %s\n",
1220 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1221 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1226 (long) current_gdbarch
->get_saved_register
1227 /*GET_SAVED_REGISTER ()*/);
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: IEEE_FLOAT # %s\n",
1232 XSTRING (IEEE_FLOAT
));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1237 #ifdef INIT_EXTRA_FRAME_INFO
1239 /* Macro might contain `[{}]' when not multi-arch */
1240 fprintf_unfiltered (file
,
1241 "gdbarch_dump: %s # %s\n",
1242 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1243 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1248 (long) current_gdbarch
->init_extra_frame_info
1249 /*INIT_EXTRA_FRAME_INFO ()*/);
1251 #ifdef INIT_FRAME_PC
1253 /* Macro might contain `[{}]' when not multi-arch */
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: %s # %s\n",
1256 "INIT_FRAME_PC(fromleaf, prev)",
1257 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1262 (long) current_gdbarch
->init_frame_pc
1263 /*INIT_FRAME_PC ()*/);
1265 #ifdef INIT_FRAME_PC_FIRST
1267 /* Macro might contain `[{}]' when not multi-arch */
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: %s # %s\n",
1270 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1271 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1276 (long) current_gdbarch
->init_frame_pc_first
1277 /*INIT_FRAME_PC_FIRST ()*/);
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: %s # %s\n",
1282 "INNER_THAN(lhs, rhs)",
1283 XSTRING (INNER_THAN (lhs
, rhs
)));
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1287 (long) current_gdbarch
->inner_than
1290 #ifdef INTEGER_TO_ADDRESS
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: %s # %s\n",
1293 "INTEGER_TO_ADDRESS(type, buf)",
1294 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1296 fprintf_unfiltered (file
,
1297 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1298 (long) current_gdbarch
->integer_to_address
1299 /*INTEGER_TO_ADDRESS ()*/);
1301 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: %s # %s\n",
1304 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1305 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1309 (long) current_gdbarch
->in_solib_call_trampoline
1310 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1312 #ifdef MAX_REGISTER_RAW_SIZE
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1315 XSTRING (MAX_REGISTER_RAW_SIZE
));
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1318 (long) MAX_REGISTER_RAW_SIZE
);
1320 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1323 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1326 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1328 #ifdef MEMORY_INSERT_BREAKPOINT
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: %s # %s\n",
1331 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1332 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1336 (long) current_gdbarch
->memory_insert_breakpoint
1337 /*MEMORY_INSERT_BREAKPOINT ()*/);
1339 #ifdef MEMORY_REMOVE_BREAKPOINT
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: %s # %s\n",
1342 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1343 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1345 fprintf_unfiltered (file
,
1346 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1347 (long) current_gdbarch
->memory_remove_breakpoint
1348 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: NNPC_REGNUM # %s\n",
1353 XSTRING (NNPC_REGNUM
));
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1356 (long) NNPC_REGNUM
);
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: NPC_REGNUM # %s\n",
1361 XSTRING (NPC_REGNUM
));
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: NPC_REGNUM = %ld\n",
1366 #ifdef NUM_PSEUDO_REGS
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1369 XSTRING (NUM_PSEUDO_REGS
));
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1372 (long) NUM_PSEUDO_REGS
);
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: NUM_REGS # %s\n",
1377 XSTRING (NUM_REGS
));
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: NUM_REGS = %ld\n",
1382 #ifdef PARM_BOUNDARY
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1385 XSTRING (PARM_BOUNDARY
));
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1388 (long) PARM_BOUNDARY
);
1390 #ifdef PC_IN_CALL_DUMMY
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: %s # %s\n",
1393 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1394 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1398 (long) current_gdbarch
->pc_in_call_dummy
1399 /*PC_IN_CALL_DUMMY ()*/);
1402 fprintf_unfiltered (file
,
1403 "gdbarch_dump: PC_REGNUM # %s\n",
1404 XSTRING (PC_REGNUM
));
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: PC_REGNUM = %ld\n",
1409 #ifdef POINTER_TO_ADDRESS
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: %s # %s\n",
1412 "POINTER_TO_ADDRESS(type, buf)",
1413 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1415 fprintf_unfiltered (file
,
1416 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1417 (long) current_gdbarch
->pointer_to_address
1418 /*POINTER_TO_ADDRESS ()*/);
1422 /* Macro might contain `[{}]' when not multi-arch */
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: %s # %s\n",
1426 XSTRING (POP_FRAME (-)));
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1431 (long) current_gdbarch
->pop_frame
1434 #ifdef PREPARE_TO_PROCEED
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: %s # %s\n",
1437 "PREPARE_TO_PROCEED(select_it)",
1438 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1442 (long) current_gdbarch
->prepare_to_proceed
1443 /*PREPARE_TO_PROCEED ()*/);
1445 #ifdef PROLOGUE_FRAMELESS_P
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: %s # %s\n",
1448 "PROLOGUE_FRAMELESS_P(ip)",
1449 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1453 (long) current_gdbarch
->prologue_frameless_p
1454 /*PROLOGUE_FRAMELESS_P ()*/);
1456 #ifdef PUSH_ARGUMENTS
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: %s # %s\n",
1459 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1460 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1464 (long) current_gdbarch
->push_arguments
1465 /*PUSH_ARGUMENTS ()*/);
1467 #ifdef PUSH_DUMMY_FRAME
1469 /* Macro might contain `[{}]' when not multi-arch */
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: %s # %s\n",
1472 "PUSH_DUMMY_FRAME(-)",
1473 XSTRING (PUSH_DUMMY_FRAME (-)));
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1478 (long) current_gdbarch
->push_dummy_frame
1479 /*PUSH_DUMMY_FRAME ()*/);
1481 #ifdef PUSH_RETURN_ADDRESS
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: %s # %s\n",
1484 "PUSH_RETURN_ADDRESS(pc, sp)",
1485 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1489 (long) current_gdbarch
->push_return_address
1490 /*PUSH_RETURN_ADDRESS ()*/);
1492 #ifdef REGISTER_BYTE
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: %s # %s\n",
1495 "REGISTER_BYTE(reg_nr)",
1496 XSTRING (REGISTER_BYTE (reg_nr
)));
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1500 (long) current_gdbarch
->register_byte
1501 /*REGISTER_BYTE ()*/);
1503 #ifdef REGISTER_BYTES
1504 fprintf_unfiltered (file
,
1505 "gdbarch_dump: REGISTER_BYTES # %s\n",
1506 XSTRING (REGISTER_BYTES
));
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1509 (long) REGISTER_BYTES
);
1511 #ifdef REGISTER_BYTES_OK
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: %s # %s\n",
1514 "REGISTER_BYTES_OK(nr_bytes)",
1515 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1519 (long) current_gdbarch
->register_bytes_ok
1520 /*REGISTER_BYTES_OK ()*/);
1522 #ifdef REGISTER_CONVERTIBLE
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: %s # %s\n",
1525 "REGISTER_CONVERTIBLE(nr)",
1526 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1530 (long) current_gdbarch
->register_convertible
1531 /*REGISTER_CONVERTIBLE ()*/);
1533 #ifdef REGISTER_CONVERT_TO_RAW
1535 /* Macro might contain `[{}]' when not multi-arch */
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: %s # %s\n",
1538 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1539 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1544 (long) current_gdbarch
->register_convert_to_raw
1545 /*REGISTER_CONVERT_TO_RAW ()*/);
1547 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1549 /* Macro might contain `[{}]' when not multi-arch */
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: %s # %s\n",
1552 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1553 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1556 fprintf_unfiltered (file
,
1557 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1558 (long) current_gdbarch
->register_convert_to_virtual
1559 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1561 #ifdef REGISTER_NAME
1562 fprintf_unfiltered (file
,
1563 "gdbarch_dump: %s # %s\n",
1564 "REGISTER_NAME(regnr)",
1565 XSTRING (REGISTER_NAME (regnr
)));
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1569 (long) current_gdbarch
->register_name
1570 /*REGISTER_NAME ()*/);
1572 #ifdef REGISTER_RAW_SIZE
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: %s # %s\n",
1575 "REGISTER_RAW_SIZE(reg_nr)",
1576 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1578 fprintf_unfiltered (file
,
1579 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1580 (long) current_gdbarch
->register_raw_size
1581 /*REGISTER_RAW_SIZE ()*/);
1583 #ifdef REGISTER_SIM_REGNO
1584 fprintf_unfiltered (file
,
1585 "gdbarch_dump: %s # %s\n",
1586 "REGISTER_SIM_REGNO(reg_nr)",
1587 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1591 (long) current_gdbarch
->register_sim_regno
1592 /*REGISTER_SIM_REGNO ()*/);
1594 #ifdef REGISTER_SIZE
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: REGISTER_SIZE # %s\n",
1597 XSTRING (REGISTER_SIZE
));
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1600 (long) REGISTER_SIZE
);
1602 #ifdef REGISTER_VIRTUAL_SIZE
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: %s # %s\n",
1605 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1606 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1610 (long) current_gdbarch
->register_virtual_size
1611 /*REGISTER_VIRTUAL_SIZE ()*/);
1613 #ifdef REGISTER_VIRTUAL_TYPE
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: %s # %s\n",
1616 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1617 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1621 (long) current_gdbarch
->register_virtual_type
1622 /*REGISTER_VIRTUAL_TYPE ()*/);
1624 #ifdef REG_STRUCT_HAS_ADDR
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: %s # %s\n",
1627 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1628 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1630 fprintf_unfiltered (file
,
1631 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1632 (long) current_gdbarch
->reg_struct_has_addr
1633 /*REG_STRUCT_HAS_ADDR ()*/);
1635 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1637 /* Macro might contain `[{}]' when not multi-arch */
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: %s # %s\n",
1640 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1641 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1646 (long) current_gdbarch
->remote_translate_xfer_address
1647 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1649 #ifdef RETURN_VALUE_ON_STACK
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: %s # %s\n",
1652 "RETURN_VALUE_ON_STACK(type)",
1653 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1657 (long) current_gdbarch
->return_value_on_stack
1658 /*RETURN_VALUE_ON_STACK ()*/);
1660 #ifdef SAVED_PC_AFTER_CALL
1661 fprintf_unfiltered (file
,
1662 "gdbarch_dump: %s # %s\n",
1663 "SAVED_PC_AFTER_CALL(frame)",
1664 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1666 fprintf_unfiltered (file
,
1667 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1668 (long) current_gdbarch
->saved_pc_after_call
1669 /*SAVED_PC_AFTER_CALL ()*/);
1671 #ifdef SAVE_DUMMY_FRAME_TOS
1673 /* Macro might contain `[{}]' when not multi-arch */
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: %s # %s\n",
1676 "SAVE_DUMMY_FRAME_TOS(sp)",
1677 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1682 (long) current_gdbarch
->save_dummy_frame_tos
1683 /*SAVE_DUMMY_FRAME_TOS ()*/);
1685 #ifdef SDB_REG_TO_REGNUM
1686 fprintf_unfiltered (file
,
1687 "gdbarch_dump: %s # %s\n",
1688 "SDB_REG_TO_REGNUM(sdb_regnr)",
1689 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1693 (long) current_gdbarch
->sdb_reg_to_regnum
1694 /*SDB_REG_TO_REGNUM ()*/);
1696 #ifdef SIZEOF_CALL_DUMMY_WORDS
1697 fprintf_unfiltered (file
,
1698 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1699 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1702 (long) SIZEOF_CALL_DUMMY_WORDS
);
1704 #ifdef SKIP_PROLOGUE
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: %s # %s\n",
1707 "SKIP_PROLOGUE(ip)",
1708 XSTRING (SKIP_PROLOGUE (ip
)));
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1712 (long) current_gdbarch
->skip_prologue
1713 /*SKIP_PROLOGUE ()*/);
1715 #ifdef SKIP_TRAMPOLINE_CODE
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: %s # %s\n",
1718 "SKIP_TRAMPOLINE_CODE(pc)",
1719 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1721 fprintf_unfiltered (file
,
1722 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1723 (long) current_gdbarch
->skip_trampoline_code
1724 /*SKIP_TRAMPOLINE_CODE ()*/);
1726 #ifdef SOFTWARE_SINGLE_STEP
1728 /* Macro might contain `[{}]' when not multi-arch */
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: %s # %s\n",
1731 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1732 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1737 (long) current_gdbarch
->software_single_step
1738 /*SOFTWARE_SINGLE_STEP ()*/);
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: SP_REGNUM # %s\n",
1743 XSTRING (SP_REGNUM
));
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: SP_REGNUM = %ld\n",
1748 #ifdef STAB_REG_TO_REGNUM
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: %s # %s\n",
1751 "STAB_REG_TO_REGNUM(stab_regnr)",
1752 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1756 (long) current_gdbarch
->stab_reg_to_regnum
1757 /*STAB_REG_TO_REGNUM ()*/);
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: %s # %s\n",
1763 XSTRING (STACK_ALIGN (sp
)));
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1767 (long) current_gdbarch
->stack_align
1768 /*STACK_ALIGN ()*/);
1770 #ifdef STORE_PSEUDO_REGISTER
1772 /* Macro might contain `[{}]' when not multi-arch */
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: %s # %s\n",
1775 "STORE_PSEUDO_REGISTER(regnum)",
1776 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1781 (long) current_gdbarch
->store_pseudo_register
1782 /*STORE_PSEUDO_REGISTER ()*/);
1784 #ifdef STORE_RETURN_VALUE
1786 /* Macro might contain `[{}]' when not multi-arch */
1787 fprintf_unfiltered (file
,
1788 "gdbarch_dump: %s # %s\n",
1789 "STORE_RETURN_VALUE(type, valbuf)",
1790 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1795 (long) current_gdbarch
->store_return_value
1796 /*STORE_RETURN_VALUE ()*/);
1798 #ifdef STORE_STRUCT_RETURN
1800 /* Macro might contain `[{}]' when not multi-arch */
1801 fprintf_unfiltered (file
,
1802 "gdbarch_dump: %s # %s\n",
1803 "STORE_STRUCT_RETURN(addr, sp)",
1804 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1807 fprintf_unfiltered (file
,
1808 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1809 (long) current_gdbarch
->store_struct_return
1810 /*STORE_STRUCT_RETURN ()*/);
1812 #ifdef TARGET_ADDR_BIT
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1815 XSTRING (TARGET_ADDR_BIT
));
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1818 (long) TARGET_ADDR_BIT
);
1820 #ifdef TARGET_ARCHITECTURE
1821 fprintf_unfiltered (file
,
1822 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1823 XSTRING (TARGET_ARCHITECTURE
));
1824 if (TARGET_ARCHITECTURE
!= NULL
)
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1827 TARGET_ARCHITECTURE
->printable_name
);
1829 #ifdef TARGET_BFD_VMA_BIT
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1832 XSTRING (TARGET_BFD_VMA_BIT
));
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1835 (long) TARGET_BFD_VMA_BIT
);
1837 #ifdef TARGET_BYTE_ORDER
1838 fprintf_unfiltered (file
,
1839 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1840 XSTRING (TARGET_BYTE_ORDER
));
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1843 (long) TARGET_BYTE_ORDER
);
1845 #ifdef TARGET_DOUBLE_BIT
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1848 XSTRING (TARGET_DOUBLE_BIT
));
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1851 (long) TARGET_DOUBLE_BIT
);
1853 #ifdef TARGET_DOUBLE_FORMAT
1854 fprintf_unfiltered (file
,
1855 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1856 XSTRING (TARGET_DOUBLE_FORMAT
));
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1859 (long) TARGET_DOUBLE_FORMAT
);
1861 #ifdef TARGET_FLOAT_BIT
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1864 XSTRING (TARGET_FLOAT_BIT
));
1865 fprintf_unfiltered (file
,
1866 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1867 (long) TARGET_FLOAT_BIT
);
1869 #ifdef TARGET_FLOAT_FORMAT
1870 fprintf_unfiltered (file
,
1871 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1872 XSTRING (TARGET_FLOAT_FORMAT
));
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1875 (long) TARGET_FLOAT_FORMAT
);
1877 #ifdef TARGET_INT_BIT
1878 fprintf_unfiltered (file
,
1879 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1880 XSTRING (TARGET_INT_BIT
));
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1883 (long) TARGET_INT_BIT
);
1885 #ifdef TARGET_LONG_BIT
1886 fprintf_unfiltered (file
,
1887 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1888 XSTRING (TARGET_LONG_BIT
));
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1891 (long) TARGET_LONG_BIT
);
1893 #ifdef TARGET_LONG_DOUBLE_BIT
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1896 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1899 (long) TARGET_LONG_DOUBLE_BIT
);
1901 #ifdef TARGET_LONG_DOUBLE_FORMAT
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1904 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1905 fprintf_unfiltered (file
,
1906 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1907 (long) TARGET_LONG_DOUBLE_FORMAT
);
1909 #ifdef TARGET_LONG_LONG_BIT
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1912 XSTRING (TARGET_LONG_LONG_BIT
));
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1915 (long) TARGET_LONG_LONG_BIT
);
1917 #ifdef TARGET_PRINT_INSN
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: %s # %s\n",
1920 "TARGET_PRINT_INSN(vma, info)",
1921 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1925 (long) current_gdbarch
->print_insn
1926 /*TARGET_PRINT_INSN ()*/);
1928 #ifdef TARGET_PTR_BIT
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1931 XSTRING (TARGET_PTR_BIT
));
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1934 (long) TARGET_PTR_BIT
);
1936 #ifdef TARGET_READ_FP
1937 fprintf_unfiltered (file
,
1938 "gdbarch_dump: %s # %s\n",
1940 XSTRING (TARGET_READ_FP ()));
1942 fprintf_unfiltered (file
,
1943 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1944 (long) current_gdbarch
->read_fp
1945 /*TARGET_READ_FP ()*/);
1947 #ifdef TARGET_READ_PC
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: %s # %s\n",
1950 "TARGET_READ_PC(ptid)",
1951 XSTRING (TARGET_READ_PC (ptid
)));
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1955 (long) current_gdbarch
->read_pc
1956 /*TARGET_READ_PC ()*/);
1958 #ifdef TARGET_READ_SP
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: %s # %s\n",
1962 XSTRING (TARGET_READ_SP ()));
1964 fprintf_unfiltered (file
,
1965 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1966 (long) current_gdbarch
->read_sp
1967 /*TARGET_READ_SP ()*/);
1969 #ifdef TARGET_SHORT_BIT
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1972 XSTRING (TARGET_SHORT_BIT
));
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1975 (long) TARGET_SHORT_BIT
);
1977 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1979 /* Macro might contain `[{}]' when not multi-arch */
1980 fprintf_unfiltered (file
,
1981 "gdbarch_dump: %s # %s\n",
1982 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1983 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
1988 (long) current_gdbarch
->virtual_frame_pointer
1989 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
1991 #ifdef TARGET_WRITE_FP
1993 /* Macro might contain `[{}]' when not multi-arch */
1994 fprintf_unfiltered (file
,
1995 "gdbarch_dump: %s # %s\n",
1996 "TARGET_WRITE_FP(val)",
1997 XSTRING (TARGET_WRITE_FP (val
)));
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2002 (long) current_gdbarch
->write_fp
2003 /*TARGET_WRITE_FP ()*/);
2005 #ifdef TARGET_WRITE_PC
2007 /* Macro might contain `[{}]' when not multi-arch */
2008 fprintf_unfiltered (file
,
2009 "gdbarch_dump: %s # %s\n",
2010 "TARGET_WRITE_PC(val, ptid)",
2011 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2016 (long) current_gdbarch
->write_pc
2017 /*TARGET_WRITE_PC ()*/);
2019 #ifdef TARGET_WRITE_SP
2021 /* Macro might contain `[{}]' when not multi-arch */
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: %s # %s\n",
2024 "TARGET_WRITE_SP(val)",
2025 XSTRING (TARGET_WRITE_SP (val
)));
2028 fprintf_unfiltered (file
,
2029 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2030 (long) current_gdbarch
->write_sp
2031 /*TARGET_WRITE_SP ()*/);
2033 #ifdef USE_GENERIC_DUMMY_FRAMES
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2036 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2039 (long) USE_GENERIC_DUMMY_FRAMES
);
2041 #ifdef USE_STRUCT_CONVENTION
2042 fprintf_unfiltered (file
,
2043 "gdbarch_dump: %s # %s\n",
2044 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2045 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2047 fprintf_unfiltered (file
,
2048 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2049 (long) current_gdbarch
->use_struct_convention
2050 /*USE_STRUCT_CONVENTION ()*/);
2052 if (current_gdbarch
->dump_tdep
!= NULL
)
2053 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2056 struct gdbarch_tdep
*
2057 gdbarch_tdep (struct gdbarch
*gdbarch
)
2059 if (gdbarch_debug
>= 2)
2060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2061 return gdbarch
->tdep
;
2065 const struct bfd_arch_info
*
2066 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2068 if (gdbarch_debug
>= 2)
2069 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2070 return gdbarch
->bfd_arch_info
;
2074 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2076 if (gdbarch_debug
>= 2)
2077 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2078 return gdbarch
->byte_order
;
2082 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2084 /* Skip verify of short_bit, invalid_p == 0 */
2085 if (gdbarch_debug
>= 2)
2086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2087 return gdbarch
->short_bit
;
2091 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2094 gdbarch
->short_bit
= short_bit
;
2098 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2100 /* Skip verify of int_bit, invalid_p == 0 */
2101 if (gdbarch_debug
>= 2)
2102 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2103 return gdbarch
->int_bit
;
2107 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2110 gdbarch
->int_bit
= int_bit
;
2114 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2116 /* Skip verify of long_bit, invalid_p == 0 */
2117 if (gdbarch_debug
>= 2)
2118 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2119 return gdbarch
->long_bit
;
2123 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2126 gdbarch
->long_bit
= long_bit
;
2130 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2132 /* Skip verify of long_long_bit, invalid_p == 0 */
2133 if (gdbarch_debug
>= 2)
2134 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2135 return gdbarch
->long_long_bit
;
2139 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2142 gdbarch
->long_long_bit
= long_long_bit
;
2146 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2148 /* Skip verify of float_bit, invalid_p == 0 */
2149 if (gdbarch_debug
>= 2)
2150 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2151 return gdbarch
->float_bit
;
2155 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2158 gdbarch
->float_bit
= float_bit
;
2162 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2164 /* Skip verify of double_bit, invalid_p == 0 */
2165 if (gdbarch_debug
>= 2)
2166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2167 return gdbarch
->double_bit
;
2171 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2174 gdbarch
->double_bit
= double_bit
;
2178 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2180 /* Skip verify of long_double_bit, invalid_p == 0 */
2181 if (gdbarch_debug
>= 2)
2182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2183 return gdbarch
->long_double_bit
;
2187 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2188 int long_double_bit
)
2190 gdbarch
->long_double_bit
= long_double_bit
;
2194 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2196 /* Skip verify of ptr_bit, invalid_p == 0 */
2197 if (gdbarch_debug
>= 2)
2198 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2199 return gdbarch
->ptr_bit
;
2203 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2206 gdbarch
->ptr_bit
= ptr_bit
;
2210 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2212 if (gdbarch
->addr_bit
== 0)
2213 internal_error (__FILE__
, __LINE__
,
2214 "gdbarch: gdbarch_addr_bit invalid");
2215 if (gdbarch_debug
>= 2)
2216 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2217 return gdbarch
->addr_bit
;
2221 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2224 gdbarch
->addr_bit
= addr_bit
;
2228 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2230 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2231 if (gdbarch_debug
>= 2)
2232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2233 return gdbarch
->bfd_vma_bit
;
2237 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2240 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2244 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2246 /* Skip verify of ieee_float, invalid_p == 0 */
2247 if (gdbarch_debug
>= 2)
2248 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2249 return gdbarch
->ieee_float
;
2253 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2256 gdbarch
->ieee_float
= ieee_float
;
2260 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2262 if (gdbarch
->read_pc
== 0)
2263 internal_error (__FILE__
, __LINE__
,
2264 "gdbarch: gdbarch_read_pc invalid");
2265 if (gdbarch_debug
>= 2)
2266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2267 return gdbarch
->read_pc (ptid
);
2271 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2272 gdbarch_read_pc_ftype read_pc
)
2274 gdbarch
->read_pc
= read_pc
;
2278 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2280 if (gdbarch
->write_pc
== 0)
2281 internal_error (__FILE__
, __LINE__
,
2282 "gdbarch: gdbarch_write_pc invalid");
2283 if (gdbarch_debug
>= 2)
2284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2285 gdbarch
->write_pc (val
, ptid
);
2289 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2290 gdbarch_write_pc_ftype write_pc
)
2292 gdbarch
->write_pc
= write_pc
;
2296 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2298 if (gdbarch
->read_fp
== 0)
2299 internal_error (__FILE__
, __LINE__
,
2300 "gdbarch: gdbarch_read_fp invalid");
2301 if (gdbarch_debug
>= 2)
2302 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2303 return gdbarch
->read_fp ();
2307 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2308 gdbarch_read_fp_ftype read_fp
)
2310 gdbarch
->read_fp
= read_fp
;
2314 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2316 if (gdbarch
->write_fp
== 0)
2317 internal_error (__FILE__
, __LINE__
,
2318 "gdbarch: gdbarch_write_fp invalid");
2319 if (gdbarch_debug
>= 2)
2320 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2321 gdbarch
->write_fp (val
);
2325 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2326 gdbarch_write_fp_ftype write_fp
)
2328 gdbarch
->write_fp
= write_fp
;
2332 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2334 if (gdbarch
->read_sp
== 0)
2335 internal_error (__FILE__
, __LINE__
,
2336 "gdbarch: gdbarch_read_sp invalid");
2337 if (gdbarch_debug
>= 2)
2338 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2339 return gdbarch
->read_sp ();
2343 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2344 gdbarch_read_sp_ftype read_sp
)
2346 gdbarch
->read_sp
= read_sp
;
2350 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2352 if (gdbarch
->write_sp
== 0)
2353 internal_error (__FILE__
, __LINE__
,
2354 "gdbarch: gdbarch_write_sp invalid");
2355 if (gdbarch_debug
>= 2)
2356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2357 gdbarch
->write_sp (val
);
2361 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2362 gdbarch_write_sp_ftype write_sp
)
2364 gdbarch
->write_sp
= write_sp
;
2368 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2370 if (gdbarch
->virtual_frame_pointer
== 0)
2371 internal_error (__FILE__
, __LINE__
,
2372 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2373 if (gdbarch_debug
>= 2)
2374 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2375 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2379 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2380 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2382 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2386 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2388 return gdbarch
->register_read
!= 0;
2392 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2394 if (gdbarch
->register_read
== 0)
2395 internal_error (__FILE__
, __LINE__
,
2396 "gdbarch: gdbarch_register_read invalid");
2397 if (gdbarch_debug
>= 2)
2398 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2399 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2403 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2404 gdbarch_register_read_ftype register_read
)
2406 gdbarch
->register_read
= register_read
;
2410 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2412 return gdbarch
->register_write
!= 0;
2416 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2418 if (gdbarch
->register_write
== 0)
2419 internal_error (__FILE__
, __LINE__
,
2420 "gdbarch: gdbarch_register_write invalid");
2421 if (gdbarch_debug
>= 2)
2422 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2423 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2427 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2428 gdbarch_register_write_ftype register_write
)
2430 gdbarch
->register_write
= register_write
;
2434 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2436 if (gdbarch
->num_regs
== -1)
2437 internal_error (__FILE__
, __LINE__
,
2438 "gdbarch: gdbarch_num_regs invalid");
2439 if (gdbarch_debug
>= 2)
2440 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2441 return gdbarch
->num_regs
;
2445 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2448 gdbarch
->num_regs
= num_regs
;
2452 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2454 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2455 if (gdbarch_debug
>= 2)
2456 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2457 return gdbarch
->num_pseudo_regs
;
2461 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2462 int num_pseudo_regs
)
2464 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2468 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2470 if (gdbarch
->sp_regnum
== -1)
2471 internal_error (__FILE__
, __LINE__
,
2472 "gdbarch: gdbarch_sp_regnum invalid");
2473 if (gdbarch_debug
>= 2)
2474 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2475 return gdbarch
->sp_regnum
;
2479 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2482 gdbarch
->sp_regnum
= sp_regnum
;
2486 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2488 if (gdbarch
->fp_regnum
== -1)
2489 internal_error (__FILE__
, __LINE__
,
2490 "gdbarch: gdbarch_fp_regnum invalid");
2491 if (gdbarch_debug
>= 2)
2492 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2493 return gdbarch
->fp_regnum
;
2497 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2500 gdbarch
->fp_regnum
= fp_regnum
;
2504 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2506 if (gdbarch
->pc_regnum
== -1)
2507 internal_error (__FILE__
, __LINE__
,
2508 "gdbarch: gdbarch_pc_regnum invalid");
2509 if (gdbarch_debug
>= 2)
2510 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2511 return gdbarch
->pc_regnum
;
2515 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2518 gdbarch
->pc_regnum
= pc_regnum
;
2522 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2524 /* Skip verify of fp0_regnum, invalid_p == 0 */
2525 if (gdbarch_debug
>= 2)
2526 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2527 return gdbarch
->fp0_regnum
;
2531 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2534 gdbarch
->fp0_regnum
= fp0_regnum
;
2538 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2540 /* Skip verify of npc_regnum, invalid_p == 0 */
2541 if (gdbarch_debug
>= 2)
2542 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2543 return gdbarch
->npc_regnum
;
2547 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2550 gdbarch
->npc_regnum
= npc_regnum
;
2554 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2556 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2557 if (gdbarch_debug
>= 2)
2558 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2559 return gdbarch
->nnpc_regnum
;
2563 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2566 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2570 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2572 if (gdbarch
->stab_reg_to_regnum
== 0)
2573 internal_error (__FILE__
, __LINE__
,
2574 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2575 if (gdbarch_debug
>= 2)
2576 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2577 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2581 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2582 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2584 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2588 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2590 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2591 internal_error (__FILE__
, __LINE__
,
2592 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2593 if (gdbarch_debug
>= 2)
2594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2595 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2599 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2600 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2602 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2606 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2608 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2609 internal_error (__FILE__
, __LINE__
,
2610 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2611 if (gdbarch_debug
>= 2)
2612 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2613 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2617 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2618 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2620 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2624 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2626 if (gdbarch
->sdb_reg_to_regnum
== 0)
2627 internal_error (__FILE__
, __LINE__
,
2628 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2629 if (gdbarch_debug
>= 2)
2630 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2631 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2635 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2636 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2638 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2642 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2644 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2645 internal_error (__FILE__
, __LINE__
,
2646 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2647 if (gdbarch_debug
>= 2)
2648 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2649 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2653 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2654 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2656 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2660 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2662 if (gdbarch
->register_name
== 0)
2663 internal_error (__FILE__
, __LINE__
,
2664 "gdbarch: gdbarch_register_name invalid");
2665 if (gdbarch_debug
>= 2)
2666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2667 return gdbarch
->register_name (regnr
);
2671 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2672 gdbarch_register_name_ftype register_name
)
2674 gdbarch
->register_name
= register_name
;
2678 gdbarch_register_size (struct gdbarch
*gdbarch
)
2680 if (gdbarch
->register_size
== -1)
2681 internal_error (__FILE__
, __LINE__
,
2682 "gdbarch: gdbarch_register_size invalid");
2683 if (gdbarch_debug
>= 2)
2684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2685 return gdbarch
->register_size
;
2689 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2692 gdbarch
->register_size
= register_size
;
2696 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2698 if (gdbarch
->register_bytes
== -1)
2699 internal_error (__FILE__
, __LINE__
,
2700 "gdbarch: gdbarch_register_bytes invalid");
2701 if (gdbarch_debug
>= 2)
2702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2703 return gdbarch
->register_bytes
;
2707 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2710 gdbarch
->register_bytes
= register_bytes
;
2714 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2716 if (gdbarch
->register_byte
== 0)
2717 internal_error (__FILE__
, __LINE__
,
2718 "gdbarch: gdbarch_register_byte invalid");
2719 if (gdbarch_debug
>= 2)
2720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2721 return gdbarch
->register_byte (reg_nr
);
2725 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2726 gdbarch_register_byte_ftype register_byte
)
2728 gdbarch
->register_byte
= register_byte
;
2732 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2734 if (gdbarch
->register_raw_size
== 0)
2735 internal_error (__FILE__
, __LINE__
,
2736 "gdbarch: gdbarch_register_raw_size invalid");
2737 if (gdbarch_debug
>= 2)
2738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2739 return gdbarch
->register_raw_size (reg_nr
);
2743 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2744 gdbarch_register_raw_size_ftype register_raw_size
)
2746 gdbarch
->register_raw_size
= register_raw_size
;
2750 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2752 if (gdbarch
->max_register_raw_size
== -1)
2753 internal_error (__FILE__
, __LINE__
,
2754 "gdbarch: gdbarch_max_register_raw_size invalid");
2755 if (gdbarch_debug
>= 2)
2756 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2757 return gdbarch
->max_register_raw_size
;
2761 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2762 int max_register_raw_size
)
2764 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2768 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2770 if (gdbarch
->register_virtual_size
== 0)
2771 internal_error (__FILE__
, __LINE__
,
2772 "gdbarch: gdbarch_register_virtual_size invalid");
2773 if (gdbarch_debug
>= 2)
2774 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2775 return gdbarch
->register_virtual_size (reg_nr
);
2779 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2780 gdbarch_register_virtual_size_ftype register_virtual_size
)
2782 gdbarch
->register_virtual_size
= register_virtual_size
;
2786 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2788 if (gdbarch
->max_register_virtual_size
== -1)
2789 internal_error (__FILE__
, __LINE__
,
2790 "gdbarch: gdbarch_max_register_virtual_size invalid");
2791 if (gdbarch_debug
>= 2)
2792 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2793 return gdbarch
->max_register_virtual_size
;
2797 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2798 int max_register_virtual_size
)
2800 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2804 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2806 if (gdbarch
->register_virtual_type
== 0)
2807 internal_error (__FILE__
, __LINE__
,
2808 "gdbarch: gdbarch_register_virtual_type invalid");
2809 if (gdbarch_debug
>= 2)
2810 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2811 return gdbarch
->register_virtual_type (reg_nr
);
2815 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2816 gdbarch_register_virtual_type_ftype register_virtual_type
)
2818 gdbarch
->register_virtual_type
= register_virtual_type
;
2822 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2824 if (gdbarch
->do_registers_info
== 0)
2825 internal_error (__FILE__
, __LINE__
,
2826 "gdbarch: gdbarch_do_registers_info invalid");
2827 if (gdbarch_debug
>= 2)
2828 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2829 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2833 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2834 gdbarch_do_registers_info_ftype do_registers_info
)
2836 gdbarch
->do_registers_info
= do_registers_info
;
2840 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2842 if (gdbarch
->register_sim_regno
== 0)
2843 internal_error (__FILE__
, __LINE__
,
2844 "gdbarch: gdbarch_register_sim_regno invalid");
2845 if (gdbarch_debug
>= 2)
2846 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2847 return gdbarch
->register_sim_regno (reg_nr
);
2851 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2852 gdbarch_register_sim_regno_ftype register_sim_regno
)
2854 gdbarch
->register_sim_regno
= register_sim_regno
;
2858 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2860 return gdbarch
->register_bytes_ok
!= 0;
2864 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2866 if (gdbarch
->register_bytes_ok
== 0)
2867 internal_error (__FILE__
, __LINE__
,
2868 "gdbarch: gdbarch_register_bytes_ok invalid");
2869 if (gdbarch_debug
>= 2)
2870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2871 return gdbarch
->register_bytes_ok (nr_bytes
);
2875 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2876 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2878 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2882 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2884 if (gdbarch
->cannot_fetch_register
== 0)
2885 internal_error (__FILE__
, __LINE__
,
2886 "gdbarch: gdbarch_cannot_fetch_register invalid");
2887 if (gdbarch_debug
>= 2)
2888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2889 return gdbarch
->cannot_fetch_register (regnum
);
2893 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2894 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2896 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2900 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2902 if (gdbarch
->cannot_store_register
== 0)
2903 internal_error (__FILE__
, __LINE__
,
2904 "gdbarch: gdbarch_cannot_store_register invalid");
2905 if (gdbarch_debug
>= 2)
2906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2907 return gdbarch
->cannot_store_register (regnum
);
2911 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2912 gdbarch_cannot_store_register_ftype cannot_store_register
)
2914 gdbarch
->cannot_store_register
= cannot_store_register
;
2918 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2920 if (gdbarch
->use_generic_dummy_frames
== -1)
2921 internal_error (__FILE__
, __LINE__
,
2922 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2923 if (gdbarch_debug
>= 2)
2924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2925 return gdbarch
->use_generic_dummy_frames
;
2929 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2930 int use_generic_dummy_frames
)
2932 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2936 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2938 if (gdbarch
->call_dummy_location
== 0)
2939 internal_error (__FILE__
, __LINE__
,
2940 "gdbarch: gdbarch_call_dummy_location invalid");
2941 if (gdbarch_debug
>= 2)
2942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2943 return gdbarch
->call_dummy_location
;
2947 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2948 int call_dummy_location
)
2950 gdbarch
->call_dummy_location
= call_dummy_location
;
2954 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2956 if (gdbarch
->call_dummy_address
== 0)
2957 internal_error (__FILE__
, __LINE__
,
2958 "gdbarch: gdbarch_call_dummy_address invalid");
2959 if (gdbarch_debug
>= 2)
2960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2961 return gdbarch
->call_dummy_address ();
2965 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2966 gdbarch_call_dummy_address_ftype call_dummy_address
)
2968 gdbarch
->call_dummy_address
= call_dummy_address
;
2972 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2974 if (gdbarch
->call_dummy_start_offset
== -1)
2975 internal_error (__FILE__
, __LINE__
,
2976 "gdbarch: gdbarch_call_dummy_start_offset invalid");
2977 if (gdbarch_debug
>= 2)
2978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2979 return gdbarch
->call_dummy_start_offset
;
2983 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
2984 CORE_ADDR call_dummy_start_offset
)
2986 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
2990 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
2992 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
2993 internal_error (__FILE__
, __LINE__
,
2994 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2995 if (gdbarch_debug
>= 2)
2996 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
2997 return gdbarch
->call_dummy_breakpoint_offset
;
3001 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3002 CORE_ADDR call_dummy_breakpoint_offset
)
3004 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3008 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3010 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3011 internal_error (__FILE__
, __LINE__
,
3012 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3013 if (gdbarch_debug
>= 2)
3014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3015 return gdbarch
->call_dummy_breakpoint_offset_p
;
3019 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3020 int call_dummy_breakpoint_offset_p
)
3022 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3026 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3028 if (gdbarch
->call_dummy_length
== -1)
3029 internal_error (__FILE__
, __LINE__
,
3030 "gdbarch: gdbarch_call_dummy_length invalid");
3031 if (gdbarch_debug
>= 2)
3032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3033 return gdbarch
->call_dummy_length
;
3037 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3038 int call_dummy_length
)
3040 gdbarch
->call_dummy_length
= call_dummy_length
;
3044 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3046 if (gdbarch
->pc_in_call_dummy
== 0)
3047 internal_error (__FILE__
, __LINE__
,
3048 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3049 if (gdbarch_debug
>= 2)
3050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3051 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3055 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3056 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3058 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3062 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3064 if (gdbarch
->call_dummy_p
== -1)
3065 internal_error (__FILE__
, __LINE__
,
3066 "gdbarch: gdbarch_call_dummy_p invalid");
3067 if (gdbarch_debug
>= 2)
3068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3069 return gdbarch
->call_dummy_p
;
3073 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3076 gdbarch
->call_dummy_p
= call_dummy_p
;
3080 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3082 /* Skip verify of call_dummy_words, invalid_p == 0 */
3083 if (gdbarch_debug
>= 2)
3084 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3085 return gdbarch
->call_dummy_words
;
3089 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3090 LONGEST
* call_dummy_words
)
3092 gdbarch
->call_dummy_words
= call_dummy_words
;
3096 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3098 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3099 if (gdbarch_debug
>= 2)
3100 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3101 return gdbarch
->sizeof_call_dummy_words
;
3105 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3106 int sizeof_call_dummy_words
)
3108 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3112 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3114 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3115 internal_error (__FILE__
, __LINE__
,
3116 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3117 if (gdbarch_debug
>= 2)
3118 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3119 return gdbarch
->call_dummy_stack_adjust_p
;
3123 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3124 int call_dummy_stack_adjust_p
)
3126 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3130 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3132 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3133 internal_error (__FILE__
, __LINE__
,
3134 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3135 if (gdbarch_debug
>= 2)
3136 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3137 return gdbarch
->call_dummy_stack_adjust
;
3141 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3142 int call_dummy_stack_adjust
)
3144 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3148 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
)
3150 if (gdbarch
->fix_call_dummy
== 0)
3151 internal_error (__FILE__
, __LINE__
,
3152 "gdbarch: gdbarch_fix_call_dummy invalid");
3153 if (gdbarch_debug
>= 2)
3154 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3155 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3159 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3160 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3162 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3166 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3168 if (gdbarch
->init_frame_pc_first
== 0)
3169 internal_error (__FILE__
, __LINE__
,
3170 "gdbarch: gdbarch_init_frame_pc_first invalid");
3171 if (gdbarch_debug
>= 2)
3172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3173 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3177 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3178 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3180 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3184 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3186 if (gdbarch
->init_frame_pc
== 0)
3187 internal_error (__FILE__
, __LINE__
,
3188 "gdbarch: gdbarch_init_frame_pc invalid");
3189 if (gdbarch_debug
>= 2)
3190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3191 gdbarch
->init_frame_pc (fromleaf
, prev
);
3195 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3196 gdbarch_init_frame_pc_ftype init_frame_pc
)
3198 gdbarch
->init_frame_pc
= init_frame_pc
;
3202 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3204 if (gdbarch_debug
>= 2)
3205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3206 return gdbarch
->believe_pcc_promotion
;
3210 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3211 int believe_pcc_promotion
)
3213 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3217 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3219 if (gdbarch_debug
>= 2)
3220 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3221 return gdbarch
->believe_pcc_promotion_type
;
3225 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3226 int believe_pcc_promotion_type
)
3228 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3232 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3234 if (gdbarch
->coerce_float_to_double
== 0)
3235 internal_error (__FILE__
, __LINE__
,
3236 "gdbarch: gdbarch_coerce_float_to_double invalid");
3237 if (gdbarch_debug
>= 2)
3238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3239 return gdbarch
->coerce_float_to_double (formal
, actual
);
3243 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3244 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3246 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3250 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
)
3252 if (gdbarch
->get_saved_register
== 0)
3253 internal_error (__FILE__
, __LINE__
,
3254 "gdbarch: gdbarch_get_saved_register invalid");
3255 if (gdbarch_debug
>= 2)
3256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3257 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3261 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3262 gdbarch_get_saved_register_ftype get_saved_register
)
3264 gdbarch
->get_saved_register
= get_saved_register
;
3268 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3270 if (gdbarch
->register_convertible
== 0)
3271 internal_error (__FILE__
, __LINE__
,
3272 "gdbarch: gdbarch_register_convertible invalid");
3273 if (gdbarch_debug
>= 2)
3274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3275 return gdbarch
->register_convertible (nr
);
3279 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3280 gdbarch_register_convertible_ftype register_convertible
)
3282 gdbarch
->register_convertible
= register_convertible
;
3286 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3288 if (gdbarch
->register_convert_to_virtual
== 0)
3289 internal_error (__FILE__
, __LINE__
,
3290 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3291 if (gdbarch_debug
>= 2)
3292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3293 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3297 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3298 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3300 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3304 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3306 if (gdbarch
->register_convert_to_raw
== 0)
3307 internal_error (__FILE__
, __LINE__
,
3308 "gdbarch: gdbarch_register_convert_to_raw invalid");
3309 if (gdbarch_debug
>= 2)
3310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3311 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3315 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3316 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3318 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3322 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3324 if (gdbarch
->fetch_pseudo_register
== 0)
3325 internal_error (__FILE__
, __LINE__
,
3326 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3327 if (gdbarch_debug
>= 2)
3328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3329 gdbarch
->fetch_pseudo_register (regnum
);
3333 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3334 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3336 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3340 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3342 if (gdbarch
->store_pseudo_register
== 0)
3343 internal_error (__FILE__
, __LINE__
,
3344 "gdbarch: gdbarch_store_pseudo_register invalid");
3345 if (gdbarch_debug
>= 2)
3346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3347 gdbarch
->store_pseudo_register (regnum
);
3351 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3352 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3354 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3358 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3360 if (gdbarch
->pointer_to_address
== 0)
3361 internal_error (__FILE__
, __LINE__
,
3362 "gdbarch: gdbarch_pointer_to_address invalid");
3363 if (gdbarch_debug
>= 2)
3364 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3365 return gdbarch
->pointer_to_address (type
, buf
);
3369 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3370 gdbarch_pointer_to_address_ftype pointer_to_address
)
3372 gdbarch
->pointer_to_address
= pointer_to_address
;
3376 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3378 if (gdbarch
->address_to_pointer
== 0)
3379 internal_error (__FILE__
, __LINE__
,
3380 "gdbarch: gdbarch_address_to_pointer invalid");
3381 if (gdbarch_debug
>= 2)
3382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3383 gdbarch
->address_to_pointer (type
, buf
, addr
);
3387 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3388 gdbarch_address_to_pointer_ftype address_to_pointer
)
3390 gdbarch
->address_to_pointer
= address_to_pointer
;
3394 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3396 return gdbarch
->integer_to_address
!= 0;
3400 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3402 if (gdbarch
->integer_to_address
== 0)
3403 internal_error (__FILE__
, __LINE__
,
3404 "gdbarch: gdbarch_integer_to_address invalid");
3405 if (gdbarch_debug
>= 2)
3406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3407 return gdbarch
->integer_to_address (type
, buf
);
3411 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3412 gdbarch_integer_to_address_ftype integer_to_address
)
3414 gdbarch
->integer_to_address
= integer_to_address
;
3418 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3420 if (gdbarch
->return_value_on_stack
== 0)
3421 internal_error (__FILE__
, __LINE__
,
3422 "gdbarch: gdbarch_return_value_on_stack invalid");
3423 if (gdbarch_debug
>= 2)
3424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3425 return gdbarch
->return_value_on_stack (type
);
3429 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3430 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3432 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3436 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3438 if (gdbarch
->extract_return_value
== 0)
3439 internal_error (__FILE__
, __LINE__
,
3440 "gdbarch: gdbarch_extract_return_value invalid");
3441 if (gdbarch_debug
>= 2)
3442 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3443 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3447 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3448 gdbarch_extract_return_value_ftype extract_return_value
)
3450 gdbarch
->extract_return_value
= extract_return_value
;
3454 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3456 if (gdbarch
->push_arguments
== 0)
3457 internal_error (__FILE__
, __LINE__
,
3458 "gdbarch: gdbarch_push_arguments invalid");
3459 if (gdbarch_debug
>= 2)
3460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3461 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3465 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3466 gdbarch_push_arguments_ftype push_arguments
)
3468 gdbarch
->push_arguments
= push_arguments
;
3472 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3474 if (gdbarch
->push_dummy_frame
== 0)
3475 internal_error (__FILE__
, __LINE__
,
3476 "gdbarch: gdbarch_push_dummy_frame invalid");
3477 if (gdbarch_debug
>= 2)
3478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3479 gdbarch
->push_dummy_frame ();
3483 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3484 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3486 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3490 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3492 return gdbarch
->push_return_address
!= 0;
3496 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3498 if (gdbarch
->push_return_address
== 0)
3499 internal_error (__FILE__
, __LINE__
,
3500 "gdbarch: gdbarch_push_return_address invalid");
3501 if (gdbarch_debug
>= 2)
3502 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3503 return gdbarch
->push_return_address (pc
, sp
);
3507 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3508 gdbarch_push_return_address_ftype push_return_address
)
3510 gdbarch
->push_return_address
= push_return_address
;
3514 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3516 if (gdbarch
->pop_frame
== 0)
3517 internal_error (__FILE__
, __LINE__
,
3518 "gdbarch: gdbarch_pop_frame invalid");
3519 if (gdbarch_debug
>= 2)
3520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3521 gdbarch
->pop_frame ();
3525 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3526 gdbarch_pop_frame_ftype pop_frame
)
3528 gdbarch
->pop_frame
= pop_frame
;
3532 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3534 if (gdbarch
->store_struct_return
== 0)
3535 internal_error (__FILE__
, __LINE__
,
3536 "gdbarch: gdbarch_store_struct_return invalid");
3537 if (gdbarch_debug
>= 2)
3538 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3539 gdbarch
->store_struct_return (addr
, sp
);
3543 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3544 gdbarch_store_struct_return_ftype store_struct_return
)
3546 gdbarch
->store_struct_return
= store_struct_return
;
3550 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3552 if (gdbarch
->store_return_value
== 0)
3553 internal_error (__FILE__
, __LINE__
,
3554 "gdbarch: gdbarch_store_return_value invalid");
3555 if (gdbarch_debug
>= 2)
3556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3557 gdbarch
->store_return_value (type
, valbuf
);
3561 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3562 gdbarch_store_return_value_ftype store_return_value
)
3564 gdbarch
->store_return_value
= store_return_value
;
3568 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3570 return gdbarch
->extract_struct_value_address
!= 0;
3574 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3576 if (gdbarch
->extract_struct_value_address
== 0)
3577 internal_error (__FILE__
, __LINE__
,
3578 "gdbarch: gdbarch_extract_struct_value_address invalid");
3579 if (gdbarch_debug
>= 2)
3580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3581 return gdbarch
->extract_struct_value_address (regbuf
);
3585 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3586 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3588 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3592 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3594 if (gdbarch
->use_struct_convention
== 0)
3595 internal_error (__FILE__
, __LINE__
,
3596 "gdbarch: gdbarch_use_struct_convention invalid");
3597 if (gdbarch_debug
>= 2)
3598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3599 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3603 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3604 gdbarch_use_struct_convention_ftype use_struct_convention
)
3606 gdbarch
->use_struct_convention
= use_struct_convention
;
3610 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3612 if (gdbarch
->frame_init_saved_regs
== 0)
3613 internal_error (__FILE__
, __LINE__
,
3614 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3615 if (gdbarch_debug
>= 2)
3616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3617 gdbarch
->frame_init_saved_regs (frame
);
3621 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3622 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3624 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3628 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3630 return gdbarch
->init_extra_frame_info
!= 0;
3634 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3636 if (gdbarch
->init_extra_frame_info
== 0)
3637 internal_error (__FILE__
, __LINE__
,
3638 "gdbarch: gdbarch_init_extra_frame_info invalid");
3639 if (gdbarch_debug
>= 2)
3640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3641 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3645 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3646 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3648 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3652 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3654 if (gdbarch
->skip_prologue
== 0)
3655 internal_error (__FILE__
, __LINE__
,
3656 "gdbarch: gdbarch_skip_prologue invalid");
3657 if (gdbarch_debug
>= 2)
3658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3659 return gdbarch
->skip_prologue (ip
);
3663 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3664 gdbarch_skip_prologue_ftype skip_prologue
)
3666 gdbarch
->skip_prologue
= skip_prologue
;
3670 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3672 if (gdbarch
->prologue_frameless_p
== 0)
3673 internal_error (__FILE__
, __LINE__
,
3674 "gdbarch: gdbarch_prologue_frameless_p invalid");
3675 if (gdbarch_debug
>= 2)
3676 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3677 return gdbarch
->prologue_frameless_p (ip
);
3681 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3682 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3684 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3688 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3690 if (gdbarch
->inner_than
== 0)
3691 internal_error (__FILE__
, __LINE__
,
3692 "gdbarch: gdbarch_inner_than invalid");
3693 if (gdbarch_debug
>= 2)
3694 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3695 return gdbarch
->inner_than (lhs
, rhs
);
3699 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3700 gdbarch_inner_than_ftype inner_than
)
3702 gdbarch
->inner_than
= inner_than
;
3706 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3708 if (gdbarch
->breakpoint_from_pc
== 0)
3709 internal_error (__FILE__
, __LINE__
,
3710 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3711 if (gdbarch_debug
>= 2)
3712 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3713 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3717 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3718 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3720 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3724 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3726 if (gdbarch
->memory_insert_breakpoint
== 0)
3727 internal_error (__FILE__
, __LINE__
,
3728 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3729 if (gdbarch_debug
>= 2)
3730 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3731 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3735 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3736 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3738 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3742 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3744 if (gdbarch
->memory_remove_breakpoint
== 0)
3745 internal_error (__FILE__
, __LINE__
,
3746 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3747 if (gdbarch_debug
>= 2)
3748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3749 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3753 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3754 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3756 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3760 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3762 if (gdbarch
->decr_pc_after_break
== -1)
3763 internal_error (__FILE__
, __LINE__
,
3764 "gdbarch: gdbarch_decr_pc_after_break invalid");
3765 if (gdbarch_debug
>= 2)
3766 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3767 return gdbarch
->decr_pc_after_break
;
3771 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3772 CORE_ADDR decr_pc_after_break
)
3774 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3778 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3780 if (gdbarch
->prepare_to_proceed
== 0)
3781 internal_error (__FILE__
, __LINE__
,
3782 "gdbarch: gdbarch_prepare_to_proceed invalid");
3783 if (gdbarch_debug
>= 2)
3784 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3785 return gdbarch
->prepare_to_proceed (select_it
);
3789 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3790 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3792 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3796 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3798 if (gdbarch
->function_start_offset
== -1)
3799 internal_error (__FILE__
, __LINE__
,
3800 "gdbarch: gdbarch_function_start_offset invalid");
3801 if (gdbarch_debug
>= 2)
3802 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3803 return gdbarch
->function_start_offset
;
3807 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3808 CORE_ADDR function_start_offset
)
3810 gdbarch
->function_start_offset
= function_start_offset
;
3814 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3816 if (gdbarch
->remote_translate_xfer_address
== 0)
3817 internal_error (__FILE__
, __LINE__
,
3818 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3819 if (gdbarch_debug
>= 2)
3820 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3821 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3825 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3826 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3828 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3832 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3834 if (gdbarch
->frame_args_skip
== -1)
3835 internal_error (__FILE__
, __LINE__
,
3836 "gdbarch: gdbarch_frame_args_skip invalid");
3837 if (gdbarch_debug
>= 2)
3838 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3839 return gdbarch
->frame_args_skip
;
3843 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3844 CORE_ADDR frame_args_skip
)
3846 gdbarch
->frame_args_skip
= frame_args_skip
;
3850 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3852 if (gdbarch
->frameless_function_invocation
== 0)
3853 internal_error (__FILE__
, __LINE__
,
3854 "gdbarch: gdbarch_frameless_function_invocation invalid");
3855 if (gdbarch_debug
>= 2)
3856 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3857 return gdbarch
->frameless_function_invocation (fi
);
3861 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3862 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3864 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3868 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3870 if (gdbarch
->frame_chain
== 0)
3871 internal_error (__FILE__
, __LINE__
,
3872 "gdbarch: gdbarch_frame_chain invalid");
3873 if (gdbarch_debug
>= 2)
3874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3875 return gdbarch
->frame_chain (frame
);
3879 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3880 gdbarch_frame_chain_ftype frame_chain
)
3882 gdbarch
->frame_chain
= frame_chain
;
3886 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3888 if (gdbarch
->frame_chain_valid
== 0)
3889 internal_error (__FILE__
, __LINE__
,
3890 "gdbarch: gdbarch_frame_chain_valid invalid");
3891 if (gdbarch_debug
>= 2)
3892 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3893 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3897 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3898 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3900 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3904 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3906 if (gdbarch
->frame_saved_pc
== 0)
3907 internal_error (__FILE__
, __LINE__
,
3908 "gdbarch: gdbarch_frame_saved_pc invalid");
3909 if (gdbarch_debug
>= 2)
3910 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3911 return gdbarch
->frame_saved_pc (fi
);
3915 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3916 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3918 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3922 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3924 if (gdbarch
->frame_args_address
== 0)
3925 internal_error (__FILE__
, __LINE__
,
3926 "gdbarch: gdbarch_frame_args_address invalid");
3927 if (gdbarch_debug
>= 2)
3928 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3929 return gdbarch
->frame_args_address (fi
);
3933 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3934 gdbarch_frame_args_address_ftype frame_args_address
)
3936 gdbarch
->frame_args_address
= frame_args_address
;
3940 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3942 if (gdbarch
->frame_locals_address
== 0)
3943 internal_error (__FILE__
, __LINE__
,
3944 "gdbarch: gdbarch_frame_locals_address invalid");
3945 if (gdbarch_debug
>= 2)
3946 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3947 return gdbarch
->frame_locals_address (fi
);
3951 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3952 gdbarch_frame_locals_address_ftype frame_locals_address
)
3954 gdbarch
->frame_locals_address
= frame_locals_address
;
3958 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3960 if (gdbarch
->saved_pc_after_call
== 0)
3961 internal_error (__FILE__
, __LINE__
,
3962 "gdbarch: gdbarch_saved_pc_after_call invalid");
3963 if (gdbarch_debug
>= 2)
3964 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3965 return gdbarch
->saved_pc_after_call (frame
);
3969 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3970 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3972 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3976 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3978 if (gdbarch
->frame_num_args
== 0)
3979 internal_error (__FILE__
, __LINE__
,
3980 "gdbarch: gdbarch_frame_num_args invalid");
3981 if (gdbarch_debug
>= 2)
3982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3983 return gdbarch
->frame_num_args (frame
);
3987 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3988 gdbarch_frame_num_args_ftype frame_num_args
)
3990 gdbarch
->frame_num_args
= frame_num_args
;
3994 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
3996 return gdbarch
->stack_align
!= 0;
4000 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4002 if (gdbarch
->stack_align
== 0)
4003 internal_error (__FILE__
, __LINE__
,
4004 "gdbarch: gdbarch_stack_align invalid");
4005 if (gdbarch_debug
>= 2)
4006 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4007 return gdbarch
->stack_align (sp
);
4011 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4012 gdbarch_stack_align_ftype stack_align
)
4014 gdbarch
->stack_align
= stack_align
;
4018 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4020 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4021 if (gdbarch_debug
>= 2)
4022 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4023 return gdbarch
->extra_stack_alignment_needed
;
4027 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4028 int extra_stack_alignment_needed
)
4030 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4034 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4036 return gdbarch
->reg_struct_has_addr
!= 0;
4040 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4042 if (gdbarch
->reg_struct_has_addr
== 0)
4043 internal_error (__FILE__
, __LINE__
,
4044 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4045 if (gdbarch_debug
>= 2)
4046 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4047 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4051 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4052 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4054 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4058 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4060 return gdbarch
->save_dummy_frame_tos
!= 0;
4064 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4066 if (gdbarch
->save_dummy_frame_tos
== 0)
4067 internal_error (__FILE__
, __LINE__
,
4068 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4069 if (gdbarch_debug
>= 2)
4070 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4071 gdbarch
->save_dummy_frame_tos (sp
);
4075 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4076 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4078 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4082 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4084 if (gdbarch_debug
>= 2)
4085 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4086 return gdbarch
->parm_boundary
;
4090 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4093 gdbarch
->parm_boundary
= parm_boundary
;
4096 const struct floatformat
*
4097 gdbarch_float_format (struct gdbarch
*gdbarch
)
4099 if (gdbarch_debug
>= 2)
4100 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4101 return gdbarch
->float_format
;
4105 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4106 const struct floatformat
* float_format
)
4108 gdbarch
->float_format
= float_format
;
4111 const struct floatformat
*
4112 gdbarch_double_format (struct gdbarch
*gdbarch
)
4114 if (gdbarch_debug
>= 2)
4115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4116 return gdbarch
->double_format
;
4120 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4121 const struct floatformat
* double_format
)
4123 gdbarch
->double_format
= double_format
;
4126 const struct floatformat
*
4127 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4129 if (gdbarch_debug
>= 2)
4130 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4131 return gdbarch
->long_double_format
;
4135 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4136 const struct floatformat
* long_double_format
)
4138 gdbarch
->long_double_format
= long_double_format
;
4142 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4144 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4145 internal_error (__FILE__
, __LINE__
,
4146 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4147 if (gdbarch_debug
>= 2)
4148 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4149 return gdbarch
->convert_from_func_ptr_addr (addr
);
4153 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4154 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4156 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4160 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4162 if (gdbarch
->addr_bits_remove
== 0)
4163 internal_error (__FILE__
, __LINE__
,
4164 "gdbarch: gdbarch_addr_bits_remove invalid");
4165 if (gdbarch_debug
>= 2)
4166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4167 return gdbarch
->addr_bits_remove (addr
);
4171 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4172 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4174 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4178 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4180 return gdbarch
->software_single_step
!= 0;
4184 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4186 if (gdbarch
->software_single_step
== 0)
4187 internal_error (__FILE__
, __LINE__
,
4188 "gdbarch: gdbarch_software_single_step invalid");
4189 if (gdbarch_debug
>= 2)
4190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4191 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4195 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4196 gdbarch_software_single_step_ftype software_single_step
)
4198 gdbarch
->software_single_step
= software_single_step
;
4202 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4204 if (gdbarch
->print_insn
== 0)
4205 internal_error (__FILE__
, __LINE__
,
4206 "gdbarch: gdbarch_print_insn invalid");
4207 if (gdbarch_debug
>= 2)
4208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4209 return gdbarch
->print_insn (vma
, info
);
4213 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4214 gdbarch_print_insn_ftype print_insn
)
4216 gdbarch
->print_insn
= print_insn
;
4220 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4222 if (gdbarch
->skip_trampoline_code
== 0)
4223 internal_error (__FILE__
, __LINE__
,
4224 "gdbarch: gdbarch_skip_trampoline_code invalid");
4225 if (gdbarch_debug
>= 2)
4226 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4227 return gdbarch
->skip_trampoline_code (pc
);
4231 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4232 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4234 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4238 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4240 if (gdbarch
->in_solib_call_trampoline
== 0)
4241 internal_error (__FILE__
, __LINE__
,
4242 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4243 if (gdbarch_debug
>= 2)
4244 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4245 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4249 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4250 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4252 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4256 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4258 if (gdbarch
->in_function_epilogue_p
== 0)
4259 internal_error (__FILE__
, __LINE__
,
4260 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4261 if (gdbarch_debug
>= 2)
4262 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4263 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4267 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4268 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4270 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4274 /* Keep a registry of per-architecture data-pointers required by GDB
4280 gdbarch_data_init_ftype
*init
;
4281 gdbarch_data_free_ftype
*free
;
4284 struct gdbarch_data_registration
4286 struct gdbarch_data
*data
;
4287 struct gdbarch_data_registration
*next
;
4290 struct gdbarch_data_registry
4293 struct gdbarch_data_registration
*registrations
;
4296 struct gdbarch_data_registry gdbarch_data_registry
=
4301 struct gdbarch_data
*
4302 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4303 gdbarch_data_free_ftype
*free
)
4305 struct gdbarch_data_registration
**curr
;
4306 for (curr
= &gdbarch_data_registry
.registrations
;
4308 curr
= &(*curr
)->next
);
4309 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4310 (*curr
)->next
= NULL
;
4311 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4312 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4313 (*curr
)->data
->init
= init
;
4314 (*curr
)->data
->free
= free
;
4315 return (*curr
)->data
;
4319 /* Walk through all the registered users initializing each in turn. */
4322 init_gdbarch_data (struct gdbarch
*gdbarch
)
4324 struct gdbarch_data_registration
*rego
;
4325 for (rego
= gdbarch_data_registry
.registrations
;
4329 struct gdbarch_data
*data
= rego
->data
;
4330 gdb_assert (data
->index
< gdbarch
->nr_data
);
4331 if (data
->init
!= NULL
)
4333 void *pointer
= data
->init (gdbarch
);
4334 set_gdbarch_data (gdbarch
, data
, pointer
);
4339 /* Create/delete the gdbarch data vector. */
4342 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4344 gdb_assert (gdbarch
->data
== NULL
);
4345 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4346 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4350 free_gdbarch_data (struct gdbarch
*gdbarch
)
4352 struct gdbarch_data_registration
*rego
;
4353 gdb_assert (gdbarch
->data
!= NULL
);
4354 for (rego
= gdbarch_data_registry
.registrations
;
4358 struct gdbarch_data
*data
= rego
->data
;
4359 gdb_assert (data
->index
< gdbarch
->nr_data
);
4360 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4362 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4363 gdbarch
->data
[data
->index
] = NULL
;
4366 xfree (gdbarch
->data
);
4367 gdbarch
->data
= NULL
;
4371 /* Initialize the current value of thee specified per-architecture
4375 set_gdbarch_data (struct gdbarch
*gdbarch
,
4376 struct gdbarch_data
*data
,
4379 gdb_assert (data
->index
< gdbarch
->nr_data
);
4380 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4381 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4382 gdbarch
->data
[data
->index
] = pointer
;
4385 /* Return the current value of the specified per-architecture
4389 gdbarch_data (struct gdbarch_data
*data
)
4391 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4392 return current_gdbarch
->data
[data
->index
];
4397 /* Keep a registry of swapped data required by GDB modules. */
4402 struct gdbarch_swap_registration
*source
;
4403 struct gdbarch_swap
*next
;
4406 struct gdbarch_swap_registration
4409 unsigned long sizeof_data
;
4410 gdbarch_swap_ftype
*init
;
4411 struct gdbarch_swap_registration
*next
;
4414 struct gdbarch_swap_registry
4417 struct gdbarch_swap_registration
*registrations
;
4420 struct gdbarch_swap_registry gdbarch_swap_registry
=
4426 register_gdbarch_swap (void *data
,
4427 unsigned long sizeof_data
,
4428 gdbarch_swap_ftype
*init
)
4430 struct gdbarch_swap_registration
**rego
;
4431 for (rego
= &gdbarch_swap_registry
.registrations
;
4433 rego
= &(*rego
)->next
);
4434 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4435 (*rego
)->next
= NULL
;
4436 (*rego
)->init
= init
;
4437 (*rego
)->data
= data
;
4438 (*rego
)->sizeof_data
= sizeof_data
;
4443 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4445 struct gdbarch_swap_registration
*rego
;
4446 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4447 for (rego
= gdbarch_swap_registry
.registrations
;
4451 if (rego
->data
!= NULL
)
4453 (*curr
) = XMALLOC (struct gdbarch_swap
);
4454 (*curr
)->source
= rego
;
4455 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4456 (*curr
)->next
= NULL
;
4457 memset (rego
->data
, 0, rego
->sizeof_data
);
4458 curr
= &(*curr
)->next
;
4460 if (rego
->init
!= NULL
)
4466 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4468 struct gdbarch_swap
*curr
;
4469 for (curr
= gdbarch
->swap
;
4472 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4476 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4478 struct gdbarch_swap
*curr
;
4479 for (curr
= gdbarch
->swap
;
4482 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4486 /* Keep a registry of the architectures known by GDB. */
4488 struct gdbarch_registration
4490 enum bfd_architecture bfd_architecture
;
4491 gdbarch_init_ftype
*init
;
4492 gdbarch_dump_tdep_ftype
*dump_tdep
;
4493 struct gdbarch_list
*arches
;
4494 struct gdbarch_registration
*next
;
4497 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4500 append_name (const char ***buf
, int *nr
, const char *name
)
4502 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4508 gdbarch_printable_names (void)
4512 /* Accumulate a list of names based on the registed list of
4514 enum bfd_architecture a
;
4516 const char **arches
= NULL
;
4517 struct gdbarch_registration
*rego
;
4518 for (rego
= gdbarch_registry
;
4522 const struct bfd_arch_info
*ap
;
4523 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4525 internal_error (__FILE__
, __LINE__
,
4526 "gdbarch_architecture_names: multi-arch unknown");
4529 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4534 append_name (&arches
, &nr_arches
, NULL
);
4538 /* Just return all the architectures that BFD knows. Assume that
4539 the legacy architecture framework supports them. */
4540 return bfd_arch_list ();
4545 gdbarch_register (enum bfd_architecture bfd_architecture
,
4546 gdbarch_init_ftype
*init
,
4547 gdbarch_dump_tdep_ftype
*dump_tdep
)
4549 struct gdbarch_registration
**curr
;
4550 const struct bfd_arch_info
*bfd_arch_info
;
4551 /* Check that BFD recognizes this architecture */
4552 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4553 if (bfd_arch_info
== NULL
)
4555 internal_error (__FILE__
, __LINE__
,
4556 "gdbarch: Attempt to register unknown architecture (%d)",
4559 /* Check that we haven't seen this architecture before */
4560 for (curr
= &gdbarch_registry
;
4562 curr
= &(*curr
)->next
)
4564 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4565 internal_error (__FILE__
, __LINE__
,
4566 "gdbarch: Duplicate registraration of architecture (%s)",
4567 bfd_arch_info
->printable_name
);
4571 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4572 bfd_arch_info
->printable_name
,
4575 (*curr
) = XMALLOC (struct gdbarch_registration
);
4576 (*curr
)->bfd_architecture
= bfd_architecture
;
4577 (*curr
)->init
= init
;
4578 (*curr
)->dump_tdep
= dump_tdep
;
4579 (*curr
)->arches
= NULL
;
4580 (*curr
)->next
= NULL
;
4581 /* When non- multi-arch, install whatever target dump routine we've
4582 been provided - hopefully that routine has been written correctly
4583 and works regardless of multi-arch. */
4584 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4585 && startup_gdbarch
.dump_tdep
== NULL
)
4586 startup_gdbarch
.dump_tdep
= dump_tdep
;
4590 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4591 gdbarch_init_ftype
*init
)
4593 gdbarch_register (bfd_architecture
, init
, NULL
);
4597 /* Look for an architecture using gdbarch_info. Base search on only
4598 BFD_ARCH_INFO and BYTE_ORDER. */
4600 struct gdbarch_list
*
4601 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4602 const struct gdbarch_info
*info
)
4604 for (; arches
!= NULL
; arches
= arches
->next
)
4606 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4608 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4616 /* Update the current architecture. Return ZERO if the update request
4620 gdbarch_update_p (struct gdbarch_info info
)
4622 struct gdbarch
*new_gdbarch
;
4623 struct gdbarch_list
**list
;
4624 struct gdbarch_registration
*rego
;
4626 /* Fill in missing parts of the INFO struct using a number of
4627 sources: ``set ...''; INFOabfd supplied; existing target. */
4629 /* ``(gdb) set architecture ...'' */
4630 if (info
.bfd_arch_info
== NULL
4631 && !TARGET_ARCHITECTURE_AUTO
)
4632 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4633 if (info
.bfd_arch_info
== NULL
4634 && info
.abfd
!= NULL
4635 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4636 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4637 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4638 if (info
.bfd_arch_info
== NULL
)
4639 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4641 /* ``(gdb) set byte-order ...'' */
4642 if (info
.byte_order
== 0
4643 && !TARGET_BYTE_ORDER_AUTO
)
4644 info
.byte_order
= TARGET_BYTE_ORDER
;
4645 /* From the INFO struct. */
4646 if (info
.byte_order
== 0
4647 && info
.abfd
!= NULL
)
4648 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4649 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4651 /* From the current target. */
4652 if (info
.byte_order
== 0)
4653 info
.byte_order
= TARGET_BYTE_ORDER
;
4655 /* Must have found some sort of architecture. */
4656 gdb_assert (info
.bfd_arch_info
!= NULL
);
4660 fprintf_unfiltered (gdb_stdlog
,
4661 "gdbarch_update: info.bfd_arch_info %s\n",
4662 (info
.bfd_arch_info
!= NULL
4663 ? info
.bfd_arch_info
->printable_name
4665 fprintf_unfiltered (gdb_stdlog
,
4666 "gdbarch_update: info.byte_order %d (%s)\n",
4668 (info
.byte_order
== BIG_ENDIAN
? "big"
4669 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4671 fprintf_unfiltered (gdb_stdlog
,
4672 "gdbarch_update: info.abfd 0x%lx\n",
4674 fprintf_unfiltered (gdb_stdlog
,
4675 "gdbarch_update: info.tdep_info 0x%lx\n",
4676 (long) info
.tdep_info
);
4679 /* Find the target that knows about this architecture. */
4680 for (rego
= gdbarch_registry
;
4683 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4688 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4692 /* Ask the target for a replacement architecture. */
4693 new_gdbarch
= rego
->init (info
, rego
->arches
);
4695 /* Did the target like it? No. Reject the change. */
4696 if (new_gdbarch
== NULL
)
4699 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4703 /* Did the architecture change? No. Do nothing. */
4704 if (current_gdbarch
== new_gdbarch
)
4707 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4709 new_gdbarch
->bfd_arch_info
->printable_name
);
4713 /* Swap all data belonging to the old target out */
4714 swapout_gdbarch_swap (current_gdbarch
);
4716 /* Is this a pre-existing architecture? Yes. Swap it in. */
4717 for (list
= ®o
->arches
;
4719 list
= &(*list
)->next
)
4721 if ((*list
)->gdbarch
== new_gdbarch
)
4724 fprintf_unfiltered (gdb_stdlog
,
4725 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4727 new_gdbarch
->bfd_arch_info
->printable_name
);
4728 current_gdbarch
= new_gdbarch
;
4729 swapin_gdbarch_swap (new_gdbarch
);
4730 architecture_changed_event ();
4735 /* Append this new architecture to this targets list. */
4736 (*list
) = XMALLOC (struct gdbarch_list
);
4737 (*list
)->next
= NULL
;
4738 (*list
)->gdbarch
= new_gdbarch
;
4740 /* Switch to this new architecture. Dump it out. */
4741 current_gdbarch
= new_gdbarch
;
4744 fprintf_unfiltered (gdb_stdlog
,
4745 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4747 new_gdbarch
->bfd_arch_info
->printable_name
);
4750 /* Check that the newly installed architecture is valid. Plug in
4751 any post init values. */
4752 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4753 verify_gdbarch (new_gdbarch
);
4755 /* Initialize the per-architecture memory (swap) areas.
4756 CURRENT_GDBARCH must be update before these modules are
4758 init_gdbarch_swap (new_gdbarch
);
4760 /* Initialize the per-architecture data-pointer of all parties that
4761 registered an interest in this architecture. CURRENT_GDBARCH
4762 must be updated before these modules are called. */
4763 init_gdbarch_data (new_gdbarch
);
4764 architecture_changed_event ();
4767 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4775 /* Pointer to the target-dependent disassembly function. */
4776 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4777 disassemble_info tm_print_insn_info
;
4780 extern void _initialize_gdbarch (void);
4783 _initialize_gdbarch (void)
4785 struct cmd_list_element
*c
;
4787 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4788 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4789 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4790 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4791 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4793 add_show_from_set (add_set_cmd ("arch",
4796 (char *)&gdbarch_debug
,
4797 "Set architecture debugging.\n\
4798 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4800 c
= add_set_cmd ("archdebug",
4803 (char *)&gdbarch_debug
,
4804 "Set architecture debugging.\n\
4805 When non-zero, architecture debugging is enabled.", &setlist
);
4807 deprecate_cmd (c
, "set debug arch");
4808 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");