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
->prologue_frameless_p
= generic_prologue_frameless_p
;
490 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
491 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
492 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
493 current_gdbarch
->decr_pc_after_break
= -1;
494 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
495 current_gdbarch
->function_start_offset
= -1;
496 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
497 current_gdbarch
->frame_args_skip
= -1;
498 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
499 current_gdbarch
->extra_stack_alignment_needed
= 1;
500 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
501 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
502 current_gdbarch
->print_insn
= legacy_print_insn
;
503 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
504 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
505 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
506 /* gdbarch_alloc() */
508 return current_gdbarch
;
512 /* Free a gdbarch struct. This should never happen in normal
513 operation --- once you've created a gdbarch, you keep it around.
514 However, if an architecture's init function encounters an error
515 building the structure, it may need to clean up a partially
516 constructed gdbarch. */
519 gdbarch_free (struct gdbarch
*arch
)
521 gdb_assert (arch
!= NULL
);
522 free_gdbarch_data (arch
);
527 /* Ensure that all values in a GDBARCH are reasonable. */
530 verify_gdbarch (struct gdbarch
*gdbarch
)
533 struct cleanup
*cleanups
;
536 /* Only perform sanity checks on a multi-arch target. */
539 log
= mem_fileopen ();
540 cleanups
= make_cleanup_ui_file_delete (log
);
542 if (gdbarch
->byte_order
== 0)
543 fprintf_unfiltered (log
, "\n\tbyte-order");
544 if (gdbarch
->bfd_arch_info
== NULL
)
545 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
546 /* Check those that need to be defined for the given multi-arch level. */
547 /* Skip verify of short_bit, invalid_p == 0 */
548 /* Skip verify of int_bit, invalid_p == 0 */
549 /* Skip verify of long_bit, invalid_p == 0 */
550 /* Skip verify of long_long_bit, invalid_p == 0 */
551 /* Skip verify of float_bit, invalid_p == 0 */
552 /* Skip verify of double_bit, invalid_p == 0 */
553 /* Skip verify of long_double_bit, invalid_p == 0 */
554 /* Skip verify of ptr_bit, invalid_p == 0 */
555 if (gdbarch
->addr_bit
== 0)
556 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
557 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
558 /* Skip verify of ieee_float, invalid_p == 0 */
559 /* Skip verify of read_pc, invalid_p == 0 */
560 /* Skip verify of write_pc, invalid_p == 0 */
561 /* Skip verify of read_fp, invalid_p == 0 */
562 /* Skip verify of write_fp, invalid_p == 0 */
563 /* Skip verify of read_sp, invalid_p == 0 */
564 /* Skip verify of write_sp, invalid_p == 0 */
565 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
566 /* Skip verify of register_read, has predicate */
567 /* Skip verify of register_write, has predicate */
568 if ((GDB_MULTI_ARCH
>= 2)
569 && (gdbarch
->num_regs
== -1))
570 fprintf_unfiltered (log
, "\n\tnum_regs");
571 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
572 if ((GDB_MULTI_ARCH
>= 2)
573 && (gdbarch
->sp_regnum
== -1))
574 fprintf_unfiltered (log
, "\n\tsp_regnum");
575 if ((GDB_MULTI_ARCH
>= 2)
576 && (gdbarch
->fp_regnum
== -1))
577 fprintf_unfiltered (log
, "\n\tfp_regnum");
578 if ((GDB_MULTI_ARCH
>= 2)
579 && (gdbarch
->pc_regnum
== -1))
580 fprintf_unfiltered (log
, "\n\tpc_regnum");
581 /* Skip verify of fp0_regnum, invalid_p == 0 */
582 /* Skip verify of npc_regnum, invalid_p == 0 */
583 /* Skip verify of nnpc_regnum, invalid_p == 0 */
584 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
585 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
586 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
587 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
588 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
589 /* Skip verify of register_name, invalid_p == 0 */
590 if ((GDB_MULTI_ARCH
>= 2)
591 && (gdbarch
->register_size
== -1))
592 fprintf_unfiltered (log
, "\n\tregister_size");
593 if ((GDB_MULTI_ARCH
>= 2)
594 && (gdbarch
->register_bytes
== -1))
595 fprintf_unfiltered (log
, "\n\tregister_bytes");
596 if ((GDB_MULTI_ARCH
>= 2)
597 && (gdbarch
->register_byte
== 0))
598 fprintf_unfiltered (log
, "\n\tregister_byte");
599 if ((GDB_MULTI_ARCH
>= 2)
600 && (gdbarch
->register_raw_size
== 0))
601 fprintf_unfiltered (log
, "\n\tregister_raw_size");
602 if ((GDB_MULTI_ARCH
>= 2)
603 && (gdbarch
->max_register_raw_size
== -1))
604 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
605 if ((GDB_MULTI_ARCH
>= 2)
606 && (gdbarch
->register_virtual_size
== 0))
607 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
608 if ((GDB_MULTI_ARCH
>= 2)
609 && (gdbarch
->max_register_virtual_size
== -1))
610 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
611 if ((GDB_MULTI_ARCH
>= 2)
612 && (gdbarch
->register_virtual_type
== 0))
613 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
614 /* Skip verify of do_registers_info, invalid_p == 0 */
615 /* Skip verify of register_sim_regno, invalid_p == 0 */
616 /* Skip verify of register_bytes_ok, has predicate */
617 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
618 /* Skip verify of cannot_store_register, invalid_p == 0 */
619 if ((GDB_MULTI_ARCH
>= 1)
620 && (gdbarch
->use_generic_dummy_frames
== -1))
621 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
622 if ((GDB_MULTI_ARCH
>= 2)
623 && (gdbarch
->call_dummy_location
== 0))
624 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
625 if ((GDB_MULTI_ARCH
>= 2)
626 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
627 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
628 if ((GDB_MULTI_ARCH
>= 2)
629 && (gdbarch
->call_dummy_start_offset
== -1))
630 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
631 if ((GDB_MULTI_ARCH
>= 2)
632 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
633 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
634 if ((GDB_MULTI_ARCH
>= 1)
635 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
636 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
637 if ((GDB_MULTI_ARCH
>= 2)
638 && (gdbarch
->call_dummy_length
== -1))
639 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
640 if ((GDB_MULTI_ARCH
>= 2)
641 && (gdbarch
->pc_in_call_dummy
== 0))
642 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
643 if ((GDB_MULTI_ARCH
>= 1)
644 && (gdbarch
->call_dummy_p
== -1))
645 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
646 /* Skip verify of call_dummy_words, invalid_p == 0 */
647 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
648 if ((GDB_MULTI_ARCH
>= 1)
649 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
650 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
651 if ((GDB_MULTI_ARCH
>= 2)
652 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
653 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
654 if ((GDB_MULTI_ARCH
>= 2)
655 && (gdbarch
->fix_call_dummy
== 0))
656 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
657 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
658 /* Skip verify of init_frame_pc, invalid_p == 0 */
659 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
660 if ((GDB_MULTI_ARCH
>= 1)
661 && (gdbarch
->get_saved_register
== 0))
662 fprintf_unfiltered (log
, "\n\tget_saved_register");
663 /* Skip verify of register_convertible, invalid_p == 0 */
664 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
665 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
666 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
667 /* Skip verify of store_pseudo_register, invalid_p == 0 */
668 /* Skip verify of pointer_to_address, invalid_p == 0 */
669 /* Skip verify of address_to_pointer, invalid_p == 0 */
670 /* Skip verify of integer_to_address, has predicate */
671 /* Skip verify of return_value_on_stack, invalid_p == 0 */
672 if ((GDB_MULTI_ARCH
>= 2)
673 && (gdbarch
->extract_return_value
== 0))
674 fprintf_unfiltered (log
, "\n\textract_return_value");
675 if ((GDB_MULTI_ARCH
>= 1)
676 && (gdbarch
->push_arguments
== 0))
677 fprintf_unfiltered (log
, "\n\tpush_arguments");
678 if ((GDB_MULTI_ARCH
>= 2)
679 && (gdbarch
->push_dummy_frame
== 0))
680 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
681 if ((GDB_MULTI_ARCH
>= 1)
682 && (gdbarch
->push_return_address
== 0))
683 fprintf_unfiltered (log
, "\n\tpush_return_address");
684 if ((GDB_MULTI_ARCH
>= 2)
685 && (gdbarch
->pop_frame
== 0))
686 fprintf_unfiltered (log
, "\n\tpop_frame");
687 if ((GDB_MULTI_ARCH
>= 2)
688 && (gdbarch
->store_struct_return
== 0))
689 fprintf_unfiltered (log
, "\n\tstore_struct_return");
690 if ((GDB_MULTI_ARCH
>= 2)
691 && (gdbarch
->store_return_value
== 0))
692 fprintf_unfiltered (log
, "\n\tstore_return_value");
693 /* Skip verify of extract_struct_value_address, has predicate */
694 if ((GDB_MULTI_ARCH
>= 2)
695 && (gdbarch
->use_struct_convention
== 0))
696 fprintf_unfiltered (log
, "\n\tuse_struct_convention");
697 if ((GDB_MULTI_ARCH
>= 2)
698 && (gdbarch
->frame_init_saved_regs
== 0))
699 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
700 /* Skip verify of init_extra_frame_info, has predicate */
701 if ((GDB_MULTI_ARCH
>= 2)
702 && (gdbarch
->skip_prologue
== 0))
703 fprintf_unfiltered (log
, "\n\tskip_prologue");
704 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
705 if ((GDB_MULTI_ARCH
>= 2)
706 && (gdbarch
->inner_than
== 0))
707 fprintf_unfiltered (log
, "\n\tinner_than");
708 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
709 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
710 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
711 if ((GDB_MULTI_ARCH
>= 2)
712 && (gdbarch
->decr_pc_after_break
== -1))
713 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
714 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
715 if ((GDB_MULTI_ARCH
>= 2)
716 && (gdbarch
->function_start_offset
== -1))
717 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
718 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
719 if ((GDB_MULTI_ARCH
>= 2)
720 && (gdbarch
->frame_args_skip
== -1))
721 fprintf_unfiltered (log
, "\n\tframe_args_skip");
722 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
723 if ((GDB_MULTI_ARCH
>= 2)
724 && (gdbarch
->frame_chain
== 0))
725 fprintf_unfiltered (log
, "\n\tframe_chain");
726 if ((GDB_MULTI_ARCH
>= 1)
727 && (gdbarch
->frame_chain_valid
== 0))
728 fprintf_unfiltered (log
, "\n\tframe_chain_valid");
729 if ((GDB_MULTI_ARCH
>= 2)
730 && (gdbarch
->frame_saved_pc
== 0))
731 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
732 if ((GDB_MULTI_ARCH
>= 2)
733 && (gdbarch
->frame_args_address
== 0))
734 fprintf_unfiltered (log
, "\n\tframe_args_address");
735 if ((GDB_MULTI_ARCH
>= 2)
736 && (gdbarch
->frame_locals_address
== 0))
737 fprintf_unfiltered (log
, "\n\tframe_locals_address");
738 if ((GDB_MULTI_ARCH
>= 2)
739 && (gdbarch
->saved_pc_after_call
== 0))
740 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
741 if ((GDB_MULTI_ARCH
>= 2)
742 && (gdbarch
->frame_num_args
== 0))
743 fprintf_unfiltered (log
, "\n\tframe_num_args");
744 /* Skip verify of stack_align, has predicate */
745 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
746 /* Skip verify of reg_struct_has_addr, has predicate */
747 /* Skip verify of save_dummy_frame_tos, has predicate */
748 if (gdbarch
->float_format
== 0)
749 gdbarch
->float_format
= default_float_format (gdbarch
);
750 if (gdbarch
->double_format
== 0)
751 gdbarch
->double_format
= default_double_format (gdbarch
);
752 if (gdbarch
->long_double_format
== 0)
753 gdbarch
->long_double_format
= &floatformat_unknown
;
754 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
755 /* Skip verify of addr_bits_remove, invalid_p == 0 */
756 /* Skip verify of software_single_step, has predicate */
757 /* Skip verify of print_insn, invalid_p == 0 */
758 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
759 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
760 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
761 buf
= ui_file_xstrdup (log
, &dummy
);
762 make_cleanup (xfree
, buf
);
763 if (strlen (buf
) > 0)
764 internal_error (__FILE__
, __LINE__
,
765 "verify_gdbarch: the following are invalid ...%s",
767 do_cleanups (cleanups
);
771 /* Print out the details of the current architecture. */
773 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
774 just happens to match the global variable ``current_gdbarch''. That
775 way macros refering to that variable get the local and not the global
776 version - ulgh. Once everything is parameterised with gdbarch, this
780 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
782 fprintf_unfiltered (file
,
783 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
786 fprintf_unfiltered (file
,
787 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
788 (long) current_gdbarch
->in_function_epilogue_p
);
790 fprintf_unfiltered (file
,
791 "gdbarch_dump: register_read = 0x%08lx\n",
792 (long) current_gdbarch
->register_read
);
794 fprintf_unfiltered (file
,
795 "gdbarch_dump: register_write = 0x%08lx\n",
796 (long) current_gdbarch
->register_write
);
797 #ifdef ADDRESS_TO_POINTER
799 /* Macro might contain `[{}]' when not multi-arch */
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: %s # %s\n",
802 "ADDRESS_TO_POINTER(type, buf, addr)",
803 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
808 (long) current_gdbarch
->address_to_pointer
809 /*ADDRESS_TO_POINTER ()*/);
811 #ifdef ADDR_BITS_REMOVE
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: %s # %s\n",
814 "ADDR_BITS_REMOVE(addr)",
815 XSTRING (ADDR_BITS_REMOVE (addr
)));
817 fprintf_unfiltered (file
,
818 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
819 (long) current_gdbarch
->addr_bits_remove
820 /*ADDR_BITS_REMOVE ()*/);
822 #ifdef BELIEVE_PCC_PROMOTION
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
825 XSTRING (BELIEVE_PCC_PROMOTION
));
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
828 (long) BELIEVE_PCC_PROMOTION
);
830 #ifdef BELIEVE_PCC_PROMOTION_TYPE
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
833 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
836 (long) BELIEVE_PCC_PROMOTION_TYPE
);
838 #ifdef BREAKPOINT_FROM_PC
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: %s # %s\n",
841 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
842 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
846 (long) current_gdbarch
->breakpoint_from_pc
847 /*BREAKPOINT_FROM_PC ()*/);
849 #ifdef CALL_DUMMY_ADDRESS
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: %s # %s\n",
852 "CALL_DUMMY_ADDRESS()",
853 XSTRING (CALL_DUMMY_ADDRESS ()));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
857 (long) current_gdbarch
->call_dummy_address
858 /*CALL_DUMMY_ADDRESS ()*/);
860 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
863 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
864 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
867 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
869 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
872 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
873 fprintf_unfiltered (file
,
874 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
875 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
877 #ifdef CALL_DUMMY_LENGTH
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
880 XSTRING (CALL_DUMMY_LENGTH
));
881 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
884 (long) CALL_DUMMY_LENGTH
);
886 #ifdef CALL_DUMMY_LOCATION
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
889 XSTRING (CALL_DUMMY_LOCATION
));
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
892 (long) CALL_DUMMY_LOCATION
);
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: CALL_DUMMY_P # %s\n",
897 XSTRING (CALL_DUMMY_P
));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
900 (long) CALL_DUMMY_P
);
902 #ifdef CALL_DUMMY_STACK_ADJUST
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
905 XSTRING (CALL_DUMMY_STACK_ADJUST
));
906 if (CALL_DUMMY_STACK_ADJUST_P
)
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
909 (long) CALL_DUMMY_STACK_ADJUST
);
911 #ifdef CALL_DUMMY_STACK_ADJUST_P
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
914 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
917 (long) CALL_DUMMY_STACK_ADJUST_P
);
919 #ifdef CALL_DUMMY_START_OFFSET
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
922 XSTRING (CALL_DUMMY_START_OFFSET
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
925 (long) CALL_DUMMY_START_OFFSET
);
927 #ifdef CALL_DUMMY_WORDS
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
930 XSTRING (CALL_DUMMY_WORDS
));
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
933 (long) CALL_DUMMY_WORDS
);
935 #ifdef CANNOT_FETCH_REGISTER
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: %s # %s\n",
938 "CANNOT_FETCH_REGISTER(regnum)",
939 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
943 (long) current_gdbarch
->cannot_fetch_register
944 /*CANNOT_FETCH_REGISTER ()*/);
946 #ifdef CANNOT_STORE_REGISTER
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: %s # %s\n",
949 "CANNOT_STORE_REGISTER(regnum)",
950 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
954 (long) current_gdbarch
->cannot_store_register
955 /*CANNOT_STORE_REGISTER ()*/);
957 #ifdef COERCE_FLOAT_TO_DOUBLE
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: %s # %s\n",
960 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
961 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
965 (long) current_gdbarch
->coerce_float_to_double
966 /*COERCE_FLOAT_TO_DOUBLE ()*/);
968 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: %s # %s\n",
971 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
972 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
976 (long) current_gdbarch
->convert_from_func_ptr_addr
977 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
979 #ifdef DECR_PC_AFTER_BREAK
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
982 XSTRING (DECR_PC_AFTER_BREAK
));
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
985 (long) DECR_PC_AFTER_BREAK
);
987 #ifdef DO_REGISTERS_INFO
989 /* Macro might contain `[{}]' when not multi-arch */
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: %s # %s\n",
992 "DO_REGISTERS_INFO(reg_nr, fpregs)",
993 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
998 (long) current_gdbarch
->do_registers_info
999 /*DO_REGISTERS_INFO ()*/);
1001 #ifdef DWARF2_REG_TO_REGNUM
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: %s # %s\n",
1004 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1005 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1009 (long) current_gdbarch
->dwarf2_reg_to_regnum
1010 /*DWARF2_REG_TO_REGNUM ()*/);
1012 #ifdef DWARF_REG_TO_REGNUM
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: %s # %s\n",
1015 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1016 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1020 (long) current_gdbarch
->dwarf_reg_to_regnum
1021 /*DWARF_REG_TO_REGNUM ()*/);
1023 #ifdef ECOFF_REG_TO_REGNUM
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: %s # %s\n",
1026 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1027 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1031 (long) current_gdbarch
->ecoff_reg_to_regnum
1032 /*ECOFF_REG_TO_REGNUM ()*/);
1034 #ifdef EXTRACT_RETURN_VALUE
1036 /* Macro might contain `[{}]' when not multi-arch */
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: %s # %s\n",
1039 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1040 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1045 (long) current_gdbarch
->extract_return_value
1046 /*EXTRACT_RETURN_VALUE ()*/);
1048 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: %s # %s\n",
1051 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1052 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1056 (long) current_gdbarch
->extract_struct_value_address
1057 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1059 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1062 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1065 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
1067 #ifdef FETCH_PSEUDO_REGISTER
1069 /* Macro might contain `[{}]' when not multi-arch */
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: %s # %s\n",
1072 "FETCH_PSEUDO_REGISTER(regnum)",
1073 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1078 (long) current_gdbarch
->fetch_pseudo_register
1079 /*FETCH_PSEUDO_REGISTER ()*/);
1081 #ifdef FIX_CALL_DUMMY
1083 /* Macro might contain `[{}]' when not multi-arch */
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: %s # %s\n",
1086 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1087 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1092 (long) current_gdbarch
->fix_call_dummy
1093 /*FIX_CALL_DUMMY ()*/);
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: FP0_REGNUM # %s\n",
1098 XSTRING (FP0_REGNUM
));
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: FP0_REGNUM = %ld\n",
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: FP_REGNUM # %s\n",
1106 XSTRING (FP_REGNUM
));
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: FP_REGNUM = %ld\n",
1111 #ifdef FRAMELESS_FUNCTION_INVOCATION
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: %s # %s\n",
1114 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1115 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1119 (long) current_gdbarch
->frameless_function_invocation
1120 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1122 #ifdef FRAME_ARGS_ADDRESS
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: %s # %s\n",
1125 "FRAME_ARGS_ADDRESS(fi)",
1126 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1130 (long) current_gdbarch
->frame_args_address
1131 /*FRAME_ARGS_ADDRESS ()*/);
1133 #ifdef FRAME_ARGS_SKIP
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1136 XSTRING (FRAME_ARGS_SKIP
));
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1139 (long) FRAME_ARGS_SKIP
);
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: %s # %s\n",
1144 "FRAME_CHAIN(frame)",
1145 XSTRING (FRAME_CHAIN (frame
)));
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1149 (long) current_gdbarch
->frame_chain
1150 /*FRAME_CHAIN ()*/);
1152 #ifdef FRAME_CHAIN_VALID
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: %s # %s\n",
1155 "FRAME_CHAIN_VALID(chain, thisframe)",
1156 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1160 (long) current_gdbarch
->frame_chain_valid
1161 /*FRAME_CHAIN_VALID ()*/);
1163 #ifdef FRAME_INIT_SAVED_REGS
1165 /* Macro might contain `[{}]' when not multi-arch */
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: %s # %s\n",
1168 "FRAME_INIT_SAVED_REGS(frame)",
1169 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1174 (long) current_gdbarch
->frame_init_saved_regs
1175 /*FRAME_INIT_SAVED_REGS ()*/);
1177 #ifdef FRAME_LOCALS_ADDRESS
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: %s # %s\n",
1180 "FRAME_LOCALS_ADDRESS(fi)",
1181 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1183 fprintf_unfiltered (file
,
1184 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1185 (long) current_gdbarch
->frame_locals_address
1186 /*FRAME_LOCALS_ADDRESS ()*/);
1188 #ifdef FRAME_NUM_ARGS
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: %s # %s\n",
1191 "FRAME_NUM_ARGS(frame)",
1192 XSTRING (FRAME_NUM_ARGS (frame
)));
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1196 (long) current_gdbarch
->frame_num_args
1197 /*FRAME_NUM_ARGS ()*/);
1199 #ifdef FRAME_SAVED_PC
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: %s # %s\n",
1202 "FRAME_SAVED_PC(fi)",
1203 XSTRING (FRAME_SAVED_PC (fi
)));
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1207 (long) current_gdbarch
->frame_saved_pc
1208 /*FRAME_SAVED_PC ()*/);
1210 #ifdef FUNCTION_START_OFFSET
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1213 XSTRING (FUNCTION_START_OFFSET
));
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1216 (long) FUNCTION_START_OFFSET
);
1218 #ifdef GET_SAVED_REGISTER
1220 /* Macro might contain `[{}]' when not multi-arch */
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: %s # %s\n",
1223 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1224 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1229 (long) current_gdbarch
->get_saved_register
1230 /*GET_SAVED_REGISTER ()*/);
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: IEEE_FLOAT # %s\n",
1235 XSTRING (IEEE_FLOAT
));
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1240 #ifdef INIT_EXTRA_FRAME_INFO
1242 /* Macro might contain `[{}]' when not multi-arch */
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: %s # %s\n",
1245 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1246 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1249 fprintf_unfiltered (file
,
1250 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1251 (long) current_gdbarch
->init_extra_frame_info
1252 /*INIT_EXTRA_FRAME_INFO ()*/);
1254 #ifdef INIT_FRAME_PC
1256 /* Macro might contain `[{}]' when not multi-arch */
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: %s # %s\n",
1259 "INIT_FRAME_PC(fromleaf, prev)",
1260 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1265 (long) current_gdbarch
->init_frame_pc
1266 /*INIT_FRAME_PC ()*/);
1268 #ifdef INIT_FRAME_PC_FIRST
1270 /* Macro might contain `[{}]' when not multi-arch */
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: %s # %s\n",
1273 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1274 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1279 (long) current_gdbarch
->init_frame_pc_first
1280 /*INIT_FRAME_PC_FIRST ()*/);
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: %s # %s\n",
1285 "INNER_THAN(lhs, rhs)",
1286 XSTRING (INNER_THAN (lhs
, rhs
)));
1288 fprintf_unfiltered (file
,
1289 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1290 (long) current_gdbarch
->inner_than
1293 #ifdef INTEGER_TO_ADDRESS
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: %s # %s\n",
1296 "INTEGER_TO_ADDRESS(type, buf)",
1297 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1301 (long) current_gdbarch
->integer_to_address
1302 /*INTEGER_TO_ADDRESS ()*/);
1304 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1308 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1312 (long) current_gdbarch
->in_solib_call_trampoline
1313 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1315 #ifdef MAX_REGISTER_RAW_SIZE
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1318 XSTRING (MAX_REGISTER_RAW_SIZE
));
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1321 (long) MAX_REGISTER_RAW_SIZE
);
1323 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1326 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1329 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1331 #ifdef MEMORY_INSERT_BREAKPOINT
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: %s # %s\n",
1334 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1335 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1339 (long) current_gdbarch
->memory_insert_breakpoint
1340 /*MEMORY_INSERT_BREAKPOINT ()*/);
1342 #ifdef MEMORY_REMOVE_BREAKPOINT
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: %s # %s\n",
1345 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1346 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1350 (long) current_gdbarch
->memory_remove_breakpoint
1351 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: NNPC_REGNUM # %s\n",
1356 XSTRING (NNPC_REGNUM
));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1359 (long) NNPC_REGNUM
);
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: NPC_REGNUM # %s\n",
1364 XSTRING (NPC_REGNUM
));
1365 fprintf_unfiltered (file
,
1366 "gdbarch_dump: NPC_REGNUM = %ld\n",
1369 #ifdef NUM_PSEUDO_REGS
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1372 XSTRING (NUM_PSEUDO_REGS
));
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1375 (long) NUM_PSEUDO_REGS
);
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: NUM_REGS # %s\n",
1380 XSTRING (NUM_REGS
));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: NUM_REGS = %ld\n",
1385 #ifdef PARM_BOUNDARY
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1388 XSTRING (PARM_BOUNDARY
));
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1391 (long) PARM_BOUNDARY
);
1393 #ifdef PC_IN_CALL_DUMMY
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: %s # %s\n",
1396 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1397 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1401 (long) current_gdbarch
->pc_in_call_dummy
1402 /*PC_IN_CALL_DUMMY ()*/);
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: PC_REGNUM # %s\n",
1407 XSTRING (PC_REGNUM
));
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: PC_REGNUM = %ld\n",
1412 #ifdef POINTER_TO_ADDRESS
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: %s # %s\n",
1415 "POINTER_TO_ADDRESS(type, buf)",
1416 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1418 fprintf_unfiltered (file
,
1419 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1420 (long) current_gdbarch
->pointer_to_address
1421 /*POINTER_TO_ADDRESS ()*/);
1425 /* Macro might contain `[{}]' when not multi-arch */
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: %s # %s\n",
1429 XSTRING (POP_FRAME (-)));
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1434 (long) current_gdbarch
->pop_frame
1437 #ifdef PREPARE_TO_PROCEED
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: %s # %s\n",
1440 "PREPARE_TO_PROCEED(select_it)",
1441 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1445 (long) current_gdbarch
->prepare_to_proceed
1446 /*PREPARE_TO_PROCEED ()*/);
1448 #ifdef PROLOGUE_FRAMELESS_P
1449 fprintf_unfiltered (file
,
1450 "gdbarch_dump: %s # %s\n",
1451 "PROLOGUE_FRAMELESS_P(ip)",
1452 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1456 (long) current_gdbarch
->prologue_frameless_p
1457 /*PROLOGUE_FRAMELESS_P ()*/);
1459 #ifdef PUSH_ARGUMENTS
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: %s # %s\n",
1462 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1463 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1467 (long) current_gdbarch
->push_arguments
1468 /*PUSH_ARGUMENTS ()*/);
1470 #ifdef PUSH_DUMMY_FRAME
1472 /* Macro might contain `[{}]' when not multi-arch */
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: %s # %s\n",
1475 "PUSH_DUMMY_FRAME(-)",
1476 XSTRING (PUSH_DUMMY_FRAME (-)));
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1481 (long) current_gdbarch
->push_dummy_frame
1482 /*PUSH_DUMMY_FRAME ()*/);
1484 #ifdef PUSH_RETURN_ADDRESS
1485 fprintf_unfiltered (file
,
1486 "gdbarch_dump: %s # %s\n",
1487 "PUSH_RETURN_ADDRESS(pc, sp)",
1488 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1492 (long) current_gdbarch
->push_return_address
1493 /*PUSH_RETURN_ADDRESS ()*/);
1495 #ifdef REGISTER_BYTE
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: %s # %s\n",
1498 "REGISTER_BYTE(reg_nr)",
1499 XSTRING (REGISTER_BYTE (reg_nr
)));
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1503 (long) current_gdbarch
->register_byte
1504 /*REGISTER_BYTE ()*/);
1506 #ifdef REGISTER_BYTES
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: REGISTER_BYTES # %s\n",
1509 XSTRING (REGISTER_BYTES
));
1510 fprintf_unfiltered (file
,
1511 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1512 (long) REGISTER_BYTES
);
1514 #ifdef REGISTER_BYTES_OK
1515 fprintf_unfiltered (file
,
1516 "gdbarch_dump: %s # %s\n",
1517 "REGISTER_BYTES_OK(nr_bytes)",
1518 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1522 (long) current_gdbarch
->register_bytes_ok
1523 /*REGISTER_BYTES_OK ()*/);
1525 #ifdef REGISTER_CONVERTIBLE
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: %s # %s\n",
1528 "REGISTER_CONVERTIBLE(nr)",
1529 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1533 (long) current_gdbarch
->register_convertible
1534 /*REGISTER_CONVERTIBLE ()*/);
1536 #ifdef REGISTER_CONVERT_TO_RAW
1538 /* Macro might contain `[{}]' when not multi-arch */
1539 fprintf_unfiltered (file
,
1540 "gdbarch_dump: %s # %s\n",
1541 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1542 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1547 (long) current_gdbarch
->register_convert_to_raw
1548 /*REGISTER_CONVERT_TO_RAW ()*/);
1550 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1552 /* Macro might contain `[{}]' when not multi-arch */
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: %s # %s\n",
1555 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1556 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1559 fprintf_unfiltered (file
,
1560 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1561 (long) current_gdbarch
->register_convert_to_virtual
1562 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1564 #ifdef REGISTER_NAME
1565 fprintf_unfiltered (file
,
1566 "gdbarch_dump: %s # %s\n",
1567 "REGISTER_NAME(regnr)",
1568 XSTRING (REGISTER_NAME (regnr
)));
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1572 (long) current_gdbarch
->register_name
1573 /*REGISTER_NAME ()*/);
1575 #ifdef REGISTER_RAW_SIZE
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: %s # %s\n",
1578 "REGISTER_RAW_SIZE(reg_nr)",
1579 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1583 (long) current_gdbarch
->register_raw_size
1584 /*REGISTER_RAW_SIZE ()*/);
1586 #ifdef REGISTER_SIM_REGNO
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: %s # %s\n",
1589 "REGISTER_SIM_REGNO(reg_nr)",
1590 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1594 (long) current_gdbarch
->register_sim_regno
1595 /*REGISTER_SIM_REGNO ()*/);
1597 #ifdef REGISTER_SIZE
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: REGISTER_SIZE # %s\n",
1600 XSTRING (REGISTER_SIZE
));
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1603 (long) REGISTER_SIZE
);
1605 #ifdef REGISTER_VIRTUAL_SIZE
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: %s # %s\n",
1608 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1609 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1613 (long) current_gdbarch
->register_virtual_size
1614 /*REGISTER_VIRTUAL_SIZE ()*/);
1616 #ifdef REGISTER_VIRTUAL_TYPE
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: %s # %s\n",
1619 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1620 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1624 (long) current_gdbarch
->register_virtual_type
1625 /*REGISTER_VIRTUAL_TYPE ()*/);
1627 #ifdef REG_STRUCT_HAS_ADDR
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: %s # %s\n",
1630 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1631 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1635 (long) current_gdbarch
->reg_struct_has_addr
1636 /*REG_STRUCT_HAS_ADDR ()*/);
1638 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1640 /* Macro might contain `[{}]' when not multi-arch */
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: %s # %s\n",
1643 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1644 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1647 fprintf_unfiltered (file
,
1648 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1649 (long) current_gdbarch
->remote_translate_xfer_address
1650 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1652 #ifdef RETURN_VALUE_ON_STACK
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: %s # %s\n",
1655 "RETURN_VALUE_ON_STACK(type)",
1656 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1660 (long) current_gdbarch
->return_value_on_stack
1661 /*RETURN_VALUE_ON_STACK ()*/);
1663 #ifdef SAVED_PC_AFTER_CALL
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: %s # %s\n",
1666 "SAVED_PC_AFTER_CALL(frame)",
1667 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1669 fprintf_unfiltered (file
,
1670 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1671 (long) current_gdbarch
->saved_pc_after_call
1672 /*SAVED_PC_AFTER_CALL ()*/);
1674 #ifdef SAVE_DUMMY_FRAME_TOS
1676 /* Macro might contain `[{}]' when not multi-arch */
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: %s # %s\n",
1679 "SAVE_DUMMY_FRAME_TOS(sp)",
1680 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1685 (long) current_gdbarch
->save_dummy_frame_tos
1686 /*SAVE_DUMMY_FRAME_TOS ()*/);
1688 #ifdef SDB_REG_TO_REGNUM
1689 fprintf_unfiltered (file
,
1690 "gdbarch_dump: %s # %s\n",
1691 "SDB_REG_TO_REGNUM(sdb_regnr)",
1692 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1696 (long) current_gdbarch
->sdb_reg_to_regnum
1697 /*SDB_REG_TO_REGNUM ()*/);
1699 #ifdef SIZEOF_CALL_DUMMY_WORDS
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1702 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1705 (long) SIZEOF_CALL_DUMMY_WORDS
);
1707 #ifdef SKIP_PROLOGUE
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: %s # %s\n",
1710 "SKIP_PROLOGUE(ip)",
1711 XSTRING (SKIP_PROLOGUE (ip
)));
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1715 (long) current_gdbarch
->skip_prologue
1716 /*SKIP_PROLOGUE ()*/);
1718 #ifdef SKIP_TRAMPOLINE_CODE
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: %s # %s\n",
1721 "SKIP_TRAMPOLINE_CODE(pc)",
1722 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1724 fprintf_unfiltered (file
,
1725 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1726 (long) current_gdbarch
->skip_trampoline_code
1727 /*SKIP_TRAMPOLINE_CODE ()*/);
1729 #ifdef SOFTWARE_SINGLE_STEP
1731 /* Macro might contain `[{}]' when not multi-arch */
1732 fprintf_unfiltered (file
,
1733 "gdbarch_dump: %s # %s\n",
1734 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1735 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1738 fprintf_unfiltered (file
,
1739 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1740 (long) current_gdbarch
->software_single_step
1741 /*SOFTWARE_SINGLE_STEP ()*/);
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: SP_REGNUM # %s\n",
1746 XSTRING (SP_REGNUM
));
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: SP_REGNUM = %ld\n",
1751 #ifdef STAB_REG_TO_REGNUM
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: %s # %s\n",
1754 "STAB_REG_TO_REGNUM(stab_regnr)",
1755 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1759 (long) current_gdbarch
->stab_reg_to_regnum
1760 /*STAB_REG_TO_REGNUM ()*/);
1763 fprintf_unfiltered (file
,
1764 "gdbarch_dump: %s # %s\n",
1766 XSTRING (STACK_ALIGN (sp
)));
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1770 (long) current_gdbarch
->stack_align
1771 /*STACK_ALIGN ()*/);
1773 #ifdef STORE_PSEUDO_REGISTER
1775 /* Macro might contain `[{}]' when not multi-arch */
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: %s # %s\n",
1778 "STORE_PSEUDO_REGISTER(regnum)",
1779 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1784 (long) current_gdbarch
->store_pseudo_register
1785 /*STORE_PSEUDO_REGISTER ()*/);
1787 #ifdef STORE_RETURN_VALUE
1789 /* Macro might contain `[{}]' when not multi-arch */
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: %s # %s\n",
1792 "STORE_RETURN_VALUE(type, valbuf)",
1793 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1796 fprintf_unfiltered (file
,
1797 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1798 (long) current_gdbarch
->store_return_value
1799 /*STORE_RETURN_VALUE ()*/);
1801 #ifdef STORE_STRUCT_RETURN
1803 /* Macro might contain `[{}]' when not multi-arch */
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: %s # %s\n",
1806 "STORE_STRUCT_RETURN(addr, sp)",
1807 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1812 (long) current_gdbarch
->store_struct_return
1813 /*STORE_STRUCT_RETURN ()*/);
1815 #ifdef TARGET_ADDR_BIT
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1818 XSTRING (TARGET_ADDR_BIT
));
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1821 (long) TARGET_ADDR_BIT
);
1823 #ifdef TARGET_ARCHITECTURE
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1826 XSTRING (TARGET_ARCHITECTURE
));
1827 if (TARGET_ARCHITECTURE
!= NULL
)
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1830 TARGET_ARCHITECTURE
->printable_name
);
1832 #ifdef TARGET_BFD_VMA_BIT
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1835 XSTRING (TARGET_BFD_VMA_BIT
));
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1838 (long) TARGET_BFD_VMA_BIT
);
1840 #ifdef TARGET_BYTE_ORDER
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1843 XSTRING (TARGET_BYTE_ORDER
));
1844 fprintf_unfiltered (file
,
1845 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1846 (long) TARGET_BYTE_ORDER
);
1848 #ifdef TARGET_DOUBLE_BIT
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1851 XSTRING (TARGET_DOUBLE_BIT
));
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1854 (long) TARGET_DOUBLE_BIT
);
1856 #ifdef TARGET_DOUBLE_FORMAT
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1859 XSTRING (TARGET_DOUBLE_FORMAT
));
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1862 (long) TARGET_DOUBLE_FORMAT
);
1864 #ifdef TARGET_FLOAT_BIT
1865 fprintf_unfiltered (file
,
1866 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1867 XSTRING (TARGET_FLOAT_BIT
));
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1870 (long) TARGET_FLOAT_BIT
);
1872 #ifdef TARGET_FLOAT_FORMAT
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1875 XSTRING (TARGET_FLOAT_FORMAT
));
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1878 (long) TARGET_FLOAT_FORMAT
);
1880 #ifdef TARGET_INT_BIT
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1883 XSTRING (TARGET_INT_BIT
));
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1886 (long) TARGET_INT_BIT
);
1888 #ifdef TARGET_LONG_BIT
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1891 XSTRING (TARGET_LONG_BIT
));
1892 fprintf_unfiltered (file
,
1893 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1894 (long) TARGET_LONG_BIT
);
1896 #ifdef TARGET_LONG_DOUBLE_BIT
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1899 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1902 (long) TARGET_LONG_DOUBLE_BIT
);
1904 #ifdef TARGET_LONG_DOUBLE_FORMAT
1905 fprintf_unfiltered (file
,
1906 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1907 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1910 (long) TARGET_LONG_DOUBLE_FORMAT
);
1912 #ifdef TARGET_LONG_LONG_BIT
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1915 XSTRING (TARGET_LONG_LONG_BIT
));
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1918 (long) TARGET_LONG_LONG_BIT
);
1920 #ifdef TARGET_PRINT_INSN
1921 fprintf_unfiltered (file
,
1922 "gdbarch_dump: %s # %s\n",
1923 "TARGET_PRINT_INSN(vma, info)",
1924 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1928 (long) current_gdbarch
->print_insn
1929 /*TARGET_PRINT_INSN ()*/);
1931 #ifdef TARGET_PTR_BIT
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1934 XSTRING (TARGET_PTR_BIT
));
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1937 (long) TARGET_PTR_BIT
);
1939 #ifdef TARGET_READ_FP
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: %s # %s\n",
1943 XSTRING (TARGET_READ_FP ()));
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1947 (long) current_gdbarch
->read_fp
1948 /*TARGET_READ_FP ()*/);
1950 #ifdef TARGET_READ_PC
1951 fprintf_unfiltered (file
,
1952 "gdbarch_dump: %s # %s\n",
1953 "TARGET_READ_PC(ptid)",
1954 XSTRING (TARGET_READ_PC (ptid
)));
1956 fprintf_unfiltered (file
,
1957 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1958 (long) current_gdbarch
->read_pc
1959 /*TARGET_READ_PC ()*/);
1961 #ifdef TARGET_READ_SP
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: %s # %s\n",
1965 XSTRING (TARGET_READ_SP ()));
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1969 (long) current_gdbarch
->read_sp
1970 /*TARGET_READ_SP ()*/);
1972 #ifdef TARGET_SHORT_BIT
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1975 XSTRING (TARGET_SHORT_BIT
));
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1978 (long) TARGET_SHORT_BIT
);
1980 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1982 /* Macro might contain `[{}]' when not multi-arch */
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: %s # %s\n",
1985 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1986 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
1991 (long) current_gdbarch
->virtual_frame_pointer
1992 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
1994 #ifdef TARGET_WRITE_FP
1996 /* Macro might contain `[{}]' when not multi-arch */
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: %s # %s\n",
1999 "TARGET_WRITE_FP(val)",
2000 XSTRING (TARGET_WRITE_FP (val
)));
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2005 (long) current_gdbarch
->write_fp
2006 /*TARGET_WRITE_FP ()*/);
2008 #ifdef TARGET_WRITE_PC
2010 /* Macro might contain `[{}]' when not multi-arch */
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: %s # %s\n",
2013 "TARGET_WRITE_PC(val, ptid)",
2014 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2019 (long) current_gdbarch
->write_pc
2020 /*TARGET_WRITE_PC ()*/);
2022 #ifdef TARGET_WRITE_SP
2024 /* Macro might contain `[{}]' when not multi-arch */
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: %s # %s\n",
2027 "TARGET_WRITE_SP(val)",
2028 XSTRING (TARGET_WRITE_SP (val
)));
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2033 (long) current_gdbarch
->write_sp
2034 /*TARGET_WRITE_SP ()*/);
2036 #ifdef USE_GENERIC_DUMMY_FRAMES
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2039 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2040 fprintf_unfiltered (file
,
2041 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2042 (long) USE_GENERIC_DUMMY_FRAMES
);
2044 #ifdef USE_STRUCT_CONVENTION
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: %s # %s\n",
2047 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2048 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2052 (long) current_gdbarch
->use_struct_convention
2053 /*USE_STRUCT_CONVENTION ()*/);
2055 if (current_gdbarch
->dump_tdep
!= NULL
)
2056 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2059 struct gdbarch_tdep
*
2060 gdbarch_tdep (struct gdbarch
*gdbarch
)
2062 if (gdbarch_debug
>= 2)
2063 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2064 return gdbarch
->tdep
;
2068 const struct bfd_arch_info
*
2069 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2071 if (gdbarch_debug
>= 2)
2072 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2073 return gdbarch
->bfd_arch_info
;
2077 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2079 if (gdbarch_debug
>= 2)
2080 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2081 return gdbarch
->byte_order
;
2085 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2087 /* Skip verify of short_bit, invalid_p == 0 */
2088 if (gdbarch_debug
>= 2)
2089 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2090 return gdbarch
->short_bit
;
2094 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2097 gdbarch
->short_bit
= short_bit
;
2101 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2103 /* Skip verify of int_bit, invalid_p == 0 */
2104 if (gdbarch_debug
>= 2)
2105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2106 return gdbarch
->int_bit
;
2110 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2113 gdbarch
->int_bit
= int_bit
;
2117 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2119 /* Skip verify of long_bit, invalid_p == 0 */
2120 if (gdbarch_debug
>= 2)
2121 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2122 return gdbarch
->long_bit
;
2126 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2129 gdbarch
->long_bit
= long_bit
;
2133 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2135 /* Skip verify of long_long_bit, invalid_p == 0 */
2136 if (gdbarch_debug
>= 2)
2137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2138 return gdbarch
->long_long_bit
;
2142 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2145 gdbarch
->long_long_bit
= long_long_bit
;
2149 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2151 /* Skip verify of float_bit, invalid_p == 0 */
2152 if (gdbarch_debug
>= 2)
2153 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2154 return gdbarch
->float_bit
;
2158 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2161 gdbarch
->float_bit
= float_bit
;
2165 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2167 /* Skip verify of double_bit, invalid_p == 0 */
2168 if (gdbarch_debug
>= 2)
2169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2170 return gdbarch
->double_bit
;
2174 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2177 gdbarch
->double_bit
= double_bit
;
2181 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2183 /* Skip verify of long_double_bit, invalid_p == 0 */
2184 if (gdbarch_debug
>= 2)
2185 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2186 return gdbarch
->long_double_bit
;
2190 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2191 int long_double_bit
)
2193 gdbarch
->long_double_bit
= long_double_bit
;
2197 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2199 /* Skip verify of ptr_bit, invalid_p == 0 */
2200 if (gdbarch_debug
>= 2)
2201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2202 return gdbarch
->ptr_bit
;
2206 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2209 gdbarch
->ptr_bit
= ptr_bit
;
2213 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2215 if (gdbarch
->addr_bit
== 0)
2216 internal_error (__FILE__
, __LINE__
,
2217 "gdbarch: gdbarch_addr_bit invalid");
2218 if (gdbarch_debug
>= 2)
2219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2220 return gdbarch
->addr_bit
;
2224 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2227 gdbarch
->addr_bit
= addr_bit
;
2231 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2233 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2234 if (gdbarch_debug
>= 2)
2235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2236 return gdbarch
->bfd_vma_bit
;
2240 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2243 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2247 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2249 /* Skip verify of ieee_float, invalid_p == 0 */
2250 if (gdbarch_debug
>= 2)
2251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2252 return gdbarch
->ieee_float
;
2256 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2259 gdbarch
->ieee_float
= ieee_float
;
2263 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2265 if (gdbarch
->read_pc
== 0)
2266 internal_error (__FILE__
, __LINE__
,
2267 "gdbarch: gdbarch_read_pc invalid");
2268 if (gdbarch_debug
>= 2)
2269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2270 return gdbarch
->read_pc (ptid
);
2274 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2275 gdbarch_read_pc_ftype read_pc
)
2277 gdbarch
->read_pc
= read_pc
;
2281 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2283 if (gdbarch
->write_pc
== 0)
2284 internal_error (__FILE__
, __LINE__
,
2285 "gdbarch: gdbarch_write_pc invalid");
2286 if (gdbarch_debug
>= 2)
2287 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2288 gdbarch
->write_pc (val
, ptid
);
2292 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2293 gdbarch_write_pc_ftype write_pc
)
2295 gdbarch
->write_pc
= write_pc
;
2299 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2301 if (gdbarch
->read_fp
== 0)
2302 internal_error (__FILE__
, __LINE__
,
2303 "gdbarch: gdbarch_read_fp invalid");
2304 if (gdbarch_debug
>= 2)
2305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2306 return gdbarch
->read_fp ();
2310 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2311 gdbarch_read_fp_ftype read_fp
)
2313 gdbarch
->read_fp
= read_fp
;
2317 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2319 if (gdbarch
->write_fp
== 0)
2320 internal_error (__FILE__
, __LINE__
,
2321 "gdbarch: gdbarch_write_fp invalid");
2322 if (gdbarch_debug
>= 2)
2323 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2324 gdbarch
->write_fp (val
);
2328 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2329 gdbarch_write_fp_ftype write_fp
)
2331 gdbarch
->write_fp
= write_fp
;
2335 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2337 if (gdbarch
->read_sp
== 0)
2338 internal_error (__FILE__
, __LINE__
,
2339 "gdbarch: gdbarch_read_sp invalid");
2340 if (gdbarch_debug
>= 2)
2341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2342 return gdbarch
->read_sp ();
2346 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2347 gdbarch_read_sp_ftype read_sp
)
2349 gdbarch
->read_sp
= read_sp
;
2353 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2355 if (gdbarch
->write_sp
== 0)
2356 internal_error (__FILE__
, __LINE__
,
2357 "gdbarch: gdbarch_write_sp invalid");
2358 if (gdbarch_debug
>= 2)
2359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2360 gdbarch
->write_sp (val
);
2364 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2365 gdbarch_write_sp_ftype write_sp
)
2367 gdbarch
->write_sp
= write_sp
;
2371 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2373 if (gdbarch
->virtual_frame_pointer
== 0)
2374 internal_error (__FILE__
, __LINE__
,
2375 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2376 if (gdbarch_debug
>= 2)
2377 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2378 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2382 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2383 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2385 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2389 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2391 return gdbarch
->register_read
!= 0;
2395 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2397 if (gdbarch
->register_read
== 0)
2398 internal_error (__FILE__
, __LINE__
,
2399 "gdbarch: gdbarch_register_read invalid");
2400 if (gdbarch_debug
>= 2)
2401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2402 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2406 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2407 gdbarch_register_read_ftype register_read
)
2409 gdbarch
->register_read
= register_read
;
2413 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2415 return gdbarch
->register_write
!= 0;
2419 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2421 if (gdbarch
->register_write
== 0)
2422 internal_error (__FILE__
, __LINE__
,
2423 "gdbarch: gdbarch_register_write invalid");
2424 if (gdbarch_debug
>= 2)
2425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2426 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2430 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2431 gdbarch_register_write_ftype register_write
)
2433 gdbarch
->register_write
= register_write
;
2437 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2439 if (gdbarch
->num_regs
== -1)
2440 internal_error (__FILE__
, __LINE__
,
2441 "gdbarch: gdbarch_num_regs invalid");
2442 if (gdbarch_debug
>= 2)
2443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2444 return gdbarch
->num_regs
;
2448 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2451 gdbarch
->num_regs
= num_regs
;
2455 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2457 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2458 if (gdbarch_debug
>= 2)
2459 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2460 return gdbarch
->num_pseudo_regs
;
2464 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2465 int num_pseudo_regs
)
2467 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2471 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2473 if (gdbarch
->sp_regnum
== -1)
2474 internal_error (__FILE__
, __LINE__
,
2475 "gdbarch: gdbarch_sp_regnum invalid");
2476 if (gdbarch_debug
>= 2)
2477 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2478 return gdbarch
->sp_regnum
;
2482 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2485 gdbarch
->sp_regnum
= sp_regnum
;
2489 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2491 if (gdbarch
->fp_regnum
== -1)
2492 internal_error (__FILE__
, __LINE__
,
2493 "gdbarch: gdbarch_fp_regnum invalid");
2494 if (gdbarch_debug
>= 2)
2495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2496 return gdbarch
->fp_regnum
;
2500 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2503 gdbarch
->fp_regnum
= fp_regnum
;
2507 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2509 if (gdbarch
->pc_regnum
== -1)
2510 internal_error (__FILE__
, __LINE__
,
2511 "gdbarch: gdbarch_pc_regnum invalid");
2512 if (gdbarch_debug
>= 2)
2513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2514 return gdbarch
->pc_regnum
;
2518 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2521 gdbarch
->pc_regnum
= pc_regnum
;
2525 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2527 /* Skip verify of fp0_regnum, invalid_p == 0 */
2528 if (gdbarch_debug
>= 2)
2529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2530 return gdbarch
->fp0_regnum
;
2534 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2537 gdbarch
->fp0_regnum
= fp0_regnum
;
2541 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2543 /* Skip verify of npc_regnum, invalid_p == 0 */
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2546 return gdbarch
->npc_regnum
;
2550 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2553 gdbarch
->npc_regnum
= npc_regnum
;
2557 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2559 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2560 if (gdbarch_debug
>= 2)
2561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2562 return gdbarch
->nnpc_regnum
;
2566 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2569 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2573 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2575 if (gdbarch
->stab_reg_to_regnum
== 0)
2576 internal_error (__FILE__
, __LINE__
,
2577 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2578 if (gdbarch_debug
>= 2)
2579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2580 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2584 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2585 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2587 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2591 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2593 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2594 internal_error (__FILE__
, __LINE__
,
2595 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2596 if (gdbarch_debug
>= 2)
2597 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2598 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2602 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2603 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2605 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2609 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2611 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2612 internal_error (__FILE__
, __LINE__
,
2613 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2614 if (gdbarch_debug
>= 2)
2615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2616 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2620 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2621 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2623 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2627 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2629 if (gdbarch
->sdb_reg_to_regnum
== 0)
2630 internal_error (__FILE__
, __LINE__
,
2631 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2632 if (gdbarch_debug
>= 2)
2633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2634 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2638 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2639 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2641 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2645 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2647 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2648 internal_error (__FILE__
, __LINE__
,
2649 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2650 if (gdbarch_debug
>= 2)
2651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2652 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2656 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2657 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2659 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2663 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2665 if (gdbarch
->register_name
== 0)
2666 internal_error (__FILE__
, __LINE__
,
2667 "gdbarch: gdbarch_register_name invalid");
2668 if (gdbarch_debug
>= 2)
2669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2670 return gdbarch
->register_name (regnr
);
2674 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2675 gdbarch_register_name_ftype register_name
)
2677 gdbarch
->register_name
= register_name
;
2681 gdbarch_register_size (struct gdbarch
*gdbarch
)
2683 if (gdbarch
->register_size
== -1)
2684 internal_error (__FILE__
, __LINE__
,
2685 "gdbarch: gdbarch_register_size invalid");
2686 if (gdbarch_debug
>= 2)
2687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2688 return gdbarch
->register_size
;
2692 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2695 gdbarch
->register_size
= register_size
;
2699 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2701 if (gdbarch
->register_bytes
== -1)
2702 internal_error (__FILE__
, __LINE__
,
2703 "gdbarch: gdbarch_register_bytes invalid");
2704 if (gdbarch_debug
>= 2)
2705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2706 return gdbarch
->register_bytes
;
2710 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2713 gdbarch
->register_bytes
= register_bytes
;
2717 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2719 if (gdbarch
->register_byte
== 0)
2720 internal_error (__FILE__
, __LINE__
,
2721 "gdbarch: gdbarch_register_byte invalid");
2722 if (gdbarch_debug
>= 2)
2723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2724 return gdbarch
->register_byte (reg_nr
);
2728 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2729 gdbarch_register_byte_ftype register_byte
)
2731 gdbarch
->register_byte
= register_byte
;
2735 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2737 if (gdbarch
->register_raw_size
== 0)
2738 internal_error (__FILE__
, __LINE__
,
2739 "gdbarch: gdbarch_register_raw_size invalid");
2740 if (gdbarch_debug
>= 2)
2741 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2742 return gdbarch
->register_raw_size (reg_nr
);
2746 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2747 gdbarch_register_raw_size_ftype register_raw_size
)
2749 gdbarch
->register_raw_size
= register_raw_size
;
2753 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2755 if (gdbarch
->max_register_raw_size
== -1)
2756 internal_error (__FILE__
, __LINE__
,
2757 "gdbarch: gdbarch_max_register_raw_size invalid");
2758 if (gdbarch_debug
>= 2)
2759 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2760 return gdbarch
->max_register_raw_size
;
2764 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2765 int max_register_raw_size
)
2767 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2771 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2773 if (gdbarch
->register_virtual_size
== 0)
2774 internal_error (__FILE__
, __LINE__
,
2775 "gdbarch: gdbarch_register_virtual_size invalid");
2776 if (gdbarch_debug
>= 2)
2777 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2778 return gdbarch
->register_virtual_size (reg_nr
);
2782 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2783 gdbarch_register_virtual_size_ftype register_virtual_size
)
2785 gdbarch
->register_virtual_size
= register_virtual_size
;
2789 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2791 if (gdbarch
->max_register_virtual_size
== -1)
2792 internal_error (__FILE__
, __LINE__
,
2793 "gdbarch: gdbarch_max_register_virtual_size invalid");
2794 if (gdbarch_debug
>= 2)
2795 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2796 return gdbarch
->max_register_virtual_size
;
2800 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2801 int max_register_virtual_size
)
2803 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2807 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2809 if (gdbarch
->register_virtual_type
== 0)
2810 internal_error (__FILE__
, __LINE__
,
2811 "gdbarch: gdbarch_register_virtual_type invalid");
2812 if (gdbarch_debug
>= 2)
2813 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2814 return gdbarch
->register_virtual_type (reg_nr
);
2818 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2819 gdbarch_register_virtual_type_ftype register_virtual_type
)
2821 gdbarch
->register_virtual_type
= register_virtual_type
;
2825 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2827 if (gdbarch
->do_registers_info
== 0)
2828 internal_error (__FILE__
, __LINE__
,
2829 "gdbarch: gdbarch_do_registers_info invalid");
2830 if (gdbarch_debug
>= 2)
2831 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2832 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2836 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2837 gdbarch_do_registers_info_ftype do_registers_info
)
2839 gdbarch
->do_registers_info
= do_registers_info
;
2843 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2845 if (gdbarch
->register_sim_regno
== 0)
2846 internal_error (__FILE__
, __LINE__
,
2847 "gdbarch: gdbarch_register_sim_regno invalid");
2848 if (gdbarch_debug
>= 2)
2849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2850 return gdbarch
->register_sim_regno (reg_nr
);
2854 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2855 gdbarch_register_sim_regno_ftype register_sim_regno
)
2857 gdbarch
->register_sim_regno
= register_sim_regno
;
2861 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2863 return gdbarch
->register_bytes_ok
!= 0;
2867 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2869 if (gdbarch
->register_bytes_ok
== 0)
2870 internal_error (__FILE__
, __LINE__
,
2871 "gdbarch: gdbarch_register_bytes_ok invalid");
2872 if (gdbarch_debug
>= 2)
2873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2874 return gdbarch
->register_bytes_ok (nr_bytes
);
2878 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2879 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2881 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2885 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2887 if (gdbarch
->cannot_fetch_register
== 0)
2888 internal_error (__FILE__
, __LINE__
,
2889 "gdbarch: gdbarch_cannot_fetch_register invalid");
2890 if (gdbarch_debug
>= 2)
2891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2892 return gdbarch
->cannot_fetch_register (regnum
);
2896 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2897 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2899 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2903 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2905 if (gdbarch
->cannot_store_register
== 0)
2906 internal_error (__FILE__
, __LINE__
,
2907 "gdbarch: gdbarch_cannot_store_register invalid");
2908 if (gdbarch_debug
>= 2)
2909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2910 return gdbarch
->cannot_store_register (regnum
);
2914 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2915 gdbarch_cannot_store_register_ftype cannot_store_register
)
2917 gdbarch
->cannot_store_register
= cannot_store_register
;
2921 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2923 if (gdbarch
->use_generic_dummy_frames
== -1)
2924 internal_error (__FILE__
, __LINE__
,
2925 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2926 if (gdbarch_debug
>= 2)
2927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2928 return gdbarch
->use_generic_dummy_frames
;
2932 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2933 int use_generic_dummy_frames
)
2935 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2939 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2941 if (gdbarch
->call_dummy_location
== 0)
2942 internal_error (__FILE__
, __LINE__
,
2943 "gdbarch: gdbarch_call_dummy_location invalid");
2944 if (gdbarch_debug
>= 2)
2945 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2946 return gdbarch
->call_dummy_location
;
2950 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2951 int call_dummy_location
)
2953 gdbarch
->call_dummy_location
= call_dummy_location
;
2957 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2959 if (gdbarch
->call_dummy_address
== 0)
2960 internal_error (__FILE__
, __LINE__
,
2961 "gdbarch: gdbarch_call_dummy_address invalid");
2962 if (gdbarch_debug
>= 2)
2963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2964 return gdbarch
->call_dummy_address ();
2968 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2969 gdbarch_call_dummy_address_ftype call_dummy_address
)
2971 gdbarch
->call_dummy_address
= call_dummy_address
;
2975 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2977 if (gdbarch
->call_dummy_start_offset
== -1)
2978 internal_error (__FILE__
, __LINE__
,
2979 "gdbarch: gdbarch_call_dummy_start_offset invalid");
2980 if (gdbarch_debug
>= 2)
2981 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2982 return gdbarch
->call_dummy_start_offset
;
2986 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
2987 CORE_ADDR call_dummy_start_offset
)
2989 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
2993 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
2995 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
2996 internal_error (__FILE__
, __LINE__
,
2997 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2998 if (gdbarch_debug
>= 2)
2999 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3000 return gdbarch
->call_dummy_breakpoint_offset
;
3004 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3005 CORE_ADDR call_dummy_breakpoint_offset
)
3007 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3011 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3013 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3014 internal_error (__FILE__
, __LINE__
,
3015 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3016 if (gdbarch_debug
>= 2)
3017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3018 return gdbarch
->call_dummy_breakpoint_offset_p
;
3022 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3023 int call_dummy_breakpoint_offset_p
)
3025 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3029 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3031 if (gdbarch
->call_dummy_length
== -1)
3032 internal_error (__FILE__
, __LINE__
,
3033 "gdbarch: gdbarch_call_dummy_length invalid");
3034 if (gdbarch_debug
>= 2)
3035 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3036 return gdbarch
->call_dummy_length
;
3040 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3041 int call_dummy_length
)
3043 gdbarch
->call_dummy_length
= call_dummy_length
;
3047 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3049 if (gdbarch
->pc_in_call_dummy
== 0)
3050 internal_error (__FILE__
, __LINE__
,
3051 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3052 if (gdbarch_debug
>= 2)
3053 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3054 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3058 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3059 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3061 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3065 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3067 if (gdbarch
->call_dummy_p
== -1)
3068 internal_error (__FILE__
, __LINE__
,
3069 "gdbarch: gdbarch_call_dummy_p invalid");
3070 if (gdbarch_debug
>= 2)
3071 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3072 return gdbarch
->call_dummy_p
;
3076 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3079 gdbarch
->call_dummy_p
= call_dummy_p
;
3083 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3085 /* Skip verify of call_dummy_words, invalid_p == 0 */
3086 if (gdbarch_debug
>= 2)
3087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3088 return gdbarch
->call_dummy_words
;
3092 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3093 LONGEST
* call_dummy_words
)
3095 gdbarch
->call_dummy_words
= call_dummy_words
;
3099 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3101 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3102 if (gdbarch_debug
>= 2)
3103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3104 return gdbarch
->sizeof_call_dummy_words
;
3108 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3109 int sizeof_call_dummy_words
)
3111 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3115 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3117 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3118 internal_error (__FILE__
, __LINE__
,
3119 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3120 if (gdbarch_debug
>= 2)
3121 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3122 return gdbarch
->call_dummy_stack_adjust_p
;
3126 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3127 int call_dummy_stack_adjust_p
)
3129 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3133 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3135 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3136 internal_error (__FILE__
, __LINE__
,
3137 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3138 if (gdbarch_debug
>= 2)
3139 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3140 return gdbarch
->call_dummy_stack_adjust
;
3144 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3145 int call_dummy_stack_adjust
)
3147 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3151 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
)
3153 if (gdbarch
->fix_call_dummy
== 0)
3154 internal_error (__FILE__
, __LINE__
,
3155 "gdbarch: gdbarch_fix_call_dummy invalid");
3156 if (gdbarch_debug
>= 2)
3157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3158 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3162 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3163 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3165 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3169 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3171 if (gdbarch
->init_frame_pc_first
== 0)
3172 internal_error (__FILE__
, __LINE__
,
3173 "gdbarch: gdbarch_init_frame_pc_first invalid");
3174 if (gdbarch_debug
>= 2)
3175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3176 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3180 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3181 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3183 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3187 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3189 if (gdbarch
->init_frame_pc
== 0)
3190 internal_error (__FILE__
, __LINE__
,
3191 "gdbarch: gdbarch_init_frame_pc invalid");
3192 if (gdbarch_debug
>= 2)
3193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3194 gdbarch
->init_frame_pc (fromleaf
, prev
);
3198 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3199 gdbarch_init_frame_pc_ftype init_frame_pc
)
3201 gdbarch
->init_frame_pc
= init_frame_pc
;
3205 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3209 return gdbarch
->believe_pcc_promotion
;
3213 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3214 int believe_pcc_promotion
)
3216 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3220 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3222 if (gdbarch_debug
>= 2)
3223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3224 return gdbarch
->believe_pcc_promotion_type
;
3228 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3229 int believe_pcc_promotion_type
)
3231 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3235 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3237 if (gdbarch
->coerce_float_to_double
== 0)
3238 internal_error (__FILE__
, __LINE__
,
3239 "gdbarch: gdbarch_coerce_float_to_double invalid");
3240 if (gdbarch_debug
>= 2)
3241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3242 return gdbarch
->coerce_float_to_double (formal
, actual
);
3246 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3247 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3249 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3253 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
)
3255 if (gdbarch
->get_saved_register
== 0)
3256 internal_error (__FILE__
, __LINE__
,
3257 "gdbarch: gdbarch_get_saved_register invalid");
3258 if (gdbarch_debug
>= 2)
3259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3260 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3264 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3265 gdbarch_get_saved_register_ftype get_saved_register
)
3267 gdbarch
->get_saved_register
= get_saved_register
;
3271 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3273 if (gdbarch
->register_convertible
== 0)
3274 internal_error (__FILE__
, __LINE__
,
3275 "gdbarch: gdbarch_register_convertible invalid");
3276 if (gdbarch_debug
>= 2)
3277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3278 return gdbarch
->register_convertible (nr
);
3282 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3283 gdbarch_register_convertible_ftype register_convertible
)
3285 gdbarch
->register_convertible
= register_convertible
;
3289 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3291 if (gdbarch
->register_convert_to_virtual
== 0)
3292 internal_error (__FILE__
, __LINE__
,
3293 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3294 if (gdbarch_debug
>= 2)
3295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3296 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3300 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3301 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3303 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3307 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3309 if (gdbarch
->register_convert_to_raw
== 0)
3310 internal_error (__FILE__
, __LINE__
,
3311 "gdbarch: gdbarch_register_convert_to_raw invalid");
3312 if (gdbarch_debug
>= 2)
3313 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3314 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3318 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3319 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3321 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3325 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3327 if (gdbarch
->fetch_pseudo_register
== 0)
3328 internal_error (__FILE__
, __LINE__
,
3329 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3330 if (gdbarch_debug
>= 2)
3331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3332 gdbarch
->fetch_pseudo_register (regnum
);
3336 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3337 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3339 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3343 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3345 if (gdbarch
->store_pseudo_register
== 0)
3346 internal_error (__FILE__
, __LINE__
,
3347 "gdbarch: gdbarch_store_pseudo_register invalid");
3348 if (gdbarch_debug
>= 2)
3349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3350 gdbarch
->store_pseudo_register (regnum
);
3354 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3355 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3357 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3361 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3363 if (gdbarch
->pointer_to_address
== 0)
3364 internal_error (__FILE__
, __LINE__
,
3365 "gdbarch: gdbarch_pointer_to_address invalid");
3366 if (gdbarch_debug
>= 2)
3367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3368 return gdbarch
->pointer_to_address (type
, buf
);
3372 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3373 gdbarch_pointer_to_address_ftype pointer_to_address
)
3375 gdbarch
->pointer_to_address
= pointer_to_address
;
3379 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3381 if (gdbarch
->address_to_pointer
== 0)
3382 internal_error (__FILE__
, __LINE__
,
3383 "gdbarch: gdbarch_address_to_pointer invalid");
3384 if (gdbarch_debug
>= 2)
3385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3386 gdbarch
->address_to_pointer (type
, buf
, addr
);
3390 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3391 gdbarch_address_to_pointer_ftype address_to_pointer
)
3393 gdbarch
->address_to_pointer
= address_to_pointer
;
3397 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3399 return gdbarch
->integer_to_address
!= 0;
3403 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3405 if (gdbarch
->integer_to_address
== 0)
3406 internal_error (__FILE__
, __LINE__
,
3407 "gdbarch: gdbarch_integer_to_address invalid");
3408 if (gdbarch_debug
>= 2)
3409 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3410 return gdbarch
->integer_to_address (type
, buf
);
3414 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3415 gdbarch_integer_to_address_ftype integer_to_address
)
3417 gdbarch
->integer_to_address
= integer_to_address
;
3421 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3423 if (gdbarch
->return_value_on_stack
== 0)
3424 internal_error (__FILE__
, __LINE__
,
3425 "gdbarch: gdbarch_return_value_on_stack invalid");
3426 if (gdbarch_debug
>= 2)
3427 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3428 return gdbarch
->return_value_on_stack (type
);
3432 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3433 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3435 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3439 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3441 if (gdbarch
->extract_return_value
== 0)
3442 internal_error (__FILE__
, __LINE__
,
3443 "gdbarch: gdbarch_extract_return_value invalid");
3444 if (gdbarch_debug
>= 2)
3445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3446 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3450 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3451 gdbarch_extract_return_value_ftype extract_return_value
)
3453 gdbarch
->extract_return_value
= extract_return_value
;
3457 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3459 if (gdbarch
->push_arguments
== 0)
3460 internal_error (__FILE__
, __LINE__
,
3461 "gdbarch: gdbarch_push_arguments invalid");
3462 if (gdbarch_debug
>= 2)
3463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3464 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3468 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3469 gdbarch_push_arguments_ftype push_arguments
)
3471 gdbarch
->push_arguments
= push_arguments
;
3475 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3477 if (gdbarch
->push_dummy_frame
== 0)
3478 internal_error (__FILE__
, __LINE__
,
3479 "gdbarch: gdbarch_push_dummy_frame invalid");
3480 if (gdbarch_debug
>= 2)
3481 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3482 gdbarch
->push_dummy_frame ();
3486 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3487 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3489 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3493 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3495 if (gdbarch
->push_return_address
== 0)
3496 internal_error (__FILE__
, __LINE__
,
3497 "gdbarch: gdbarch_push_return_address invalid");
3498 if (gdbarch_debug
>= 2)
3499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3500 return gdbarch
->push_return_address (pc
, sp
);
3504 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3505 gdbarch_push_return_address_ftype push_return_address
)
3507 gdbarch
->push_return_address
= push_return_address
;
3511 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3513 if (gdbarch
->pop_frame
== 0)
3514 internal_error (__FILE__
, __LINE__
,
3515 "gdbarch: gdbarch_pop_frame invalid");
3516 if (gdbarch_debug
>= 2)
3517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3518 gdbarch
->pop_frame ();
3522 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3523 gdbarch_pop_frame_ftype pop_frame
)
3525 gdbarch
->pop_frame
= pop_frame
;
3529 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3531 if (gdbarch
->store_struct_return
== 0)
3532 internal_error (__FILE__
, __LINE__
,
3533 "gdbarch: gdbarch_store_struct_return invalid");
3534 if (gdbarch_debug
>= 2)
3535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3536 gdbarch
->store_struct_return (addr
, sp
);
3540 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3541 gdbarch_store_struct_return_ftype store_struct_return
)
3543 gdbarch
->store_struct_return
= store_struct_return
;
3547 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3549 if (gdbarch
->store_return_value
== 0)
3550 internal_error (__FILE__
, __LINE__
,
3551 "gdbarch: gdbarch_store_return_value invalid");
3552 if (gdbarch_debug
>= 2)
3553 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3554 gdbarch
->store_return_value (type
, valbuf
);
3558 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3559 gdbarch_store_return_value_ftype store_return_value
)
3561 gdbarch
->store_return_value
= store_return_value
;
3565 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3567 return gdbarch
->extract_struct_value_address
!= 0;
3571 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3573 if (gdbarch
->extract_struct_value_address
== 0)
3574 internal_error (__FILE__
, __LINE__
,
3575 "gdbarch: gdbarch_extract_struct_value_address invalid");
3576 if (gdbarch_debug
>= 2)
3577 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3578 return gdbarch
->extract_struct_value_address (regbuf
);
3582 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3583 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3585 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3589 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3591 if (gdbarch
->use_struct_convention
== 0)
3592 internal_error (__FILE__
, __LINE__
,
3593 "gdbarch: gdbarch_use_struct_convention invalid");
3594 if (gdbarch_debug
>= 2)
3595 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3596 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3600 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3601 gdbarch_use_struct_convention_ftype use_struct_convention
)
3603 gdbarch
->use_struct_convention
= use_struct_convention
;
3607 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3609 if (gdbarch
->frame_init_saved_regs
== 0)
3610 internal_error (__FILE__
, __LINE__
,
3611 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3612 if (gdbarch_debug
>= 2)
3613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3614 gdbarch
->frame_init_saved_regs (frame
);
3618 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3619 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3621 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3625 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3627 return gdbarch
->init_extra_frame_info
!= 0;
3631 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3633 if (gdbarch
->init_extra_frame_info
== 0)
3634 internal_error (__FILE__
, __LINE__
,
3635 "gdbarch: gdbarch_init_extra_frame_info invalid");
3636 if (gdbarch_debug
>= 2)
3637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3638 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3642 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3643 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3645 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3649 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3651 if (gdbarch
->skip_prologue
== 0)
3652 internal_error (__FILE__
, __LINE__
,
3653 "gdbarch: gdbarch_skip_prologue invalid");
3654 if (gdbarch_debug
>= 2)
3655 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3656 return gdbarch
->skip_prologue (ip
);
3660 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3661 gdbarch_skip_prologue_ftype skip_prologue
)
3663 gdbarch
->skip_prologue
= skip_prologue
;
3667 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3669 if (gdbarch
->prologue_frameless_p
== 0)
3670 internal_error (__FILE__
, __LINE__
,
3671 "gdbarch: gdbarch_prologue_frameless_p invalid");
3672 if (gdbarch_debug
>= 2)
3673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3674 return gdbarch
->prologue_frameless_p (ip
);
3678 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3679 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3681 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3685 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3687 if (gdbarch
->inner_than
== 0)
3688 internal_error (__FILE__
, __LINE__
,
3689 "gdbarch: gdbarch_inner_than invalid");
3690 if (gdbarch_debug
>= 2)
3691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3692 return gdbarch
->inner_than (lhs
, rhs
);
3696 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3697 gdbarch_inner_than_ftype inner_than
)
3699 gdbarch
->inner_than
= inner_than
;
3703 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3705 if (gdbarch
->breakpoint_from_pc
== 0)
3706 internal_error (__FILE__
, __LINE__
,
3707 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3708 if (gdbarch_debug
>= 2)
3709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3710 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3714 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3715 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3717 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3721 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3723 if (gdbarch
->memory_insert_breakpoint
== 0)
3724 internal_error (__FILE__
, __LINE__
,
3725 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3726 if (gdbarch_debug
>= 2)
3727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3728 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3732 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3733 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3735 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3739 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3741 if (gdbarch
->memory_remove_breakpoint
== 0)
3742 internal_error (__FILE__
, __LINE__
,
3743 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3744 if (gdbarch_debug
>= 2)
3745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3746 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3750 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3751 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3753 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3757 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3759 if (gdbarch
->decr_pc_after_break
== -1)
3760 internal_error (__FILE__
, __LINE__
,
3761 "gdbarch: gdbarch_decr_pc_after_break invalid");
3762 if (gdbarch_debug
>= 2)
3763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3764 return gdbarch
->decr_pc_after_break
;
3768 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3769 CORE_ADDR decr_pc_after_break
)
3771 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3775 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3777 if (gdbarch
->prepare_to_proceed
== 0)
3778 internal_error (__FILE__
, __LINE__
,
3779 "gdbarch: gdbarch_prepare_to_proceed invalid");
3780 if (gdbarch_debug
>= 2)
3781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3782 return gdbarch
->prepare_to_proceed (select_it
);
3786 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3787 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3789 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3793 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3795 if (gdbarch
->function_start_offset
== -1)
3796 internal_error (__FILE__
, __LINE__
,
3797 "gdbarch: gdbarch_function_start_offset invalid");
3798 if (gdbarch_debug
>= 2)
3799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3800 return gdbarch
->function_start_offset
;
3804 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3805 CORE_ADDR function_start_offset
)
3807 gdbarch
->function_start_offset
= function_start_offset
;
3811 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3813 if (gdbarch
->remote_translate_xfer_address
== 0)
3814 internal_error (__FILE__
, __LINE__
,
3815 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3816 if (gdbarch_debug
>= 2)
3817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3818 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3822 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3823 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3825 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3829 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3831 if (gdbarch
->frame_args_skip
== -1)
3832 internal_error (__FILE__
, __LINE__
,
3833 "gdbarch: gdbarch_frame_args_skip invalid");
3834 if (gdbarch_debug
>= 2)
3835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3836 return gdbarch
->frame_args_skip
;
3840 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3841 CORE_ADDR frame_args_skip
)
3843 gdbarch
->frame_args_skip
= frame_args_skip
;
3847 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3849 if (gdbarch
->frameless_function_invocation
== 0)
3850 internal_error (__FILE__
, __LINE__
,
3851 "gdbarch: gdbarch_frameless_function_invocation invalid");
3852 if (gdbarch_debug
>= 2)
3853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3854 return gdbarch
->frameless_function_invocation (fi
);
3858 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3859 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3861 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3865 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3867 if (gdbarch
->frame_chain
== 0)
3868 internal_error (__FILE__
, __LINE__
,
3869 "gdbarch: gdbarch_frame_chain invalid");
3870 if (gdbarch_debug
>= 2)
3871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3872 return gdbarch
->frame_chain (frame
);
3876 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3877 gdbarch_frame_chain_ftype frame_chain
)
3879 gdbarch
->frame_chain
= frame_chain
;
3883 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3885 if (gdbarch
->frame_chain_valid
== 0)
3886 internal_error (__FILE__
, __LINE__
,
3887 "gdbarch: gdbarch_frame_chain_valid invalid");
3888 if (gdbarch_debug
>= 2)
3889 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3890 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3894 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3895 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3897 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3901 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3903 if (gdbarch
->frame_saved_pc
== 0)
3904 internal_error (__FILE__
, __LINE__
,
3905 "gdbarch: gdbarch_frame_saved_pc invalid");
3906 if (gdbarch_debug
>= 2)
3907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3908 return gdbarch
->frame_saved_pc (fi
);
3912 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3913 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3915 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3919 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3921 if (gdbarch
->frame_args_address
== 0)
3922 internal_error (__FILE__
, __LINE__
,
3923 "gdbarch: gdbarch_frame_args_address invalid");
3924 if (gdbarch_debug
>= 2)
3925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3926 return gdbarch
->frame_args_address (fi
);
3930 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3931 gdbarch_frame_args_address_ftype frame_args_address
)
3933 gdbarch
->frame_args_address
= frame_args_address
;
3937 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3939 if (gdbarch
->frame_locals_address
== 0)
3940 internal_error (__FILE__
, __LINE__
,
3941 "gdbarch: gdbarch_frame_locals_address invalid");
3942 if (gdbarch_debug
>= 2)
3943 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3944 return gdbarch
->frame_locals_address (fi
);
3948 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3949 gdbarch_frame_locals_address_ftype frame_locals_address
)
3951 gdbarch
->frame_locals_address
= frame_locals_address
;
3955 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3957 if (gdbarch
->saved_pc_after_call
== 0)
3958 internal_error (__FILE__
, __LINE__
,
3959 "gdbarch: gdbarch_saved_pc_after_call invalid");
3960 if (gdbarch_debug
>= 2)
3961 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3962 return gdbarch
->saved_pc_after_call (frame
);
3966 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3967 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3969 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3973 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3975 if (gdbarch
->frame_num_args
== 0)
3976 internal_error (__FILE__
, __LINE__
,
3977 "gdbarch: gdbarch_frame_num_args invalid");
3978 if (gdbarch_debug
>= 2)
3979 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3980 return gdbarch
->frame_num_args (frame
);
3984 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3985 gdbarch_frame_num_args_ftype frame_num_args
)
3987 gdbarch
->frame_num_args
= frame_num_args
;
3991 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
3993 return gdbarch
->stack_align
!= 0;
3997 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3999 if (gdbarch
->stack_align
== 0)
4000 internal_error (__FILE__
, __LINE__
,
4001 "gdbarch: gdbarch_stack_align invalid");
4002 if (gdbarch_debug
>= 2)
4003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4004 return gdbarch
->stack_align (sp
);
4008 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4009 gdbarch_stack_align_ftype stack_align
)
4011 gdbarch
->stack_align
= stack_align
;
4015 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4017 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4018 if (gdbarch_debug
>= 2)
4019 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4020 return gdbarch
->extra_stack_alignment_needed
;
4024 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4025 int extra_stack_alignment_needed
)
4027 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4031 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4033 return gdbarch
->reg_struct_has_addr
!= 0;
4037 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4039 if (gdbarch
->reg_struct_has_addr
== 0)
4040 internal_error (__FILE__
, __LINE__
,
4041 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4042 if (gdbarch_debug
>= 2)
4043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4044 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4048 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4049 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4051 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4055 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4057 return gdbarch
->save_dummy_frame_tos
!= 0;
4061 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4063 if (gdbarch
->save_dummy_frame_tos
== 0)
4064 internal_error (__FILE__
, __LINE__
,
4065 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4066 if (gdbarch_debug
>= 2)
4067 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4068 gdbarch
->save_dummy_frame_tos (sp
);
4072 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4073 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4075 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4079 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4081 if (gdbarch_debug
>= 2)
4082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4083 return gdbarch
->parm_boundary
;
4087 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4090 gdbarch
->parm_boundary
= parm_boundary
;
4093 const struct floatformat
*
4094 gdbarch_float_format (struct gdbarch
*gdbarch
)
4096 if (gdbarch_debug
>= 2)
4097 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4098 return gdbarch
->float_format
;
4102 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4103 const struct floatformat
* float_format
)
4105 gdbarch
->float_format
= float_format
;
4108 const struct floatformat
*
4109 gdbarch_double_format (struct gdbarch
*gdbarch
)
4111 if (gdbarch_debug
>= 2)
4112 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4113 return gdbarch
->double_format
;
4117 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4118 const struct floatformat
* double_format
)
4120 gdbarch
->double_format
= double_format
;
4123 const struct floatformat
*
4124 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4126 if (gdbarch_debug
>= 2)
4127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4128 return gdbarch
->long_double_format
;
4132 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4133 const struct floatformat
* long_double_format
)
4135 gdbarch
->long_double_format
= long_double_format
;
4139 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4141 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4142 internal_error (__FILE__
, __LINE__
,
4143 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4144 if (gdbarch_debug
>= 2)
4145 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4146 return gdbarch
->convert_from_func_ptr_addr (addr
);
4150 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4151 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4153 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4157 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4159 if (gdbarch
->addr_bits_remove
== 0)
4160 internal_error (__FILE__
, __LINE__
,
4161 "gdbarch: gdbarch_addr_bits_remove invalid");
4162 if (gdbarch_debug
>= 2)
4163 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4164 return gdbarch
->addr_bits_remove (addr
);
4168 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4169 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4171 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4175 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4177 return gdbarch
->software_single_step
!= 0;
4181 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4183 if (gdbarch
->software_single_step
== 0)
4184 internal_error (__FILE__
, __LINE__
,
4185 "gdbarch: gdbarch_software_single_step invalid");
4186 if (gdbarch_debug
>= 2)
4187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4188 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4192 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4193 gdbarch_software_single_step_ftype software_single_step
)
4195 gdbarch
->software_single_step
= software_single_step
;
4199 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4201 if (gdbarch
->print_insn
== 0)
4202 internal_error (__FILE__
, __LINE__
,
4203 "gdbarch: gdbarch_print_insn invalid");
4204 if (gdbarch_debug
>= 2)
4205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4206 return gdbarch
->print_insn (vma
, info
);
4210 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4211 gdbarch_print_insn_ftype print_insn
)
4213 gdbarch
->print_insn
= print_insn
;
4217 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4219 if (gdbarch
->skip_trampoline_code
== 0)
4220 internal_error (__FILE__
, __LINE__
,
4221 "gdbarch: gdbarch_skip_trampoline_code invalid");
4222 if (gdbarch_debug
>= 2)
4223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4224 return gdbarch
->skip_trampoline_code (pc
);
4228 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4229 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4231 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4235 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4237 if (gdbarch
->in_solib_call_trampoline
== 0)
4238 internal_error (__FILE__
, __LINE__
,
4239 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4240 if (gdbarch_debug
>= 2)
4241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4242 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4246 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4247 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4249 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4253 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4255 if (gdbarch
->in_function_epilogue_p
== 0)
4256 internal_error (__FILE__
, __LINE__
,
4257 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4258 if (gdbarch_debug
>= 2)
4259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4260 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4264 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4265 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4267 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4271 /* Keep a registry of per-architecture data-pointers required by GDB
4277 gdbarch_data_init_ftype
*init
;
4278 gdbarch_data_free_ftype
*free
;
4281 struct gdbarch_data_registration
4283 struct gdbarch_data
*data
;
4284 struct gdbarch_data_registration
*next
;
4287 struct gdbarch_data_registry
4290 struct gdbarch_data_registration
*registrations
;
4293 struct gdbarch_data_registry gdbarch_data_registry
=
4298 struct gdbarch_data
*
4299 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4300 gdbarch_data_free_ftype
*free
)
4302 struct gdbarch_data_registration
**curr
;
4303 for (curr
= &gdbarch_data_registry
.registrations
;
4305 curr
= &(*curr
)->next
);
4306 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4307 (*curr
)->next
= NULL
;
4308 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4309 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4310 (*curr
)->data
->init
= init
;
4311 (*curr
)->data
->free
= free
;
4312 return (*curr
)->data
;
4316 /* Walk through all the registered users initializing each in turn. */
4319 init_gdbarch_data (struct gdbarch
*gdbarch
)
4321 struct gdbarch_data_registration
*rego
;
4322 for (rego
= gdbarch_data_registry
.registrations
;
4326 struct gdbarch_data
*data
= rego
->data
;
4327 gdb_assert (data
->index
< gdbarch
->nr_data
);
4328 if (data
->init
!= NULL
)
4330 void *pointer
= data
->init (gdbarch
);
4331 set_gdbarch_data (gdbarch
, data
, pointer
);
4336 /* Create/delete the gdbarch data vector. */
4339 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4341 gdb_assert (gdbarch
->data
== NULL
);
4342 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4343 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4347 free_gdbarch_data (struct gdbarch
*gdbarch
)
4349 struct gdbarch_data_registration
*rego
;
4350 gdb_assert (gdbarch
->data
!= NULL
);
4351 for (rego
= gdbarch_data_registry
.registrations
;
4355 struct gdbarch_data
*data
= rego
->data
;
4356 gdb_assert (data
->index
< gdbarch
->nr_data
);
4357 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4359 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4360 gdbarch
->data
[data
->index
] = NULL
;
4363 xfree (gdbarch
->data
);
4364 gdbarch
->data
= NULL
;
4368 /* Initialize the current value of thee specified per-architecture
4372 set_gdbarch_data (struct gdbarch
*gdbarch
,
4373 struct gdbarch_data
*data
,
4376 gdb_assert (data
->index
< gdbarch
->nr_data
);
4377 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4378 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4379 gdbarch
->data
[data
->index
] = pointer
;
4382 /* Return the current value of the specified per-architecture
4386 gdbarch_data (struct gdbarch_data
*data
)
4388 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4389 return current_gdbarch
->data
[data
->index
];
4394 /* Keep a registry of swapped data required by GDB modules. */
4399 struct gdbarch_swap_registration
*source
;
4400 struct gdbarch_swap
*next
;
4403 struct gdbarch_swap_registration
4406 unsigned long sizeof_data
;
4407 gdbarch_swap_ftype
*init
;
4408 struct gdbarch_swap_registration
*next
;
4411 struct gdbarch_swap_registry
4414 struct gdbarch_swap_registration
*registrations
;
4417 struct gdbarch_swap_registry gdbarch_swap_registry
=
4423 register_gdbarch_swap (void *data
,
4424 unsigned long sizeof_data
,
4425 gdbarch_swap_ftype
*init
)
4427 struct gdbarch_swap_registration
**rego
;
4428 for (rego
= &gdbarch_swap_registry
.registrations
;
4430 rego
= &(*rego
)->next
);
4431 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4432 (*rego
)->next
= NULL
;
4433 (*rego
)->init
= init
;
4434 (*rego
)->data
= data
;
4435 (*rego
)->sizeof_data
= sizeof_data
;
4440 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4442 struct gdbarch_swap_registration
*rego
;
4443 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4444 for (rego
= gdbarch_swap_registry
.registrations
;
4448 if (rego
->data
!= NULL
)
4450 (*curr
) = XMALLOC (struct gdbarch_swap
);
4451 (*curr
)->source
= rego
;
4452 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4453 (*curr
)->next
= NULL
;
4454 memset (rego
->data
, 0, rego
->sizeof_data
);
4455 curr
= &(*curr
)->next
;
4457 if (rego
->init
!= NULL
)
4463 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4465 struct gdbarch_swap
*curr
;
4466 for (curr
= gdbarch
->swap
;
4469 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4473 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4475 struct gdbarch_swap
*curr
;
4476 for (curr
= gdbarch
->swap
;
4479 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4483 /* Keep a registry of the architectures known by GDB. */
4485 struct gdbarch_registration
4487 enum bfd_architecture bfd_architecture
;
4488 gdbarch_init_ftype
*init
;
4489 gdbarch_dump_tdep_ftype
*dump_tdep
;
4490 struct gdbarch_list
*arches
;
4491 struct gdbarch_registration
*next
;
4494 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4497 append_name (const char ***buf
, int *nr
, const char *name
)
4499 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4505 gdbarch_printable_names (void)
4509 /* Accumulate a list of names based on the registed list of
4511 enum bfd_architecture a
;
4513 const char **arches
= NULL
;
4514 struct gdbarch_registration
*rego
;
4515 for (rego
= gdbarch_registry
;
4519 const struct bfd_arch_info
*ap
;
4520 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4522 internal_error (__FILE__
, __LINE__
,
4523 "gdbarch_architecture_names: multi-arch unknown");
4526 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4531 append_name (&arches
, &nr_arches
, NULL
);
4535 /* Just return all the architectures that BFD knows. Assume that
4536 the legacy architecture framework supports them. */
4537 return bfd_arch_list ();
4542 gdbarch_register (enum bfd_architecture bfd_architecture
,
4543 gdbarch_init_ftype
*init
,
4544 gdbarch_dump_tdep_ftype
*dump_tdep
)
4546 struct gdbarch_registration
**curr
;
4547 const struct bfd_arch_info
*bfd_arch_info
;
4548 /* Check that BFD recognizes this architecture */
4549 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4550 if (bfd_arch_info
== NULL
)
4552 internal_error (__FILE__
, __LINE__
,
4553 "gdbarch: Attempt to register unknown architecture (%d)",
4556 /* Check that we haven't seen this architecture before */
4557 for (curr
= &gdbarch_registry
;
4559 curr
= &(*curr
)->next
)
4561 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4562 internal_error (__FILE__
, __LINE__
,
4563 "gdbarch: Duplicate registraration of architecture (%s)",
4564 bfd_arch_info
->printable_name
);
4568 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4569 bfd_arch_info
->printable_name
,
4572 (*curr
) = XMALLOC (struct gdbarch_registration
);
4573 (*curr
)->bfd_architecture
= bfd_architecture
;
4574 (*curr
)->init
= init
;
4575 (*curr
)->dump_tdep
= dump_tdep
;
4576 (*curr
)->arches
= NULL
;
4577 (*curr
)->next
= NULL
;
4578 /* When non- multi-arch, install whatever target dump routine we've
4579 been provided - hopefully that routine has been written correctly
4580 and works regardless of multi-arch. */
4581 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4582 && startup_gdbarch
.dump_tdep
== NULL
)
4583 startup_gdbarch
.dump_tdep
= dump_tdep
;
4587 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4588 gdbarch_init_ftype
*init
)
4590 gdbarch_register (bfd_architecture
, init
, NULL
);
4594 /* Look for an architecture using gdbarch_info. Base search on only
4595 BFD_ARCH_INFO and BYTE_ORDER. */
4597 struct gdbarch_list
*
4598 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4599 const struct gdbarch_info
*info
)
4601 for (; arches
!= NULL
; arches
= arches
->next
)
4603 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4605 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4613 /* Update the current architecture. Return ZERO if the update request
4617 gdbarch_update_p (struct gdbarch_info info
)
4619 struct gdbarch
*new_gdbarch
;
4620 struct gdbarch_list
**list
;
4621 struct gdbarch_registration
*rego
;
4623 /* Fill in missing parts of the INFO struct using a number of
4624 sources: ``set ...''; INFOabfd supplied; existing target. */
4626 /* ``(gdb) set architecture ...'' */
4627 if (info
.bfd_arch_info
== NULL
4628 && !TARGET_ARCHITECTURE_AUTO
)
4629 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4630 if (info
.bfd_arch_info
== NULL
4631 && info
.abfd
!= NULL
4632 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4633 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4634 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4635 if (info
.bfd_arch_info
== NULL
)
4636 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4638 /* ``(gdb) set byte-order ...'' */
4639 if (info
.byte_order
== 0
4640 && !TARGET_BYTE_ORDER_AUTO
)
4641 info
.byte_order
= TARGET_BYTE_ORDER
;
4642 /* From the INFO struct. */
4643 if (info
.byte_order
== 0
4644 && info
.abfd
!= NULL
)
4645 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4646 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4648 /* From the current target. */
4649 if (info
.byte_order
== 0)
4650 info
.byte_order
= TARGET_BYTE_ORDER
;
4652 /* Must have found some sort of architecture. */
4653 gdb_assert (info
.bfd_arch_info
!= NULL
);
4657 fprintf_unfiltered (gdb_stdlog
,
4658 "gdbarch_update: info.bfd_arch_info %s\n",
4659 (info
.bfd_arch_info
!= NULL
4660 ? info
.bfd_arch_info
->printable_name
4662 fprintf_unfiltered (gdb_stdlog
,
4663 "gdbarch_update: info.byte_order %d (%s)\n",
4665 (info
.byte_order
== BIG_ENDIAN
? "big"
4666 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4668 fprintf_unfiltered (gdb_stdlog
,
4669 "gdbarch_update: info.abfd 0x%lx\n",
4671 fprintf_unfiltered (gdb_stdlog
,
4672 "gdbarch_update: info.tdep_info 0x%lx\n",
4673 (long) info
.tdep_info
);
4676 /* Find the target that knows about this architecture. */
4677 for (rego
= gdbarch_registry
;
4680 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4685 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4689 /* Ask the target for a replacement architecture. */
4690 new_gdbarch
= rego
->init (info
, rego
->arches
);
4692 /* Did the target like it? No. Reject the change. */
4693 if (new_gdbarch
== NULL
)
4696 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4700 /* Did the architecture change? No. Do nothing. */
4701 if (current_gdbarch
== new_gdbarch
)
4704 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4706 new_gdbarch
->bfd_arch_info
->printable_name
);
4710 /* Swap all data belonging to the old target out */
4711 swapout_gdbarch_swap (current_gdbarch
);
4713 /* Is this a pre-existing architecture? Yes. Swap it in. */
4714 for (list
= ®o
->arches
;
4716 list
= &(*list
)->next
)
4718 if ((*list
)->gdbarch
== new_gdbarch
)
4721 fprintf_unfiltered (gdb_stdlog
,
4722 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4724 new_gdbarch
->bfd_arch_info
->printable_name
);
4725 current_gdbarch
= new_gdbarch
;
4726 swapin_gdbarch_swap (new_gdbarch
);
4727 architecture_changed_event ();
4732 /* Append this new architecture to this targets list. */
4733 (*list
) = XMALLOC (struct gdbarch_list
);
4734 (*list
)->next
= NULL
;
4735 (*list
)->gdbarch
= new_gdbarch
;
4737 /* Switch to this new architecture. Dump it out. */
4738 current_gdbarch
= new_gdbarch
;
4741 fprintf_unfiltered (gdb_stdlog
,
4742 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4744 new_gdbarch
->bfd_arch_info
->printable_name
);
4747 /* Check that the newly installed architecture is valid. Plug in
4748 any post init values. */
4749 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4750 verify_gdbarch (new_gdbarch
);
4752 /* Initialize the per-architecture memory (swap) areas.
4753 CURRENT_GDBARCH must be update before these modules are
4755 init_gdbarch_swap (new_gdbarch
);
4757 /* Initialize the per-architecture data-pointer of all parties that
4758 registered an interest in this architecture. CURRENT_GDBARCH
4759 must be updated before these modules are called. */
4760 init_gdbarch_data (new_gdbarch
);
4761 architecture_changed_event ();
4764 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4772 /* Pointer to the target-dependent disassembly function. */
4773 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4774 disassemble_info tm_print_insn_info
;
4777 extern void _initialize_gdbarch (void);
4780 _initialize_gdbarch (void)
4782 struct cmd_list_element
*c
;
4784 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4785 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4786 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4787 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4788 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4790 add_show_from_set (add_set_cmd ("arch",
4793 (char *)&gdbarch_debug
,
4794 "Set architecture debugging.\n\
4795 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4797 c
= add_set_cmd ("archdebug",
4800 (char *)&gdbarch_debug
,
4801 "Set architecture debugging.\n\
4802 When non-zero, architecture debugging is enabled.", &setlist
);
4804 deprecate_cmd (c
, "set debug arch");
4805 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");