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
;
258 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
259 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
263 /* The default architecture uses host values (for want of a better
266 extern const struct bfd_arch_info bfd_default_arch_struct
;
268 struct gdbarch startup_gdbarch
=
270 /* basic architecture information */
271 &bfd_default_arch_struct
,
273 /* target specific vector and its dump routine */
275 /*per-architecture data-pointers and swap regions */
277 /* Multi-arch values */
281 8 * sizeof (LONGEST
),
284 8 * sizeof (long double),
315 generic_register_raw_size
,
317 generic_register_virtual_size
,
344 generic_get_saved_register
,
398 generic_in_function_epilogue_p
,
399 construct_inferior_arguments
,
401 /* startup_gdbarch() */
404 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
406 /* Do any initialization needed for a non-multiarch configuration
407 after the _initialize_MODULE functions have been run. */
409 initialize_non_multiarch ()
411 alloc_gdbarch_data (&startup_gdbarch
);
412 init_gdbarch_data (&startup_gdbarch
);
416 /* Create a new ``struct gdbarch'' based on information provided by
417 ``struct gdbarch_info''. */
420 gdbarch_alloc (const struct gdbarch_info
*info
,
421 struct gdbarch_tdep
*tdep
)
423 /* NOTE: The new architecture variable is named ``current_gdbarch''
424 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
425 the current local architecture and not the previous global
426 architecture. This ensures that the new architectures initial
427 values are not influenced by the previous architecture. Once
428 everything is parameterised with gdbarch, this will go away. */
429 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
430 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
432 alloc_gdbarch_data (current_gdbarch
);
434 current_gdbarch
->tdep
= tdep
;
436 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
437 current_gdbarch
->byte_order
= info
->byte_order
;
439 /* Force the explicit initialization of these. */
440 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
441 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
442 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
443 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
444 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
445 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
446 current_gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
447 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
448 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
449 current_gdbarch
->read_pc
= generic_target_read_pc
;
450 current_gdbarch
->write_pc
= generic_target_write_pc
;
451 current_gdbarch
->read_fp
= generic_target_read_fp
;
452 current_gdbarch
->write_fp
= generic_target_write_fp
;
453 current_gdbarch
->read_sp
= generic_target_read_sp
;
454 current_gdbarch
->write_sp
= generic_target_write_sp
;
455 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
456 current_gdbarch
->num_regs
= -1;
457 current_gdbarch
->sp_regnum
= -1;
458 current_gdbarch
->fp_regnum
= -1;
459 current_gdbarch
->pc_regnum
= -1;
460 current_gdbarch
->fp0_regnum
= -1;
461 current_gdbarch
->npc_regnum
= -1;
462 current_gdbarch
->nnpc_regnum
= -1;
463 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
464 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
465 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
466 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
467 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
468 current_gdbarch
->register_name
= legacy_register_name
;
469 current_gdbarch
->register_size
= -1;
470 current_gdbarch
->register_bytes
= -1;
471 current_gdbarch
->max_register_raw_size
= -1;
472 current_gdbarch
->max_register_virtual_size
= -1;
473 current_gdbarch
->do_registers_info
= do_registers_info
;
474 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
475 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
476 current_gdbarch
->cannot_store_register
= cannot_register_not
;
477 current_gdbarch
->use_generic_dummy_frames
= -1;
478 current_gdbarch
->call_dummy_start_offset
= -1;
479 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
480 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
481 current_gdbarch
->call_dummy_length
= -1;
482 current_gdbarch
->call_dummy_p
= -1;
483 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
484 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
485 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
486 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
487 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
488 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
489 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
490 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
491 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
492 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
493 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
494 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
495 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
496 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
497 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
498 current_gdbarch
->decr_pc_after_break
= -1;
499 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
500 current_gdbarch
->function_start_offset
= -1;
501 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
502 current_gdbarch
->frame_args_skip
= -1;
503 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
504 current_gdbarch
->extra_stack_alignment_needed
= 1;
505 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
506 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
507 current_gdbarch
->print_insn
= legacy_print_insn
;
508 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
509 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
510 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
511 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
512 /* gdbarch_alloc() */
514 return current_gdbarch
;
518 /* Free a gdbarch struct. This should never happen in normal
519 operation --- once you've created a gdbarch, you keep it around.
520 However, if an architecture's init function encounters an error
521 building the structure, it may need to clean up a partially
522 constructed gdbarch. */
525 gdbarch_free (struct gdbarch
*arch
)
527 gdb_assert (arch
!= NULL
);
528 free_gdbarch_data (arch
);
533 /* Ensure that all values in a GDBARCH are reasonable. */
536 verify_gdbarch (struct gdbarch
*gdbarch
)
539 struct cleanup
*cleanups
;
542 /* Only perform sanity checks on a multi-arch target. */
545 log
= mem_fileopen ();
546 cleanups
= make_cleanup_ui_file_delete (log
);
548 if (gdbarch
->byte_order
== 0)
549 fprintf_unfiltered (log
, "\n\tbyte-order");
550 if (gdbarch
->bfd_arch_info
== NULL
)
551 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
552 /* Check those that need to be defined for the given multi-arch level. */
553 /* Skip verify of short_bit, invalid_p == 0 */
554 /* Skip verify of int_bit, invalid_p == 0 */
555 /* Skip verify of long_bit, invalid_p == 0 */
556 /* Skip verify of long_long_bit, invalid_p == 0 */
557 /* Skip verify of float_bit, invalid_p == 0 */
558 /* Skip verify of double_bit, invalid_p == 0 */
559 /* Skip verify of long_double_bit, invalid_p == 0 */
560 /* Skip verify of ptr_bit, invalid_p == 0 */
561 if (gdbarch
->addr_bit
== 0)
562 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
563 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
564 /* Skip verify of ieee_float, invalid_p == 0 */
565 /* Skip verify of read_pc, invalid_p == 0 */
566 /* Skip verify of write_pc, invalid_p == 0 */
567 /* Skip verify of read_fp, invalid_p == 0 */
568 /* Skip verify of write_fp, invalid_p == 0 */
569 /* Skip verify of read_sp, invalid_p == 0 */
570 /* Skip verify of write_sp, invalid_p == 0 */
571 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
572 /* Skip verify of register_read, has predicate */
573 /* Skip verify of register_write, has predicate */
574 if ((GDB_MULTI_ARCH
>= 2)
575 && (gdbarch
->num_regs
== -1))
576 fprintf_unfiltered (log
, "\n\tnum_regs");
577 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
578 if ((GDB_MULTI_ARCH
>= 2)
579 && (gdbarch
->sp_regnum
== -1))
580 fprintf_unfiltered (log
, "\n\tsp_regnum");
581 if ((GDB_MULTI_ARCH
>= 2)
582 && (gdbarch
->fp_regnum
== -1))
583 fprintf_unfiltered (log
, "\n\tfp_regnum");
584 if ((GDB_MULTI_ARCH
>= 2)
585 && (gdbarch
->pc_regnum
== -1))
586 fprintf_unfiltered (log
, "\n\tpc_regnum");
587 /* Skip verify of fp0_regnum, invalid_p == 0 */
588 /* Skip verify of npc_regnum, invalid_p == 0 */
589 /* Skip verify of nnpc_regnum, invalid_p == 0 */
590 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
591 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
592 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
593 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
594 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
595 /* Skip verify of register_name, invalid_p == 0 */
596 if ((GDB_MULTI_ARCH
>= 2)
597 && (gdbarch
->register_size
== -1))
598 fprintf_unfiltered (log
, "\n\tregister_size");
599 if ((GDB_MULTI_ARCH
>= 2)
600 && (gdbarch
->register_bytes
== -1))
601 fprintf_unfiltered (log
, "\n\tregister_bytes");
602 if ((GDB_MULTI_ARCH
>= 2)
603 && (gdbarch
->register_byte
== 0))
604 fprintf_unfiltered (log
, "\n\tregister_byte");
605 if ((GDB_MULTI_ARCH
>= 2)
606 && (gdbarch
->register_raw_size
== 0))
607 fprintf_unfiltered (log
, "\n\tregister_raw_size");
608 if ((GDB_MULTI_ARCH
>= 2)
609 && (gdbarch
->max_register_raw_size
== -1))
610 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
611 if ((GDB_MULTI_ARCH
>= 2)
612 && (gdbarch
->register_virtual_size
== 0))
613 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
614 if ((GDB_MULTI_ARCH
>= 2)
615 && (gdbarch
->max_register_virtual_size
== -1))
616 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
617 if ((GDB_MULTI_ARCH
>= 2)
618 && (gdbarch
->register_virtual_type
== 0))
619 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
620 /* Skip verify of do_registers_info, invalid_p == 0 */
621 /* Skip verify of register_sim_regno, invalid_p == 0 */
622 /* Skip verify of register_bytes_ok, has predicate */
623 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
624 /* Skip verify of cannot_store_register, invalid_p == 0 */
625 if ((GDB_MULTI_ARCH
>= 1)
626 && (gdbarch
->use_generic_dummy_frames
== -1))
627 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
628 if ((GDB_MULTI_ARCH
>= 1)
629 && (gdbarch
->call_dummy_location
== 0))
630 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
631 if ((GDB_MULTI_ARCH
>= 2)
632 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
633 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
634 if ((GDB_MULTI_ARCH
>= 2)
635 && (gdbarch
->call_dummy_start_offset
== -1))
636 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
637 if ((GDB_MULTI_ARCH
>= 2)
638 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
639 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
640 if ((GDB_MULTI_ARCH
>= 1)
641 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
642 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
643 if ((GDB_MULTI_ARCH
>= 2)
644 && (gdbarch
->call_dummy_length
== -1))
645 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
646 if ((GDB_MULTI_ARCH
>= 1)
647 && (gdbarch
->pc_in_call_dummy
== 0))
648 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
649 if ((GDB_MULTI_ARCH
>= 1)
650 && (gdbarch
->call_dummy_p
== -1))
651 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
652 /* Skip verify of call_dummy_words, invalid_p == 0 */
653 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
654 if ((GDB_MULTI_ARCH
>= 1)
655 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
656 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
657 if ((GDB_MULTI_ARCH
>= 2)
658 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
659 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
660 if ((GDB_MULTI_ARCH
>= 2)
661 && (gdbarch
->fix_call_dummy
== 0))
662 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
663 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
664 /* Skip verify of init_frame_pc, invalid_p == 0 */
665 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
666 if ((GDB_MULTI_ARCH
>= 1)
667 && (gdbarch
->get_saved_register
== 0))
668 fprintf_unfiltered (log
, "\n\tget_saved_register");
669 /* Skip verify of register_convertible, invalid_p == 0 */
670 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
671 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
672 /* Skip verify of fetch_pseudo_register, has predicate */
673 /* Skip verify of store_pseudo_register, has predicate */
674 /* Skip verify of pointer_to_address, invalid_p == 0 */
675 /* Skip verify of address_to_pointer, invalid_p == 0 */
676 /* Skip verify of integer_to_address, has predicate */
677 /* Skip verify of return_value_on_stack, invalid_p == 0 */
678 if ((GDB_MULTI_ARCH
>= 2)
679 && (gdbarch
->extract_return_value
== 0))
680 fprintf_unfiltered (log
, "\n\textract_return_value");
681 if ((GDB_MULTI_ARCH
>= 1)
682 && (gdbarch
->push_arguments
== 0))
683 fprintf_unfiltered (log
, "\n\tpush_arguments");
684 if ((GDB_MULTI_ARCH
>= 2)
685 && (gdbarch
->push_dummy_frame
== 0))
686 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
687 /* Skip verify of push_return_address, has predicate */
688 if ((GDB_MULTI_ARCH
>= 2)
689 && (gdbarch
->pop_frame
== 0))
690 fprintf_unfiltered (log
, "\n\tpop_frame");
691 if ((GDB_MULTI_ARCH
>= 2)
692 && (gdbarch
->store_struct_return
== 0))
693 fprintf_unfiltered (log
, "\n\tstore_struct_return");
694 if ((GDB_MULTI_ARCH
>= 2)
695 && (gdbarch
->store_return_value
== 0))
696 fprintf_unfiltered (log
, "\n\tstore_return_value");
697 /* Skip verify of extract_struct_value_address, has predicate */
698 /* Skip verify of use_struct_convention, invalid_p == 0 */
699 if ((GDB_MULTI_ARCH
>= 2)
700 && (gdbarch
->frame_init_saved_regs
== 0))
701 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
702 /* Skip verify of init_extra_frame_info, has predicate */
703 if ((GDB_MULTI_ARCH
>= 2)
704 && (gdbarch
->skip_prologue
== 0))
705 fprintf_unfiltered (log
, "\n\tskip_prologue");
706 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
707 if ((GDB_MULTI_ARCH
>= 2)
708 && (gdbarch
->inner_than
== 0))
709 fprintf_unfiltered (log
, "\n\tinner_than");
710 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
711 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
712 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
713 if ((GDB_MULTI_ARCH
>= 2)
714 && (gdbarch
->decr_pc_after_break
== -1))
715 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
716 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
717 if ((GDB_MULTI_ARCH
>= 2)
718 && (gdbarch
->function_start_offset
== -1))
719 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
720 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH
>= 2)
722 && (gdbarch
->frame_args_skip
== -1))
723 fprintf_unfiltered (log
, "\n\tframe_args_skip");
724 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
725 if ((GDB_MULTI_ARCH
>= 2)
726 && (gdbarch
->frame_chain
== 0))
727 fprintf_unfiltered (log
, "\n\tframe_chain");
728 if ((GDB_MULTI_ARCH
>= 1)
729 && (gdbarch
->frame_chain_valid
== 0))
730 fprintf_unfiltered (log
, "\n\tframe_chain_valid");
731 if ((GDB_MULTI_ARCH
>= 2)
732 && (gdbarch
->frame_saved_pc
== 0))
733 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
734 if ((GDB_MULTI_ARCH
>= 2)
735 && (gdbarch
->frame_args_address
== 0))
736 fprintf_unfiltered (log
, "\n\tframe_args_address");
737 if ((GDB_MULTI_ARCH
>= 2)
738 && (gdbarch
->frame_locals_address
== 0))
739 fprintf_unfiltered (log
, "\n\tframe_locals_address");
740 if ((GDB_MULTI_ARCH
>= 2)
741 && (gdbarch
->saved_pc_after_call
== 0))
742 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
743 if ((GDB_MULTI_ARCH
>= 2)
744 && (gdbarch
->frame_num_args
== 0))
745 fprintf_unfiltered (log
, "\n\tframe_num_args");
746 /* Skip verify of stack_align, has predicate */
747 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
748 /* Skip verify of reg_struct_has_addr, has predicate */
749 /* Skip verify of save_dummy_frame_tos, has predicate */
750 if (gdbarch
->float_format
== 0)
751 gdbarch
->float_format
= default_float_format (gdbarch
);
752 if (gdbarch
->double_format
== 0)
753 gdbarch
->double_format
= default_double_format (gdbarch
);
754 if (gdbarch
->long_double_format
== 0)
755 gdbarch
->long_double_format
= &floatformat_unknown
;
756 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
757 /* Skip verify of addr_bits_remove, invalid_p == 0 */
758 /* Skip verify of software_single_step, has predicate */
759 /* Skip verify of print_insn, invalid_p == 0 */
760 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
761 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
762 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
763 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
764 /* Skip verify of dwarf2_build_frame_info, has predicate */
765 buf
= ui_file_xstrdup (log
, &dummy
);
766 make_cleanup (xfree
, buf
);
767 if (strlen (buf
) > 0)
768 internal_error (__FILE__
, __LINE__
,
769 "verify_gdbarch: the following are invalid ...%s",
771 do_cleanups (cleanups
);
775 /* Print out the details of the current architecture. */
777 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
778 just happens to match the global variable ``current_gdbarch''. That
779 way macros refering to that variable get the local and not the global
780 version - ulgh. Once everything is parameterised with gdbarch, this
784 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
786 fprintf_unfiltered (file
,
787 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
790 fprintf_unfiltered (file
,
791 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
792 (long) current_gdbarch
->in_function_epilogue_p
);
794 fprintf_unfiltered (file
,
795 "gdbarch_dump: register_read = 0x%08lx\n",
796 (long) current_gdbarch
->register_read
);
798 fprintf_unfiltered (file
,
799 "gdbarch_dump: register_write = 0x%08lx\n",
800 (long) current_gdbarch
->register_write
);
801 #ifdef ADDRESS_TO_POINTER
803 /* Macro might contain `[{}]' when not multi-arch */
804 fprintf_unfiltered (file
,
805 "gdbarch_dump: %s # %s\n",
806 "ADDRESS_TO_POINTER(type, buf, addr)",
807 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
812 (long) current_gdbarch
->address_to_pointer
813 /*ADDRESS_TO_POINTER ()*/);
815 #ifdef ADDR_BITS_REMOVE
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: %s # %s\n",
818 "ADDR_BITS_REMOVE(addr)",
819 XSTRING (ADDR_BITS_REMOVE (addr
)));
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
823 (long) current_gdbarch
->addr_bits_remove
824 /*ADDR_BITS_REMOVE ()*/);
826 #ifdef BELIEVE_PCC_PROMOTION
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
829 XSTRING (BELIEVE_PCC_PROMOTION
));
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
832 (long) BELIEVE_PCC_PROMOTION
);
834 #ifdef BELIEVE_PCC_PROMOTION_TYPE
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
837 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
840 (long) BELIEVE_PCC_PROMOTION_TYPE
);
842 #ifdef BREAKPOINT_FROM_PC
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: %s # %s\n",
845 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
846 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
850 (long) current_gdbarch
->breakpoint_from_pc
851 /*BREAKPOINT_FROM_PC ()*/);
853 #ifdef CALL_DUMMY_ADDRESS
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: %s # %s\n",
856 "CALL_DUMMY_ADDRESS()",
857 XSTRING (CALL_DUMMY_ADDRESS ()));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
861 (long) current_gdbarch
->call_dummy_address
862 /*CALL_DUMMY_ADDRESS ()*/);
864 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
867 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
868 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
871 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
873 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
876 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
879 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
881 #ifdef CALL_DUMMY_LENGTH
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
884 XSTRING (CALL_DUMMY_LENGTH
));
885 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
888 (long) CALL_DUMMY_LENGTH
);
890 #ifdef CALL_DUMMY_LOCATION
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
893 XSTRING (CALL_DUMMY_LOCATION
));
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
896 (long) CALL_DUMMY_LOCATION
);
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: CALL_DUMMY_P # %s\n",
901 XSTRING (CALL_DUMMY_P
));
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
904 (long) CALL_DUMMY_P
);
906 #ifdef CALL_DUMMY_STACK_ADJUST
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
909 XSTRING (CALL_DUMMY_STACK_ADJUST
));
910 if (CALL_DUMMY_STACK_ADJUST_P
)
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
913 (long) CALL_DUMMY_STACK_ADJUST
);
915 #ifdef CALL_DUMMY_STACK_ADJUST_P
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
918 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
921 (long) CALL_DUMMY_STACK_ADJUST_P
);
923 #ifdef CALL_DUMMY_START_OFFSET
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
926 XSTRING (CALL_DUMMY_START_OFFSET
));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
929 (long) CALL_DUMMY_START_OFFSET
);
931 #ifdef CALL_DUMMY_WORDS
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
934 XSTRING (CALL_DUMMY_WORDS
));
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
937 (long) CALL_DUMMY_WORDS
);
939 #ifdef CANNOT_FETCH_REGISTER
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: %s # %s\n",
942 "CANNOT_FETCH_REGISTER(regnum)",
943 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
947 (long) current_gdbarch
->cannot_fetch_register
948 /*CANNOT_FETCH_REGISTER ()*/);
950 #ifdef CANNOT_STORE_REGISTER
951 fprintf_unfiltered (file
,
952 "gdbarch_dump: %s # %s\n",
953 "CANNOT_STORE_REGISTER(regnum)",
954 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
958 (long) current_gdbarch
->cannot_store_register
959 /*CANNOT_STORE_REGISTER ()*/);
961 #ifdef COERCE_FLOAT_TO_DOUBLE
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: %s # %s\n",
964 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
965 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
969 (long) current_gdbarch
->coerce_float_to_double
970 /*COERCE_FLOAT_TO_DOUBLE ()*/);
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
975 (long) current_gdbarch
->construct_inferior_arguments
);
976 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: %s # %s\n",
979 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
980 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
984 (long) current_gdbarch
->convert_from_func_ptr_addr
985 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
987 #ifdef DECR_PC_AFTER_BREAK
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
990 XSTRING (DECR_PC_AFTER_BREAK
));
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
993 (long) DECR_PC_AFTER_BREAK
);
995 #ifdef DO_REGISTERS_INFO
997 /* Macro might contain `[{}]' when not multi-arch */
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: %s # %s\n",
1000 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1001 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1006 (long) current_gdbarch
->do_registers_info
1007 /*DO_REGISTERS_INFO ()*/);
1009 #ifdef DWARF2_BUILD_FRAME_INFO
1011 /* Macro might contain `[{}]' when not multi-arch */
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: %s # %s\n",
1014 "DWARF2_BUILD_FRAME_INFO(objfile)",
1015 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1020 (long) current_gdbarch
->dwarf2_build_frame_info
1021 /*DWARF2_BUILD_FRAME_INFO ()*/);
1023 #ifdef DWARF2_REG_TO_REGNUM
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: %s # %s\n",
1026 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1027 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1031 (long) current_gdbarch
->dwarf2_reg_to_regnum
1032 /*DWARF2_REG_TO_REGNUM ()*/);
1034 #ifdef DWARF_REG_TO_REGNUM
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: %s # %s\n",
1037 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1038 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1042 (long) current_gdbarch
->dwarf_reg_to_regnum
1043 /*DWARF_REG_TO_REGNUM ()*/);
1045 #ifdef ECOFF_REG_TO_REGNUM
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: %s # %s\n",
1048 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1049 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1053 (long) current_gdbarch
->ecoff_reg_to_regnum
1054 /*ECOFF_REG_TO_REGNUM ()*/);
1056 #ifdef EXTRACT_RETURN_VALUE
1058 /* Macro might contain `[{}]' when not multi-arch */
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: %s # %s\n",
1061 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1062 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1067 (long) current_gdbarch
->extract_return_value
1068 /*EXTRACT_RETURN_VALUE ()*/);
1070 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: %s # %s\n",
1073 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1074 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1078 (long) current_gdbarch
->extract_struct_value_address
1079 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1081 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1084 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1087 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
1089 #ifdef FETCH_PSEUDO_REGISTER
1091 /* Macro might contain `[{}]' when not multi-arch */
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: %s # %s\n",
1094 "FETCH_PSEUDO_REGISTER(regnum)",
1095 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1100 (long) current_gdbarch
->fetch_pseudo_register
1101 /*FETCH_PSEUDO_REGISTER ()*/);
1103 #ifdef FIX_CALL_DUMMY
1105 /* Macro might contain `[{}]' when not multi-arch */
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: %s # %s\n",
1108 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1109 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1114 (long) current_gdbarch
->fix_call_dummy
1115 /*FIX_CALL_DUMMY ()*/);
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: FP0_REGNUM # %s\n",
1120 XSTRING (FP0_REGNUM
));
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: FP0_REGNUM = %ld\n",
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: FP_REGNUM # %s\n",
1128 XSTRING (FP_REGNUM
));
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: FP_REGNUM = %ld\n",
1133 #ifdef FRAMELESS_FUNCTION_INVOCATION
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: %s # %s\n",
1136 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1137 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1141 (long) current_gdbarch
->frameless_function_invocation
1142 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1144 #ifdef FRAME_ARGS_ADDRESS
1145 fprintf_unfiltered (file
,
1146 "gdbarch_dump: %s # %s\n",
1147 "FRAME_ARGS_ADDRESS(fi)",
1148 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1152 (long) current_gdbarch
->frame_args_address
1153 /*FRAME_ARGS_ADDRESS ()*/);
1155 #ifdef FRAME_ARGS_SKIP
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1158 XSTRING (FRAME_ARGS_SKIP
));
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1161 (long) FRAME_ARGS_SKIP
);
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: %s # %s\n",
1166 "FRAME_CHAIN(frame)",
1167 XSTRING (FRAME_CHAIN (frame
)));
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1171 (long) current_gdbarch
->frame_chain
1172 /*FRAME_CHAIN ()*/);
1174 #ifdef FRAME_CHAIN_VALID
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: %s # %s\n",
1177 "FRAME_CHAIN_VALID(chain, thisframe)",
1178 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1182 (long) current_gdbarch
->frame_chain_valid
1183 /*FRAME_CHAIN_VALID ()*/);
1185 #ifdef FRAME_INIT_SAVED_REGS
1187 /* Macro might contain `[{}]' when not multi-arch */
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: %s # %s\n",
1190 "FRAME_INIT_SAVED_REGS(frame)",
1191 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1196 (long) current_gdbarch
->frame_init_saved_regs
1197 /*FRAME_INIT_SAVED_REGS ()*/);
1199 #ifdef FRAME_LOCALS_ADDRESS
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: %s # %s\n",
1202 "FRAME_LOCALS_ADDRESS(fi)",
1203 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1207 (long) current_gdbarch
->frame_locals_address
1208 /*FRAME_LOCALS_ADDRESS ()*/);
1210 #ifdef FRAME_NUM_ARGS
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1213 "FRAME_NUM_ARGS(frame)",
1214 XSTRING (FRAME_NUM_ARGS (frame
)));
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1218 (long) current_gdbarch
->frame_num_args
1219 /*FRAME_NUM_ARGS ()*/);
1221 #ifdef FRAME_SAVED_PC
1222 fprintf_unfiltered (file
,
1223 "gdbarch_dump: %s # %s\n",
1224 "FRAME_SAVED_PC(fi)",
1225 XSTRING (FRAME_SAVED_PC (fi
)));
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1229 (long) current_gdbarch
->frame_saved_pc
1230 /*FRAME_SAVED_PC ()*/);
1232 #ifdef FUNCTION_START_OFFSET
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1235 XSTRING (FUNCTION_START_OFFSET
));
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1238 (long) FUNCTION_START_OFFSET
);
1240 #ifdef GET_SAVED_REGISTER
1242 /* Macro might contain `[{}]' when not multi-arch */
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: %s # %s\n",
1245 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1246 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1249 fprintf_unfiltered (file
,
1250 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1251 (long) current_gdbarch
->get_saved_register
1252 /*GET_SAVED_REGISTER ()*/);
1255 fprintf_unfiltered (file
,
1256 "gdbarch_dump: IEEE_FLOAT # %s\n",
1257 XSTRING (IEEE_FLOAT
));
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1262 #ifdef INIT_EXTRA_FRAME_INFO
1264 /* Macro might contain `[{}]' when not multi-arch */
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: %s # %s\n",
1267 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1268 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1273 (long) current_gdbarch
->init_extra_frame_info
1274 /*INIT_EXTRA_FRAME_INFO ()*/);
1276 #ifdef INIT_FRAME_PC
1278 /* Macro might contain `[{}]' when not multi-arch */
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: %s # %s\n",
1281 "INIT_FRAME_PC(fromleaf, prev)",
1282 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1287 (long) current_gdbarch
->init_frame_pc
1288 /*INIT_FRAME_PC ()*/);
1290 #ifdef INIT_FRAME_PC_FIRST
1292 /* Macro might contain `[{}]' when not multi-arch */
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1296 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1301 (long) current_gdbarch
->init_frame_pc_first
1302 /*INIT_FRAME_PC_FIRST ()*/);
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "INNER_THAN(lhs, rhs)",
1308 XSTRING (INNER_THAN (lhs
, rhs
)));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1312 (long) current_gdbarch
->inner_than
1315 #ifdef INTEGER_TO_ADDRESS
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: %s # %s\n",
1318 "INTEGER_TO_ADDRESS(type, buf)",
1319 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1323 (long) current_gdbarch
->integer_to_address
1324 /*INTEGER_TO_ADDRESS ()*/);
1326 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: %s # %s\n",
1329 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1330 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1334 (long) current_gdbarch
->in_solib_call_trampoline
1335 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1337 #ifdef MAX_REGISTER_RAW_SIZE
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1340 XSTRING (MAX_REGISTER_RAW_SIZE
));
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1343 (long) MAX_REGISTER_RAW_SIZE
);
1345 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1348 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1351 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1353 #ifdef MEMORY_INSERT_BREAKPOINT
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: %s # %s\n",
1356 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1357 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1361 (long) current_gdbarch
->memory_insert_breakpoint
1362 /*MEMORY_INSERT_BREAKPOINT ()*/);
1364 #ifdef MEMORY_REMOVE_BREAKPOINT
1365 fprintf_unfiltered (file
,
1366 "gdbarch_dump: %s # %s\n",
1367 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1368 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1372 (long) current_gdbarch
->memory_remove_breakpoint
1373 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: NNPC_REGNUM # %s\n",
1378 XSTRING (NNPC_REGNUM
));
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1381 (long) NNPC_REGNUM
);
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: NPC_REGNUM # %s\n",
1386 XSTRING (NPC_REGNUM
));
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: NPC_REGNUM = %ld\n",
1391 #ifdef NUM_PSEUDO_REGS
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1394 XSTRING (NUM_PSEUDO_REGS
));
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1397 (long) NUM_PSEUDO_REGS
);
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: NUM_REGS # %s\n",
1402 XSTRING (NUM_REGS
));
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: NUM_REGS = %ld\n",
1407 #ifdef PARM_BOUNDARY
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1410 XSTRING (PARM_BOUNDARY
));
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1413 (long) PARM_BOUNDARY
);
1415 #ifdef PC_IN_CALL_DUMMY
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: %s # %s\n",
1418 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1419 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1423 (long) current_gdbarch
->pc_in_call_dummy
1424 /*PC_IN_CALL_DUMMY ()*/);
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: PC_REGNUM # %s\n",
1429 XSTRING (PC_REGNUM
));
1430 fprintf_unfiltered (file
,
1431 "gdbarch_dump: PC_REGNUM = %ld\n",
1434 #ifdef POINTER_TO_ADDRESS
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: %s # %s\n",
1437 "POINTER_TO_ADDRESS(type, buf)",
1438 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1442 (long) current_gdbarch
->pointer_to_address
1443 /*POINTER_TO_ADDRESS ()*/);
1447 /* Macro might contain `[{}]' when not multi-arch */
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: %s # %s\n",
1451 XSTRING (POP_FRAME (-)));
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1456 (long) current_gdbarch
->pop_frame
1459 #ifdef PREPARE_TO_PROCEED
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: %s # %s\n",
1462 "PREPARE_TO_PROCEED(select_it)",
1463 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1467 (long) current_gdbarch
->prepare_to_proceed
1468 /*PREPARE_TO_PROCEED ()*/);
1470 #ifdef PROLOGUE_FRAMELESS_P
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: %s # %s\n",
1473 "PROLOGUE_FRAMELESS_P(ip)",
1474 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1478 (long) current_gdbarch
->prologue_frameless_p
1479 /*PROLOGUE_FRAMELESS_P ()*/);
1481 #ifdef PUSH_ARGUMENTS
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: %s # %s\n",
1484 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1485 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1489 (long) current_gdbarch
->push_arguments
1490 /*PUSH_ARGUMENTS ()*/);
1492 #ifdef PUSH_DUMMY_FRAME
1494 /* Macro might contain `[{}]' when not multi-arch */
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: %s # %s\n",
1497 "PUSH_DUMMY_FRAME(-)",
1498 XSTRING (PUSH_DUMMY_FRAME (-)));
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1503 (long) current_gdbarch
->push_dummy_frame
1504 /*PUSH_DUMMY_FRAME ()*/);
1506 #ifdef PUSH_RETURN_ADDRESS
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: %s # %s\n",
1509 "PUSH_RETURN_ADDRESS(pc, sp)",
1510 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1514 (long) current_gdbarch
->push_return_address
1515 /*PUSH_RETURN_ADDRESS ()*/);
1517 #ifdef REGISTER_BYTE
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: %s # %s\n",
1520 "REGISTER_BYTE(reg_nr)",
1521 XSTRING (REGISTER_BYTE (reg_nr
)));
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1525 (long) current_gdbarch
->register_byte
1526 /*REGISTER_BYTE ()*/);
1528 #ifdef REGISTER_BYTES
1529 fprintf_unfiltered (file
,
1530 "gdbarch_dump: REGISTER_BYTES # %s\n",
1531 XSTRING (REGISTER_BYTES
));
1532 fprintf_unfiltered (file
,
1533 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1534 (long) REGISTER_BYTES
);
1536 #ifdef REGISTER_BYTES_OK
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: %s # %s\n",
1539 "REGISTER_BYTES_OK(nr_bytes)",
1540 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1544 (long) current_gdbarch
->register_bytes_ok
1545 /*REGISTER_BYTES_OK ()*/);
1547 #ifdef REGISTER_CONVERTIBLE
1548 fprintf_unfiltered (file
,
1549 "gdbarch_dump: %s # %s\n",
1550 "REGISTER_CONVERTIBLE(nr)",
1551 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1555 (long) current_gdbarch
->register_convertible
1556 /*REGISTER_CONVERTIBLE ()*/);
1558 #ifdef REGISTER_CONVERT_TO_RAW
1560 /* Macro might contain `[{}]' when not multi-arch */
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: %s # %s\n",
1563 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1564 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1569 (long) current_gdbarch
->register_convert_to_raw
1570 /*REGISTER_CONVERT_TO_RAW ()*/);
1572 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1574 /* Macro might contain `[{}]' when not multi-arch */
1575 fprintf_unfiltered (file
,
1576 "gdbarch_dump: %s # %s\n",
1577 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1578 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1583 (long) current_gdbarch
->register_convert_to_virtual
1584 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1586 #ifdef REGISTER_NAME
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: %s # %s\n",
1589 "REGISTER_NAME(regnr)",
1590 XSTRING (REGISTER_NAME (regnr
)));
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1594 (long) current_gdbarch
->register_name
1595 /*REGISTER_NAME ()*/);
1597 #ifdef REGISTER_RAW_SIZE
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: %s # %s\n",
1600 "REGISTER_RAW_SIZE(reg_nr)",
1601 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1605 (long) current_gdbarch
->register_raw_size
1606 /*REGISTER_RAW_SIZE ()*/);
1608 #ifdef REGISTER_SIM_REGNO
1609 fprintf_unfiltered (file
,
1610 "gdbarch_dump: %s # %s\n",
1611 "REGISTER_SIM_REGNO(reg_nr)",
1612 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1616 (long) current_gdbarch
->register_sim_regno
1617 /*REGISTER_SIM_REGNO ()*/);
1619 #ifdef REGISTER_SIZE
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: REGISTER_SIZE # %s\n",
1622 XSTRING (REGISTER_SIZE
));
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1625 (long) REGISTER_SIZE
);
1627 #ifdef REGISTER_VIRTUAL_SIZE
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: %s # %s\n",
1630 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1631 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1635 (long) current_gdbarch
->register_virtual_size
1636 /*REGISTER_VIRTUAL_SIZE ()*/);
1638 #ifdef REGISTER_VIRTUAL_TYPE
1639 fprintf_unfiltered (file
,
1640 "gdbarch_dump: %s # %s\n",
1641 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1642 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1646 (long) current_gdbarch
->register_virtual_type
1647 /*REGISTER_VIRTUAL_TYPE ()*/);
1649 #ifdef REG_STRUCT_HAS_ADDR
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: %s # %s\n",
1652 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1653 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1657 (long) current_gdbarch
->reg_struct_has_addr
1658 /*REG_STRUCT_HAS_ADDR ()*/);
1660 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1662 /* Macro might contain `[{}]' when not multi-arch */
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: %s # %s\n",
1665 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1666 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1669 fprintf_unfiltered (file
,
1670 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1671 (long) current_gdbarch
->remote_translate_xfer_address
1672 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1674 #ifdef RETURN_VALUE_ON_STACK
1675 fprintf_unfiltered (file
,
1676 "gdbarch_dump: %s # %s\n",
1677 "RETURN_VALUE_ON_STACK(type)",
1678 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1682 (long) current_gdbarch
->return_value_on_stack
1683 /*RETURN_VALUE_ON_STACK ()*/);
1685 #ifdef SAVED_PC_AFTER_CALL
1686 fprintf_unfiltered (file
,
1687 "gdbarch_dump: %s # %s\n",
1688 "SAVED_PC_AFTER_CALL(frame)",
1689 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1693 (long) current_gdbarch
->saved_pc_after_call
1694 /*SAVED_PC_AFTER_CALL ()*/);
1696 #ifdef SAVE_DUMMY_FRAME_TOS
1698 /* Macro might contain `[{}]' when not multi-arch */
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: %s # %s\n",
1701 "SAVE_DUMMY_FRAME_TOS(sp)",
1702 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1707 (long) current_gdbarch
->save_dummy_frame_tos
1708 /*SAVE_DUMMY_FRAME_TOS ()*/);
1710 #ifdef SDB_REG_TO_REGNUM
1711 fprintf_unfiltered (file
,
1712 "gdbarch_dump: %s # %s\n",
1713 "SDB_REG_TO_REGNUM(sdb_regnr)",
1714 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1718 (long) current_gdbarch
->sdb_reg_to_regnum
1719 /*SDB_REG_TO_REGNUM ()*/);
1721 #ifdef SIZEOF_CALL_DUMMY_WORDS
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1724 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1725 fprintf_unfiltered (file
,
1726 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1727 (long) SIZEOF_CALL_DUMMY_WORDS
);
1729 #ifdef SKIP_PROLOGUE
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: %s # %s\n",
1732 "SKIP_PROLOGUE(ip)",
1733 XSTRING (SKIP_PROLOGUE (ip
)));
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1737 (long) current_gdbarch
->skip_prologue
1738 /*SKIP_PROLOGUE ()*/);
1740 #ifdef SKIP_TRAMPOLINE_CODE
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: %s # %s\n",
1743 "SKIP_TRAMPOLINE_CODE(pc)",
1744 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1748 (long) current_gdbarch
->skip_trampoline_code
1749 /*SKIP_TRAMPOLINE_CODE ()*/);
1751 #ifdef SOFTWARE_SINGLE_STEP
1753 /* Macro might contain `[{}]' when not multi-arch */
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: %s # %s\n",
1756 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1757 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1762 (long) current_gdbarch
->software_single_step
1763 /*SOFTWARE_SINGLE_STEP ()*/);
1766 fprintf_unfiltered (file
,
1767 "gdbarch_dump: SP_REGNUM # %s\n",
1768 XSTRING (SP_REGNUM
));
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: SP_REGNUM = %ld\n",
1773 #ifdef STAB_REG_TO_REGNUM
1774 fprintf_unfiltered (file
,
1775 "gdbarch_dump: %s # %s\n",
1776 "STAB_REG_TO_REGNUM(stab_regnr)",
1777 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1781 (long) current_gdbarch
->stab_reg_to_regnum
1782 /*STAB_REG_TO_REGNUM ()*/);
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: %s # %s\n",
1788 XSTRING (STACK_ALIGN (sp
)));
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1792 (long) current_gdbarch
->stack_align
1793 /*STACK_ALIGN ()*/);
1795 #ifdef STORE_PSEUDO_REGISTER
1797 /* Macro might contain `[{}]' when not multi-arch */
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: %s # %s\n",
1800 "STORE_PSEUDO_REGISTER(regnum)",
1801 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1806 (long) current_gdbarch
->store_pseudo_register
1807 /*STORE_PSEUDO_REGISTER ()*/);
1809 #ifdef STORE_RETURN_VALUE
1811 /* Macro might contain `[{}]' when not multi-arch */
1812 fprintf_unfiltered (file
,
1813 "gdbarch_dump: %s # %s\n",
1814 "STORE_RETURN_VALUE(type, valbuf)",
1815 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1818 fprintf_unfiltered (file
,
1819 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1820 (long) current_gdbarch
->store_return_value
1821 /*STORE_RETURN_VALUE ()*/);
1823 #ifdef STORE_STRUCT_RETURN
1825 /* Macro might contain `[{}]' when not multi-arch */
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: %s # %s\n",
1828 "STORE_STRUCT_RETURN(addr, sp)",
1829 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1832 fprintf_unfiltered (file
,
1833 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1834 (long) current_gdbarch
->store_struct_return
1835 /*STORE_STRUCT_RETURN ()*/);
1837 #ifdef TARGET_ADDR_BIT
1838 fprintf_unfiltered (file
,
1839 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1840 XSTRING (TARGET_ADDR_BIT
));
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1843 (long) TARGET_ADDR_BIT
);
1845 #ifdef TARGET_ARCHITECTURE
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1848 XSTRING (TARGET_ARCHITECTURE
));
1849 if (TARGET_ARCHITECTURE
!= NULL
)
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1852 TARGET_ARCHITECTURE
->printable_name
);
1854 #ifdef TARGET_BFD_VMA_BIT
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1857 XSTRING (TARGET_BFD_VMA_BIT
));
1858 fprintf_unfiltered (file
,
1859 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1860 (long) TARGET_BFD_VMA_BIT
);
1862 #ifdef TARGET_BYTE_ORDER
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1865 XSTRING (TARGET_BYTE_ORDER
));
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1868 (long) TARGET_BYTE_ORDER
);
1870 #ifdef TARGET_DOUBLE_BIT
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1873 XSTRING (TARGET_DOUBLE_BIT
));
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1876 (long) TARGET_DOUBLE_BIT
);
1878 #ifdef TARGET_DOUBLE_FORMAT
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1881 XSTRING (TARGET_DOUBLE_FORMAT
));
1882 fprintf_unfiltered (file
,
1883 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1884 (long) TARGET_DOUBLE_FORMAT
);
1886 #ifdef TARGET_FLOAT_BIT
1887 fprintf_unfiltered (file
,
1888 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1889 XSTRING (TARGET_FLOAT_BIT
));
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1892 (long) TARGET_FLOAT_BIT
);
1894 #ifdef TARGET_FLOAT_FORMAT
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1897 XSTRING (TARGET_FLOAT_FORMAT
));
1898 fprintf_unfiltered (file
,
1899 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1900 (long) TARGET_FLOAT_FORMAT
);
1902 #ifdef TARGET_INT_BIT
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1905 XSTRING (TARGET_INT_BIT
));
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1908 (long) TARGET_INT_BIT
);
1910 #ifdef TARGET_LONG_BIT
1911 fprintf_unfiltered (file
,
1912 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1913 XSTRING (TARGET_LONG_BIT
));
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1916 (long) TARGET_LONG_BIT
);
1918 #ifdef TARGET_LONG_DOUBLE_BIT
1919 fprintf_unfiltered (file
,
1920 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1921 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1924 (long) TARGET_LONG_DOUBLE_BIT
);
1926 #ifdef TARGET_LONG_DOUBLE_FORMAT
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1929 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1930 fprintf_unfiltered (file
,
1931 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1932 (long) TARGET_LONG_DOUBLE_FORMAT
);
1934 #ifdef TARGET_LONG_LONG_BIT
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1937 XSTRING (TARGET_LONG_LONG_BIT
));
1938 fprintf_unfiltered (file
,
1939 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1940 (long) TARGET_LONG_LONG_BIT
);
1942 #ifdef TARGET_PRINT_INSN
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: %s # %s\n",
1945 "TARGET_PRINT_INSN(vma, info)",
1946 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1950 (long) current_gdbarch
->print_insn
1951 /*TARGET_PRINT_INSN ()*/);
1953 #ifdef TARGET_PTR_BIT
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1956 XSTRING (TARGET_PTR_BIT
));
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1959 (long) TARGET_PTR_BIT
);
1961 #ifdef TARGET_READ_FP
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: %s # %s\n",
1965 XSTRING (TARGET_READ_FP ()));
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1969 (long) current_gdbarch
->read_fp
1970 /*TARGET_READ_FP ()*/);
1972 #ifdef TARGET_READ_PC
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: %s # %s\n",
1975 "TARGET_READ_PC(ptid)",
1976 XSTRING (TARGET_READ_PC (ptid
)));
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1980 (long) current_gdbarch
->read_pc
1981 /*TARGET_READ_PC ()*/);
1983 #ifdef TARGET_READ_SP
1984 fprintf_unfiltered (file
,
1985 "gdbarch_dump: %s # %s\n",
1987 XSTRING (TARGET_READ_SP ()));
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1991 (long) current_gdbarch
->read_sp
1992 /*TARGET_READ_SP ()*/);
1994 #ifdef TARGET_SHORT_BIT
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1997 XSTRING (TARGET_SHORT_BIT
));
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
2000 (long) TARGET_SHORT_BIT
);
2002 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2004 /* Macro might contain `[{}]' when not multi-arch */
2005 fprintf_unfiltered (file
,
2006 "gdbarch_dump: %s # %s\n",
2007 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2008 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2013 (long) current_gdbarch
->virtual_frame_pointer
2014 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2016 #ifdef TARGET_WRITE_FP
2018 /* Macro might contain `[{}]' when not multi-arch */
2019 fprintf_unfiltered (file
,
2020 "gdbarch_dump: %s # %s\n",
2021 "TARGET_WRITE_FP(val)",
2022 XSTRING (TARGET_WRITE_FP (val
)));
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2027 (long) current_gdbarch
->write_fp
2028 /*TARGET_WRITE_FP ()*/);
2030 #ifdef TARGET_WRITE_PC
2032 /* Macro might contain `[{}]' when not multi-arch */
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: %s # %s\n",
2035 "TARGET_WRITE_PC(val, ptid)",
2036 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2041 (long) current_gdbarch
->write_pc
2042 /*TARGET_WRITE_PC ()*/);
2044 #ifdef TARGET_WRITE_SP
2046 /* Macro might contain `[{}]' when not multi-arch */
2047 fprintf_unfiltered (file
,
2048 "gdbarch_dump: %s # %s\n",
2049 "TARGET_WRITE_SP(val)",
2050 XSTRING (TARGET_WRITE_SP (val
)));
2053 fprintf_unfiltered (file
,
2054 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2055 (long) current_gdbarch
->write_sp
2056 /*TARGET_WRITE_SP ()*/);
2058 #ifdef USE_GENERIC_DUMMY_FRAMES
2059 fprintf_unfiltered (file
,
2060 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2061 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2064 (long) USE_GENERIC_DUMMY_FRAMES
);
2066 #ifdef USE_STRUCT_CONVENTION
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: %s # %s\n",
2069 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2070 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2072 fprintf_unfiltered (file
,
2073 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2074 (long) current_gdbarch
->use_struct_convention
2075 /*USE_STRUCT_CONVENTION ()*/);
2077 if (current_gdbarch
->dump_tdep
!= NULL
)
2078 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2081 struct gdbarch_tdep
*
2082 gdbarch_tdep (struct gdbarch
*gdbarch
)
2084 if (gdbarch_debug
>= 2)
2085 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2086 return gdbarch
->tdep
;
2090 const struct bfd_arch_info
*
2091 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2093 if (gdbarch_debug
>= 2)
2094 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2095 return gdbarch
->bfd_arch_info
;
2099 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2101 if (gdbarch_debug
>= 2)
2102 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2103 return gdbarch
->byte_order
;
2107 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2109 /* Skip verify of short_bit, invalid_p == 0 */
2110 if (gdbarch_debug
>= 2)
2111 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2112 return gdbarch
->short_bit
;
2116 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2119 gdbarch
->short_bit
= short_bit
;
2123 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2125 /* Skip verify of int_bit, invalid_p == 0 */
2126 if (gdbarch_debug
>= 2)
2127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2128 return gdbarch
->int_bit
;
2132 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2135 gdbarch
->int_bit
= int_bit
;
2139 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2141 /* Skip verify of long_bit, invalid_p == 0 */
2142 if (gdbarch_debug
>= 2)
2143 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2144 return gdbarch
->long_bit
;
2148 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2151 gdbarch
->long_bit
= long_bit
;
2155 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2157 /* Skip verify of long_long_bit, invalid_p == 0 */
2158 if (gdbarch_debug
>= 2)
2159 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2160 return gdbarch
->long_long_bit
;
2164 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2167 gdbarch
->long_long_bit
= long_long_bit
;
2171 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2173 /* Skip verify of float_bit, invalid_p == 0 */
2174 if (gdbarch_debug
>= 2)
2175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2176 return gdbarch
->float_bit
;
2180 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2183 gdbarch
->float_bit
= float_bit
;
2187 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2189 /* Skip verify of double_bit, invalid_p == 0 */
2190 if (gdbarch_debug
>= 2)
2191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2192 return gdbarch
->double_bit
;
2196 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2199 gdbarch
->double_bit
= double_bit
;
2203 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2205 /* Skip verify of long_double_bit, invalid_p == 0 */
2206 if (gdbarch_debug
>= 2)
2207 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2208 return gdbarch
->long_double_bit
;
2212 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2213 int long_double_bit
)
2215 gdbarch
->long_double_bit
= long_double_bit
;
2219 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2221 /* Skip verify of ptr_bit, invalid_p == 0 */
2222 if (gdbarch_debug
>= 2)
2223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2224 return gdbarch
->ptr_bit
;
2228 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2231 gdbarch
->ptr_bit
= ptr_bit
;
2235 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2237 if (gdbarch
->addr_bit
== 0)
2238 internal_error (__FILE__
, __LINE__
,
2239 "gdbarch: gdbarch_addr_bit invalid");
2240 if (gdbarch_debug
>= 2)
2241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2242 return gdbarch
->addr_bit
;
2246 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2249 gdbarch
->addr_bit
= addr_bit
;
2253 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2255 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2256 if (gdbarch_debug
>= 2)
2257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2258 return gdbarch
->bfd_vma_bit
;
2262 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2265 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2269 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2271 /* Skip verify of ieee_float, invalid_p == 0 */
2272 if (gdbarch_debug
>= 2)
2273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2274 return gdbarch
->ieee_float
;
2278 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2281 gdbarch
->ieee_float
= ieee_float
;
2285 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2287 if (gdbarch
->read_pc
== 0)
2288 internal_error (__FILE__
, __LINE__
,
2289 "gdbarch: gdbarch_read_pc invalid");
2290 if (gdbarch_debug
>= 2)
2291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2292 return gdbarch
->read_pc (ptid
);
2296 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2297 gdbarch_read_pc_ftype read_pc
)
2299 gdbarch
->read_pc
= read_pc
;
2303 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2305 if (gdbarch
->write_pc
== 0)
2306 internal_error (__FILE__
, __LINE__
,
2307 "gdbarch: gdbarch_write_pc invalid");
2308 if (gdbarch_debug
>= 2)
2309 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2310 gdbarch
->write_pc (val
, ptid
);
2314 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2315 gdbarch_write_pc_ftype write_pc
)
2317 gdbarch
->write_pc
= write_pc
;
2321 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2323 if (gdbarch
->read_fp
== 0)
2324 internal_error (__FILE__
, __LINE__
,
2325 "gdbarch: gdbarch_read_fp invalid");
2326 if (gdbarch_debug
>= 2)
2327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2328 return gdbarch
->read_fp ();
2332 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2333 gdbarch_read_fp_ftype read_fp
)
2335 gdbarch
->read_fp
= read_fp
;
2339 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2341 if (gdbarch
->write_fp
== 0)
2342 internal_error (__FILE__
, __LINE__
,
2343 "gdbarch: gdbarch_write_fp invalid");
2344 if (gdbarch_debug
>= 2)
2345 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2346 gdbarch
->write_fp (val
);
2350 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2351 gdbarch_write_fp_ftype write_fp
)
2353 gdbarch
->write_fp
= write_fp
;
2357 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2359 if (gdbarch
->read_sp
== 0)
2360 internal_error (__FILE__
, __LINE__
,
2361 "gdbarch: gdbarch_read_sp invalid");
2362 if (gdbarch_debug
>= 2)
2363 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2364 return gdbarch
->read_sp ();
2368 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2369 gdbarch_read_sp_ftype read_sp
)
2371 gdbarch
->read_sp
= read_sp
;
2375 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2377 if (gdbarch
->write_sp
== 0)
2378 internal_error (__FILE__
, __LINE__
,
2379 "gdbarch: gdbarch_write_sp invalid");
2380 if (gdbarch_debug
>= 2)
2381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2382 gdbarch
->write_sp (val
);
2386 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2387 gdbarch_write_sp_ftype write_sp
)
2389 gdbarch
->write_sp
= write_sp
;
2393 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2395 if (gdbarch
->virtual_frame_pointer
== 0)
2396 internal_error (__FILE__
, __LINE__
,
2397 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2398 if (gdbarch_debug
>= 2)
2399 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2400 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2404 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2405 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2407 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2411 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2413 return gdbarch
->register_read
!= 0;
2417 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2419 if (gdbarch
->register_read
== 0)
2420 internal_error (__FILE__
, __LINE__
,
2421 "gdbarch: gdbarch_register_read invalid");
2422 if (gdbarch_debug
>= 2)
2423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2424 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2428 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2429 gdbarch_register_read_ftype register_read
)
2431 gdbarch
->register_read
= register_read
;
2435 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2437 return gdbarch
->register_write
!= 0;
2441 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2443 if (gdbarch
->register_write
== 0)
2444 internal_error (__FILE__
, __LINE__
,
2445 "gdbarch: gdbarch_register_write invalid");
2446 if (gdbarch_debug
>= 2)
2447 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2448 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2452 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2453 gdbarch_register_write_ftype register_write
)
2455 gdbarch
->register_write
= register_write
;
2459 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2461 if (gdbarch
->num_regs
== -1)
2462 internal_error (__FILE__
, __LINE__
,
2463 "gdbarch: gdbarch_num_regs invalid");
2464 if (gdbarch_debug
>= 2)
2465 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2466 return gdbarch
->num_regs
;
2470 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2473 gdbarch
->num_regs
= num_regs
;
2477 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2479 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2480 if (gdbarch_debug
>= 2)
2481 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2482 return gdbarch
->num_pseudo_regs
;
2486 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2487 int num_pseudo_regs
)
2489 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2493 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2495 if (gdbarch
->sp_regnum
== -1)
2496 internal_error (__FILE__
, __LINE__
,
2497 "gdbarch: gdbarch_sp_regnum invalid");
2498 if (gdbarch_debug
>= 2)
2499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2500 return gdbarch
->sp_regnum
;
2504 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2507 gdbarch
->sp_regnum
= sp_regnum
;
2511 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2513 if (gdbarch
->fp_regnum
== -1)
2514 internal_error (__FILE__
, __LINE__
,
2515 "gdbarch: gdbarch_fp_regnum invalid");
2516 if (gdbarch_debug
>= 2)
2517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2518 return gdbarch
->fp_regnum
;
2522 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2525 gdbarch
->fp_regnum
= fp_regnum
;
2529 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2531 if (gdbarch
->pc_regnum
== -1)
2532 internal_error (__FILE__
, __LINE__
,
2533 "gdbarch: gdbarch_pc_regnum invalid");
2534 if (gdbarch_debug
>= 2)
2535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2536 return gdbarch
->pc_regnum
;
2540 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2543 gdbarch
->pc_regnum
= pc_regnum
;
2547 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2549 /* Skip verify of fp0_regnum, invalid_p == 0 */
2550 if (gdbarch_debug
>= 2)
2551 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2552 return gdbarch
->fp0_regnum
;
2556 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2559 gdbarch
->fp0_regnum
= fp0_regnum
;
2563 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2565 /* Skip verify of npc_regnum, invalid_p == 0 */
2566 if (gdbarch_debug
>= 2)
2567 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2568 return gdbarch
->npc_regnum
;
2572 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2575 gdbarch
->npc_regnum
= npc_regnum
;
2579 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2581 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2582 if (gdbarch_debug
>= 2)
2583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2584 return gdbarch
->nnpc_regnum
;
2588 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2591 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2595 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2597 if (gdbarch
->stab_reg_to_regnum
== 0)
2598 internal_error (__FILE__
, __LINE__
,
2599 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2600 if (gdbarch_debug
>= 2)
2601 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2602 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2606 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2607 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2609 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2613 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2615 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2616 internal_error (__FILE__
, __LINE__
,
2617 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2618 if (gdbarch_debug
>= 2)
2619 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2620 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2624 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2625 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2627 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2631 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2633 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2634 internal_error (__FILE__
, __LINE__
,
2635 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2636 if (gdbarch_debug
>= 2)
2637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2638 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2642 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2643 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2645 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2649 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2651 if (gdbarch
->sdb_reg_to_regnum
== 0)
2652 internal_error (__FILE__
, __LINE__
,
2653 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2654 if (gdbarch_debug
>= 2)
2655 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2656 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2660 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2661 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2663 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2667 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2669 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2670 internal_error (__FILE__
, __LINE__
,
2671 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2672 if (gdbarch_debug
>= 2)
2673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2674 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2678 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2679 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2681 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2685 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2687 if (gdbarch
->register_name
== 0)
2688 internal_error (__FILE__
, __LINE__
,
2689 "gdbarch: gdbarch_register_name invalid");
2690 if (gdbarch_debug
>= 2)
2691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2692 return gdbarch
->register_name (regnr
);
2696 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2697 gdbarch_register_name_ftype register_name
)
2699 gdbarch
->register_name
= register_name
;
2703 gdbarch_register_size (struct gdbarch
*gdbarch
)
2705 if (gdbarch
->register_size
== -1)
2706 internal_error (__FILE__
, __LINE__
,
2707 "gdbarch: gdbarch_register_size invalid");
2708 if (gdbarch_debug
>= 2)
2709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2710 return gdbarch
->register_size
;
2714 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2717 gdbarch
->register_size
= register_size
;
2721 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2723 if (gdbarch
->register_bytes
== -1)
2724 internal_error (__FILE__
, __LINE__
,
2725 "gdbarch: gdbarch_register_bytes invalid");
2726 if (gdbarch_debug
>= 2)
2727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2728 return gdbarch
->register_bytes
;
2732 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2735 gdbarch
->register_bytes
= register_bytes
;
2739 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2741 if (gdbarch
->register_byte
== 0)
2742 internal_error (__FILE__
, __LINE__
,
2743 "gdbarch: gdbarch_register_byte invalid");
2744 if (gdbarch_debug
>= 2)
2745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2746 return gdbarch
->register_byte (reg_nr
);
2750 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2751 gdbarch_register_byte_ftype register_byte
)
2753 gdbarch
->register_byte
= register_byte
;
2757 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2759 if (gdbarch
->register_raw_size
== 0)
2760 internal_error (__FILE__
, __LINE__
,
2761 "gdbarch: gdbarch_register_raw_size invalid");
2762 if (gdbarch_debug
>= 2)
2763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2764 return gdbarch
->register_raw_size (reg_nr
);
2768 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2769 gdbarch_register_raw_size_ftype register_raw_size
)
2771 gdbarch
->register_raw_size
= register_raw_size
;
2775 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2777 if (gdbarch
->max_register_raw_size
== -1)
2778 internal_error (__FILE__
, __LINE__
,
2779 "gdbarch: gdbarch_max_register_raw_size invalid");
2780 if (gdbarch_debug
>= 2)
2781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2782 return gdbarch
->max_register_raw_size
;
2786 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2787 int max_register_raw_size
)
2789 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2793 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2795 if (gdbarch
->register_virtual_size
== 0)
2796 internal_error (__FILE__
, __LINE__
,
2797 "gdbarch: gdbarch_register_virtual_size invalid");
2798 if (gdbarch_debug
>= 2)
2799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2800 return gdbarch
->register_virtual_size (reg_nr
);
2804 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2805 gdbarch_register_virtual_size_ftype register_virtual_size
)
2807 gdbarch
->register_virtual_size
= register_virtual_size
;
2811 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2813 if (gdbarch
->max_register_virtual_size
== -1)
2814 internal_error (__FILE__
, __LINE__
,
2815 "gdbarch: gdbarch_max_register_virtual_size invalid");
2816 if (gdbarch_debug
>= 2)
2817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2818 return gdbarch
->max_register_virtual_size
;
2822 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2823 int max_register_virtual_size
)
2825 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2829 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2831 if (gdbarch
->register_virtual_type
== 0)
2832 internal_error (__FILE__
, __LINE__
,
2833 "gdbarch: gdbarch_register_virtual_type invalid");
2834 if (gdbarch_debug
>= 2)
2835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2836 return gdbarch
->register_virtual_type (reg_nr
);
2840 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2841 gdbarch_register_virtual_type_ftype register_virtual_type
)
2843 gdbarch
->register_virtual_type
= register_virtual_type
;
2847 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2849 if (gdbarch
->do_registers_info
== 0)
2850 internal_error (__FILE__
, __LINE__
,
2851 "gdbarch: gdbarch_do_registers_info invalid");
2852 if (gdbarch_debug
>= 2)
2853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2854 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2858 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2859 gdbarch_do_registers_info_ftype do_registers_info
)
2861 gdbarch
->do_registers_info
= do_registers_info
;
2865 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2867 if (gdbarch
->register_sim_regno
== 0)
2868 internal_error (__FILE__
, __LINE__
,
2869 "gdbarch: gdbarch_register_sim_regno invalid");
2870 if (gdbarch_debug
>= 2)
2871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2872 return gdbarch
->register_sim_regno (reg_nr
);
2876 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2877 gdbarch_register_sim_regno_ftype register_sim_regno
)
2879 gdbarch
->register_sim_regno
= register_sim_regno
;
2883 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2885 return gdbarch
->register_bytes_ok
!= 0;
2889 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2891 if (gdbarch
->register_bytes_ok
== 0)
2892 internal_error (__FILE__
, __LINE__
,
2893 "gdbarch: gdbarch_register_bytes_ok invalid");
2894 if (gdbarch_debug
>= 2)
2895 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2896 return gdbarch
->register_bytes_ok (nr_bytes
);
2900 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2901 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2903 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2907 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2909 if (gdbarch
->cannot_fetch_register
== 0)
2910 internal_error (__FILE__
, __LINE__
,
2911 "gdbarch: gdbarch_cannot_fetch_register invalid");
2912 if (gdbarch_debug
>= 2)
2913 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2914 return gdbarch
->cannot_fetch_register (regnum
);
2918 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2919 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2921 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2925 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2927 if (gdbarch
->cannot_store_register
== 0)
2928 internal_error (__FILE__
, __LINE__
,
2929 "gdbarch: gdbarch_cannot_store_register invalid");
2930 if (gdbarch_debug
>= 2)
2931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2932 return gdbarch
->cannot_store_register (regnum
);
2936 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2937 gdbarch_cannot_store_register_ftype cannot_store_register
)
2939 gdbarch
->cannot_store_register
= cannot_store_register
;
2943 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2945 if (gdbarch
->use_generic_dummy_frames
== -1)
2946 internal_error (__FILE__
, __LINE__
,
2947 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2948 if (gdbarch_debug
>= 2)
2949 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2950 return gdbarch
->use_generic_dummy_frames
;
2954 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2955 int use_generic_dummy_frames
)
2957 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2961 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2963 if (gdbarch
->call_dummy_location
== 0)
2964 internal_error (__FILE__
, __LINE__
,
2965 "gdbarch: gdbarch_call_dummy_location invalid");
2966 if (gdbarch_debug
>= 2)
2967 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2968 return gdbarch
->call_dummy_location
;
2972 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2973 int call_dummy_location
)
2975 gdbarch
->call_dummy_location
= call_dummy_location
;
2979 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2981 if (gdbarch
->call_dummy_address
== 0)
2982 internal_error (__FILE__
, __LINE__
,
2983 "gdbarch: gdbarch_call_dummy_address invalid");
2984 if (gdbarch_debug
>= 2)
2985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2986 return gdbarch
->call_dummy_address ();
2990 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2991 gdbarch_call_dummy_address_ftype call_dummy_address
)
2993 gdbarch
->call_dummy_address
= call_dummy_address
;
2997 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2999 if (gdbarch
->call_dummy_start_offset
== -1)
3000 internal_error (__FILE__
, __LINE__
,
3001 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3002 if (gdbarch_debug
>= 2)
3003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3004 return gdbarch
->call_dummy_start_offset
;
3008 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3009 CORE_ADDR call_dummy_start_offset
)
3011 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3015 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3017 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3018 internal_error (__FILE__
, __LINE__
,
3019 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3020 if (gdbarch_debug
>= 2)
3021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3022 return gdbarch
->call_dummy_breakpoint_offset
;
3026 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3027 CORE_ADDR call_dummy_breakpoint_offset
)
3029 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3033 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3035 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3036 internal_error (__FILE__
, __LINE__
,
3037 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3038 if (gdbarch_debug
>= 2)
3039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3040 return gdbarch
->call_dummy_breakpoint_offset_p
;
3044 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3045 int call_dummy_breakpoint_offset_p
)
3047 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3051 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3053 if (gdbarch
->call_dummy_length
== -1)
3054 internal_error (__FILE__
, __LINE__
,
3055 "gdbarch: gdbarch_call_dummy_length invalid");
3056 if (gdbarch_debug
>= 2)
3057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3058 return gdbarch
->call_dummy_length
;
3062 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3063 int call_dummy_length
)
3065 gdbarch
->call_dummy_length
= call_dummy_length
;
3069 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3071 if (gdbarch
->pc_in_call_dummy
== 0)
3072 internal_error (__FILE__
, __LINE__
,
3073 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3074 if (gdbarch_debug
>= 2)
3075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3076 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3080 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3081 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3083 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3087 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3089 if (gdbarch
->call_dummy_p
== -1)
3090 internal_error (__FILE__
, __LINE__
,
3091 "gdbarch: gdbarch_call_dummy_p invalid");
3092 if (gdbarch_debug
>= 2)
3093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3094 return gdbarch
->call_dummy_p
;
3098 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3101 gdbarch
->call_dummy_p
= call_dummy_p
;
3105 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3107 /* Skip verify of call_dummy_words, invalid_p == 0 */
3108 if (gdbarch_debug
>= 2)
3109 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3110 return gdbarch
->call_dummy_words
;
3114 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3115 LONGEST
* call_dummy_words
)
3117 gdbarch
->call_dummy_words
= call_dummy_words
;
3121 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3123 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3124 if (gdbarch_debug
>= 2)
3125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3126 return gdbarch
->sizeof_call_dummy_words
;
3130 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3131 int sizeof_call_dummy_words
)
3133 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3137 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3139 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3140 internal_error (__FILE__
, __LINE__
,
3141 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3142 if (gdbarch_debug
>= 2)
3143 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3144 return gdbarch
->call_dummy_stack_adjust_p
;
3148 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3149 int call_dummy_stack_adjust_p
)
3151 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3155 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3157 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3158 internal_error (__FILE__
, __LINE__
,
3159 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3160 if (gdbarch_debug
>= 2)
3161 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3162 return gdbarch
->call_dummy_stack_adjust
;
3166 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3167 int call_dummy_stack_adjust
)
3169 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3173 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
)
3175 if (gdbarch
->fix_call_dummy
== 0)
3176 internal_error (__FILE__
, __LINE__
,
3177 "gdbarch: gdbarch_fix_call_dummy invalid");
3178 if (gdbarch_debug
>= 2)
3179 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3180 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3184 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3185 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3187 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3191 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3193 if (gdbarch
->init_frame_pc_first
== 0)
3194 internal_error (__FILE__
, __LINE__
,
3195 "gdbarch: gdbarch_init_frame_pc_first invalid");
3196 if (gdbarch_debug
>= 2)
3197 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3198 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3202 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3203 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3205 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3209 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3211 if (gdbarch
->init_frame_pc
== 0)
3212 internal_error (__FILE__
, __LINE__
,
3213 "gdbarch: gdbarch_init_frame_pc invalid");
3214 if (gdbarch_debug
>= 2)
3215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3216 gdbarch
->init_frame_pc (fromleaf
, prev
);
3220 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3221 gdbarch_init_frame_pc_ftype init_frame_pc
)
3223 gdbarch
->init_frame_pc
= init_frame_pc
;
3227 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3229 if (gdbarch_debug
>= 2)
3230 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3231 return gdbarch
->believe_pcc_promotion
;
3235 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3236 int believe_pcc_promotion
)
3238 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3242 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3244 if (gdbarch_debug
>= 2)
3245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3246 return gdbarch
->believe_pcc_promotion_type
;
3250 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3251 int believe_pcc_promotion_type
)
3253 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3257 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3259 if (gdbarch
->coerce_float_to_double
== 0)
3260 internal_error (__FILE__
, __LINE__
,
3261 "gdbarch: gdbarch_coerce_float_to_double invalid");
3262 if (gdbarch_debug
>= 2)
3263 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3264 return gdbarch
->coerce_float_to_double (formal
, actual
);
3268 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3269 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3271 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3275 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
)
3277 if (gdbarch
->get_saved_register
== 0)
3278 internal_error (__FILE__
, __LINE__
,
3279 "gdbarch: gdbarch_get_saved_register invalid");
3280 if (gdbarch_debug
>= 2)
3281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3282 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3286 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3287 gdbarch_get_saved_register_ftype get_saved_register
)
3289 gdbarch
->get_saved_register
= get_saved_register
;
3293 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3295 if (gdbarch
->register_convertible
== 0)
3296 internal_error (__FILE__
, __LINE__
,
3297 "gdbarch: gdbarch_register_convertible invalid");
3298 if (gdbarch_debug
>= 2)
3299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3300 return gdbarch
->register_convertible (nr
);
3304 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3305 gdbarch_register_convertible_ftype register_convertible
)
3307 gdbarch
->register_convertible
= register_convertible
;
3311 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3313 if (gdbarch
->register_convert_to_virtual
== 0)
3314 internal_error (__FILE__
, __LINE__
,
3315 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3316 if (gdbarch_debug
>= 2)
3317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3318 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3322 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3323 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3325 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3329 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3331 if (gdbarch
->register_convert_to_raw
== 0)
3332 internal_error (__FILE__
, __LINE__
,
3333 "gdbarch: gdbarch_register_convert_to_raw invalid");
3334 if (gdbarch_debug
>= 2)
3335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3336 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3340 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3341 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3343 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3347 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3349 return gdbarch
->fetch_pseudo_register
!= 0;
3353 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3355 if (gdbarch
->fetch_pseudo_register
== 0)
3356 internal_error (__FILE__
, __LINE__
,
3357 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3358 if (gdbarch_debug
>= 2)
3359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3360 gdbarch
->fetch_pseudo_register (regnum
);
3364 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3365 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3367 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3371 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3373 return gdbarch
->store_pseudo_register
!= 0;
3377 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3379 if (gdbarch
->store_pseudo_register
== 0)
3380 internal_error (__FILE__
, __LINE__
,
3381 "gdbarch: gdbarch_store_pseudo_register invalid");
3382 if (gdbarch_debug
>= 2)
3383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3384 gdbarch
->store_pseudo_register (regnum
);
3388 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3389 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3391 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3395 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3397 if (gdbarch
->pointer_to_address
== 0)
3398 internal_error (__FILE__
, __LINE__
,
3399 "gdbarch: gdbarch_pointer_to_address invalid");
3400 if (gdbarch_debug
>= 2)
3401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3402 return gdbarch
->pointer_to_address (type
, buf
);
3406 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3407 gdbarch_pointer_to_address_ftype pointer_to_address
)
3409 gdbarch
->pointer_to_address
= pointer_to_address
;
3413 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3415 if (gdbarch
->address_to_pointer
== 0)
3416 internal_error (__FILE__
, __LINE__
,
3417 "gdbarch: gdbarch_address_to_pointer invalid");
3418 if (gdbarch_debug
>= 2)
3419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3420 gdbarch
->address_to_pointer (type
, buf
, addr
);
3424 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3425 gdbarch_address_to_pointer_ftype address_to_pointer
)
3427 gdbarch
->address_to_pointer
= address_to_pointer
;
3431 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3433 return gdbarch
->integer_to_address
!= 0;
3437 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3439 if (gdbarch
->integer_to_address
== 0)
3440 internal_error (__FILE__
, __LINE__
,
3441 "gdbarch: gdbarch_integer_to_address invalid");
3442 if (gdbarch_debug
>= 2)
3443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3444 return gdbarch
->integer_to_address (type
, buf
);
3448 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3449 gdbarch_integer_to_address_ftype integer_to_address
)
3451 gdbarch
->integer_to_address
= integer_to_address
;
3455 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3457 if (gdbarch
->return_value_on_stack
== 0)
3458 internal_error (__FILE__
, __LINE__
,
3459 "gdbarch: gdbarch_return_value_on_stack invalid");
3460 if (gdbarch_debug
>= 2)
3461 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3462 return gdbarch
->return_value_on_stack (type
);
3466 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3467 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3469 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3473 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3475 if (gdbarch
->extract_return_value
== 0)
3476 internal_error (__FILE__
, __LINE__
,
3477 "gdbarch: gdbarch_extract_return_value invalid");
3478 if (gdbarch_debug
>= 2)
3479 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3480 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3484 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3485 gdbarch_extract_return_value_ftype extract_return_value
)
3487 gdbarch
->extract_return_value
= extract_return_value
;
3491 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3493 if (gdbarch
->push_arguments
== 0)
3494 internal_error (__FILE__
, __LINE__
,
3495 "gdbarch: gdbarch_push_arguments invalid");
3496 if (gdbarch_debug
>= 2)
3497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3498 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3502 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3503 gdbarch_push_arguments_ftype push_arguments
)
3505 gdbarch
->push_arguments
= push_arguments
;
3509 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3511 if (gdbarch
->push_dummy_frame
== 0)
3512 internal_error (__FILE__
, __LINE__
,
3513 "gdbarch: gdbarch_push_dummy_frame invalid");
3514 if (gdbarch_debug
>= 2)
3515 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3516 gdbarch
->push_dummy_frame ();
3520 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3521 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3523 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3527 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3529 return gdbarch
->push_return_address
!= 0;
3533 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3535 if (gdbarch
->push_return_address
== 0)
3536 internal_error (__FILE__
, __LINE__
,
3537 "gdbarch: gdbarch_push_return_address invalid");
3538 if (gdbarch_debug
>= 2)
3539 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3540 return gdbarch
->push_return_address (pc
, sp
);
3544 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3545 gdbarch_push_return_address_ftype push_return_address
)
3547 gdbarch
->push_return_address
= push_return_address
;
3551 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3553 if (gdbarch
->pop_frame
== 0)
3554 internal_error (__FILE__
, __LINE__
,
3555 "gdbarch: gdbarch_pop_frame invalid");
3556 if (gdbarch_debug
>= 2)
3557 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3558 gdbarch
->pop_frame ();
3562 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3563 gdbarch_pop_frame_ftype pop_frame
)
3565 gdbarch
->pop_frame
= pop_frame
;
3569 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3571 if (gdbarch
->store_struct_return
== 0)
3572 internal_error (__FILE__
, __LINE__
,
3573 "gdbarch: gdbarch_store_struct_return invalid");
3574 if (gdbarch_debug
>= 2)
3575 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3576 gdbarch
->store_struct_return (addr
, sp
);
3580 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3581 gdbarch_store_struct_return_ftype store_struct_return
)
3583 gdbarch
->store_struct_return
= store_struct_return
;
3587 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3589 if (gdbarch
->store_return_value
== 0)
3590 internal_error (__FILE__
, __LINE__
,
3591 "gdbarch: gdbarch_store_return_value invalid");
3592 if (gdbarch_debug
>= 2)
3593 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3594 gdbarch
->store_return_value (type
, valbuf
);
3598 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3599 gdbarch_store_return_value_ftype store_return_value
)
3601 gdbarch
->store_return_value
= store_return_value
;
3605 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3607 return gdbarch
->extract_struct_value_address
!= 0;
3611 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3613 if (gdbarch
->extract_struct_value_address
== 0)
3614 internal_error (__FILE__
, __LINE__
,
3615 "gdbarch: gdbarch_extract_struct_value_address invalid");
3616 if (gdbarch_debug
>= 2)
3617 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3618 return gdbarch
->extract_struct_value_address (regbuf
);
3622 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3623 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3625 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3629 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3631 if (gdbarch
->use_struct_convention
== 0)
3632 internal_error (__FILE__
, __LINE__
,
3633 "gdbarch: gdbarch_use_struct_convention invalid");
3634 if (gdbarch_debug
>= 2)
3635 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3636 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3640 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3641 gdbarch_use_struct_convention_ftype use_struct_convention
)
3643 gdbarch
->use_struct_convention
= use_struct_convention
;
3647 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3649 if (gdbarch
->frame_init_saved_regs
== 0)
3650 internal_error (__FILE__
, __LINE__
,
3651 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3652 if (gdbarch_debug
>= 2)
3653 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3654 gdbarch
->frame_init_saved_regs (frame
);
3658 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3659 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3661 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3665 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3667 return gdbarch
->init_extra_frame_info
!= 0;
3671 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3673 if (gdbarch
->init_extra_frame_info
== 0)
3674 internal_error (__FILE__
, __LINE__
,
3675 "gdbarch: gdbarch_init_extra_frame_info invalid");
3676 if (gdbarch_debug
>= 2)
3677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3678 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3682 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3683 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3685 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3689 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3691 if (gdbarch
->skip_prologue
== 0)
3692 internal_error (__FILE__
, __LINE__
,
3693 "gdbarch: gdbarch_skip_prologue invalid");
3694 if (gdbarch_debug
>= 2)
3695 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3696 return gdbarch
->skip_prologue (ip
);
3700 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3701 gdbarch_skip_prologue_ftype skip_prologue
)
3703 gdbarch
->skip_prologue
= skip_prologue
;
3707 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3709 if (gdbarch
->prologue_frameless_p
== 0)
3710 internal_error (__FILE__
, __LINE__
,
3711 "gdbarch: gdbarch_prologue_frameless_p invalid");
3712 if (gdbarch_debug
>= 2)
3713 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3714 return gdbarch
->prologue_frameless_p (ip
);
3718 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3719 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3721 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3725 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3727 if (gdbarch
->inner_than
== 0)
3728 internal_error (__FILE__
, __LINE__
,
3729 "gdbarch: gdbarch_inner_than invalid");
3730 if (gdbarch_debug
>= 2)
3731 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3732 return gdbarch
->inner_than (lhs
, rhs
);
3736 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3737 gdbarch_inner_than_ftype inner_than
)
3739 gdbarch
->inner_than
= inner_than
;
3743 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3745 if (gdbarch
->breakpoint_from_pc
== 0)
3746 internal_error (__FILE__
, __LINE__
,
3747 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3748 if (gdbarch_debug
>= 2)
3749 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3750 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3754 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3755 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3757 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3761 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3763 if (gdbarch
->memory_insert_breakpoint
== 0)
3764 internal_error (__FILE__
, __LINE__
,
3765 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3766 if (gdbarch_debug
>= 2)
3767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3768 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3772 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3773 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3775 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3779 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3781 if (gdbarch
->memory_remove_breakpoint
== 0)
3782 internal_error (__FILE__
, __LINE__
,
3783 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3784 if (gdbarch_debug
>= 2)
3785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3786 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3790 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3791 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3793 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3797 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3799 if (gdbarch
->decr_pc_after_break
== -1)
3800 internal_error (__FILE__
, __LINE__
,
3801 "gdbarch: gdbarch_decr_pc_after_break invalid");
3802 if (gdbarch_debug
>= 2)
3803 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3804 return gdbarch
->decr_pc_after_break
;
3808 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3809 CORE_ADDR decr_pc_after_break
)
3811 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3815 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3817 if (gdbarch
->prepare_to_proceed
== 0)
3818 internal_error (__FILE__
, __LINE__
,
3819 "gdbarch: gdbarch_prepare_to_proceed invalid");
3820 if (gdbarch_debug
>= 2)
3821 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3822 return gdbarch
->prepare_to_proceed (select_it
);
3826 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3827 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3829 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3833 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3835 if (gdbarch
->function_start_offset
== -1)
3836 internal_error (__FILE__
, __LINE__
,
3837 "gdbarch: gdbarch_function_start_offset invalid");
3838 if (gdbarch_debug
>= 2)
3839 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3840 return gdbarch
->function_start_offset
;
3844 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3845 CORE_ADDR function_start_offset
)
3847 gdbarch
->function_start_offset
= function_start_offset
;
3851 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3853 if (gdbarch
->remote_translate_xfer_address
== 0)
3854 internal_error (__FILE__
, __LINE__
,
3855 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3856 if (gdbarch_debug
>= 2)
3857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3858 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3862 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3863 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3865 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3869 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3871 if (gdbarch
->frame_args_skip
== -1)
3872 internal_error (__FILE__
, __LINE__
,
3873 "gdbarch: gdbarch_frame_args_skip invalid");
3874 if (gdbarch_debug
>= 2)
3875 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3876 return gdbarch
->frame_args_skip
;
3880 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3881 CORE_ADDR frame_args_skip
)
3883 gdbarch
->frame_args_skip
= frame_args_skip
;
3887 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3889 if (gdbarch
->frameless_function_invocation
== 0)
3890 internal_error (__FILE__
, __LINE__
,
3891 "gdbarch: gdbarch_frameless_function_invocation invalid");
3892 if (gdbarch_debug
>= 2)
3893 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3894 return gdbarch
->frameless_function_invocation (fi
);
3898 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3899 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3901 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3905 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3907 if (gdbarch
->frame_chain
== 0)
3908 internal_error (__FILE__
, __LINE__
,
3909 "gdbarch: gdbarch_frame_chain invalid");
3910 if (gdbarch_debug
>= 2)
3911 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3912 return gdbarch
->frame_chain (frame
);
3916 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3917 gdbarch_frame_chain_ftype frame_chain
)
3919 gdbarch
->frame_chain
= frame_chain
;
3923 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3925 if (gdbarch
->frame_chain_valid
== 0)
3926 internal_error (__FILE__
, __LINE__
,
3927 "gdbarch: gdbarch_frame_chain_valid invalid");
3928 if (gdbarch_debug
>= 2)
3929 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3930 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3934 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3935 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3937 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3941 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3943 if (gdbarch
->frame_saved_pc
== 0)
3944 internal_error (__FILE__
, __LINE__
,
3945 "gdbarch: gdbarch_frame_saved_pc invalid");
3946 if (gdbarch_debug
>= 2)
3947 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3948 return gdbarch
->frame_saved_pc (fi
);
3952 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3953 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3955 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3959 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3961 if (gdbarch
->frame_args_address
== 0)
3962 internal_error (__FILE__
, __LINE__
,
3963 "gdbarch: gdbarch_frame_args_address invalid");
3964 if (gdbarch_debug
>= 2)
3965 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3966 return gdbarch
->frame_args_address (fi
);
3970 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3971 gdbarch_frame_args_address_ftype frame_args_address
)
3973 gdbarch
->frame_args_address
= frame_args_address
;
3977 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3979 if (gdbarch
->frame_locals_address
== 0)
3980 internal_error (__FILE__
, __LINE__
,
3981 "gdbarch: gdbarch_frame_locals_address invalid");
3982 if (gdbarch_debug
>= 2)
3983 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3984 return gdbarch
->frame_locals_address (fi
);
3988 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3989 gdbarch_frame_locals_address_ftype frame_locals_address
)
3991 gdbarch
->frame_locals_address
= frame_locals_address
;
3995 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3997 if (gdbarch
->saved_pc_after_call
== 0)
3998 internal_error (__FILE__
, __LINE__
,
3999 "gdbarch: gdbarch_saved_pc_after_call invalid");
4000 if (gdbarch_debug
>= 2)
4001 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4002 return gdbarch
->saved_pc_after_call (frame
);
4006 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4007 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4009 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4013 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4015 if (gdbarch
->frame_num_args
== 0)
4016 internal_error (__FILE__
, __LINE__
,
4017 "gdbarch: gdbarch_frame_num_args invalid");
4018 if (gdbarch_debug
>= 2)
4019 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4020 return gdbarch
->frame_num_args (frame
);
4024 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4025 gdbarch_frame_num_args_ftype frame_num_args
)
4027 gdbarch
->frame_num_args
= frame_num_args
;
4031 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4033 return gdbarch
->stack_align
!= 0;
4037 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4039 if (gdbarch
->stack_align
== 0)
4040 internal_error (__FILE__
, __LINE__
,
4041 "gdbarch: gdbarch_stack_align invalid");
4042 if (gdbarch_debug
>= 2)
4043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4044 return gdbarch
->stack_align (sp
);
4048 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4049 gdbarch_stack_align_ftype stack_align
)
4051 gdbarch
->stack_align
= stack_align
;
4055 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4057 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4058 if (gdbarch_debug
>= 2)
4059 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4060 return gdbarch
->extra_stack_alignment_needed
;
4064 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4065 int extra_stack_alignment_needed
)
4067 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4071 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4073 return gdbarch
->reg_struct_has_addr
!= 0;
4077 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4079 if (gdbarch
->reg_struct_has_addr
== 0)
4080 internal_error (__FILE__
, __LINE__
,
4081 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4082 if (gdbarch_debug
>= 2)
4083 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4084 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4088 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4089 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4091 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4095 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4097 return gdbarch
->save_dummy_frame_tos
!= 0;
4101 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4103 if (gdbarch
->save_dummy_frame_tos
== 0)
4104 internal_error (__FILE__
, __LINE__
,
4105 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4106 if (gdbarch_debug
>= 2)
4107 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4108 gdbarch
->save_dummy_frame_tos (sp
);
4112 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4113 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4115 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4119 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4121 if (gdbarch_debug
>= 2)
4122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4123 return gdbarch
->parm_boundary
;
4127 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4130 gdbarch
->parm_boundary
= parm_boundary
;
4133 const struct floatformat
*
4134 gdbarch_float_format (struct gdbarch
*gdbarch
)
4136 if (gdbarch_debug
>= 2)
4137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4138 return gdbarch
->float_format
;
4142 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4143 const struct floatformat
* float_format
)
4145 gdbarch
->float_format
= float_format
;
4148 const struct floatformat
*
4149 gdbarch_double_format (struct gdbarch
*gdbarch
)
4151 if (gdbarch_debug
>= 2)
4152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4153 return gdbarch
->double_format
;
4157 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4158 const struct floatformat
* double_format
)
4160 gdbarch
->double_format
= double_format
;
4163 const struct floatformat
*
4164 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4166 if (gdbarch_debug
>= 2)
4167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4168 return gdbarch
->long_double_format
;
4172 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4173 const struct floatformat
* long_double_format
)
4175 gdbarch
->long_double_format
= long_double_format
;
4179 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4181 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4182 internal_error (__FILE__
, __LINE__
,
4183 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4184 if (gdbarch_debug
>= 2)
4185 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4186 return gdbarch
->convert_from_func_ptr_addr (addr
);
4190 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4191 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4193 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4197 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4199 if (gdbarch
->addr_bits_remove
== 0)
4200 internal_error (__FILE__
, __LINE__
,
4201 "gdbarch: gdbarch_addr_bits_remove invalid");
4202 if (gdbarch_debug
>= 2)
4203 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4204 return gdbarch
->addr_bits_remove (addr
);
4208 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4209 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4211 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4215 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4217 return gdbarch
->software_single_step
!= 0;
4221 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4223 if (gdbarch
->software_single_step
== 0)
4224 internal_error (__FILE__
, __LINE__
,
4225 "gdbarch: gdbarch_software_single_step invalid");
4226 if (gdbarch_debug
>= 2)
4227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4228 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4232 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4233 gdbarch_software_single_step_ftype software_single_step
)
4235 gdbarch
->software_single_step
= software_single_step
;
4239 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4241 if (gdbarch
->print_insn
== 0)
4242 internal_error (__FILE__
, __LINE__
,
4243 "gdbarch: gdbarch_print_insn invalid");
4244 if (gdbarch_debug
>= 2)
4245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4246 return gdbarch
->print_insn (vma
, info
);
4250 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4251 gdbarch_print_insn_ftype print_insn
)
4253 gdbarch
->print_insn
= print_insn
;
4257 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4259 if (gdbarch
->skip_trampoline_code
== 0)
4260 internal_error (__FILE__
, __LINE__
,
4261 "gdbarch: gdbarch_skip_trampoline_code invalid");
4262 if (gdbarch_debug
>= 2)
4263 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4264 return gdbarch
->skip_trampoline_code (pc
);
4268 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4269 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4271 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4275 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4277 if (gdbarch
->in_solib_call_trampoline
== 0)
4278 internal_error (__FILE__
, __LINE__
,
4279 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4280 if (gdbarch_debug
>= 2)
4281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4282 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4286 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4287 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4289 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4293 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4295 if (gdbarch
->in_function_epilogue_p
== 0)
4296 internal_error (__FILE__
, __LINE__
,
4297 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4298 if (gdbarch_debug
>= 2)
4299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4300 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4304 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4305 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4307 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4311 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4313 if (gdbarch
->construct_inferior_arguments
== 0)
4314 internal_error (__FILE__
, __LINE__
,
4315 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4316 if (gdbarch_debug
>= 2)
4317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4318 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4322 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4323 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4325 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4329 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4331 return gdbarch
->dwarf2_build_frame_info
!= 0;
4335 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4337 if (gdbarch
->dwarf2_build_frame_info
== 0)
4338 internal_error (__FILE__
, __LINE__
,
4339 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4340 if (gdbarch_debug
>= 2)
4341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4342 gdbarch
->dwarf2_build_frame_info (objfile
);
4346 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4347 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4349 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4353 /* Keep a registry of per-architecture data-pointers required by GDB
4359 gdbarch_data_init_ftype
*init
;
4360 gdbarch_data_free_ftype
*free
;
4363 struct gdbarch_data_registration
4365 struct gdbarch_data
*data
;
4366 struct gdbarch_data_registration
*next
;
4369 struct gdbarch_data_registry
4372 struct gdbarch_data_registration
*registrations
;
4375 struct gdbarch_data_registry gdbarch_data_registry
=
4380 struct gdbarch_data
*
4381 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4382 gdbarch_data_free_ftype
*free
)
4384 struct gdbarch_data_registration
**curr
;
4385 for (curr
= &gdbarch_data_registry
.registrations
;
4387 curr
= &(*curr
)->next
);
4388 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4389 (*curr
)->next
= NULL
;
4390 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4391 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4392 (*curr
)->data
->init
= init
;
4393 (*curr
)->data
->free
= free
;
4394 return (*curr
)->data
;
4398 /* Walk through all the registered users initializing each in turn. */
4401 init_gdbarch_data (struct gdbarch
*gdbarch
)
4403 struct gdbarch_data_registration
*rego
;
4404 for (rego
= gdbarch_data_registry
.registrations
;
4408 struct gdbarch_data
*data
= rego
->data
;
4409 gdb_assert (data
->index
< gdbarch
->nr_data
);
4410 if (data
->init
!= NULL
)
4412 void *pointer
= data
->init (gdbarch
);
4413 set_gdbarch_data (gdbarch
, data
, pointer
);
4418 /* Create/delete the gdbarch data vector. */
4421 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4423 gdb_assert (gdbarch
->data
== NULL
);
4424 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4425 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4429 free_gdbarch_data (struct gdbarch
*gdbarch
)
4431 struct gdbarch_data_registration
*rego
;
4432 gdb_assert (gdbarch
->data
!= NULL
);
4433 for (rego
= gdbarch_data_registry
.registrations
;
4437 struct gdbarch_data
*data
= rego
->data
;
4438 gdb_assert (data
->index
< gdbarch
->nr_data
);
4439 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4441 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4442 gdbarch
->data
[data
->index
] = NULL
;
4445 xfree (gdbarch
->data
);
4446 gdbarch
->data
= NULL
;
4450 /* Initialize the current value of thee specified per-architecture
4454 set_gdbarch_data (struct gdbarch
*gdbarch
,
4455 struct gdbarch_data
*data
,
4458 gdb_assert (data
->index
< gdbarch
->nr_data
);
4459 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4460 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4461 gdbarch
->data
[data
->index
] = pointer
;
4464 /* Return the current value of the specified per-architecture
4468 gdbarch_data (struct gdbarch_data
*data
)
4470 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4471 return current_gdbarch
->data
[data
->index
];
4476 /* Keep a registry of swapped data required by GDB modules. */
4481 struct gdbarch_swap_registration
*source
;
4482 struct gdbarch_swap
*next
;
4485 struct gdbarch_swap_registration
4488 unsigned long sizeof_data
;
4489 gdbarch_swap_ftype
*init
;
4490 struct gdbarch_swap_registration
*next
;
4493 struct gdbarch_swap_registry
4496 struct gdbarch_swap_registration
*registrations
;
4499 struct gdbarch_swap_registry gdbarch_swap_registry
=
4505 register_gdbarch_swap (void *data
,
4506 unsigned long sizeof_data
,
4507 gdbarch_swap_ftype
*init
)
4509 struct gdbarch_swap_registration
**rego
;
4510 for (rego
= &gdbarch_swap_registry
.registrations
;
4512 rego
= &(*rego
)->next
);
4513 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4514 (*rego
)->next
= NULL
;
4515 (*rego
)->init
= init
;
4516 (*rego
)->data
= data
;
4517 (*rego
)->sizeof_data
= sizeof_data
;
4522 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4524 struct gdbarch_swap_registration
*rego
;
4525 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4526 for (rego
= gdbarch_swap_registry
.registrations
;
4530 if (rego
->data
!= NULL
)
4532 (*curr
) = XMALLOC (struct gdbarch_swap
);
4533 (*curr
)->source
= rego
;
4534 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4535 (*curr
)->next
= NULL
;
4536 memset (rego
->data
, 0, rego
->sizeof_data
);
4537 curr
= &(*curr
)->next
;
4539 if (rego
->init
!= NULL
)
4545 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4547 struct gdbarch_swap
*curr
;
4548 for (curr
= gdbarch
->swap
;
4551 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4555 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4557 struct gdbarch_swap
*curr
;
4558 for (curr
= gdbarch
->swap
;
4561 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4565 /* Keep a registry of the architectures known by GDB. */
4567 struct gdbarch_registration
4569 enum bfd_architecture bfd_architecture
;
4570 gdbarch_init_ftype
*init
;
4571 gdbarch_dump_tdep_ftype
*dump_tdep
;
4572 struct gdbarch_list
*arches
;
4573 struct gdbarch_registration
*next
;
4576 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4579 append_name (const char ***buf
, int *nr
, const char *name
)
4581 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4587 gdbarch_printable_names (void)
4591 /* Accumulate a list of names based on the registed list of
4593 enum bfd_architecture a
;
4595 const char **arches
= NULL
;
4596 struct gdbarch_registration
*rego
;
4597 for (rego
= gdbarch_registry
;
4601 const struct bfd_arch_info
*ap
;
4602 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4604 internal_error (__FILE__
, __LINE__
,
4605 "gdbarch_architecture_names: multi-arch unknown");
4608 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4613 append_name (&arches
, &nr_arches
, NULL
);
4617 /* Just return all the architectures that BFD knows. Assume that
4618 the legacy architecture framework supports them. */
4619 return bfd_arch_list ();
4624 gdbarch_register (enum bfd_architecture bfd_architecture
,
4625 gdbarch_init_ftype
*init
,
4626 gdbarch_dump_tdep_ftype
*dump_tdep
)
4628 struct gdbarch_registration
**curr
;
4629 const struct bfd_arch_info
*bfd_arch_info
;
4630 /* Check that BFD recognizes this architecture */
4631 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4632 if (bfd_arch_info
== NULL
)
4634 internal_error (__FILE__
, __LINE__
,
4635 "gdbarch: Attempt to register unknown architecture (%d)",
4638 /* Check that we haven't seen this architecture before */
4639 for (curr
= &gdbarch_registry
;
4641 curr
= &(*curr
)->next
)
4643 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4644 internal_error (__FILE__
, __LINE__
,
4645 "gdbarch: Duplicate registraration of architecture (%s)",
4646 bfd_arch_info
->printable_name
);
4650 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4651 bfd_arch_info
->printable_name
,
4654 (*curr
) = XMALLOC (struct gdbarch_registration
);
4655 (*curr
)->bfd_architecture
= bfd_architecture
;
4656 (*curr
)->init
= init
;
4657 (*curr
)->dump_tdep
= dump_tdep
;
4658 (*curr
)->arches
= NULL
;
4659 (*curr
)->next
= NULL
;
4660 /* When non- multi-arch, install whatever target dump routine we've
4661 been provided - hopefully that routine has been written correctly
4662 and works regardless of multi-arch. */
4663 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4664 && startup_gdbarch
.dump_tdep
== NULL
)
4665 startup_gdbarch
.dump_tdep
= dump_tdep
;
4669 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4670 gdbarch_init_ftype
*init
)
4672 gdbarch_register (bfd_architecture
, init
, NULL
);
4676 /* Look for an architecture using gdbarch_info. Base search on only
4677 BFD_ARCH_INFO and BYTE_ORDER. */
4679 struct gdbarch_list
*
4680 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4681 const struct gdbarch_info
*info
)
4683 for (; arches
!= NULL
; arches
= arches
->next
)
4685 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4687 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4695 /* Update the current architecture. Return ZERO if the update request
4699 gdbarch_update_p (struct gdbarch_info info
)
4701 struct gdbarch
*new_gdbarch
;
4702 struct gdbarch_list
**list
;
4703 struct gdbarch_registration
*rego
;
4705 /* Fill in missing parts of the INFO struct using a number of
4706 sources: ``set ...''; INFOabfd supplied; existing target. */
4708 /* ``(gdb) set architecture ...'' */
4709 if (info
.bfd_arch_info
== NULL
4710 && !TARGET_ARCHITECTURE_AUTO
)
4711 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4712 if (info
.bfd_arch_info
== NULL
4713 && info
.abfd
!= NULL
4714 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4715 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4716 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4717 if (info
.bfd_arch_info
== NULL
)
4718 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4720 /* ``(gdb) set byte-order ...'' */
4721 if (info
.byte_order
== 0
4722 && !TARGET_BYTE_ORDER_AUTO
)
4723 info
.byte_order
= TARGET_BYTE_ORDER
;
4724 /* From the INFO struct. */
4725 if (info
.byte_order
== 0
4726 && info
.abfd
!= NULL
)
4727 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4728 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4730 /* From the current target. */
4731 if (info
.byte_order
== 0)
4732 info
.byte_order
= TARGET_BYTE_ORDER
;
4734 /* Must have found some sort of architecture. */
4735 gdb_assert (info
.bfd_arch_info
!= NULL
);
4739 fprintf_unfiltered (gdb_stdlog
,
4740 "gdbarch_update: info.bfd_arch_info %s\n",
4741 (info
.bfd_arch_info
!= NULL
4742 ? info
.bfd_arch_info
->printable_name
4744 fprintf_unfiltered (gdb_stdlog
,
4745 "gdbarch_update: info.byte_order %d (%s)\n",
4747 (info
.byte_order
== BIG_ENDIAN
? "big"
4748 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4750 fprintf_unfiltered (gdb_stdlog
,
4751 "gdbarch_update: info.abfd 0x%lx\n",
4753 fprintf_unfiltered (gdb_stdlog
,
4754 "gdbarch_update: info.tdep_info 0x%lx\n",
4755 (long) info
.tdep_info
);
4758 /* Find the target that knows about this architecture. */
4759 for (rego
= gdbarch_registry
;
4762 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4771 /* Ask the target for a replacement architecture. */
4772 new_gdbarch
= rego
->init (info
, rego
->arches
);
4774 /* Did the target like it? No. Reject the change. */
4775 if (new_gdbarch
== NULL
)
4778 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4782 /* Did the architecture change? No. Do nothing. */
4783 if (current_gdbarch
== new_gdbarch
)
4786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4788 new_gdbarch
->bfd_arch_info
->printable_name
);
4792 /* Swap all data belonging to the old target out */
4793 swapout_gdbarch_swap (current_gdbarch
);
4795 /* Is this a pre-existing architecture? Yes. Swap it in. */
4796 for (list
= ®o
->arches
;
4798 list
= &(*list
)->next
)
4800 if ((*list
)->gdbarch
== new_gdbarch
)
4803 fprintf_unfiltered (gdb_stdlog
,
4804 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4806 new_gdbarch
->bfd_arch_info
->printable_name
);
4807 current_gdbarch
= new_gdbarch
;
4808 swapin_gdbarch_swap (new_gdbarch
);
4809 architecture_changed_event ();
4814 /* Append this new architecture to this targets list. */
4815 (*list
) = XMALLOC (struct gdbarch_list
);
4816 (*list
)->next
= NULL
;
4817 (*list
)->gdbarch
= new_gdbarch
;
4819 /* Switch to this new architecture. Dump it out. */
4820 current_gdbarch
= new_gdbarch
;
4823 fprintf_unfiltered (gdb_stdlog
,
4824 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4826 new_gdbarch
->bfd_arch_info
->printable_name
);
4829 /* Check that the newly installed architecture is valid. Plug in
4830 any post init values. */
4831 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4832 verify_gdbarch (new_gdbarch
);
4834 /* Initialize the per-architecture memory (swap) areas.
4835 CURRENT_GDBARCH must be update before these modules are
4837 init_gdbarch_swap (new_gdbarch
);
4839 /* Initialize the per-architecture data-pointer of all parties that
4840 registered an interest in this architecture. CURRENT_GDBARCH
4841 must be updated before these modules are called. */
4842 init_gdbarch_data (new_gdbarch
);
4843 architecture_changed_event ();
4846 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4854 /* Pointer to the target-dependent disassembly function. */
4855 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4856 disassemble_info tm_print_insn_info
;
4859 extern void _initialize_gdbarch (void);
4862 _initialize_gdbarch (void)
4864 struct cmd_list_element
*c
;
4866 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4867 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4868 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4869 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4870 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4872 add_show_from_set (add_set_cmd ("arch",
4875 (char *)&gdbarch_debug
,
4876 "Set architecture debugging.\n\
4877 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4879 c
= add_set_cmd ("archdebug",
4882 (char *)&gdbarch_debug
,
4883 "Set architecture debugging.\n\
4884 When non-zero, architecture debugging is enabled.", &setlist
);
4886 deprecate_cmd (c
, "set debug arch");
4887 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");