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).
149 gdbarch_read_pc_ftype
*read_pc
;
150 gdbarch_write_pc_ftype
*write_pc
;
151 gdbarch_read_fp_ftype
*read_fp
;
152 gdbarch_write_fp_ftype
*write_fp
;
153 gdbarch_read_sp_ftype
*read_sp
;
154 gdbarch_write_sp_ftype
*write_sp
;
155 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
156 gdbarch_register_read_ftype
*register_read
;
157 gdbarch_register_write_ftype
*register_write
;
166 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
167 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
168 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
169 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
170 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
171 gdbarch_register_name_ftype
*register_name
;
174 gdbarch_register_byte_ftype
*register_byte
;
175 gdbarch_register_raw_size_ftype
*register_raw_size
;
176 int max_register_raw_size
;
177 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
178 int max_register_virtual_size
;
179 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
180 gdbarch_do_registers_info_ftype
*do_registers_info
;
181 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
182 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
183 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
184 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
185 int use_generic_dummy_frames
;
186 int call_dummy_location
;
187 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
188 CORE_ADDR call_dummy_start_offset
;
189 CORE_ADDR call_dummy_breakpoint_offset
;
190 int call_dummy_breakpoint_offset_p
;
191 int call_dummy_length
;
192 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
194 LONGEST
* call_dummy_words
;
195 int sizeof_call_dummy_words
;
196 int call_dummy_stack_adjust_p
;
197 int call_dummy_stack_adjust
;
198 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
199 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
200 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
201 int believe_pcc_promotion
;
202 int believe_pcc_promotion_type
;
203 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
204 gdbarch_get_saved_register_ftype
*get_saved_register
;
205 gdbarch_register_convertible_ftype
*register_convertible
;
206 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
207 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
208 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
209 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
210 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
211 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
212 gdbarch_integer_to_address_ftype
*integer_to_address
;
213 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
214 gdbarch_extract_return_value_ftype
*extract_return_value
;
215 gdbarch_push_arguments_ftype
*push_arguments
;
216 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
217 gdbarch_push_return_address_ftype
*push_return_address
;
218 gdbarch_pop_frame_ftype
*pop_frame
;
219 gdbarch_store_struct_return_ftype
*store_struct_return
;
220 gdbarch_store_return_value_ftype
*store_return_value
;
221 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
222 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
223 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
224 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
225 gdbarch_skip_prologue_ftype
*skip_prologue
;
226 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
227 gdbarch_inner_than_ftype
*inner_than
;
228 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
229 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
230 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
231 CORE_ADDR decr_pc_after_break
;
232 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
233 CORE_ADDR function_start_offset
;
234 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
235 CORE_ADDR frame_args_skip
;
236 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
237 gdbarch_frame_chain_ftype
*frame_chain
;
238 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
239 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
240 gdbarch_frame_args_address_ftype
*frame_args_address
;
241 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
242 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
243 gdbarch_frame_num_args_ftype
*frame_num_args
;
244 gdbarch_stack_align_ftype
*stack_align
;
245 int extra_stack_alignment_needed
;
246 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
247 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
249 const struct floatformat
* float_format
;
250 const struct floatformat
* double_format
;
251 const struct floatformat
* long_double_format
;
252 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
253 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
254 gdbarch_software_single_step_ftype
*software_single_step
;
255 gdbarch_print_insn_ftype
*print_insn
;
256 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
257 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
258 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
259 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
260 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
264 /* The default architecture uses host values (for want of a better
267 extern const struct bfd_arch_info bfd_default_arch_struct
;
269 struct gdbarch startup_gdbarch
=
271 /* basic architecture information */
272 &bfd_default_arch_struct
,
274 /* target specific vector and its dump routine */
276 /*per-architecture data-pointers and swap regions */
278 /* Multi-arch values */
282 8 * sizeof (LONGEST
),
285 8 * sizeof (long double),
317 generic_register_raw_size
,
319 generic_register_virtual_size
,
346 generic_get_saved_register
,
400 generic_in_function_epilogue_p
,
401 construct_inferior_arguments
,
403 /* startup_gdbarch() */
406 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
408 /* Do any initialization needed for a non-multiarch configuration
409 after the _initialize_MODULE functions have been run. */
411 initialize_non_multiarch ()
413 alloc_gdbarch_data (&startup_gdbarch
);
414 init_gdbarch_data (&startup_gdbarch
);
418 /* Create a new ``struct gdbarch'' based on information provided by
419 ``struct gdbarch_info''. */
422 gdbarch_alloc (const struct gdbarch_info
*info
,
423 struct gdbarch_tdep
*tdep
)
425 /* NOTE: The new architecture variable is named ``current_gdbarch''
426 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
427 the current local architecture and not the previous global
428 architecture. This ensures that the new architectures initial
429 values are not influenced by the previous architecture. Once
430 everything is parameterised with gdbarch, this will go away. */
431 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
432 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
434 alloc_gdbarch_data (current_gdbarch
);
436 current_gdbarch
->tdep
= tdep
;
438 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
439 current_gdbarch
->byte_order
= info
->byte_order
;
441 /* Force the explicit initialization of these. */
442 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
443 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
444 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
445 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
446 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
447 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
448 current_gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
449 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
450 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
451 current_gdbarch
->char_signed
= -1;
452 current_gdbarch
->read_pc
= generic_target_read_pc
;
453 current_gdbarch
->write_pc
= generic_target_write_pc
;
454 current_gdbarch
->read_fp
= generic_target_read_fp
;
455 current_gdbarch
->write_fp
= generic_target_write_fp
;
456 current_gdbarch
->read_sp
= generic_target_read_sp
;
457 current_gdbarch
->write_sp
= generic_target_write_sp
;
458 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
459 current_gdbarch
->num_regs
= -1;
460 current_gdbarch
->sp_regnum
= -1;
461 current_gdbarch
->fp_regnum
= -1;
462 current_gdbarch
->pc_regnum
= -1;
463 current_gdbarch
->fp0_regnum
= -1;
464 current_gdbarch
->npc_regnum
= -1;
465 current_gdbarch
->nnpc_regnum
= -1;
466 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
467 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
468 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
469 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
470 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
471 current_gdbarch
->register_name
= legacy_register_name
;
472 current_gdbarch
->register_size
= -1;
473 current_gdbarch
->register_bytes
= -1;
474 current_gdbarch
->max_register_raw_size
= -1;
475 current_gdbarch
->max_register_virtual_size
= -1;
476 current_gdbarch
->do_registers_info
= do_registers_info
;
477 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
478 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
479 current_gdbarch
->cannot_store_register
= cannot_register_not
;
480 current_gdbarch
->use_generic_dummy_frames
= -1;
481 current_gdbarch
->call_dummy_start_offset
= -1;
482 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
483 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
484 current_gdbarch
->call_dummy_length
= -1;
485 current_gdbarch
->call_dummy_p
= -1;
486 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
487 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
488 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
489 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
490 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
491 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
492 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
493 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
494 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
495 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
496 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
497 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
498 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
499 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
500 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
501 current_gdbarch
->decr_pc_after_break
= -1;
502 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
503 current_gdbarch
->function_start_offset
= -1;
504 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
505 current_gdbarch
->frame_args_skip
= -1;
506 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
507 current_gdbarch
->extra_stack_alignment_needed
= 1;
508 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
509 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
510 current_gdbarch
->print_insn
= legacy_print_insn
;
511 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
512 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
513 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
514 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
515 /* gdbarch_alloc() */
517 return current_gdbarch
;
521 /* Free a gdbarch struct. This should never happen in normal
522 operation --- once you've created a gdbarch, you keep it around.
523 However, if an architecture's init function encounters an error
524 building the structure, it may need to clean up a partially
525 constructed gdbarch. */
528 gdbarch_free (struct gdbarch
*arch
)
530 gdb_assert (arch
!= NULL
);
531 free_gdbarch_data (arch
);
536 /* Ensure that all values in a GDBARCH are reasonable. */
539 verify_gdbarch (struct gdbarch
*gdbarch
)
542 struct cleanup
*cleanups
;
545 /* Only perform sanity checks on a multi-arch target. */
548 log
= mem_fileopen ();
549 cleanups
= make_cleanup_ui_file_delete (log
);
551 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
552 fprintf_unfiltered (log
, "\n\tbyte-order");
553 if (gdbarch
->bfd_arch_info
== NULL
)
554 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
555 /* Check those that need to be defined for the given multi-arch level. */
556 /* Skip verify of short_bit, invalid_p == 0 */
557 /* Skip verify of int_bit, invalid_p == 0 */
558 /* Skip verify of long_bit, invalid_p == 0 */
559 /* Skip verify of long_long_bit, invalid_p == 0 */
560 /* Skip verify of float_bit, invalid_p == 0 */
561 /* Skip verify of double_bit, invalid_p == 0 */
562 /* Skip verify of long_double_bit, invalid_p == 0 */
563 /* Skip verify of ptr_bit, invalid_p == 0 */
564 if (gdbarch
->addr_bit
== 0)
565 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
566 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
567 if (gdbarch
->char_signed
== -1)
568 gdbarch
->char_signed
= 1;
569 /* Skip verify of ieee_float, invalid_p == 0 */
570 /* Skip verify of read_pc, invalid_p == 0 */
571 /* Skip verify of write_pc, invalid_p == 0 */
572 /* Skip verify of read_fp, invalid_p == 0 */
573 /* Skip verify of write_fp, invalid_p == 0 */
574 /* Skip verify of read_sp, invalid_p == 0 */
575 /* Skip verify of write_sp, invalid_p == 0 */
576 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
577 /* Skip verify of register_read, has predicate */
578 /* Skip verify of register_write, has predicate */
579 if ((GDB_MULTI_ARCH
>= 2)
580 && (gdbarch
->num_regs
== -1))
581 fprintf_unfiltered (log
, "\n\tnum_regs");
582 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
583 if ((GDB_MULTI_ARCH
>= 2)
584 && (gdbarch
->sp_regnum
== -1))
585 fprintf_unfiltered (log
, "\n\tsp_regnum");
586 if ((GDB_MULTI_ARCH
>= 2)
587 && (gdbarch
->fp_regnum
== -1))
588 fprintf_unfiltered (log
, "\n\tfp_regnum");
589 if ((GDB_MULTI_ARCH
>= 2)
590 && (gdbarch
->pc_regnum
== -1))
591 fprintf_unfiltered (log
, "\n\tpc_regnum");
592 /* Skip verify of fp0_regnum, invalid_p == 0 */
593 /* Skip verify of npc_regnum, invalid_p == 0 */
594 /* Skip verify of nnpc_regnum, invalid_p == 0 */
595 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
596 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
597 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
598 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
599 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
600 /* Skip verify of register_name, invalid_p == 0 */
601 if ((GDB_MULTI_ARCH
>= 2)
602 && (gdbarch
->register_size
== -1))
603 fprintf_unfiltered (log
, "\n\tregister_size");
604 if ((GDB_MULTI_ARCH
>= 2)
605 && (gdbarch
->register_bytes
== -1))
606 fprintf_unfiltered (log
, "\n\tregister_bytes");
607 if ((GDB_MULTI_ARCH
>= 2)
608 && (gdbarch
->register_byte
== 0))
609 fprintf_unfiltered (log
, "\n\tregister_byte");
610 if ((GDB_MULTI_ARCH
>= 2)
611 && (gdbarch
->register_raw_size
== 0))
612 fprintf_unfiltered (log
, "\n\tregister_raw_size");
613 if ((GDB_MULTI_ARCH
>= 2)
614 && (gdbarch
->max_register_raw_size
== -1))
615 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
616 if ((GDB_MULTI_ARCH
>= 2)
617 && (gdbarch
->register_virtual_size
== 0))
618 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
619 if ((GDB_MULTI_ARCH
>= 2)
620 && (gdbarch
->max_register_virtual_size
== -1))
621 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
622 if ((GDB_MULTI_ARCH
>= 2)
623 && (gdbarch
->register_virtual_type
== 0))
624 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
625 /* Skip verify of do_registers_info, invalid_p == 0 */
626 /* Skip verify of register_sim_regno, invalid_p == 0 */
627 /* Skip verify of register_bytes_ok, has predicate */
628 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
629 /* Skip verify of cannot_store_register, invalid_p == 0 */
630 if ((GDB_MULTI_ARCH
>= 1)
631 && (gdbarch
->use_generic_dummy_frames
== -1))
632 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
633 if ((GDB_MULTI_ARCH
>= 1)
634 && (gdbarch
->call_dummy_location
== 0))
635 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
636 if ((GDB_MULTI_ARCH
>= 2)
637 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
638 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
639 if ((GDB_MULTI_ARCH
>= 2)
640 && (gdbarch
->call_dummy_start_offset
== -1))
641 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
642 if ((GDB_MULTI_ARCH
>= 2)
643 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
644 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
645 if ((GDB_MULTI_ARCH
>= 1)
646 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
647 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
648 if ((GDB_MULTI_ARCH
>= 2)
649 && (gdbarch
->call_dummy_length
== -1))
650 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
651 if ((GDB_MULTI_ARCH
>= 1)
652 && (gdbarch
->pc_in_call_dummy
== 0))
653 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
654 if ((GDB_MULTI_ARCH
>= 1)
655 && (gdbarch
->call_dummy_p
== -1))
656 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
657 /* Skip verify of call_dummy_words, invalid_p == 0 */
658 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
659 if ((GDB_MULTI_ARCH
>= 1)
660 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
661 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
662 if ((GDB_MULTI_ARCH
>= 2)
663 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
664 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
665 if ((GDB_MULTI_ARCH
>= 2)
666 && (gdbarch
->fix_call_dummy
== 0))
667 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
668 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
669 /* Skip verify of init_frame_pc, invalid_p == 0 */
670 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
671 if ((GDB_MULTI_ARCH
>= 1)
672 && (gdbarch
->get_saved_register
== 0))
673 fprintf_unfiltered (log
, "\n\tget_saved_register");
674 /* Skip verify of register_convertible, invalid_p == 0 */
675 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
676 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
677 /* Skip verify of fetch_pseudo_register, has predicate */
678 /* Skip verify of store_pseudo_register, has predicate */
679 /* Skip verify of pointer_to_address, invalid_p == 0 */
680 /* Skip verify of address_to_pointer, invalid_p == 0 */
681 /* Skip verify of integer_to_address, has predicate */
682 /* Skip verify of return_value_on_stack, invalid_p == 0 */
683 if ((GDB_MULTI_ARCH
>= 2)
684 && (gdbarch
->extract_return_value
== 0))
685 fprintf_unfiltered (log
, "\n\textract_return_value");
686 if ((GDB_MULTI_ARCH
>= 1)
687 && (gdbarch
->push_arguments
== 0))
688 fprintf_unfiltered (log
, "\n\tpush_arguments");
689 if ((GDB_MULTI_ARCH
>= 2)
690 && (gdbarch
->push_dummy_frame
== 0))
691 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
692 /* Skip verify of push_return_address, has predicate */
693 if ((GDB_MULTI_ARCH
>= 2)
694 && (gdbarch
->pop_frame
== 0))
695 fprintf_unfiltered (log
, "\n\tpop_frame");
696 if ((GDB_MULTI_ARCH
>= 2)
697 && (gdbarch
->store_struct_return
== 0))
698 fprintf_unfiltered (log
, "\n\tstore_struct_return");
699 if ((GDB_MULTI_ARCH
>= 2)
700 && (gdbarch
->store_return_value
== 0))
701 fprintf_unfiltered (log
, "\n\tstore_return_value");
702 /* Skip verify of extract_struct_value_address, has predicate */
703 /* Skip verify of use_struct_convention, invalid_p == 0 */
704 if ((GDB_MULTI_ARCH
>= 2)
705 && (gdbarch
->frame_init_saved_regs
== 0))
706 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
707 /* Skip verify of init_extra_frame_info, has predicate */
708 if ((GDB_MULTI_ARCH
>= 2)
709 && (gdbarch
->skip_prologue
== 0))
710 fprintf_unfiltered (log
, "\n\tskip_prologue");
711 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
712 if ((GDB_MULTI_ARCH
>= 2)
713 && (gdbarch
->inner_than
== 0))
714 fprintf_unfiltered (log
, "\n\tinner_than");
715 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
716 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
717 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
718 if ((GDB_MULTI_ARCH
>= 2)
719 && (gdbarch
->decr_pc_after_break
== -1))
720 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
721 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
722 if ((GDB_MULTI_ARCH
>= 2)
723 && (gdbarch
->function_start_offset
== -1))
724 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
725 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
726 if ((GDB_MULTI_ARCH
>= 2)
727 && (gdbarch
->frame_args_skip
== -1))
728 fprintf_unfiltered (log
, "\n\tframe_args_skip");
729 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
730 if ((GDB_MULTI_ARCH
>= 2)
731 && (gdbarch
->frame_chain
== 0))
732 fprintf_unfiltered (log
, "\n\tframe_chain");
733 if ((GDB_MULTI_ARCH
>= 1)
734 && (gdbarch
->frame_chain_valid
== 0))
735 fprintf_unfiltered (log
, "\n\tframe_chain_valid");
736 if ((GDB_MULTI_ARCH
>= 2)
737 && (gdbarch
->frame_saved_pc
== 0))
738 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
739 if ((GDB_MULTI_ARCH
>= 2)
740 && (gdbarch
->frame_args_address
== 0))
741 fprintf_unfiltered (log
, "\n\tframe_args_address");
742 if ((GDB_MULTI_ARCH
>= 2)
743 && (gdbarch
->frame_locals_address
== 0))
744 fprintf_unfiltered (log
, "\n\tframe_locals_address");
745 if ((GDB_MULTI_ARCH
>= 2)
746 && (gdbarch
->saved_pc_after_call
== 0))
747 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
748 if ((GDB_MULTI_ARCH
>= 2)
749 && (gdbarch
->frame_num_args
== 0))
750 fprintf_unfiltered (log
, "\n\tframe_num_args");
751 /* Skip verify of stack_align, has predicate */
752 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
753 /* Skip verify of reg_struct_has_addr, has predicate */
754 /* Skip verify of save_dummy_frame_tos, has predicate */
755 if (gdbarch
->float_format
== 0)
756 gdbarch
->float_format
= default_float_format (gdbarch
);
757 if (gdbarch
->double_format
== 0)
758 gdbarch
->double_format
= default_double_format (gdbarch
);
759 if (gdbarch
->long_double_format
== 0)
760 gdbarch
->long_double_format
= &floatformat_unknown
;
761 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
762 /* Skip verify of addr_bits_remove, invalid_p == 0 */
763 /* Skip verify of software_single_step, has predicate */
764 /* Skip verify of print_insn, invalid_p == 0 */
765 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
766 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
767 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
768 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
769 /* Skip verify of dwarf2_build_frame_info, has predicate */
770 buf
= ui_file_xstrdup (log
, &dummy
);
771 make_cleanup (xfree
, buf
);
772 if (strlen (buf
) > 0)
773 internal_error (__FILE__
, __LINE__
,
774 "verify_gdbarch: the following are invalid ...%s",
776 do_cleanups (cleanups
);
780 /* Print out the details of the current architecture. */
782 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
783 just happens to match the global variable ``current_gdbarch''. That
784 way macros refering to that variable get the local and not the global
785 version - ulgh. Once everything is parameterised with gdbarch, this
789 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
791 fprintf_unfiltered (file
,
792 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
795 fprintf_unfiltered (file
,
796 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
797 (long) current_gdbarch
->in_function_epilogue_p
);
799 fprintf_unfiltered (file
,
800 "gdbarch_dump: register_read = 0x%08lx\n",
801 (long) current_gdbarch
->register_read
);
803 fprintf_unfiltered (file
,
804 "gdbarch_dump: register_write = 0x%08lx\n",
805 (long) current_gdbarch
->register_write
);
806 #ifdef ADDRESS_TO_POINTER
808 /* Macro might contain `[{}]' when not multi-arch */
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: %s # %s\n",
811 "ADDRESS_TO_POINTER(type, buf, addr)",
812 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
817 (long) current_gdbarch
->address_to_pointer
818 /*ADDRESS_TO_POINTER ()*/);
820 #ifdef ADDR_BITS_REMOVE
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: %s # %s\n",
823 "ADDR_BITS_REMOVE(addr)",
824 XSTRING (ADDR_BITS_REMOVE (addr
)));
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
828 (long) current_gdbarch
->addr_bits_remove
829 /*ADDR_BITS_REMOVE ()*/);
831 #ifdef BELIEVE_PCC_PROMOTION
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
834 XSTRING (BELIEVE_PCC_PROMOTION
));
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
837 BELIEVE_PCC_PROMOTION
);
839 #ifdef BELIEVE_PCC_PROMOTION_TYPE
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
842 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
845 BELIEVE_PCC_PROMOTION_TYPE
);
847 #ifdef BREAKPOINT_FROM_PC
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: %s # %s\n",
850 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
851 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
855 (long) current_gdbarch
->breakpoint_from_pc
856 /*BREAKPOINT_FROM_PC ()*/);
858 #ifdef CALL_DUMMY_ADDRESS
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: %s # %s\n",
861 "CALL_DUMMY_ADDRESS()",
862 XSTRING (CALL_DUMMY_ADDRESS ()));
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
866 (long) current_gdbarch
->call_dummy_address
867 /*CALL_DUMMY_ADDRESS ()*/);
869 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
872 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
873 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
876 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
878 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
881 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
884 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
886 #ifdef CALL_DUMMY_LENGTH
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
889 XSTRING (CALL_DUMMY_LENGTH
));
890 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
895 #ifdef CALL_DUMMY_LOCATION
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
898 XSTRING (CALL_DUMMY_LOCATION
));
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
901 CALL_DUMMY_LOCATION
);
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: CALL_DUMMY_P # %s\n",
906 XSTRING (CALL_DUMMY_P
));
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: CALL_DUMMY_P = %d\n",
911 #ifdef CALL_DUMMY_STACK_ADJUST
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
914 XSTRING (CALL_DUMMY_STACK_ADJUST
));
915 if (CALL_DUMMY_STACK_ADJUST_P
)
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
918 (long) CALL_DUMMY_STACK_ADJUST
);
920 #ifdef CALL_DUMMY_STACK_ADJUST_P
921 fprintf_unfiltered (file
,
922 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
923 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
926 (long) CALL_DUMMY_STACK_ADJUST_P
);
928 #ifdef CALL_DUMMY_START_OFFSET
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
931 XSTRING (CALL_DUMMY_START_OFFSET
));
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
934 (long) CALL_DUMMY_START_OFFSET
);
936 #ifdef CALL_DUMMY_WORDS
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
939 XSTRING (CALL_DUMMY_WORDS
));
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
942 (long) CALL_DUMMY_WORDS
);
944 #ifdef CANNOT_FETCH_REGISTER
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: %s # %s\n",
947 "CANNOT_FETCH_REGISTER(regnum)",
948 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
952 (long) current_gdbarch
->cannot_fetch_register
953 /*CANNOT_FETCH_REGISTER ()*/);
955 #ifdef CANNOT_STORE_REGISTER
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: %s # %s\n",
958 "CANNOT_STORE_REGISTER(regnum)",
959 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
963 (long) current_gdbarch
->cannot_store_register
964 /*CANNOT_STORE_REGISTER ()*/);
966 #ifdef COERCE_FLOAT_TO_DOUBLE
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: %s # %s\n",
969 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
970 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
972 fprintf_unfiltered (file
,
973 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
974 (long) current_gdbarch
->coerce_float_to_double
975 /*COERCE_FLOAT_TO_DOUBLE ()*/);
978 fprintf_unfiltered (file
,
979 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
980 (long) current_gdbarch
->construct_inferior_arguments
);
981 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: %s # %s\n",
984 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
985 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
989 (long) current_gdbarch
->convert_from_func_ptr_addr
990 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
992 #ifdef DECR_PC_AFTER_BREAK
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
995 XSTRING (DECR_PC_AFTER_BREAK
));
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
998 (long) DECR_PC_AFTER_BREAK
);
1000 #ifdef DO_REGISTERS_INFO
1002 /* Macro might contain `[{}]' when not multi-arch */
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: %s # %s\n",
1005 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1006 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1011 (long) current_gdbarch
->do_registers_info
1012 /*DO_REGISTERS_INFO ()*/);
1014 #ifdef DWARF2_BUILD_FRAME_INFO
1016 /* Macro might contain `[{}]' when not multi-arch */
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: %s # %s\n",
1019 "DWARF2_BUILD_FRAME_INFO(objfile)",
1020 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1025 (long) current_gdbarch
->dwarf2_build_frame_info
1026 /*DWARF2_BUILD_FRAME_INFO ()*/);
1028 #ifdef DWARF2_REG_TO_REGNUM
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: %s # %s\n",
1031 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1032 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1036 (long) current_gdbarch
->dwarf2_reg_to_regnum
1037 /*DWARF2_REG_TO_REGNUM ()*/);
1039 #ifdef DWARF_REG_TO_REGNUM
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: %s # %s\n",
1042 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1043 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1047 (long) current_gdbarch
->dwarf_reg_to_regnum
1048 /*DWARF_REG_TO_REGNUM ()*/);
1050 #ifdef ECOFF_REG_TO_REGNUM
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: %s # %s\n",
1053 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1054 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1058 (long) current_gdbarch
->ecoff_reg_to_regnum
1059 /*ECOFF_REG_TO_REGNUM ()*/);
1061 #ifdef EXTRACT_RETURN_VALUE
1063 /* Macro might contain `[{}]' when not multi-arch */
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: %s # %s\n",
1066 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1067 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1072 (long) current_gdbarch
->extract_return_value
1073 /*EXTRACT_RETURN_VALUE ()*/);
1075 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: %s # %s\n",
1078 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1079 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1083 (long) current_gdbarch
->extract_struct_value_address
1084 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1086 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1089 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1092 EXTRA_STACK_ALIGNMENT_NEEDED
);
1094 #ifdef FETCH_PSEUDO_REGISTER
1096 /* Macro might contain `[{}]' when not multi-arch */
1097 fprintf_unfiltered (file
,
1098 "gdbarch_dump: %s # %s\n",
1099 "FETCH_PSEUDO_REGISTER(regnum)",
1100 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1105 (long) current_gdbarch
->fetch_pseudo_register
1106 /*FETCH_PSEUDO_REGISTER ()*/);
1108 #ifdef FIX_CALL_DUMMY
1110 /* Macro might contain `[{}]' when not multi-arch */
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: %s # %s\n",
1113 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1114 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1119 (long) current_gdbarch
->fix_call_dummy
1120 /*FIX_CALL_DUMMY ()*/);
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: FP0_REGNUM # %s\n",
1125 XSTRING (FP0_REGNUM
));
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: FP0_REGNUM = %d\n",
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: FP_REGNUM # %s\n",
1133 XSTRING (FP_REGNUM
));
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: FP_REGNUM = %d\n",
1138 #ifdef FRAMELESS_FUNCTION_INVOCATION
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: %s # %s\n",
1141 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1142 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1144 fprintf_unfiltered (file
,
1145 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1146 (long) current_gdbarch
->frameless_function_invocation
1147 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1149 #ifdef FRAME_ARGS_ADDRESS
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: %s # %s\n",
1152 "FRAME_ARGS_ADDRESS(fi)",
1153 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1157 (long) current_gdbarch
->frame_args_address
1158 /*FRAME_ARGS_ADDRESS ()*/);
1160 #ifdef FRAME_ARGS_SKIP
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1163 XSTRING (FRAME_ARGS_SKIP
));
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1166 (long) FRAME_ARGS_SKIP
);
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: %s # %s\n",
1171 "FRAME_CHAIN(frame)",
1172 XSTRING (FRAME_CHAIN (frame
)));
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1176 (long) current_gdbarch
->frame_chain
1177 /*FRAME_CHAIN ()*/);
1179 #ifdef FRAME_CHAIN_VALID
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: %s # %s\n",
1182 "FRAME_CHAIN_VALID(chain, thisframe)",
1183 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1187 (long) current_gdbarch
->frame_chain_valid
1188 /*FRAME_CHAIN_VALID ()*/);
1190 #ifdef FRAME_INIT_SAVED_REGS
1192 /* Macro might contain `[{}]' when not multi-arch */
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: %s # %s\n",
1195 "FRAME_INIT_SAVED_REGS(frame)",
1196 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1199 fprintf_unfiltered (file
,
1200 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1201 (long) current_gdbarch
->frame_init_saved_regs
1202 /*FRAME_INIT_SAVED_REGS ()*/);
1204 #ifdef FRAME_LOCALS_ADDRESS
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: %s # %s\n",
1207 "FRAME_LOCALS_ADDRESS(fi)",
1208 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1212 (long) current_gdbarch
->frame_locals_address
1213 /*FRAME_LOCALS_ADDRESS ()*/);
1215 #ifdef FRAME_NUM_ARGS
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: %s # %s\n",
1218 "FRAME_NUM_ARGS(frame)",
1219 XSTRING (FRAME_NUM_ARGS (frame
)));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1223 (long) current_gdbarch
->frame_num_args
1224 /*FRAME_NUM_ARGS ()*/);
1226 #ifdef FRAME_SAVED_PC
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: %s # %s\n",
1229 "FRAME_SAVED_PC(fi)",
1230 XSTRING (FRAME_SAVED_PC (fi
)));
1232 fprintf_unfiltered (file
,
1233 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1234 (long) current_gdbarch
->frame_saved_pc
1235 /*FRAME_SAVED_PC ()*/);
1237 #ifdef FUNCTION_START_OFFSET
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1240 XSTRING (FUNCTION_START_OFFSET
));
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1243 (long) FUNCTION_START_OFFSET
);
1245 #ifdef GET_SAVED_REGISTER
1247 /* Macro might contain `[{}]' when not multi-arch */
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: %s # %s\n",
1250 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1251 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1256 (long) current_gdbarch
->get_saved_register
1257 /*GET_SAVED_REGISTER ()*/);
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: IEEE_FLOAT # %s\n",
1262 XSTRING (IEEE_FLOAT
));
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: IEEE_FLOAT = %d\n",
1267 #ifdef INIT_EXTRA_FRAME_INFO
1269 /* Macro might contain `[{}]' when not multi-arch */
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: %s # %s\n",
1272 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1273 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1278 (long) current_gdbarch
->init_extra_frame_info
1279 /*INIT_EXTRA_FRAME_INFO ()*/);
1281 #ifdef INIT_FRAME_PC
1283 /* Macro might contain `[{}]' when not multi-arch */
1284 fprintf_unfiltered (file
,
1285 "gdbarch_dump: %s # %s\n",
1286 "INIT_FRAME_PC(fromleaf, prev)",
1287 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1290 fprintf_unfiltered (file
,
1291 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1292 (long) current_gdbarch
->init_frame_pc
1293 /*INIT_FRAME_PC ()*/);
1295 #ifdef INIT_FRAME_PC_FIRST
1297 /* Macro might contain `[{}]' when not multi-arch */
1298 fprintf_unfiltered (file
,
1299 "gdbarch_dump: %s # %s\n",
1300 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1301 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1306 (long) current_gdbarch
->init_frame_pc_first
1307 /*INIT_FRAME_PC_FIRST ()*/);
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: %s # %s\n",
1312 "INNER_THAN(lhs, rhs)",
1313 XSTRING (INNER_THAN (lhs
, rhs
)));
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1317 (long) current_gdbarch
->inner_than
1320 #ifdef INTEGER_TO_ADDRESS
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: %s # %s\n",
1323 "INTEGER_TO_ADDRESS(type, buf)",
1324 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1328 (long) current_gdbarch
->integer_to_address
1329 /*INTEGER_TO_ADDRESS ()*/);
1331 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: %s # %s\n",
1334 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1335 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1339 (long) current_gdbarch
->in_solib_call_trampoline
1340 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1342 #ifdef MAX_REGISTER_RAW_SIZE
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1345 XSTRING (MAX_REGISTER_RAW_SIZE
));
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1348 MAX_REGISTER_RAW_SIZE
);
1350 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1353 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1356 MAX_REGISTER_VIRTUAL_SIZE
);
1358 #ifdef MEMORY_INSERT_BREAKPOINT
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: %s # %s\n",
1361 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1362 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1366 (long) current_gdbarch
->memory_insert_breakpoint
1367 /*MEMORY_INSERT_BREAKPOINT ()*/);
1369 #ifdef MEMORY_REMOVE_BREAKPOINT
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: %s # %s\n",
1372 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1373 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1377 (long) current_gdbarch
->memory_remove_breakpoint
1378 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: NNPC_REGNUM # %s\n",
1383 XSTRING (NNPC_REGNUM
));
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: NNPC_REGNUM = %d\n",
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: NPC_REGNUM # %s\n",
1391 XSTRING (NPC_REGNUM
));
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: NPC_REGNUM = %d\n",
1396 #ifdef NUM_PSEUDO_REGS
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1399 XSTRING (NUM_PSEUDO_REGS
));
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: NUM_REGS # %s\n",
1407 XSTRING (NUM_REGS
));
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: NUM_REGS = %d\n",
1412 #ifdef PARM_BOUNDARY
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1415 XSTRING (PARM_BOUNDARY
));
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1420 #ifdef PC_IN_CALL_DUMMY
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: %s # %s\n",
1423 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1424 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1428 (long) current_gdbarch
->pc_in_call_dummy
1429 /*PC_IN_CALL_DUMMY ()*/);
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: PC_REGNUM # %s\n",
1434 XSTRING (PC_REGNUM
));
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: PC_REGNUM = %d\n",
1439 #ifdef POINTER_TO_ADDRESS
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: %s # %s\n",
1442 "POINTER_TO_ADDRESS(type, buf)",
1443 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1447 (long) current_gdbarch
->pointer_to_address
1448 /*POINTER_TO_ADDRESS ()*/);
1452 /* Macro might contain `[{}]' when not multi-arch */
1453 fprintf_unfiltered (file
,
1454 "gdbarch_dump: %s # %s\n",
1456 XSTRING (POP_FRAME (-)));
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1461 (long) current_gdbarch
->pop_frame
1464 #ifdef PREPARE_TO_PROCEED
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: %s # %s\n",
1467 "PREPARE_TO_PROCEED(select_it)",
1468 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1472 (long) current_gdbarch
->prepare_to_proceed
1473 /*PREPARE_TO_PROCEED ()*/);
1475 #ifdef PROLOGUE_FRAMELESS_P
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: %s # %s\n",
1478 "PROLOGUE_FRAMELESS_P(ip)",
1479 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1483 (long) current_gdbarch
->prologue_frameless_p
1484 /*PROLOGUE_FRAMELESS_P ()*/);
1486 #ifdef PUSH_ARGUMENTS
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: %s # %s\n",
1489 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1490 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1492 fprintf_unfiltered (file
,
1493 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1494 (long) current_gdbarch
->push_arguments
1495 /*PUSH_ARGUMENTS ()*/);
1497 #ifdef PUSH_DUMMY_FRAME
1499 /* Macro might contain `[{}]' when not multi-arch */
1500 fprintf_unfiltered (file
,
1501 "gdbarch_dump: %s # %s\n",
1502 "PUSH_DUMMY_FRAME(-)",
1503 XSTRING (PUSH_DUMMY_FRAME (-)));
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1508 (long) current_gdbarch
->push_dummy_frame
1509 /*PUSH_DUMMY_FRAME ()*/);
1511 #ifdef PUSH_RETURN_ADDRESS
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: %s # %s\n",
1514 "PUSH_RETURN_ADDRESS(pc, sp)",
1515 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1519 (long) current_gdbarch
->push_return_address
1520 /*PUSH_RETURN_ADDRESS ()*/);
1522 #ifdef REGISTER_BYTE
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: %s # %s\n",
1525 "REGISTER_BYTE(reg_nr)",
1526 XSTRING (REGISTER_BYTE (reg_nr
)));
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1530 (long) current_gdbarch
->register_byte
1531 /*REGISTER_BYTE ()*/);
1533 #ifdef REGISTER_BYTES
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: REGISTER_BYTES # %s\n",
1536 XSTRING (REGISTER_BYTES
));
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: REGISTER_BYTES = %d\n",
1541 #ifdef REGISTER_BYTES_OK
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: %s # %s\n",
1544 "REGISTER_BYTES_OK(nr_bytes)",
1545 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1547 fprintf_unfiltered (file
,
1548 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1549 (long) current_gdbarch
->register_bytes_ok
1550 /*REGISTER_BYTES_OK ()*/);
1552 #ifdef REGISTER_CONVERTIBLE
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: %s # %s\n",
1555 "REGISTER_CONVERTIBLE(nr)",
1556 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1560 (long) current_gdbarch
->register_convertible
1561 /*REGISTER_CONVERTIBLE ()*/);
1563 #ifdef REGISTER_CONVERT_TO_RAW
1565 /* Macro might contain `[{}]' when not multi-arch */
1566 fprintf_unfiltered (file
,
1567 "gdbarch_dump: %s # %s\n",
1568 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1569 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1574 (long) current_gdbarch
->register_convert_to_raw
1575 /*REGISTER_CONVERT_TO_RAW ()*/);
1577 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1579 /* Macro might contain `[{}]' when not multi-arch */
1580 fprintf_unfiltered (file
,
1581 "gdbarch_dump: %s # %s\n",
1582 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1583 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1588 (long) current_gdbarch
->register_convert_to_virtual
1589 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1591 #ifdef REGISTER_NAME
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: %s # %s\n",
1594 "REGISTER_NAME(regnr)",
1595 XSTRING (REGISTER_NAME (regnr
)));
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1599 (long) current_gdbarch
->register_name
1600 /*REGISTER_NAME ()*/);
1602 #ifdef REGISTER_RAW_SIZE
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: %s # %s\n",
1605 "REGISTER_RAW_SIZE(reg_nr)",
1606 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1610 (long) current_gdbarch
->register_raw_size
1611 /*REGISTER_RAW_SIZE ()*/);
1613 #ifdef REGISTER_SIM_REGNO
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: %s # %s\n",
1616 "REGISTER_SIM_REGNO(reg_nr)",
1617 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1621 (long) current_gdbarch
->register_sim_regno
1622 /*REGISTER_SIM_REGNO ()*/);
1624 #ifdef REGISTER_SIZE
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: REGISTER_SIZE # %s\n",
1627 XSTRING (REGISTER_SIZE
));
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: REGISTER_SIZE = %d\n",
1632 #ifdef REGISTER_VIRTUAL_SIZE
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: %s # %s\n",
1635 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1636 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1640 (long) current_gdbarch
->register_virtual_size
1641 /*REGISTER_VIRTUAL_SIZE ()*/);
1643 #ifdef REGISTER_VIRTUAL_TYPE
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: %s # %s\n",
1646 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1647 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1651 (long) current_gdbarch
->register_virtual_type
1652 /*REGISTER_VIRTUAL_TYPE ()*/);
1654 #ifdef REG_STRUCT_HAS_ADDR
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: %s # %s\n",
1657 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1658 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1662 (long) current_gdbarch
->reg_struct_has_addr
1663 /*REG_STRUCT_HAS_ADDR ()*/);
1665 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1667 /* Macro might contain `[{}]' when not multi-arch */
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: %s # %s\n",
1670 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1671 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1676 (long) current_gdbarch
->remote_translate_xfer_address
1677 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1679 #ifdef RETURN_VALUE_ON_STACK
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: %s # %s\n",
1682 "RETURN_VALUE_ON_STACK(type)",
1683 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1685 fprintf_unfiltered (file
,
1686 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1687 (long) current_gdbarch
->return_value_on_stack
1688 /*RETURN_VALUE_ON_STACK ()*/);
1690 #ifdef SAVED_PC_AFTER_CALL
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: %s # %s\n",
1693 "SAVED_PC_AFTER_CALL(frame)",
1694 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1696 fprintf_unfiltered (file
,
1697 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1698 (long) current_gdbarch
->saved_pc_after_call
1699 /*SAVED_PC_AFTER_CALL ()*/);
1701 #ifdef SAVE_DUMMY_FRAME_TOS
1703 /* Macro might contain `[{}]' when not multi-arch */
1704 fprintf_unfiltered (file
,
1705 "gdbarch_dump: %s # %s\n",
1706 "SAVE_DUMMY_FRAME_TOS(sp)",
1707 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1712 (long) current_gdbarch
->save_dummy_frame_tos
1713 /*SAVE_DUMMY_FRAME_TOS ()*/);
1715 #ifdef SDB_REG_TO_REGNUM
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: %s # %s\n",
1718 "SDB_REG_TO_REGNUM(sdb_regnr)",
1719 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1721 fprintf_unfiltered (file
,
1722 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1723 (long) current_gdbarch
->sdb_reg_to_regnum
1724 /*SDB_REG_TO_REGNUM ()*/);
1726 #ifdef SIZEOF_CALL_DUMMY_WORDS
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1729 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1732 (long) SIZEOF_CALL_DUMMY_WORDS
);
1734 #ifdef SKIP_PROLOGUE
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: %s # %s\n",
1737 "SKIP_PROLOGUE(ip)",
1738 XSTRING (SKIP_PROLOGUE (ip
)));
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1742 (long) current_gdbarch
->skip_prologue
1743 /*SKIP_PROLOGUE ()*/);
1745 #ifdef SKIP_TRAMPOLINE_CODE
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: %s # %s\n",
1748 "SKIP_TRAMPOLINE_CODE(pc)",
1749 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1751 fprintf_unfiltered (file
,
1752 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1753 (long) current_gdbarch
->skip_trampoline_code
1754 /*SKIP_TRAMPOLINE_CODE ()*/);
1756 #ifdef SOFTWARE_SINGLE_STEP
1758 /* Macro might contain `[{}]' when not multi-arch */
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: %s # %s\n",
1761 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1762 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1767 (long) current_gdbarch
->software_single_step
1768 /*SOFTWARE_SINGLE_STEP ()*/);
1771 fprintf_unfiltered (file
,
1772 "gdbarch_dump: SP_REGNUM # %s\n",
1773 XSTRING (SP_REGNUM
));
1774 fprintf_unfiltered (file
,
1775 "gdbarch_dump: SP_REGNUM = %d\n",
1778 #ifdef STAB_REG_TO_REGNUM
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: %s # %s\n",
1781 "STAB_REG_TO_REGNUM(stab_regnr)",
1782 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1786 (long) current_gdbarch
->stab_reg_to_regnum
1787 /*STAB_REG_TO_REGNUM ()*/);
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: %s # %s\n",
1793 XSTRING (STACK_ALIGN (sp
)));
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1797 (long) current_gdbarch
->stack_align
1798 /*STACK_ALIGN ()*/);
1800 #ifdef STORE_PSEUDO_REGISTER
1802 /* Macro might contain `[{}]' when not multi-arch */
1803 fprintf_unfiltered (file
,
1804 "gdbarch_dump: %s # %s\n",
1805 "STORE_PSEUDO_REGISTER(regnum)",
1806 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1809 fprintf_unfiltered (file
,
1810 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1811 (long) current_gdbarch
->store_pseudo_register
1812 /*STORE_PSEUDO_REGISTER ()*/);
1814 #ifdef STORE_RETURN_VALUE
1816 /* Macro might contain `[{}]' when not multi-arch */
1817 fprintf_unfiltered (file
,
1818 "gdbarch_dump: %s # %s\n",
1819 "STORE_RETURN_VALUE(type, valbuf)",
1820 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1823 fprintf_unfiltered (file
,
1824 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1825 (long) current_gdbarch
->store_return_value
1826 /*STORE_RETURN_VALUE ()*/);
1828 #ifdef STORE_STRUCT_RETURN
1830 /* Macro might contain `[{}]' when not multi-arch */
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: %s # %s\n",
1833 "STORE_STRUCT_RETURN(addr, sp)",
1834 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1837 fprintf_unfiltered (file
,
1838 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1839 (long) current_gdbarch
->store_struct_return
1840 /*STORE_STRUCT_RETURN ()*/);
1842 #ifdef TARGET_ADDR_BIT
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1845 XSTRING (TARGET_ADDR_BIT
));
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1850 #ifdef TARGET_ARCHITECTURE
1851 fprintf_unfiltered (file
,
1852 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1853 XSTRING (TARGET_ARCHITECTURE
));
1854 if (TARGET_ARCHITECTURE
!= NULL
)
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1857 TARGET_ARCHITECTURE
->printable_name
);
1859 #ifdef TARGET_BFD_VMA_BIT
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1862 XSTRING (TARGET_BFD_VMA_BIT
));
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1865 TARGET_BFD_VMA_BIT
);
1867 #ifdef TARGET_BYTE_ORDER
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1870 XSTRING (TARGET_BYTE_ORDER
));
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1873 (long) TARGET_BYTE_ORDER
);
1875 #ifdef TARGET_CHAR_SIGNED
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1878 XSTRING (TARGET_CHAR_SIGNED
));
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1881 TARGET_CHAR_SIGNED
);
1883 #ifdef TARGET_DOUBLE_BIT
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1886 XSTRING (TARGET_DOUBLE_BIT
));
1887 fprintf_unfiltered (file
,
1888 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1891 #ifdef TARGET_DOUBLE_FORMAT
1892 fprintf_unfiltered (file
,
1893 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1894 XSTRING (TARGET_DOUBLE_FORMAT
));
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1897 (long) TARGET_DOUBLE_FORMAT
);
1899 #ifdef TARGET_FLOAT_BIT
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1902 XSTRING (TARGET_FLOAT_BIT
));
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1907 #ifdef TARGET_FLOAT_FORMAT
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1910 XSTRING (TARGET_FLOAT_FORMAT
));
1911 fprintf_unfiltered (file
,
1912 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1913 (long) TARGET_FLOAT_FORMAT
);
1915 #ifdef TARGET_INT_BIT
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1918 XSTRING (TARGET_INT_BIT
));
1919 fprintf_unfiltered (file
,
1920 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1923 #ifdef TARGET_LONG_BIT
1924 fprintf_unfiltered (file
,
1925 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1926 XSTRING (TARGET_LONG_BIT
));
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
1931 #ifdef TARGET_LONG_DOUBLE_BIT
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1934 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
1937 TARGET_LONG_DOUBLE_BIT
);
1939 #ifdef TARGET_LONG_DOUBLE_FORMAT
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1942 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1945 (long) TARGET_LONG_DOUBLE_FORMAT
);
1947 #ifdef TARGET_LONG_LONG_BIT
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1950 XSTRING (TARGET_LONG_LONG_BIT
));
1951 fprintf_unfiltered (file
,
1952 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
1953 TARGET_LONG_LONG_BIT
);
1955 #ifdef TARGET_PRINT_INSN
1956 fprintf_unfiltered (file
,
1957 "gdbarch_dump: %s # %s\n",
1958 "TARGET_PRINT_INSN(vma, info)",
1959 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1963 (long) current_gdbarch
->print_insn
1964 /*TARGET_PRINT_INSN ()*/);
1966 #ifdef TARGET_PTR_BIT
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1969 XSTRING (TARGET_PTR_BIT
));
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
1974 #ifdef TARGET_READ_FP
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: %s # %s\n",
1978 XSTRING (TARGET_READ_FP ()));
1980 fprintf_unfiltered (file
,
1981 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1982 (long) current_gdbarch
->read_fp
1983 /*TARGET_READ_FP ()*/);
1985 #ifdef TARGET_READ_PC
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: %s # %s\n",
1988 "TARGET_READ_PC(ptid)",
1989 XSTRING (TARGET_READ_PC (ptid
)));
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1993 (long) current_gdbarch
->read_pc
1994 /*TARGET_READ_PC ()*/);
1996 #ifdef TARGET_READ_SP
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: %s # %s\n",
2000 XSTRING (TARGET_READ_SP ()));
2002 fprintf_unfiltered (file
,
2003 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2004 (long) current_gdbarch
->read_sp
2005 /*TARGET_READ_SP ()*/);
2007 #ifdef TARGET_SHORT_BIT
2008 fprintf_unfiltered (file
,
2009 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2010 XSTRING (TARGET_SHORT_BIT
));
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2015 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2017 /* Macro might contain `[{}]' when not multi-arch */
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: %s # %s\n",
2020 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2021 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2024 fprintf_unfiltered (file
,
2025 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2026 (long) current_gdbarch
->virtual_frame_pointer
2027 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2029 #ifdef TARGET_WRITE_FP
2031 /* Macro might contain `[{}]' when not multi-arch */
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: %s # %s\n",
2034 "TARGET_WRITE_FP(val)",
2035 XSTRING (TARGET_WRITE_FP (val
)));
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2040 (long) current_gdbarch
->write_fp
2041 /*TARGET_WRITE_FP ()*/);
2043 #ifdef TARGET_WRITE_PC
2045 /* Macro might contain `[{}]' when not multi-arch */
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: %s # %s\n",
2048 "TARGET_WRITE_PC(val, ptid)",
2049 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2054 (long) current_gdbarch
->write_pc
2055 /*TARGET_WRITE_PC ()*/);
2057 #ifdef TARGET_WRITE_SP
2059 /* Macro might contain `[{}]' when not multi-arch */
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: %s # %s\n",
2062 "TARGET_WRITE_SP(val)",
2063 XSTRING (TARGET_WRITE_SP (val
)));
2066 fprintf_unfiltered (file
,
2067 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2068 (long) current_gdbarch
->write_sp
2069 /*TARGET_WRITE_SP ()*/);
2071 #ifdef USE_GENERIC_DUMMY_FRAMES
2072 fprintf_unfiltered (file
,
2073 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2074 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2075 fprintf_unfiltered (file
,
2076 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2077 USE_GENERIC_DUMMY_FRAMES
);
2079 #ifdef USE_STRUCT_CONVENTION
2080 fprintf_unfiltered (file
,
2081 "gdbarch_dump: %s # %s\n",
2082 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2083 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2085 fprintf_unfiltered (file
,
2086 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2087 (long) current_gdbarch
->use_struct_convention
2088 /*USE_STRUCT_CONVENTION ()*/);
2090 if (current_gdbarch
->dump_tdep
!= NULL
)
2091 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2094 struct gdbarch_tdep
*
2095 gdbarch_tdep (struct gdbarch
*gdbarch
)
2097 if (gdbarch_debug
>= 2)
2098 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2099 return gdbarch
->tdep
;
2103 const struct bfd_arch_info
*
2104 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2106 if (gdbarch_debug
>= 2)
2107 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2108 return gdbarch
->bfd_arch_info
;
2112 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2114 if (gdbarch_debug
>= 2)
2115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2116 return gdbarch
->byte_order
;
2120 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2122 /* Skip verify of short_bit, invalid_p == 0 */
2123 if (gdbarch_debug
>= 2)
2124 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2125 return gdbarch
->short_bit
;
2129 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2132 gdbarch
->short_bit
= short_bit
;
2136 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2138 /* Skip verify of int_bit, invalid_p == 0 */
2139 if (gdbarch_debug
>= 2)
2140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2141 return gdbarch
->int_bit
;
2145 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2148 gdbarch
->int_bit
= int_bit
;
2152 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2154 /* Skip verify of long_bit, invalid_p == 0 */
2155 if (gdbarch_debug
>= 2)
2156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2157 return gdbarch
->long_bit
;
2161 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2164 gdbarch
->long_bit
= long_bit
;
2168 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2170 /* Skip verify of long_long_bit, invalid_p == 0 */
2171 if (gdbarch_debug
>= 2)
2172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2173 return gdbarch
->long_long_bit
;
2177 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2180 gdbarch
->long_long_bit
= long_long_bit
;
2184 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2186 /* Skip verify of float_bit, invalid_p == 0 */
2187 if (gdbarch_debug
>= 2)
2188 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2189 return gdbarch
->float_bit
;
2193 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2196 gdbarch
->float_bit
= float_bit
;
2200 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2202 /* Skip verify of double_bit, invalid_p == 0 */
2203 if (gdbarch_debug
>= 2)
2204 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2205 return gdbarch
->double_bit
;
2209 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2212 gdbarch
->double_bit
= double_bit
;
2216 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2218 /* Skip verify of long_double_bit, invalid_p == 0 */
2219 if (gdbarch_debug
>= 2)
2220 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2221 return gdbarch
->long_double_bit
;
2225 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2226 int long_double_bit
)
2228 gdbarch
->long_double_bit
= long_double_bit
;
2232 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2234 /* Skip verify of ptr_bit, invalid_p == 0 */
2235 if (gdbarch_debug
>= 2)
2236 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2237 return gdbarch
->ptr_bit
;
2241 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2244 gdbarch
->ptr_bit
= ptr_bit
;
2248 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2250 if (gdbarch
->addr_bit
== 0)
2251 internal_error (__FILE__
, __LINE__
,
2252 "gdbarch: gdbarch_addr_bit invalid");
2253 if (gdbarch_debug
>= 2)
2254 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2255 return gdbarch
->addr_bit
;
2259 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2262 gdbarch
->addr_bit
= addr_bit
;
2266 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2268 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2269 if (gdbarch_debug
>= 2)
2270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2271 return gdbarch
->bfd_vma_bit
;
2275 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2278 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2282 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2284 if (gdbarch
->char_signed
== -1)
2285 internal_error (__FILE__
, __LINE__
,
2286 "gdbarch: gdbarch_char_signed invalid");
2287 if (gdbarch_debug
>= 2)
2288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2289 return gdbarch
->char_signed
;
2293 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2296 gdbarch
->char_signed
= char_signed
;
2300 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2302 /* Skip verify of ieee_float, invalid_p == 0 */
2303 if (gdbarch_debug
>= 2)
2304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2305 return gdbarch
->ieee_float
;
2309 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2312 gdbarch
->ieee_float
= ieee_float
;
2316 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2318 if (gdbarch
->read_pc
== 0)
2319 internal_error (__FILE__
, __LINE__
,
2320 "gdbarch: gdbarch_read_pc invalid");
2321 if (gdbarch_debug
>= 2)
2322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2323 return gdbarch
->read_pc (ptid
);
2327 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2328 gdbarch_read_pc_ftype read_pc
)
2330 gdbarch
->read_pc
= read_pc
;
2334 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2336 if (gdbarch
->write_pc
== 0)
2337 internal_error (__FILE__
, __LINE__
,
2338 "gdbarch: gdbarch_write_pc invalid");
2339 if (gdbarch_debug
>= 2)
2340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2341 gdbarch
->write_pc (val
, ptid
);
2345 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2346 gdbarch_write_pc_ftype write_pc
)
2348 gdbarch
->write_pc
= write_pc
;
2352 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2354 if (gdbarch
->read_fp
== 0)
2355 internal_error (__FILE__
, __LINE__
,
2356 "gdbarch: gdbarch_read_fp invalid");
2357 if (gdbarch_debug
>= 2)
2358 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2359 return gdbarch
->read_fp ();
2363 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2364 gdbarch_read_fp_ftype read_fp
)
2366 gdbarch
->read_fp
= read_fp
;
2370 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2372 if (gdbarch
->write_fp
== 0)
2373 internal_error (__FILE__
, __LINE__
,
2374 "gdbarch: gdbarch_write_fp invalid");
2375 if (gdbarch_debug
>= 2)
2376 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2377 gdbarch
->write_fp (val
);
2381 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2382 gdbarch_write_fp_ftype write_fp
)
2384 gdbarch
->write_fp
= write_fp
;
2388 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2390 if (gdbarch
->read_sp
== 0)
2391 internal_error (__FILE__
, __LINE__
,
2392 "gdbarch: gdbarch_read_sp invalid");
2393 if (gdbarch_debug
>= 2)
2394 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2395 return gdbarch
->read_sp ();
2399 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2400 gdbarch_read_sp_ftype read_sp
)
2402 gdbarch
->read_sp
= read_sp
;
2406 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2408 if (gdbarch
->write_sp
== 0)
2409 internal_error (__FILE__
, __LINE__
,
2410 "gdbarch: gdbarch_write_sp invalid");
2411 if (gdbarch_debug
>= 2)
2412 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2413 gdbarch
->write_sp (val
);
2417 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2418 gdbarch_write_sp_ftype write_sp
)
2420 gdbarch
->write_sp
= write_sp
;
2424 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2426 if (gdbarch
->virtual_frame_pointer
== 0)
2427 internal_error (__FILE__
, __LINE__
,
2428 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2429 if (gdbarch_debug
>= 2)
2430 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2431 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2435 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2436 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2438 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2442 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2444 return gdbarch
->register_read
!= 0;
2448 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2450 if (gdbarch
->register_read
== 0)
2451 internal_error (__FILE__
, __LINE__
,
2452 "gdbarch: gdbarch_register_read invalid");
2453 if (gdbarch_debug
>= 2)
2454 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2455 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2459 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2460 gdbarch_register_read_ftype register_read
)
2462 gdbarch
->register_read
= register_read
;
2466 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2468 return gdbarch
->register_write
!= 0;
2472 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2474 if (gdbarch
->register_write
== 0)
2475 internal_error (__FILE__
, __LINE__
,
2476 "gdbarch: gdbarch_register_write invalid");
2477 if (gdbarch_debug
>= 2)
2478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2479 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2483 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2484 gdbarch_register_write_ftype register_write
)
2486 gdbarch
->register_write
= register_write
;
2490 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2492 if (gdbarch
->num_regs
== -1)
2493 internal_error (__FILE__
, __LINE__
,
2494 "gdbarch: gdbarch_num_regs invalid");
2495 if (gdbarch_debug
>= 2)
2496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2497 return gdbarch
->num_regs
;
2501 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2504 gdbarch
->num_regs
= num_regs
;
2508 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2510 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2511 if (gdbarch_debug
>= 2)
2512 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2513 return gdbarch
->num_pseudo_regs
;
2517 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2518 int num_pseudo_regs
)
2520 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2524 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2526 if (gdbarch
->sp_regnum
== -1)
2527 internal_error (__FILE__
, __LINE__
,
2528 "gdbarch: gdbarch_sp_regnum invalid");
2529 if (gdbarch_debug
>= 2)
2530 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2531 return gdbarch
->sp_regnum
;
2535 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2538 gdbarch
->sp_regnum
= sp_regnum
;
2542 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2544 if (gdbarch
->fp_regnum
== -1)
2545 internal_error (__FILE__
, __LINE__
,
2546 "gdbarch: gdbarch_fp_regnum invalid");
2547 if (gdbarch_debug
>= 2)
2548 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2549 return gdbarch
->fp_regnum
;
2553 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2556 gdbarch
->fp_regnum
= fp_regnum
;
2560 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2562 if (gdbarch
->pc_regnum
== -1)
2563 internal_error (__FILE__
, __LINE__
,
2564 "gdbarch: gdbarch_pc_regnum invalid");
2565 if (gdbarch_debug
>= 2)
2566 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2567 return gdbarch
->pc_regnum
;
2571 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2574 gdbarch
->pc_regnum
= pc_regnum
;
2578 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2580 /* Skip verify of fp0_regnum, invalid_p == 0 */
2581 if (gdbarch_debug
>= 2)
2582 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2583 return gdbarch
->fp0_regnum
;
2587 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2590 gdbarch
->fp0_regnum
= fp0_regnum
;
2594 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2596 /* Skip verify of npc_regnum, invalid_p == 0 */
2597 if (gdbarch_debug
>= 2)
2598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2599 return gdbarch
->npc_regnum
;
2603 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2606 gdbarch
->npc_regnum
= npc_regnum
;
2610 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2612 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2613 if (gdbarch_debug
>= 2)
2614 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2615 return gdbarch
->nnpc_regnum
;
2619 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2622 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2626 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2628 if (gdbarch
->stab_reg_to_regnum
== 0)
2629 internal_error (__FILE__
, __LINE__
,
2630 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2631 if (gdbarch_debug
>= 2)
2632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2633 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2637 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2638 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2640 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2644 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2646 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2647 internal_error (__FILE__
, __LINE__
,
2648 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2649 if (gdbarch_debug
>= 2)
2650 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2651 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2655 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2656 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2658 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2662 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2664 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2665 internal_error (__FILE__
, __LINE__
,
2666 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2667 if (gdbarch_debug
>= 2)
2668 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2669 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2673 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2674 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2676 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2680 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2682 if (gdbarch
->sdb_reg_to_regnum
== 0)
2683 internal_error (__FILE__
, __LINE__
,
2684 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2685 if (gdbarch_debug
>= 2)
2686 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2687 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2691 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2692 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2694 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2698 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2700 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2701 internal_error (__FILE__
, __LINE__
,
2702 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2703 if (gdbarch_debug
>= 2)
2704 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2705 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2709 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2710 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2712 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2716 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2718 if (gdbarch
->register_name
== 0)
2719 internal_error (__FILE__
, __LINE__
,
2720 "gdbarch: gdbarch_register_name invalid");
2721 if (gdbarch_debug
>= 2)
2722 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2723 return gdbarch
->register_name (regnr
);
2727 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2728 gdbarch_register_name_ftype register_name
)
2730 gdbarch
->register_name
= register_name
;
2734 gdbarch_register_size (struct gdbarch
*gdbarch
)
2736 if (gdbarch
->register_size
== -1)
2737 internal_error (__FILE__
, __LINE__
,
2738 "gdbarch: gdbarch_register_size invalid");
2739 if (gdbarch_debug
>= 2)
2740 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2741 return gdbarch
->register_size
;
2745 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2748 gdbarch
->register_size
= register_size
;
2752 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2754 if (gdbarch
->register_bytes
== -1)
2755 internal_error (__FILE__
, __LINE__
,
2756 "gdbarch: gdbarch_register_bytes invalid");
2757 if (gdbarch_debug
>= 2)
2758 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2759 return gdbarch
->register_bytes
;
2763 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2766 gdbarch
->register_bytes
= register_bytes
;
2770 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2772 if (gdbarch
->register_byte
== 0)
2773 internal_error (__FILE__
, __LINE__
,
2774 "gdbarch: gdbarch_register_byte invalid");
2775 if (gdbarch_debug
>= 2)
2776 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2777 return gdbarch
->register_byte (reg_nr
);
2781 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2782 gdbarch_register_byte_ftype register_byte
)
2784 gdbarch
->register_byte
= register_byte
;
2788 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2790 if (gdbarch
->register_raw_size
== 0)
2791 internal_error (__FILE__
, __LINE__
,
2792 "gdbarch: gdbarch_register_raw_size invalid");
2793 if (gdbarch_debug
>= 2)
2794 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2795 return gdbarch
->register_raw_size (reg_nr
);
2799 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2800 gdbarch_register_raw_size_ftype register_raw_size
)
2802 gdbarch
->register_raw_size
= register_raw_size
;
2806 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2808 if (gdbarch
->max_register_raw_size
== -1)
2809 internal_error (__FILE__
, __LINE__
,
2810 "gdbarch: gdbarch_max_register_raw_size invalid");
2811 if (gdbarch_debug
>= 2)
2812 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2813 return gdbarch
->max_register_raw_size
;
2817 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2818 int max_register_raw_size
)
2820 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2824 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2826 if (gdbarch
->register_virtual_size
== 0)
2827 internal_error (__FILE__
, __LINE__
,
2828 "gdbarch: gdbarch_register_virtual_size invalid");
2829 if (gdbarch_debug
>= 2)
2830 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2831 return gdbarch
->register_virtual_size (reg_nr
);
2835 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2836 gdbarch_register_virtual_size_ftype register_virtual_size
)
2838 gdbarch
->register_virtual_size
= register_virtual_size
;
2842 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2844 if (gdbarch
->max_register_virtual_size
== -1)
2845 internal_error (__FILE__
, __LINE__
,
2846 "gdbarch: gdbarch_max_register_virtual_size invalid");
2847 if (gdbarch_debug
>= 2)
2848 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2849 return gdbarch
->max_register_virtual_size
;
2853 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2854 int max_register_virtual_size
)
2856 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2860 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2862 if (gdbarch
->register_virtual_type
== 0)
2863 internal_error (__FILE__
, __LINE__
,
2864 "gdbarch: gdbarch_register_virtual_type invalid");
2865 if (gdbarch_debug
>= 2)
2866 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2867 return gdbarch
->register_virtual_type (reg_nr
);
2871 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2872 gdbarch_register_virtual_type_ftype register_virtual_type
)
2874 gdbarch
->register_virtual_type
= register_virtual_type
;
2878 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2880 if (gdbarch
->do_registers_info
== 0)
2881 internal_error (__FILE__
, __LINE__
,
2882 "gdbarch: gdbarch_do_registers_info invalid");
2883 if (gdbarch_debug
>= 2)
2884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2885 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2889 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2890 gdbarch_do_registers_info_ftype do_registers_info
)
2892 gdbarch
->do_registers_info
= do_registers_info
;
2896 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2898 if (gdbarch
->register_sim_regno
== 0)
2899 internal_error (__FILE__
, __LINE__
,
2900 "gdbarch: gdbarch_register_sim_regno invalid");
2901 if (gdbarch_debug
>= 2)
2902 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2903 return gdbarch
->register_sim_regno (reg_nr
);
2907 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2908 gdbarch_register_sim_regno_ftype register_sim_regno
)
2910 gdbarch
->register_sim_regno
= register_sim_regno
;
2914 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2916 return gdbarch
->register_bytes_ok
!= 0;
2920 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2922 if (gdbarch
->register_bytes_ok
== 0)
2923 internal_error (__FILE__
, __LINE__
,
2924 "gdbarch: gdbarch_register_bytes_ok invalid");
2925 if (gdbarch_debug
>= 2)
2926 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2927 return gdbarch
->register_bytes_ok (nr_bytes
);
2931 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2932 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2934 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2938 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2940 if (gdbarch
->cannot_fetch_register
== 0)
2941 internal_error (__FILE__
, __LINE__
,
2942 "gdbarch: gdbarch_cannot_fetch_register invalid");
2943 if (gdbarch_debug
>= 2)
2944 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2945 return gdbarch
->cannot_fetch_register (regnum
);
2949 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2950 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2952 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2956 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2958 if (gdbarch
->cannot_store_register
== 0)
2959 internal_error (__FILE__
, __LINE__
,
2960 "gdbarch: gdbarch_cannot_store_register invalid");
2961 if (gdbarch_debug
>= 2)
2962 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2963 return gdbarch
->cannot_store_register (regnum
);
2967 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2968 gdbarch_cannot_store_register_ftype cannot_store_register
)
2970 gdbarch
->cannot_store_register
= cannot_store_register
;
2974 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2976 if (gdbarch
->use_generic_dummy_frames
== -1)
2977 internal_error (__FILE__
, __LINE__
,
2978 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2979 if (gdbarch_debug
>= 2)
2980 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2981 return gdbarch
->use_generic_dummy_frames
;
2985 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2986 int use_generic_dummy_frames
)
2988 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2992 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2994 if (gdbarch
->call_dummy_location
== 0)
2995 internal_error (__FILE__
, __LINE__
,
2996 "gdbarch: gdbarch_call_dummy_location invalid");
2997 if (gdbarch_debug
>= 2)
2998 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2999 return gdbarch
->call_dummy_location
;
3003 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3004 int call_dummy_location
)
3006 gdbarch
->call_dummy_location
= call_dummy_location
;
3010 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3012 if (gdbarch
->call_dummy_address
== 0)
3013 internal_error (__FILE__
, __LINE__
,
3014 "gdbarch: gdbarch_call_dummy_address invalid");
3015 if (gdbarch_debug
>= 2)
3016 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3017 return gdbarch
->call_dummy_address ();
3021 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3022 gdbarch_call_dummy_address_ftype call_dummy_address
)
3024 gdbarch
->call_dummy_address
= call_dummy_address
;
3028 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3030 if (gdbarch
->call_dummy_start_offset
== -1)
3031 internal_error (__FILE__
, __LINE__
,
3032 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3033 if (gdbarch_debug
>= 2)
3034 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3035 return gdbarch
->call_dummy_start_offset
;
3039 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3040 CORE_ADDR call_dummy_start_offset
)
3042 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3046 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3048 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3049 internal_error (__FILE__
, __LINE__
,
3050 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3051 if (gdbarch_debug
>= 2)
3052 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3053 return gdbarch
->call_dummy_breakpoint_offset
;
3057 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3058 CORE_ADDR call_dummy_breakpoint_offset
)
3060 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3064 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3066 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3067 internal_error (__FILE__
, __LINE__
,
3068 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3069 if (gdbarch_debug
>= 2)
3070 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3071 return gdbarch
->call_dummy_breakpoint_offset_p
;
3075 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3076 int call_dummy_breakpoint_offset_p
)
3078 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3082 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3084 if (gdbarch
->call_dummy_length
== -1)
3085 internal_error (__FILE__
, __LINE__
,
3086 "gdbarch: gdbarch_call_dummy_length invalid");
3087 if (gdbarch_debug
>= 2)
3088 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3089 return gdbarch
->call_dummy_length
;
3093 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3094 int call_dummy_length
)
3096 gdbarch
->call_dummy_length
= call_dummy_length
;
3100 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3102 if (gdbarch
->pc_in_call_dummy
== 0)
3103 internal_error (__FILE__
, __LINE__
,
3104 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3105 if (gdbarch_debug
>= 2)
3106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3107 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3111 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3112 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3114 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3118 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3120 if (gdbarch
->call_dummy_p
== -1)
3121 internal_error (__FILE__
, __LINE__
,
3122 "gdbarch: gdbarch_call_dummy_p invalid");
3123 if (gdbarch_debug
>= 2)
3124 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3125 return gdbarch
->call_dummy_p
;
3129 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3132 gdbarch
->call_dummy_p
= call_dummy_p
;
3136 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3138 /* Skip verify of call_dummy_words, invalid_p == 0 */
3139 if (gdbarch_debug
>= 2)
3140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3141 return gdbarch
->call_dummy_words
;
3145 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3146 LONGEST
* call_dummy_words
)
3148 gdbarch
->call_dummy_words
= call_dummy_words
;
3152 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3154 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3155 if (gdbarch_debug
>= 2)
3156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3157 return gdbarch
->sizeof_call_dummy_words
;
3161 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3162 int sizeof_call_dummy_words
)
3164 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3168 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3170 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3171 internal_error (__FILE__
, __LINE__
,
3172 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3173 if (gdbarch_debug
>= 2)
3174 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3175 return gdbarch
->call_dummy_stack_adjust_p
;
3179 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3180 int call_dummy_stack_adjust_p
)
3182 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3186 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3188 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3189 internal_error (__FILE__
, __LINE__
,
3190 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3191 if (gdbarch_debug
>= 2)
3192 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3193 return gdbarch
->call_dummy_stack_adjust
;
3197 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3198 int call_dummy_stack_adjust
)
3200 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3204 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
)
3206 if (gdbarch
->fix_call_dummy
== 0)
3207 internal_error (__FILE__
, __LINE__
,
3208 "gdbarch: gdbarch_fix_call_dummy invalid");
3209 if (gdbarch_debug
>= 2)
3210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3211 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3215 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3216 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3218 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3222 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3224 if (gdbarch
->init_frame_pc_first
== 0)
3225 internal_error (__FILE__
, __LINE__
,
3226 "gdbarch: gdbarch_init_frame_pc_first invalid");
3227 if (gdbarch_debug
>= 2)
3228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3229 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3233 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3234 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3236 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3240 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3242 if (gdbarch
->init_frame_pc
== 0)
3243 internal_error (__FILE__
, __LINE__
,
3244 "gdbarch: gdbarch_init_frame_pc invalid");
3245 if (gdbarch_debug
>= 2)
3246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3247 gdbarch
->init_frame_pc (fromleaf
, prev
);
3251 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3252 gdbarch_init_frame_pc_ftype init_frame_pc
)
3254 gdbarch
->init_frame_pc
= init_frame_pc
;
3258 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3260 if (gdbarch_debug
>= 2)
3261 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3262 return gdbarch
->believe_pcc_promotion
;
3266 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3267 int believe_pcc_promotion
)
3269 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3273 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3275 if (gdbarch_debug
>= 2)
3276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3277 return gdbarch
->believe_pcc_promotion_type
;
3281 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3282 int believe_pcc_promotion_type
)
3284 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3288 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3290 if (gdbarch
->coerce_float_to_double
== 0)
3291 internal_error (__FILE__
, __LINE__
,
3292 "gdbarch: gdbarch_coerce_float_to_double invalid");
3293 if (gdbarch_debug
>= 2)
3294 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3295 return gdbarch
->coerce_float_to_double (formal
, actual
);
3299 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3300 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3302 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3306 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
)
3308 if (gdbarch
->get_saved_register
== 0)
3309 internal_error (__FILE__
, __LINE__
,
3310 "gdbarch: gdbarch_get_saved_register invalid");
3311 if (gdbarch_debug
>= 2)
3312 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3313 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3317 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3318 gdbarch_get_saved_register_ftype get_saved_register
)
3320 gdbarch
->get_saved_register
= get_saved_register
;
3324 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3326 if (gdbarch
->register_convertible
== 0)
3327 internal_error (__FILE__
, __LINE__
,
3328 "gdbarch: gdbarch_register_convertible invalid");
3329 if (gdbarch_debug
>= 2)
3330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3331 return gdbarch
->register_convertible (nr
);
3335 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3336 gdbarch_register_convertible_ftype register_convertible
)
3338 gdbarch
->register_convertible
= register_convertible
;
3342 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3344 if (gdbarch
->register_convert_to_virtual
== 0)
3345 internal_error (__FILE__
, __LINE__
,
3346 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3347 if (gdbarch_debug
>= 2)
3348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3349 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3353 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3354 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3356 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3360 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3362 if (gdbarch
->register_convert_to_raw
== 0)
3363 internal_error (__FILE__
, __LINE__
,
3364 "gdbarch: gdbarch_register_convert_to_raw invalid");
3365 if (gdbarch_debug
>= 2)
3366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3367 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3371 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3372 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3374 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3378 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3380 return gdbarch
->fetch_pseudo_register
!= 0;
3384 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3386 if (gdbarch
->fetch_pseudo_register
== 0)
3387 internal_error (__FILE__
, __LINE__
,
3388 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3389 if (gdbarch_debug
>= 2)
3390 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3391 gdbarch
->fetch_pseudo_register (regnum
);
3395 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3396 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3398 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3402 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3404 return gdbarch
->store_pseudo_register
!= 0;
3408 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3410 if (gdbarch
->store_pseudo_register
== 0)
3411 internal_error (__FILE__
, __LINE__
,
3412 "gdbarch: gdbarch_store_pseudo_register invalid");
3413 if (gdbarch_debug
>= 2)
3414 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3415 gdbarch
->store_pseudo_register (regnum
);
3419 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3420 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3422 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3426 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3428 if (gdbarch
->pointer_to_address
== 0)
3429 internal_error (__FILE__
, __LINE__
,
3430 "gdbarch: gdbarch_pointer_to_address invalid");
3431 if (gdbarch_debug
>= 2)
3432 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3433 return gdbarch
->pointer_to_address (type
, buf
);
3437 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3438 gdbarch_pointer_to_address_ftype pointer_to_address
)
3440 gdbarch
->pointer_to_address
= pointer_to_address
;
3444 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3446 if (gdbarch
->address_to_pointer
== 0)
3447 internal_error (__FILE__
, __LINE__
,
3448 "gdbarch: gdbarch_address_to_pointer invalid");
3449 if (gdbarch_debug
>= 2)
3450 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3451 gdbarch
->address_to_pointer (type
, buf
, addr
);
3455 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3456 gdbarch_address_to_pointer_ftype address_to_pointer
)
3458 gdbarch
->address_to_pointer
= address_to_pointer
;
3462 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3464 return gdbarch
->integer_to_address
!= 0;
3468 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3470 if (gdbarch
->integer_to_address
== 0)
3471 internal_error (__FILE__
, __LINE__
,
3472 "gdbarch: gdbarch_integer_to_address invalid");
3473 if (gdbarch_debug
>= 2)
3474 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3475 return gdbarch
->integer_to_address (type
, buf
);
3479 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3480 gdbarch_integer_to_address_ftype integer_to_address
)
3482 gdbarch
->integer_to_address
= integer_to_address
;
3486 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3488 if (gdbarch
->return_value_on_stack
== 0)
3489 internal_error (__FILE__
, __LINE__
,
3490 "gdbarch: gdbarch_return_value_on_stack invalid");
3491 if (gdbarch_debug
>= 2)
3492 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3493 return gdbarch
->return_value_on_stack (type
);
3497 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3498 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3500 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3504 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3506 if (gdbarch
->extract_return_value
== 0)
3507 internal_error (__FILE__
, __LINE__
,
3508 "gdbarch: gdbarch_extract_return_value invalid");
3509 if (gdbarch_debug
>= 2)
3510 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3511 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3515 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3516 gdbarch_extract_return_value_ftype extract_return_value
)
3518 gdbarch
->extract_return_value
= extract_return_value
;
3522 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3524 if (gdbarch
->push_arguments
== 0)
3525 internal_error (__FILE__
, __LINE__
,
3526 "gdbarch: gdbarch_push_arguments invalid");
3527 if (gdbarch_debug
>= 2)
3528 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3529 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3533 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3534 gdbarch_push_arguments_ftype push_arguments
)
3536 gdbarch
->push_arguments
= push_arguments
;
3540 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3542 if (gdbarch
->push_dummy_frame
== 0)
3543 internal_error (__FILE__
, __LINE__
,
3544 "gdbarch: gdbarch_push_dummy_frame invalid");
3545 if (gdbarch_debug
>= 2)
3546 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3547 gdbarch
->push_dummy_frame ();
3551 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3552 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3554 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3558 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3560 return gdbarch
->push_return_address
!= 0;
3564 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3566 if (gdbarch
->push_return_address
== 0)
3567 internal_error (__FILE__
, __LINE__
,
3568 "gdbarch: gdbarch_push_return_address invalid");
3569 if (gdbarch_debug
>= 2)
3570 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3571 return gdbarch
->push_return_address (pc
, sp
);
3575 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3576 gdbarch_push_return_address_ftype push_return_address
)
3578 gdbarch
->push_return_address
= push_return_address
;
3582 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3584 if (gdbarch
->pop_frame
== 0)
3585 internal_error (__FILE__
, __LINE__
,
3586 "gdbarch: gdbarch_pop_frame invalid");
3587 if (gdbarch_debug
>= 2)
3588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3589 gdbarch
->pop_frame ();
3593 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3594 gdbarch_pop_frame_ftype pop_frame
)
3596 gdbarch
->pop_frame
= pop_frame
;
3600 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3602 if (gdbarch
->store_struct_return
== 0)
3603 internal_error (__FILE__
, __LINE__
,
3604 "gdbarch: gdbarch_store_struct_return invalid");
3605 if (gdbarch_debug
>= 2)
3606 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3607 gdbarch
->store_struct_return (addr
, sp
);
3611 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3612 gdbarch_store_struct_return_ftype store_struct_return
)
3614 gdbarch
->store_struct_return
= store_struct_return
;
3618 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3620 if (gdbarch
->store_return_value
== 0)
3621 internal_error (__FILE__
, __LINE__
,
3622 "gdbarch: gdbarch_store_return_value invalid");
3623 if (gdbarch_debug
>= 2)
3624 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3625 gdbarch
->store_return_value (type
, valbuf
);
3629 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3630 gdbarch_store_return_value_ftype store_return_value
)
3632 gdbarch
->store_return_value
= store_return_value
;
3636 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3638 return gdbarch
->extract_struct_value_address
!= 0;
3642 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3644 if (gdbarch
->extract_struct_value_address
== 0)
3645 internal_error (__FILE__
, __LINE__
,
3646 "gdbarch: gdbarch_extract_struct_value_address invalid");
3647 if (gdbarch_debug
>= 2)
3648 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3649 return gdbarch
->extract_struct_value_address (regbuf
);
3653 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3654 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3656 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3660 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3662 if (gdbarch
->use_struct_convention
== 0)
3663 internal_error (__FILE__
, __LINE__
,
3664 "gdbarch: gdbarch_use_struct_convention invalid");
3665 if (gdbarch_debug
>= 2)
3666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3667 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3671 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3672 gdbarch_use_struct_convention_ftype use_struct_convention
)
3674 gdbarch
->use_struct_convention
= use_struct_convention
;
3678 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3680 if (gdbarch
->frame_init_saved_regs
== 0)
3681 internal_error (__FILE__
, __LINE__
,
3682 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3683 if (gdbarch_debug
>= 2)
3684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3685 gdbarch
->frame_init_saved_regs (frame
);
3689 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3690 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3692 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3696 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3698 return gdbarch
->init_extra_frame_info
!= 0;
3702 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3704 if (gdbarch
->init_extra_frame_info
== 0)
3705 internal_error (__FILE__
, __LINE__
,
3706 "gdbarch: gdbarch_init_extra_frame_info invalid");
3707 if (gdbarch_debug
>= 2)
3708 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3709 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3713 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3714 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3716 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3720 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3722 if (gdbarch
->skip_prologue
== 0)
3723 internal_error (__FILE__
, __LINE__
,
3724 "gdbarch: gdbarch_skip_prologue invalid");
3725 if (gdbarch_debug
>= 2)
3726 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3727 return gdbarch
->skip_prologue (ip
);
3731 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3732 gdbarch_skip_prologue_ftype skip_prologue
)
3734 gdbarch
->skip_prologue
= skip_prologue
;
3738 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3740 if (gdbarch
->prologue_frameless_p
== 0)
3741 internal_error (__FILE__
, __LINE__
,
3742 "gdbarch: gdbarch_prologue_frameless_p invalid");
3743 if (gdbarch_debug
>= 2)
3744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3745 return gdbarch
->prologue_frameless_p (ip
);
3749 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3750 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3752 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3756 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3758 if (gdbarch
->inner_than
== 0)
3759 internal_error (__FILE__
, __LINE__
,
3760 "gdbarch: gdbarch_inner_than invalid");
3761 if (gdbarch_debug
>= 2)
3762 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3763 return gdbarch
->inner_than (lhs
, rhs
);
3767 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3768 gdbarch_inner_than_ftype inner_than
)
3770 gdbarch
->inner_than
= inner_than
;
3774 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3776 if (gdbarch
->breakpoint_from_pc
== 0)
3777 internal_error (__FILE__
, __LINE__
,
3778 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3779 if (gdbarch_debug
>= 2)
3780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3781 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3785 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3786 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3788 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3792 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3794 if (gdbarch
->memory_insert_breakpoint
== 0)
3795 internal_error (__FILE__
, __LINE__
,
3796 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3797 if (gdbarch_debug
>= 2)
3798 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3799 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3803 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3804 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3806 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3810 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3812 if (gdbarch
->memory_remove_breakpoint
== 0)
3813 internal_error (__FILE__
, __LINE__
,
3814 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3815 if (gdbarch_debug
>= 2)
3816 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3817 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3821 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3822 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3824 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3828 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3830 if (gdbarch
->decr_pc_after_break
== -1)
3831 internal_error (__FILE__
, __LINE__
,
3832 "gdbarch: gdbarch_decr_pc_after_break invalid");
3833 if (gdbarch_debug
>= 2)
3834 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3835 return gdbarch
->decr_pc_after_break
;
3839 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3840 CORE_ADDR decr_pc_after_break
)
3842 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3846 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3848 if (gdbarch
->prepare_to_proceed
== 0)
3849 internal_error (__FILE__
, __LINE__
,
3850 "gdbarch: gdbarch_prepare_to_proceed invalid");
3851 if (gdbarch_debug
>= 2)
3852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3853 return gdbarch
->prepare_to_proceed (select_it
);
3857 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3858 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3860 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3864 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3866 if (gdbarch
->function_start_offset
== -1)
3867 internal_error (__FILE__
, __LINE__
,
3868 "gdbarch: gdbarch_function_start_offset invalid");
3869 if (gdbarch_debug
>= 2)
3870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3871 return gdbarch
->function_start_offset
;
3875 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3876 CORE_ADDR function_start_offset
)
3878 gdbarch
->function_start_offset
= function_start_offset
;
3882 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3884 if (gdbarch
->remote_translate_xfer_address
== 0)
3885 internal_error (__FILE__
, __LINE__
,
3886 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3887 if (gdbarch_debug
>= 2)
3888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3889 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3893 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3894 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3896 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3900 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3902 if (gdbarch
->frame_args_skip
== -1)
3903 internal_error (__FILE__
, __LINE__
,
3904 "gdbarch: gdbarch_frame_args_skip invalid");
3905 if (gdbarch_debug
>= 2)
3906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3907 return gdbarch
->frame_args_skip
;
3911 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3912 CORE_ADDR frame_args_skip
)
3914 gdbarch
->frame_args_skip
= frame_args_skip
;
3918 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3920 if (gdbarch
->frameless_function_invocation
== 0)
3921 internal_error (__FILE__
, __LINE__
,
3922 "gdbarch: gdbarch_frameless_function_invocation invalid");
3923 if (gdbarch_debug
>= 2)
3924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3925 return gdbarch
->frameless_function_invocation (fi
);
3929 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3930 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3932 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3936 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3938 if (gdbarch
->frame_chain
== 0)
3939 internal_error (__FILE__
, __LINE__
,
3940 "gdbarch: gdbarch_frame_chain invalid");
3941 if (gdbarch_debug
>= 2)
3942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3943 return gdbarch
->frame_chain (frame
);
3947 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3948 gdbarch_frame_chain_ftype frame_chain
)
3950 gdbarch
->frame_chain
= frame_chain
;
3954 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3956 if (gdbarch
->frame_chain_valid
== 0)
3957 internal_error (__FILE__
, __LINE__
,
3958 "gdbarch: gdbarch_frame_chain_valid invalid");
3959 if (gdbarch_debug
>= 2)
3960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3961 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3965 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3966 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3968 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3972 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3974 if (gdbarch
->frame_saved_pc
== 0)
3975 internal_error (__FILE__
, __LINE__
,
3976 "gdbarch: gdbarch_frame_saved_pc invalid");
3977 if (gdbarch_debug
>= 2)
3978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3979 return gdbarch
->frame_saved_pc (fi
);
3983 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3984 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3986 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3990 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3992 if (gdbarch
->frame_args_address
== 0)
3993 internal_error (__FILE__
, __LINE__
,
3994 "gdbarch: gdbarch_frame_args_address invalid");
3995 if (gdbarch_debug
>= 2)
3996 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3997 return gdbarch
->frame_args_address (fi
);
4001 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4002 gdbarch_frame_args_address_ftype frame_args_address
)
4004 gdbarch
->frame_args_address
= frame_args_address
;
4008 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4010 if (gdbarch
->frame_locals_address
== 0)
4011 internal_error (__FILE__
, __LINE__
,
4012 "gdbarch: gdbarch_frame_locals_address invalid");
4013 if (gdbarch_debug
>= 2)
4014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4015 return gdbarch
->frame_locals_address (fi
);
4019 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4020 gdbarch_frame_locals_address_ftype frame_locals_address
)
4022 gdbarch
->frame_locals_address
= frame_locals_address
;
4026 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4028 if (gdbarch
->saved_pc_after_call
== 0)
4029 internal_error (__FILE__
, __LINE__
,
4030 "gdbarch: gdbarch_saved_pc_after_call invalid");
4031 if (gdbarch_debug
>= 2)
4032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4033 return gdbarch
->saved_pc_after_call (frame
);
4037 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4038 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4040 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4044 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4046 if (gdbarch
->frame_num_args
== 0)
4047 internal_error (__FILE__
, __LINE__
,
4048 "gdbarch: gdbarch_frame_num_args invalid");
4049 if (gdbarch_debug
>= 2)
4050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4051 return gdbarch
->frame_num_args (frame
);
4055 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4056 gdbarch_frame_num_args_ftype frame_num_args
)
4058 gdbarch
->frame_num_args
= frame_num_args
;
4062 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4064 return gdbarch
->stack_align
!= 0;
4068 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4070 if (gdbarch
->stack_align
== 0)
4071 internal_error (__FILE__
, __LINE__
,
4072 "gdbarch: gdbarch_stack_align invalid");
4073 if (gdbarch_debug
>= 2)
4074 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4075 return gdbarch
->stack_align (sp
);
4079 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4080 gdbarch_stack_align_ftype stack_align
)
4082 gdbarch
->stack_align
= stack_align
;
4086 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4088 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4089 if (gdbarch_debug
>= 2)
4090 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4091 return gdbarch
->extra_stack_alignment_needed
;
4095 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4096 int extra_stack_alignment_needed
)
4098 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4102 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4104 return gdbarch
->reg_struct_has_addr
!= 0;
4108 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4110 if (gdbarch
->reg_struct_has_addr
== 0)
4111 internal_error (__FILE__
, __LINE__
,
4112 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4113 if (gdbarch_debug
>= 2)
4114 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4115 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4119 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4120 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4122 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4126 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4128 return gdbarch
->save_dummy_frame_tos
!= 0;
4132 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4134 if (gdbarch
->save_dummy_frame_tos
== 0)
4135 internal_error (__FILE__
, __LINE__
,
4136 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4137 if (gdbarch_debug
>= 2)
4138 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4139 gdbarch
->save_dummy_frame_tos (sp
);
4143 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4144 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4146 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4150 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4152 if (gdbarch_debug
>= 2)
4153 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4154 return gdbarch
->parm_boundary
;
4158 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4161 gdbarch
->parm_boundary
= parm_boundary
;
4164 const struct floatformat
*
4165 gdbarch_float_format (struct gdbarch
*gdbarch
)
4167 if (gdbarch_debug
>= 2)
4168 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4169 return gdbarch
->float_format
;
4173 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4174 const struct floatformat
* float_format
)
4176 gdbarch
->float_format
= float_format
;
4179 const struct floatformat
*
4180 gdbarch_double_format (struct gdbarch
*gdbarch
)
4182 if (gdbarch_debug
>= 2)
4183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4184 return gdbarch
->double_format
;
4188 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4189 const struct floatformat
* double_format
)
4191 gdbarch
->double_format
= double_format
;
4194 const struct floatformat
*
4195 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4197 if (gdbarch_debug
>= 2)
4198 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4199 return gdbarch
->long_double_format
;
4203 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4204 const struct floatformat
* long_double_format
)
4206 gdbarch
->long_double_format
= long_double_format
;
4210 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4212 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4213 internal_error (__FILE__
, __LINE__
,
4214 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4215 if (gdbarch_debug
>= 2)
4216 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4217 return gdbarch
->convert_from_func_ptr_addr (addr
);
4221 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4222 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4224 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4228 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4230 if (gdbarch
->addr_bits_remove
== 0)
4231 internal_error (__FILE__
, __LINE__
,
4232 "gdbarch: gdbarch_addr_bits_remove invalid");
4233 if (gdbarch_debug
>= 2)
4234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4235 return gdbarch
->addr_bits_remove (addr
);
4239 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4240 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4242 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4246 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4248 return gdbarch
->software_single_step
!= 0;
4252 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4254 if (gdbarch
->software_single_step
== 0)
4255 internal_error (__FILE__
, __LINE__
,
4256 "gdbarch: gdbarch_software_single_step invalid");
4257 if (gdbarch_debug
>= 2)
4258 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4259 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4263 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4264 gdbarch_software_single_step_ftype software_single_step
)
4266 gdbarch
->software_single_step
= software_single_step
;
4270 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4272 if (gdbarch
->print_insn
== 0)
4273 internal_error (__FILE__
, __LINE__
,
4274 "gdbarch: gdbarch_print_insn invalid");
4275 if (gdbarch_debug
>= 2)
4276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4277 return gdbarch
->print_insn (vma
, info
);
4281 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4282 gdbarch_print_insn_ftype print_insn
)
4284 gdbarch
->print_insn
= print_insn
;
4288 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4290 if (gdbarch
->skip_trampoline_code
== 0)
4291 internal_error (__FILE__
, __LINE__
,
4292 "gdbarch: gdbarch_skip_trampoline_code invalid");
4293 if (gdbarch_debug
>= 2)
4294 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4295 return gdbarch
->skip_trampoline_code (pc
);
4299 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4300 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4302 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4306 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4308 if (gdbarch
->in_solib_call_trampoline
== 0)
4309 internal_error (__FILE__
, __LINE__
,
4310 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4311 if (gdbarch_debug
>= 2)
4312 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4313 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4317 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4318 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4320 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4324 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4326 if (gdbarch
->in_function_epilogue_p
== 0)
4327 internal_error (__FILE__
, __LINE__
,
4328 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4329 if (gdbarch_debug
>= 2)
4330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4331 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4335 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4336 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4338 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4342 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4344 if (gdbarch
->construct_inferior_arguments
== 0)
4345 internal_error (__FILE__
, __LINE__
,
4346 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4347 if (gdbarch_debug
>= 2)
4348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4349 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4353 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4354 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4356 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4360 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4362 return gdbarch
->dwarf2_build_frame_info
!= 0;
4366 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4368 if (gdbarch
->dwarf2_build_frame_info
== 0)
4369 internal_error (__FILE__
, __LINE__
,
4370 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4371 if (gdbarch_debug
>= 2)
4372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4373 gdbarch
->dwarf2_build_frame_info (objfile
);
4377 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4378 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4380 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4384 /* Keep a registry of per-architecture data-pointers required by GDB
4390 gdbarch_data_init_ftype
*init
;
4391 gdbarch_data_free_ftype
*free
;
4394 struct gdbarch_data_registration
4396 struct gdbarch_data
*data
;
4397 struct gdbarch_data_registration
*next
;
4400 struct gdbarch_data_registry
4403 struct gdbarch_data_registration
*registrations
;
4406 struct gdbarch_data_registry gdbarch_data_registry
=
4411 struct gdbarch_data
*
4412 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4413 gdbarch_data_free_ftype
*free
)
4415 struct gdbarch_data_registration
**curr
;
4416 for (curr
= &gdbarch_data_registry
.registrations
;
4418 curr
= &(*curr
)->next
);
4419 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4420 (*curr
)->next
= NULL
;
4421 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4422 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4423 (*curr
)->data
->init
= init
;
4424 (*curr
)->data
->free
= free
;
4425 return (*curr
)->data
;
4429 /* Walk through all the registered users initializing each in turn. */
4432 init_gdbarch_data (struct gdbarch
*gdbarch
)
4434 struct gdbarch_data_registration
*rego
;
4435 for (rego
= gdbarch_data_registry
.registrations
;
4439 struct gdbarch_data
*data
= rego
->data
;
4440 gdb_assert (data
->index
< gdbarch
->nr_data
);
4441 if (data
->init
!= NULL
)
4443 void *pointer
= data
->init (gdbarch
);
4444 set_gdbarch_data (gdbarch
, data
, pointer
);
4449 /* Create/delete the gdbarch data vector. */
4452 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4454 gdb_assert (gdbarch
->data
== NULL
);
4455 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4456 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4460 free_gdbarch_data (struct gdbarch
*gdbarch
)
4462 struct gdbarch_data_registration
*rego
;
4463 gdb_assert (gdbarch
->data
!= NULL
);
4464 for (rego
= gdbarch_data_registry
.registrations
;
4468 struct gdbarch_data
*data
= rego
->data
;
4469 gdb_assert (data
->index
< gdbarch
->nr_data
);
4470 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4472 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4473 gdbarch
->data
[data
->index
] = NULL
;
4476 xfree (gdbarch
->data
);
4477 gdbarch
->data
= NULL
;
4481 /* Initialize the current value of thee specified per-architecture
4485 set_gdbarch_data (struct gdbarch
*gdbarch
,
4486 struct gdbarch_data
*data
,
4489 gdb_assert (data
->index
< gdbarch
->nr_data
);
4490 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4491 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4492 gdbarch
->data
[data
->index
] = pointer
;
4495 /* Return the current value of the specified per-architecture
4499 gdbarch_data (struct gdbarch_data
*data
)
4501 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4502 return current_gdbarch
->data
[data
->index
];
4507 /* Keep a registry of swapped data required by GDB modules. */
4512 struct gdbarch_swap_registration
*source
;
4513 struct gdbarch_swap
*next
;
4516 struct gdbarch_swap_registration
4519 unsigned long sizeof_data
;
4520 gdbarch_swap_ftype
*init
;
4521 struct gdbarch_swap_registration
*next
;
4524 struct gdbarch_swap_registry
4527 struct gdbarch_swap_registration
*registrations
;
4530 struct gdbarch_swap_registry gdbarch_swap_registry
=
4536 register_gdbarch_swap (void *data
,
4537 unsigned long sizeof_data
,
4538 gdbarch_swap_ftype
*init
)
4540 struct gdbarch_swap_registration
**rego
;
4541 for (rego
= &gdbarch_swap_registry
.registrations
;
4543 rego
= &(*rego
)->next
);
4544 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4545 (*rego
)->next
= NULL
;
4546 (*rego
)->init
= init
;
4547 (*rego
)->data
= data
;
4548 (*rego
)->sizeof_data
= sizeof_data
;
4553 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4555 struct gdbarch_swap_registration
*rego
;
4556 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4557 for (rego
= gdbarch_swap_registry
.registrations
;
4561 if (rego
->data
!= NULL
)
4563 (*curr
) = XMALLOC (struct gdbarch_swap
);
4564 (*curr
)->source
= rego
;
4565 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4566 (*curr
)->next
= NULL
;
4567 memset (rego
->data
, 0, rego
->sizeof_data
);
4568 curr
= &(*curr
)->next
;
4570 if (rego
->init
!= NULL
)
4576 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4578 struct gdbarch_swap
*curr
;
4579 for (curr
= gdbarch
->swap
;
4582 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4586 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4588 struct gdbarch_swap
*curr
;
4589 for (curr
= gdbarch
->swap
;
4592 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4596 /* Keep a registry of the architectures known by GDB. */
4598 struct gdbarch_registration
4600 enum bfd_architecture bfd_architecture
;
4601 gdbarch_init_ftype
*init
;
4602 gdbarch_dump_tdep_ftype
*dump_tdep
;
4603 struct gdbarch_list
*arches
;
4604 struct gdbarch_registration
*next
;
4607 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4610 append_name (const char ***buf
, int *nr
, const char *name
)
4612 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4618 gdbarch_printable_names (void)
4622 /* Accumulate a list of names based on the registed list of
4624 enum bfd_architecture a
;
4626 const char **arches
= NULL
;
4627 struct gdbarch_registration
*rego
;
4628 for (rego
= gdbarch_registry
;
4632 const struct bfd_arch_info
*ap
;
4633 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4635 internal_error (__FILE__
, __LINE__
,
4636 "gdbarch_architecture_names: multi-arch unknown");
4639 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4644 append_name (&arches
, &nr_arches
, NULL
);
4648 /* Just return all the architectures that BFD knows. Assume that
4649 the legacy architecture framework supports them. */
4650 return bfd_arch_list ();
4655 gdbarch_register (enum bfd_architecture bfd_architecture
,
4656 gdbarch_init_ftype
*init
,
4657 gdbarch_dump_tdep_ftype
*dump_tdep
)
4659 struct gdbarch_registration
**curr
;
4660 const struct bfd_arch_info
*bfd_arch_info
;
4661 /* Check that BFD recognizes this architecture */
4662 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4663 if (bfd_arch_info
== NULL
)
4665 internal_error (__FILE__
, __LINE__
,
4666 "gdbarch: Attempt to register unknown architecture (%d)",
4669 /* Check that we haven't seen this architecture before */
4670 for (curr
= &gdbarch_registry
;
4672 curr
= &(*curr
)->next
)
4674 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4675 internal_error (__FILE__
, __LINE__
,
4676 "gdbarch: Duplicate registraration of architecture (%s)",
4677 bfd_arch_info
->printable_name
);
4681 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4682 bfd_arch_info
->printable_name
,
4685 (*curr
) = XMALLOC (struct gdbarch_registration
);
4686 (*curr
)->bfd_architecture
= bfd_architecture
;
4687 (*curr
)->init
= init
;
4688 (*curr
)->dump_tdep
= dump_tdep
;
4689 (*curr
)->arches
= NULL
;
4690 (*curr
)->next
= NULL
;
4691 /* When non- multi-arch, install whatever target dump routine we've
4692 been provided - hopefully that routine has been written correctly
4693 and works regardless of multi-arch. */
4694 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4695 && startup_gdbarch
.dump_tdep
== NULL
)
4696 startup_gdbarch
.dump_tdep
= dump_tdep
;
4700 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4701 gdbarch_init_ftype
*init
)
4703 gdbarch_register (bfd_architecture
, init
, NULL
);
4707 /* Look for an architecture using gdbarch_info. Base search on only
4708 BFD_ARCH_INFO and BYTE_ORDER. */
4710 struct gdbarch_list
*
4711 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4712 const struct gdbarch_info
*info
)
4714 for (; arches
!= NULL
; arches
= arches
->next
)
4716 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4718 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4726 /* Update the current architecture. Return ZERO if the update request
4730 gdbarch_update_p (struct gdbarch_info info
)
4732 struct gdbarch
*new_gdbarch
;
4733 struct gdbarch_list
**list
;
4734 struct gdbarch_registration
*rego
;
4736 /* Fill in missing parts of the INFO struct using a number of
4737 sources: ``set ...''; INFOabfd supplied; existing target. */
4739 /* ``(gdb) set architecture ...'' */
4740 if (info
.bfd_arch_info
== NULL
4741 && !TARGET_ARCHITECTURE_AUTO
)
4742 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4743 if (info
.bfd_arch_info
== NULL
4744 && info
.abfd
!= NULL
4745 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4746 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4747 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4748 if (info
.bfd_arch_info
== NULL
)
4749 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4751 /* ``(gdb) set byte-order ...'' */
4752 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4753 && !TARGET_BYTE_ORDER_AUTO
)
4754 info
.byte_order
= TARGET_BYTE_ORDER
;
4755 /* From the INFO struct. */
4756 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4757 && info
.abfd
!= NULL
)
4758 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4759 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
4760 : BFD_ENDIAN_UNKNOWN
);
4761 /* From the current target. */
4762 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
4763 info
.byte_order
= TARGET_BYTE_ORDER
;
4765 /* Must have found some sort of architecture. */
4766 gdb_assert (info
.bfd_arch_info
!= NULL
);
4770 fprintf_unfiltered (gdb_stdlog
,
4771 "gdbarch_update: info.bfd_arch_info %s\n",
4772 (info
.bfd_arch_info
!= NULL
4773 ? info
.bfd_arch_info
->printable_name
4775 fprintf_unfiltered (gdb_stdlog
,
4776 "gdbarch_update: info.byte_order %d (%s)\n",
4778 (info
.byte_order
== BIG_ENDIAN
? "big"
4779 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4781 fprintf_unfiltered (gdb_stdlog
,
4782 "gdbarch_update: info.abfd 0x%lx\n",
4784 fprintf_unfiltered (gdb_stdlog
,
4785 "gdbarch_update: info.tdep_info 0x%lx\n",
4786 (long) info
.tdep_info
);
4789 /* Find the target that knows about this architecture. */
4790 for (rego
= gdbarch_registry
;
4793 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4798 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4802 /* Ask the target for a replacement architecture. */
4803 new_gdbarch
= rego
->init (info
, rego
->arches
);
4805 /* Did the target like it? No. Reject the change. */
4806 if (new_gdbarch
== NULL
)
4809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4813 /* Did the architecture change? No. Do nothing. */
4814 if (current_gdbarch
== new_gdbarch
)
4817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4819 new_gdbarch
->bfd_arch_info
->printable_name
);
4823 /* Swap all data belonging to the old target out */
4824 swapout_gdbarch_swap (current_gdbarch
);
4826 /* Is this a pre-existing architecture? Yes. Swap it in. */
4827 for (list
= ®o
->arches
;
4829 list
= &(*list
)->next
)
4831 if ((*list
)->gdbarch
== new_gdbarch
)
4834 fprintf_unfiltered (gdb_stdlog
,
4835 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4837 new_gdbarch
->bfd_arch_info
->printable_name
);
4838 current_gdbarch
= new_gdbarch
;
4839 swapin_gdbarch_swap (new_gdbarch
);
4840 architecture_changed_event ();
4845 /* Append this new architecture to this targets list. */
4846 (*list
) = XMALLOC (struct gdbarch_list
);
4847 (*list
)->next
= NULL
;
4848 (*list
)->gdbarch
= new_gdbarch
;
4850 /* Switch to this new architecture. Dump it out. */
4851 current_gdbarch
= new_gdbarch
;
4854 fprintf_unfiltered (gdb_stdlog
,
4855 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4857 new_gdbarch
->bfd_arch_info
->printable_name
);
4860 /* Check that the newly installed architecture is valid. Plug in
4861 any post init values. */
4862 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4863 verify_gdbarch (new_gdbarch
);
4865 /* Initialize the per-architecture memory (swap) areas.
4866 CURRENT_GDBARCH must be update before these modules are
4868 init_gdbarch_swap (new_gdbarch
);
4870 /* Initialize the per-architecture data-pointer of all parties that
4871 registered an interest in this architecture. CURRENT_GDBARCH
4872 must be updated before these modules are called. */
4873 init_gdbarch_data (new_gdbarch
);
4874 architecture_changed_event ();
4877 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4885 /* Pointer to the target-dependent disassembly function. */
4886 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4887 disassemble_info tm_print_insn_info
;
4890 extern void _initialize_gdbarch (void);
4893 _initialize_gdbarch (void)
4895 struct cmd_list_element
*c
;
4897 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4898 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4899 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4900 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4901 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4903 add_show_from_set (add_set_cmd ("arch",
4906 (char *)&gdbarch_debug
,
4907 "Set architecture debugging.\n\
4908 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4910 c
= add_set_cmd ("archdebug",
4913 (char *)&gdbarch_debug
,
4914 "Set architecture debugging.\n\
4915 When non-zero, architecture debugging is enabled.", &setlist
);
4917 deprecate_cmd (c
, "set debug arch");
4918 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");