1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch
*gdbarch
);
70 static void alloc_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void swapout_gdbarch_swap (struct gdbarch
*);
75 static void swapin_gdbarch_swap (struct gdbarch
*);
77 /* Convenience macro for allocting typesafe memory. */
80 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
84 /* Non-zero if we want to trace architecture code. */
87 #define GDBARCH_DEBUG 0
89 int gdbarch_debug
= GDBARCH_DEBUG
;
92 /* Maintain the struct gdbarch object */
96 /* basic architectural information */
97 const struct bfd_arch_info
* bfd_arch_info
;
100 /* target specific vector. */
101 struct gdbarch_tdep
*tdep
;
102 gdbarch_dump_tdep_ftype
*dump_tdep
;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap
*swap
;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype
*read_pc
;
149 gdbarch_write_pc_ftype
*write_pc
;
150 gdbarch_read_fp_ftype
*read_fp
;
151 gdbarch_write_fp_ftype
*write_fp
;
152 gdbarch_read_sp_ftype
*read_sp
;
153 gdbarch_write_sp_ftype
*write_sp
;
154 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
155 gdbarch_register_read_ftype
*register_read
;
156 gdbarch_register_write_ftype
*register_write
;
165 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
166 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
167 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
168 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
169 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
170 gdbarch_register_name_ftype
*register_name
;
173 gdbarch_register_byte_ftype
*register_byte
;
174 gdbarch_register_raw_size_ftype
*register_raw_size
;
175 int max_register_raw_size
;
176 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
177 int max_register_virtual_size
;
178 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
179 gdbarch_do_registers_info_ftype
*do_registers_info
;
180 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
181 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
182 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
183 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
184 int use_generic_dummy_frames
;
185 int call_dummy_location
;
186 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
187 CORE_ADDR call_dummy_start_offset
;
188 CORE_ADDR call_dummy_breakpoint_offset
;
189 int call_dummy_breakpoint_offset_p
;
190 int call_dummy_length
;
191 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
193 LONGEST
* call_dummy_words
;
194 int sizeof_call_dummy_words
;
195 int call_dummy_stack_adjust_p
;
196 int call_dummy_stack_adjust
;
197 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
198 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
199 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
200 int believe_pcc_promotion
;
201 int believe_pcc_promotion_type
;
202 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
203 gdbarch_get_saved_register_ftype
*get_saved_register
;
204 gdbarch_register_convertible_ftype
*register_convertible
;
205 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
206 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
207 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
208 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
209 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
210 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
211 gdbarch_integer_to_address_ftype
*integer_to_address
;
212 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
213 gdbarch_extract_return_value_ftype
*extract_return_value
;
214 gdbarch_push_arguments_ftype
*push_arguments
;
215 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
216 gdbarch_push_return_address_ftype
*push_return_address
;
217 gdbarch_pop_frame_ftype
*pop_frame
;
218 gdbarch_store_struct_return_ftype
*store_struct_return
;
219 gdbarch_store_return_value_ftype
*store_return_value
;
220 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
221 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
222 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
223 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
224 gdbarch_skip_prologue_ftype
*skip_prologue
;
225 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
226 gdbarch_inner_than_ftype
*inner_than
;
227 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
228 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
229 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
230 CORE_ADDR decr_pc_after_break
;
231 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
232 CORE_ADDR function_start_offset
;
233 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
234 CORE_ADDR frame_args_skip
;
235 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
236 gdbarch_frame_chain_ftype
*frame_chain
;
237 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
238 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
239 gdbarch_frame_args_address_ftype
*frame_args_address
;
240 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
241 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
242 gdbarch_frame_num_args_ftype
*frame_num_args
;
243 gdbarch_stack_align_ftype
*stack_align
;
244 int extra_stack_alignment_needed
;
245 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
246 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
248 const struct floatformat
* float_format
;
249 const struct floatformat
* double_format
;
250 const struct floatformat
* long_double_format
;
251 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
252 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
253 gdbarch_software_single_step_ftype
*software_single_step
;
254 gdbarch_print_insn_ftype
*print_insn
;
255 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
256 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
257 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
258 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
259 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
263 /* The default architecture uses host values (for want of a better
266 extern const struct bfd_arch_info bfd_default_arch_struct
;
268 struct gdbarch startup_gdbarch
=
270 /* basic architecture information */
271 &bfd_default_arch_struct
,
273 /* target specific vector and its dump routine */
275 /*per-architecture data-pointers and swap regions */
277 /* Multi-arch values */
281 8 * sizeof (LONGEST
),
284 8 * sizeof (long double),
315 generic_register_raw_size
,
317 generic_register_virtual_size
,
344 generic_get_saved_register
,
398 generic_in_function_epilogue_p
,
399 construct_inferior_arguments
,
401 /* startup_gdbarch() */
404 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
406 /* Do any initialization needed for a non-multiarch configuration
407 after the _initialize_MODULE functions have been run. */
409 initialize_non_multiarch ()
411 alloc_gdbarch_data (&startup_gdbarch
);
412 init_gdbarch_data (&startup_gdbarch
);
416 /* Create a new ``struct gdbarch'' based on information provided by
417 ``struct gdbarch_info''. */
420 gdbarch_alloc (const struct gdbarch_info
*info
,
421 struct gdbarch_tdep
*tdep
)
423 /* NOTE: The new architecture variable is named ``current_gdbarch''
424 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
425 the current local architecture and not the previous global
426 architecture. This ensures that the new architectures initial
427 values are not influenced by the previous architecture. Once
428 everything is parameterised with gdbarch, this will go away. */
429 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
430 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
432 alloc_gdbarch_data (current_gdbarch
);
434 current_gdbarch
->tdep
= tdep
;
436 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
437 current_gdbarch
->byte_order
= info
->byte_order
;
439 /* Force the explicit initialization of these. */
440 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
441 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
442 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
443 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
444 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
445 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
446 current_gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
447 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
448 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
449 current_gdbarch
->char_signed
= -1;
450 current_gdbarch
->read_pc
= generic_target_read_pc
;
451 current_gdbarch
->write_pc
= generic_target_write_pc
;
452 current_gdbarch
->read_fp
= generic_target_read_fp
;
453 current_gdbarch
->write_fp
= generic_target_write_fp
;
454 current_gdbarch
->read_sp
= generic_target_read_sp
;
455 current_gdbarch
->write_sp
= generic_target_write_sp
;
456 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
457 current_gdbarch
->num_regs
= -1;
458 current_gdbarch
->sp_regnum
= -1;
459 current_gdbarch
->fp_regnum
= -1;
460 current_gdbarch
->pc_regnum
= -1;
461 current_gdbarch
->fp0_regnum
= -1;
462 current_gdbarch
->npc_regnum
= -1;
463 current_gdbarch
->nnpc_regnum
= -1;
464 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
465 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
466 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
467 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
468 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
469 current_gdbarch
->register_name
= legacy_register_name
;
470 current_gdbarch
->register_size
= -1;
471 current_gdbarch
->register_bytes
= -1;
472 current_gdbarch
->max_register_raw_size
= -1;
473 current_gdbarch
->max_register_virtual_size
= -1;
474 current_gdbarch
->do_registers_info
= do_registers_info
;
475 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
476 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
477 current_gdbarch
->cannot_store_register
= cannot_register_not
;
478 current_gdbarch
->use_generic_dummy_frames
= -1;
479 current_gdbarch
->call_dummy_start_offset
= -1;
480 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
481 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
482 current_gdbarch
->call_dummy_length
= -1;
483 current_gdbarch
->call_dummy_p
= -1;
484 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
485 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
486 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
487 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
488 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
489 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
490 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
491 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
492 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
493 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
494 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
495 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
496 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
497 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
498 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
499 current_gdbarch
->decr_pc_after_break
= -1;
500 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
501 current_gdbarch
->function_start_offset
= -1;
502 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
503 current_gdbarch
->frame_args_skip
= -1;
504 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
505 current_gdbarch
->extra_stack_alignment_needed
= 1;
506 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
507 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
508 current_gdbarch
->print_insn
= legacy_print_insn
;
509 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
510 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
511 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
512 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
513 /* gdbarch_alloc() */
515 return current_gdbarch
;
519 /* Free a gdbarch struct. This should never happen in normal
520 operation --- once you've created a gdbarch, you keep it around.
521 However, if an architecture's init function encounters an error
522 building the structure, it may need to clean up a partially
523 constructed gdbarch. */
526 gdbarch_free (struct gdbarch
*arch
)
528 gdb_assert (arch
!= NULL
);
529 free_gdbarch_data (arch
);
534 /* Ensure that all values in a GDBARCH are reasonable. */
537 verify_gdbarch (struct gdbarch
*gdbarch
)
540 struct cleanup
*cleanups
;
543 /* Only perform sanity checks on a multi-arch target. */
546 log
= mem_fileopen ();
547 cleanups
= make_cleanup_ui_file_delete (log
);
549 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
550 fprintf_unfiltered (log
, "\n\tbyte-order");
551 if (gdbarch
->bfd_arch_info
== NULL
)
552 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
553 /* Check those that need to be defined for the given multi-arch level. */
554 /* Skip verify of short_bit, invalid_p == 0 */
555 /* Skip verify of int_bit, invalid_p == 0 */
556 /* Skip verify of long_bit, invalid_p == 0 */
557 /* Skip verify of long_long_bit, invalid_p == 0 */
558 /* Skip verify of float_bit, invalid_p == 0 */
559 /* Skip verify of double_bit, invalid_p == 0 */
560 /* Skip verify of long_double_bit, invalid_p == 0 */
561 /* Skip verify of ptr_bit, invalid_p == 0 */
562 if (gdbarch
->addr_bit
== 0)
563 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
564 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
565 if (gdbarch
->char_signed
== -1)
566 gdbarch
->char_signed
= 1;
567 /* Skip verify of read_pc, invalid_p == 0 */
568 /* Skip verify of write_pc, invalid_p == 0 */
569 /* Skip verify of read_fp, invalid_p == 0 */
570 /* Skip verify of write_fp, invalid_p == 0 */
571 /* Skip verify of read_sp, invalid_p == 0 */
572 /* Skip verify of write_sp, invalid_p == 0 */
573 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
574 /* Skip verify of register_read, has predicate */
575 /* Skip verify of register_write, has predicate */
576 if ((GDB_MULTI_ARCH
>= 2)
577 && (gdbarch
->num_regs
== -1))
578 fprintf_unfiltered (log
, "\n\tnum_regs");
579 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
580 if ((GDB_MULTI_ARCH
>= 2)
581 && (gdbarch
->sp_regnum
== -1))
582 fprintf_unfiltered (log
, "\n\tsp_regnum");
583 if ((GDB_MULTI_ARCH
>= 2)
584 && (gdbarch
->fp_regnum
== -1))
585 fprintf_unfiltered (log
, "\n\tfp_regnum");
586 if ((GDB_MULTI_ARCH
>= 2)
587 && (gdbarch
->pc_regnum
== -1))
588 fprintf_unfiltered (log
, "\n\tpc_regnum");
589 /* Skip verify of fp0_regnum, invalid_p == 0 */
590 /* Skip verify of npc_regnum, invalid_p == 0 */
591 /* Skip verify of nnpc_regnum, invalid_p == 0 */
592 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
593 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
594 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
595 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
596 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
597 /* Skip verify of register_name, invalid_p == 0 */
598 if ((GDB_MULTI_ARCH
>= 2)
599 && (gdbarch
->register_size
== -1))
600 fprintf_unfiltered (log
, "\n\tregister_size");
601 if ((GDB_MULTI_ARCH
>= 2)
602 && (gdbarch
->register_bytes
== -1))
603 fprintf_unfiltered (log
, "\n\tregister_bytes");
604 if ((GDB_MULTI_ARCH
>= 2)
605 && (gdbarch
->register_byte
== 0))
606 fprintf_unfiltered (log
, "\n\tregister_byte");
607 if ((GDB_MULTI_ARCH
>= 2)
608 && (gdbarch
->register_raw_size
== 0))
609 fprintf_unfiltered (log
, "\n\tregister_raw_size");
610 if ((GDB_MULTI_ARCH
>= 2)
611 && (gdbarch
->max_register_raw_size
== -1))
612 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
613 if ((GDB_MULTI_ARCH
>= 2)
614 && (gdbarch
->register_virtual_size
== 0))
615 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
616 if ((GDB_MULTI_ARCH
>= 2)
617 && (gdbarch
->max_register_virtual_size
== -1))
618 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
619 if ((GDB_MULTI_ARCH
>= 2)
620 && (gdbarch
->register_virtual_type
== 0))
621 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
622 /* Skip verify of do_registers_info, invalid_p == 0 */
623 /* Skip verify of register_sim_regno, invalid_p == 0 */
624 /* Skip verify of register_bytes_ok, has predicate */
625 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
626 /* Skip verify of cannot_store_register, invalid_p == 0 */
627 if ((GDB_MULTI_ARCH
>= 1)
628 && (gdbarch
->use_generic_dummy_frames
== -1))
629 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
630 if ((GDB_MULTI_ARCH
>= 1)
631 && (gdbarch
->call_dummy_location
== 0))
632 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
633 if ((GDB_MULTI_ARCH
>= 2)
634 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
635 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
636 if ((GDB_MULTI_ARCH
>= 2)
637 && (gdbarch
->call_dummy_start_offset
== -1))
638 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
639 if ((GDB_MULTI_ARCH
>= 2)
640 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
641 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
642 if ((GDB_MULTI_ARCH
>= 1)
643 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
644 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
645 if ((GDB_MULTI_ARCH
>= 2)
646 && (gdbarch
->call_dummy_length
== -1))
647 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
648 if ((GDB_MULTI_ARCH
>= 1)
649 && (gdbarch
->pc_in_call_dummy
== 0))
650 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
651 if ((GDB_MULTI_ARCH
>= 1)
652 && (gdbarch
->call_dummy_p
== -1))
653 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
654 /* Skip verify of call_dummy_words, invalid_p == 0 */
655 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
656 if ((GDB_MULTI_ARCH
>= 1)
657 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
658 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
659 if ((GDB_MULTI_ARCH
>= 2)
660 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
661 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
662 if ((GDB_MULTI_ARCH
>= 2)
663 && (gdbarch
->fix_call_dummy
== 0))
664 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
665 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
666 /* Skip verify of init_frame_pc, invalid_p == 0 */
667 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
668 if ((GDB_MULTI_ARCH
>= 1)
669 && (gdbarch
->get_saved_register
== 0))
670 fprintf_unfiltered (log
, "\n\tget_saved_register");
671 /* Skip verify of register_convertible, invalid_p == 0 */
672 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
673 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
674 /* Skip verify of fetch_pseudo_register, has predicate */
675 /* Skip verify of store_pseudo_register, has predicate */
676 /* Skip verify of pointer_to_address, invalid_p == 0 */
677 /* Skip verify of address_to_pointer, invalid_p == 0 */
678 /* Skip verify of integer_to_address, has predicate */
679 /* Skip verify of return_value_on_stack, invalid_p == 0 */
680 if ((GDB_MULTI_ARCH
>= 2)
681 && (gdbarch
->extract_return_value
== 0))
682 fprintf_unfiltered (log
, "\n\textract_return_value");
683 if ((GDB_MULTI_ARCH
>= 1)
684 && (gdbarch
->push_arguments
== 0))
685 fprintf_unfiltered (log
, "\n\tpush_arguments");
686 if ((GDB_MULTI_ARCH
>= 2)
687 && (gdbarch
->push_dummy_frame
== 0))
688 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
689 /* Skip verify of push_return_address, has predicate */
690 if ((GDB_MULTI_ARCH
>= 2)
691 && (gdbarch
->pop_frame
== 0))
692 fprintf_unfiltered (log
, "\n\tpop_frame");
693 if ((GDB_MULTI_ARCH
>= 2)
694 && (gdbarch
->store_struct_return
== 0))
695 fprintf_unfiltered (log
, "\n\tstore_struct_return");
696 if ((GDB_MULTI_ARCH
>= 2)
697 && (gdbarch
->store_return_value
== 0))
698 fprintf_unfiltered (log
, "\n\tstore_return_value");
699 /* Skip verify of extract_struct_value_address, has predicate */
700 /* Skip verify of use_struct_convention, invalid_p == 0 */
701 if ((GDB_MULTI_ARCH
>= 2)
702 && (gdbarch
->frame_init_saved_regs
== 0))
703 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
704 /* Skip verify of init_extra_frame_info, has predicate */
705 if ((GDB_MULTI_ARCH
>= 2)
706 && (gdbarch
->skip_prologue
== 0))
707 fprintf_unfiltered (log
, "\n\tskip_prologue");
708 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
709 if ((GDB_MULTI_ARCH
>= 2)
710 && (gdbarch
->inner_than
== 0))
711 fprintf_unfiltered (log
, "\n\tinner_than");
712 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
713 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
714 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
715 if ((GDB_MULTI_ARCH
>= 2)
716 && (gdbarch
->decr_pc_after_break
== -1))
717 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
718 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
719 if ((GDB_MULTI_ARCH
>= 2)
720 && (gdbarch
->function_start_offset
== -1))
721 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
722 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
723 if ((GDB_MULTI_ARCH
>= 2)
724 && (gdbarch
->frame_args_skip
== -1))
725 fprintf_unfiltered (log
, "\n\tframe_args_skip");
726 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
727 if ((GDB_MULTI_ARCH
>= 2)
728 && (gdbarch
->frame_chain
== 0))
729 fprintf_unfiltered (log
, "\n\tframe_chain");
730 if ((GDB_MULTI_ARCH
>= 1)
731 && (gdbarch
->frame_chain_valid
== 0))
732 fprintf_unfiltered (log
, "\n\tframe_chain_valid");
733 if ((GDB_MULTI_ARCH
>= 2)
734 && (gdbarch
->frame_saved_pc
== 0))
735 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
736 if ((GDB_MULTI_ARCH
>= 2)
737 && (gdbarch
->frame_args_address
== 0))
738 fprintf_unfiltered (log
, "\n\tframe_args_address");
739 if ((GDB_MULTI_ARCH
>= 2)
740 && (gdbarch
->frame_locals_address
== 0))
741 fprintf_unfiltered (log
, "\n\tframe_locals_address");
742 if ((GDB_MULTI_ARCH
>= 2)
743 && (gdbarch
->saved_pc_after_call
== 0))
744 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
745 if ((GDB_MULTI_ARCH
>= 2)
746 && (gdbarch
->frame_num_args
== 0))
747 fprintf_unfiltered (log
, "\n\tframe_num_args");
748 /* Skip verify of stack_align, has predicate */
749 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
750 /* Skip verify of reg_struct_has_addr, has predicate */
751 /* Skip verify of save_dummy_frame_tos, has predicate */
752 if (gdbarch
->float_format
== 0)
753 gdbarch
->float_format
= default_float_format (gdbarch
);
754 if (gdbarch
->double_format
== 0)
755 gdbarch
->double_format
= default_double_format (gdbarch
);
756 if (gdbarch
->long_double_format
== 0)
757 gdbarch
->long_double_format
= &floatformat_unknown
;
758 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
759 /* Skip verify of addr_bits_remove, invalid_p == 0 */
760 /* Skip verify of software_single_step, has predicate */
761 /* Skip verify of print_insn, invalid_p == 0 */
762 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
763 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
764 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
765 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
766 /* Skip verify of dwarf2_build_frame_info, has predicate */
767 buf
= ui_file_xstrdup (log
, &dummy
);
768 make_cleanup (xfree
, buf
);
769 if (strlen (buf
) > 0)
770 internal_error (__FILE__
, __LINE__
,
771 "verify_gdbarch: the following are invalid ...%s",
773 do_cleanups (cleanups
);
777 /* Print out the details of the current architecture. */
779 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
780 just happens to match the global variable ``current_gdbarch''. That
781 way macros refering to that variable get the local and not the global
782 version - ulgh. Once everything is parameterised with gdbarch, this
786 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
788 fprintf_unfiltered (file
,
789 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
792 fprintf_unfiltered (file
,
793 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
794 (long) current_gdbarch
->in_function_epilogue_p
);
796 fprintf_unfiltered (file
,
797 "gdbarch_dump: register_read = 0x%08lx\n",
798 (long) current_gdbarch
->register_read
);
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: register_write = 0x%08lx\n",
802 (long) current_gdbarch
->register_write
);
803 #ifdef ADDRESS_TO_POINTER
805 /* Macro might contain `[{}]' when not multi-arch */
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: %s # %s\n",
808 "ADDRESS_TO_POINTER(type, buf, addr)",
809 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
814 (long) current_gdbarch
->address_to_pointer
815 /*ADDRESS_TO_POINTER ()*/);
817 #ifdef ADDR_BITS_REMOVE
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: %s # %s\n",
820 "ADDR_BITS_REMOVE(addr)",
821 XSTRING (ADDR_BITS_REMOVE (addr
)));
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
825 (long) current_gdbarch
->addr_bits_remove
826 /*ADDR_BITS_REMOVE ()*/);
828 #ifdef BELIEVE_PCC_PROMOTION
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
831 XSTRING (BELIEVE_PCC_PROMOTION
));
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
834 BELIEVE_PCC_PROMOTION
);
836 #ifdef BELIEVE_PCC_PROMOTION_TYPE
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
839 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
842 BELIEVE_PCC_PROMOTION_TYPE
);
844 #ifdef BREAKPOINT_FROM_PC
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: %s # %s\n",
847 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
848 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
852 (long) current_gdbarch
->breakpoint_from_pc
853 /*BREAKPOINT_FROM_PC ()*/);
855 #ifdef CALL_DUMMY_ADDRESS
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: %s # %s\n",
858 "CALL_DUMMY_ADDRESS()",
859 XSTRING (CALL_DUMMY_ADDRESS ()));
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
863 (long) current_gdbarch
->call_dummy_address
864 /*CALL_DUMMY_ADDRESS ()*/);
866 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
869 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
870 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
873 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
875 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
878 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
881 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
883 #ifdef CALL_DUMMY_LENGTH
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
886 XSTRING (CALL_DUMMY_LENGTH
));
887 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
888 fprintf_unfiltered (file
,
889 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
892 #ifdef CALL_DUMMY_LOCATION
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
895 XSTRING (CALL_DUMMY_LOCATION
));
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
898 CALL_DUMMY_LOCATION
);
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: CALL_DUMMY_P # %s\n",
903 XSTRING (CALL_DUMMY_P
));
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: CALL_DUMMY_P = %d\n",
908 #ifdef CALL_DUMMY_STACK_ADJUST
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
911 XSTRING (CALL_DUMMY_STACK_ADJUST
));
912 if (CALL_DUMMY_STACK_ADJUST_P
)
913 fprintf_unfiltered (file
,
914 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
915 (long) CALL_DUMMY_STACK_ADJUST
);
917 #ifdef CALL_DUMMY_STACK_ADJUST_P
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
920 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
921 fprintf_unfiltered (file
,
922 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
923 (long) CALL_DUMMY_STACK_ADJUST_P
);
925 #ifdef CALL_DUMMY_START_OFFSET
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
928 XSTRING (CALL_DUMMY_START_OFFSET
));
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
931 (long) CALL_DUMMY_START_OFFSET
);
933 #ifdef CALL_DUMMY_WORDS
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
936 XSTRING (CALL_DUMMY_WORDS
));
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
939 (long) CALL_DUMMY_WORDS
);
941 #ifdef CANNOT_FETCH_REGISTER
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: %s # %s\n",
944 "CANNOT_FETCH_REGISTER(regnum)",
945 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
949 (long) current_gdbarch
->cannot_fetch_register
950 /*CANNOT_FETCH_REGISTER ()*/);
952 #ifdef CANNOT_STORE_REGISTER
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: %s # %s\n",
955 "CANNOT_STORE_REGISTER(regnum)",
956 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
960 (long) current_gdbarch
->cannot_store_register
961 /*CANNOT_STORE_REGISTER ()*/);
963 #ifdef COERCE_FLOAT_TO_DOUBLE
964 fprintf_unfiltered (file
,
965 "gdbarch_dump: %s # %s\n",
966 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
967 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
971 (long) current_gdbarch
->coerce_float_to_double
972 /*COERCE_FLOAT_TO_DOUBLE ()*/);
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
977 (long) current_gdbarch
->construct_inferior_arguments
);
978 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: %s # %s\n",
981 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
982 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
986 (long) current_gdbarch
->convert_from_func_ptr_addr
987 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
989 #ifdef DECR_PC_AFTER_BREAK
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
992 XSTRING (DECR_PC_AFTER_BREAK
));
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
995 (long) DECR_PC_AFTER_BREAK
);
997 #ifdef DO_REGISTERS_INFO
999 /* Macro might contain `[{}]' when not multi-arch */
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: %s # %s\n",
1002 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1003 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1008 (long) current_gdbarch
->do_registers_info
1009 /*DO_REGISTERS_INFO ()*/);
1011 #ifdef DWARF2_BUILD_FRAME_INFO
1013 /* Macro might contain `[{}]' when not multi-arch */
1014 fprintf_unfiltered (file
,
1015 "gdbarch_dump: %s # %s\n",
1016 "DWARF2_BUILD_FRAME_INFO(objfile)",
1017 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1022 (long) current_gdbarch
->dwarf2_build_frame_info
1023 /*DWARF2_BUILD_FRAME_INFO ()*/);
1025 #ifdef DWARF2_REG_TO_REGNUM
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: %s # %s\n",
1028 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1029 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1033 (long) current_gdbarch
->dwarf2_reg_to_regnum
1034 /*DWARF2_REG_TO_REGNUM ()*/);
1036 #ifdef DWARF_REG_TO_REGNUM
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: %s # %s\n",
1039 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1040 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1044 (long) current_gdbarch
->dwarf_reg_to_regnum
1045 /*DWARF_REG_TO_REGNUM ()*/);
1047 #ifdef ECOFF_REG_TO_REGNUM
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: %s # %s\n",
1050 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1051 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1055 (long) current_gdbarch
->ecoff_reg_to_regnum
1056 /*ECOFF_REG_TO_REGNUM ()*/);
1058 #ifdef EXTRACT_RETURN_VALUE
1060 /* Macro might contain `[{}]' when not multi-arch */
1061 fprintf_unfiltered (file
,
1062 "gdbarch_dump: %s # %s\n",
1063 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1064 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1067 fprintf_unfiltered (file
,
1068 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1069 (long) current_gdbarch
->extract_return_value
1070 /*EXTRACT_RETURN_VALUE ()*/);
1072 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: %s # %s\n",
1075 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1076 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1078 fprintf_unfiltered (file
,
1079 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1080 (long) current_gdbarch
->extract_struct_value_address
1081 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1083 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1086 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1089 EXTRA_STACK_ALIGNMENT_NEEDED
);
1091 #ifdef FETCH_PSEUDO_REGISTER
1093 /* Macro might contain `[{}]' when not multi-arch */
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: %s # %s\n",
1096 "FETCH_PSEUDO_REGISTER(regnum)",
1097 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1102 (long) current_gdbarch
->fetch_pseudo_register
1103 /*FETCH_PSEUDO_REGISTER ()*/);
1105 #ifdef FIX_CALL_DUMMY
1107 /* Macro might contain `[{}]' when not multi-arch */
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: %s # %s\n",
1110 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1111 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1114 fprintf_unfiltered (file
,
1115 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1116 (long) current_gdbarch
->fix_call_dummy
1117 /*FIX_CALL_DUMMY ()*/);
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: FP0_REGNUM # %s\n",
1122 XSTRING (FP0_REGNUM
));
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: FP0_REGNUM = %d\n",
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: FP_REGNUM # %s\n",
1130 XSTRING (FP_REGNUM
));
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: FP_REGNUM = %d\n",
1135 #ifdef FRAMELESS_FUNCTION_INVOCATION
1136 fprintf_unfiltered (file
,
1137 "gdbarch_dump: %s # %s\n",
1138 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1139 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1143 (long) current_gdbarch
->frameless_function_invocation
1144 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1146 #ifdef FRAME_ARGS_ADDRESS
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: %s # %s\n",
1149 "FRAME_ARGS_ADDRESS(fi)",
1150 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1154 (long) current_gdbarch
->frame_args_address
1155 /*FRAME_ARGS_ADDRESS ()*/);
1157 #ifdef FRAME_ARGS_SKIP
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1160 XSTRING (FRAME_ARGS_SKIP
));
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1163 (long) FRAME_ARGS_SKIP
);
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: %s # %s\n",
1168 "FRAME_CHAIN(frame)",
1169 XSTRING (FRAME_CHAIN (frame
)));
1171 fprintf_unfiltered (file
,
1172 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1173 (long) current_gdbarch
->frame_chain
1174 /*FRAME_CHAIN ()*/);
1176 #ifdef FRAME_CHAIN_VALID
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: %s # %s\n",
1179 "FRAME_CHAIN_VALID(chain, thisframe)",
1180 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1184 (long) current_gdbarch
->frame_chain_valid
1185 /*FRAME_CHAIN_VALID ()*/);
1187 #ifdef FRAME_INIT_SAVED_REGS
1189 /* Macro might contain `[{}]' when not multi-arch */
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: %s # %s\n",
1192 "FRAME_INIT_SAVED_REGS(frame)",
1193 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1196 fprintf_unfiltered (file
,
1197 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1198 (long) current_gdbarch
->frame_init_saved_regs
1199 /*FRAME_INIT_SAVED_REGS ()*/);
1201 #ifdef FRAME_LOCALS_ADDRESS
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: %s # %s\n",
1204 "FRAME_LOCALS_ADDRESS(fi)",
1205 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1209 (long) current_gdbarch
->frame_locals_address
1210 /*FRAME_LOCALS_ADDRESS ()*/);
1212 #ifdef FRAME_NUM_ARGS
1213 fprintf_unfiltered (file
,
1214 "gdbarch_dump: %s # %s\n",
1215 "FRAME_NUM_ARGS(frame)",
1216 XSTRING (FRAME_NUM_ARGS (frame
)));
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1220 (long) current_gdbarch
->frame_num_args
1221 /*FRAME_NUM_ARGS ()*/);
1223 #ifdef FRAME_SAVED_PC
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: %s # %s\n",
1226 "FRAME_SAVED_PC(fi)",
1227 XSTRING (FRAME_SAVED_PC (fi
)));
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1231 (long) current_gdbarch
->frame_saved_pc
1232 /*FRAME_SAVED_PC ()*/);
1234 #ifdef FUNCTION_START_OFFSET
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1237 XSTRING (FUNCTION_START_OFFSET
));
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1240 (long) FUNCTION_START_OFFSET
);
1242 #ifdef GET_SAVED_REGISTER
1244 /* Macro might contain `[{}]' when not multi-arch */
1245 fprintf_unfiltered (file
,
1246 "gdbarch_dump: %s # %s\n",
1247 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1248 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1253 (long) current_gdbarch
->get_saved_register
1254 /*GET_SAVED_REGISTER ()*/);
1256 #ifdef INIT_EXTRA_FRAME_INFO
1258 /* Macro might contain `[{}]' when not multi-arch */
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: %s # %s\n",
1261 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1262 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1267 (long) current_gdbarch
->init_extra_frame_info
1268 /*INIT_EXTRA_FRAME_INFO ()*/);
1270 #ifdef INIT_FRAME_PC
1272 /* Macro might contain `[{}]' when not multi-arch */
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: %s # %s\n",
1275 "INIT_FRAME_PC(fromleaf, prev)",
1276 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1281 (long) current_gdbarch
->init_frame_pc
1282 /*INIT_FRAME_PC ()*/);
1284 #ifdef INIT_FRAME_PC_FIRST
1286 /* Macro might contain `[{}]' when not multi-arch */
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: %s # %s\n",
1289 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1290 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1295 (long) current_gdbarch
->init_frame_pc_first
1296 /*INIT_FRAME_PC_FIRST ()*/);
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: %s # %s\n",
1301 "INNER_THAN(lhs, rhs)",
1302 XSTRING (INNER_THAN (lhs
, rhs
)));
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1306 (long) current_gdbarch
->inner_than
1309 #ifdef INTEGER_TO_ADDRESS
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: %s # %s\n",
1312 "INTEGER_TO_ADDRESS(type, buf)",
1313 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1317 (long) current_gdbarch
->integer_to_address
1318 /*INTEGER_TO_ADDRESS ()*/);
1320 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: %s # %s\n",
1323 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1324 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1328 (long) current_gdbarch
->in_solib_call_trampoline
1329 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1331 #ifdef MAX_REGISTER_RAW_SIZE
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1334 XSTRING (MAX_REGISTER_RAW_SIZE
));
1335 fprintf_unfiltered (file
,
1336 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1337 MAX_REGISTER_RAW_SIZE
);
1339 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1342 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1345 MAX_REGISTER_VIRTUAL_SIZE
);
1347 #ifdef MEMORY_INSERT_BREAKPOINT
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: %s # %s\n",
1350 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1351 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1353 fprintf_unfiltered (file
,
1354 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1355 (long) current_gdbarch
->memory_insert_breakpoint
1356 /*MEMORY_INSERT_BREAKPOINT ()*/);
1358 #ifdef MEMORY_REMOVE_BREAKPOINT
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: %s # %s\n",
1361 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1362 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1366 (long) current_gdbarch
->memory_remove_breakpoint
1367 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: NNPC_REGNUM # %s\n",
1372 XSTRING (NNPC_REGNUM
));
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: NNPC_REGNUM = %d\n",
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: NPC_REGNUM # %s\n",
1380 XSTRING (NPC_REGNUM
));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: NPC_REGNUM = %d\n",
1385 #ifdef NUM_PSEUDO_REGS
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1388 XSTRING (NUM_PSEUDO_REGS
));
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: NUM_REGS # %s\n",
1396 XSTRING (NUM_REGS
));
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: NUM_REGS = %d\n",
1401 #ifdef PARM_BOUNDARY
1402 fprintf_unfiltered (file
,
1403 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1404 XSTRING (PARM_BOUNDARY
));
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1409 #ifdef PC_IN_CALL_DUMMY
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: %s # %s\n",
1412 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1413 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1415 fprintf_unfiltered (file
,
1416 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1417 (long) current_gdbarch
->pc_in_call_dummy
1418 /*PC_IN_CALL_DUMMY ()*/);
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: PC_REGNUM # %s\n",
1423 XSTRING (PC_REGNUM
));
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: PC_REGNUM = %d\n",
1428 #ifdef POINTER_TO_ADDRESS
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: %s # %s\n",
1431 "POINTER_TO_ADDRESS(type, buf)",
1432 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1434 fprintf_unfiltered (file
,
1435 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1436 (long) current_gdbarch
->pointer_to_address
1437 /*POINTER_TO_ADDRESS ()*/);
1441 /* Macro might contain `[{}]' when not multi-arch */
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: %s # %s\n",
1445 XSTRING (POP_FRAME (-)));
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1450 (long) current_gdbarch
->pop_frame
1453 #ifdef PREPARE_TO_PROCEED
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: %s # %s\n",
1456 "PREPARE_TO_PROCEED(select_it)",
1457 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1461 (long) current_gdbarch
->prepare_to_proceed
1462 /*PREPARE_TO_PROCEED ()*/);
1464 #ifdef PROLOGUE_FRAMELESS_P
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: %s # %s\n",
1467 "PROLOGUE_FRAMELESS_P(ip)",
1468 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1472 (long) current_gdbarch
->prologue_frameless_p
1473 /*PROLOGUE_FRAMELESS_P ()*/);
1475 #ifdef PUSH_ARGUMENTS
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: %s # %s\n",
1478 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1479 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1483 (long) current_gdbarch
->push_arguments
1484 /*PUSH_ARGUMENTS ()*/);
1486 #ifdef PUSH_DUMMY_FRAME
1488 /* Macro might contain `[{}]' when not multi-arch */
1489 fprintf_unfiltered (file
,
1490 "gdbarch_dump: %s # %s\n",
1491 "PUSH_DUMMY_FRAME(-)",
1492 XSTRING (PUSH_DUMMY_FRAME (-)));
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1497 (long) current_gdbarch
->push_dummy_frame
1498 /*PUSH_DUMMY_FRAME ()*/);
1500 #ifdef PUSH_RETURN_ADDRESS
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: %s # %s\n",
1503 "PUSH_RETURN_ADDRESS(pc, sp)",
1504 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1508 (long) current_gdbarch
->push_return_address
1509 /*PUSH_RETURN_ADDRESS ()*/);
1511 #ifdef REGISTER_BYTE
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: %s # %s\n",
1514 "REGISTER_BYTE(reg_nr)",
1515 XSTRING (REGISTER_BYTE (reg_nr
)));
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1519 (long) current_gdbarch
->register_byte
1520 /*REGISTER_BYTE ()*/);
1522 #ifdef REGISTER_BYTES
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: REGISTER_BYTES # %s\n",
1525 XSTRING (REGISTER_BYTES
));
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: REGISTER_BYTES = %d\n",
1530 #ifdef REGISTER_BYTES_OK
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: %s # %s\n",
1533 "REGISTER_BYTES_OK(nr_bytes)",
1534 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1538 (long) current_gdbarch
->register_bytes_ok
1539 /*REGISTER_BYTES_OK ()*/);
1541 #ifdef REGISTER_CONVERTIBLE
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: %s # %s\n",
1544 "REGISTER_CONVERTIBLE(nr)",
1545 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1547 fprintf_unfiltered (file
,
1548 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1549 (long) current_gdbarch
->register_convertible
1550 /*REGISTER_CONVERTIBLE ()*/);
1552 #ifdef REGISTER_CONVERT_TO_RAW
1554 /* Macro might contain `[{}]' when not multi-arch */
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: %s # %s\n",
1557 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1558 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1563 (long) current_gdbarch
->register_convert_to_raw
1564 /*REGISTER_CONVERT_TO_RAW ()*/);
1566 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1568 /* Macro might contain `[{}]' when not multi-arch */
1569 fprintf_unfiltered (file
,
1570 "gdbarch_dump: %s # %s\n",
1571 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1572 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1575 fprintf_unfiltered (file
,
1576 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1577 (long) current_gdbarch
->register_convert_to_virtual
1578 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1580 #ifdef REGISTER_NAME
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: %s # %s\n",
1583 "REGISTER_NAME(regnr)",
1584 XSTRING (REGISTER_NAME (regnr
)));
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1588 (long) current_gdbarch
->register_name
1589 /*REGISTER_NAME ()*/);
1591 #ifdef REGISTER_RAW_SIZE
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: %s # %s\n",
1594 "REGISTER_RAW_SIZE(reg_nr)",
1595 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1599 (long) current_gdbarch
->register_raw_size
1600 /*REGISTER_RAW_SIZE ()*/);
1602 #ifdef REGISTER_SIM_REGNO
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: %s # %s\n",
1605 "REGISTER_SIM_REGNO(reg_nr)",
1606 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1610 (long) current_gdbarch
->register_sim_regno
1611 /*REGISTER_SIM_REGNO ()*/);
1613 #ifdef REGISTER_SIZE
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: REGISTER_SIZE # %s\n",
1616 XSTRING (REGISTER_SIZE
));
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: REGISTER_SIZE = %d\n",
1621 #ifdef REGISTER_VIRTUAL_SIZE
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: %s # %s\n",
1624 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1625 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1627 fprintf_unfiltered (file
,
1628 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1629 (long) current_gdbarch
->register_virtual_size
1630 /*REGISTER_VIRTUAL_SIZE ()*/);
1632 #ifdef REGISTER_VIRTUAL_TYPE
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: %s # %s\n",
1635 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1636 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1640 (long) current_gdbarch
->register_virtual_type
1641 /*REGISTER_VIRTUAL_TYPE ()*/);
1643 #ifdef REG_STRUCT_HAS_ADDR
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: %s # %s\n",
1646 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1647 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1651 (long) current_gdbarch
->reg_struct_has_addr
1652 /*REG_STRUCT_HAS_ADDR ()*/);
1654 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1656 /* Macro might contain `[{}]' when not multi-arch */
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: %s # %s\n",
1659 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1660 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1665 (long) current_gdbarch
->remote_translate_xfer_address
1666 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1668 #ifdef RETURN_VALUE_ON_STACK
1669 fprintf_unfiltered (file
,
1670 "gdbarch_dump: %s # %s\n",
1671 "RETURN_VALUE_ON_STACK(type)",
1672 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1676 (long) current_gdbarch
->return_value_on_stack
1677 /*RETURN_VALUE_ON_STACK ()*/);
1679 #ifdef SAVED_PC_AFTER_CALL
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: %s # %s\n",
1682 "SAVED_PC_AFTER_CALL(frame)",
1683 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1685 fprintf_unfiltered (file
,
1686 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1687 (long) current_gdbarch
->saved_pc_after_call
1688 /*SAVED_PC_AFTER_CALL ()*/);
1690 #ifdef SAVE_DUMMY_FRAME_TOS
1692 /* Macro might contain `[{}]' when not multi-arch */
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: %s # %s\n",
1695 "SAVE_DUMMY_FRAME_TOS(sp)",
1696 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1701 (long) current_gdbarch
->save_dummy_frame_tos
1702 /*SAVE_DUMMY_FRAME_TOS ()*/);
1704 #ifdef SDB_REG_TO_REGNUM
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: %s # %s\n",
1707 "SDB_REG_TO_REGNUM(sdb_regnr)",
1708 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1712 (long) current_gdbarch
->sdb_reg_to_regnum
1713 /*SDB_REG_TO_REGNUM ()*/);
1715 #ifdef SIZEOF_CALL_DUMMY_WORDS
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1718 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1721 (long) SIZEOF_CALL_DUMMY_WORDS
);
1723 #ifdef SKIP_PROLOGUE
1724 fprintf_unfiltered (file
,
1725 "gdbarch_dump: %s # %s\n",
1726 "SKIP_PROLOGUE(ip)",
1727 XSTRING (SKIP_PROLOGUE (ip
)));
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1731 (long) current_gdbarch
->skip_prologue
1732 /*SKIP_PROLOGUE ()*/);
1734 #ifdef SKIP_TRAMPOLINE_CODE
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: %s # %s\n",
1737 "SKIP_TRAMPOLINE_CODE(pc)",
1738 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1742 (long) current_gdbarch
->skip_trampoline_code
1743 /*SKIP_TRAMPOLINE_CODE ()*/);
1745 #ifdef SOFTWARE_SINGLE_STEP
1747 /* Macro might contain `[{}]' when not multi-arch */
1748 fprintf_unfiltered (file
,
1749 "gdbarch_dump: %s # %s\n",
1750 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1751 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1756 (long) current_gdbarch
->software_single_step
1757 /*SOFTWARE_SINGLE_STEP ()*/);
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: SP_REGNUM # %s\n",
1762 XSTRING (SP_REGNUM
));
1763 fprintf_unfiltered (file
,
1764 "gdbarch_dump: SP_REGNUM = %d\n",
1767 #ifdef STAB_REG_TO_REGNUM
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: %s # %s\n",
1770 "STAB_REG_TO_REGNUM(stab_regnr)",
1771 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1775 (long) current_gdbarch
->stab_reg_to_regnum
1776 /*STAB_REG_TO_REGNUM ()*/);
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: %s # %s\n",
1782 XSTRING (STACK_ALIGN (sp
)));
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1786 (long) current_gdbarch
->stack_align
1787 /*STACK_ALIGN ()*/);
1789 #ifdef STORE_PSEUDO_REGISTER
1791 /* Macro might contain `[{}]' when not multi-arch */
1792 fprintf_unfiltered (file
,
1793 "gdbarch_dump: %s # %s\n",
1794 "STORE_PSEUDO_REGISTER(regnum)",
1795 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1800 (long) current_gdbarch
->store_pseudo_register
1801 /*STORE_PSEUDO_REGISTER ()*/);
1803 #ifdef STORE_RETURN_VALUE
1805 /* Macro might contain `[{}]' when not multi-arch */
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: %s # %s\n",
1808 "STORE_RETURN_VALUE(type, valbuf)",
1809 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1812 fprintf_unfiltered (file
,
1813 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1814 (long) current_gdbarch
->store_return_value
1815 /*STORE_RETURN_VALUE ()*/);
1817 #ifdef STORE_STRUCT_RETURN
1819 /* Macro might contain `[{}]' when not multi-arch */
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: %s # %s\n",
1822 "STORE_STRUCT_RETURN(addr, sp)",
1823 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1828 (long) current_gdbarch
->store_struct_return
1829 /*STORE_STRUCT_RETURN ()*/);
1831 #ifdef TARGET_ADDR_BIT
1832 fprintf_unfiltered (file
,
1833 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1834 XSTRING (TARGET_ADDR_BIT
));
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1839 #ifdef TARGET_ARCHITECTURE
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1842 XSTRING (TARGET_ARCHITECTURE
));
1843 if (TARGET_ARCHITECTURE
!= NULL
)
1844 fprintf_unfiltered (file
,
1845 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1846 TARGET_ARCHITECTURE
->printable_name
);
1848 #ifdef TARGET_BFD_VMA_BIT
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1851 XSTRING (TARGET_BFD_VMA_BIT
));
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1854 TARGET_BFD_VMA_BIT
);
1856 #ifdef TARGET_BYTE_ORDER
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1859 XSTRING (TARGET_BYTE_ORDER
));
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1862 (long) TARGET_BYTE_ORDER
);
1864 #ifdef TARGET_CHAR_SIGNED
1865 fprintf_unfiltered (file
,
1866 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1867 XSTRING (TARGET_CHAR_SIGNED
));
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1870 TARGET_CHAR_SIGNED
);
1872 #ifdef TARGET_DOUBLE_BIT
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1875 XSTRING (TARGET_DOUBLE_BIT
));
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1880 #ifdef TARGET_DOUBLE_FORMAT
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1883 XSTRING (TARGET_DOUBLE_FORMAT
));
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1886 (long) TARGET_DOUBLE_FORMAT
);
1888 #ifdef TARGET_FLOAT_BIT
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1891 XSTRING (TARGET_FLOAT_BIT
));
1892 fprintf_unfiltered (file
,
1893 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1896 #ifdef TARGET_FLOAT_FORMAT
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1899 XSTRING (TARGET_FLOAT_FORMAT
));
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1902 (long) TARGET_FLOAT_FORMAT
);
1904 #ifdef TARGET_INT_BIT
1905 fprintf_unfiltered (file
,
1906 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1907 XSTRING (TARGET_INT_BIT
));
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1912 #ifdef TARGET_LONG_BIT
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1915 XSTRING (TARGET_LONG_BIT
));
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
1920 #ifdef TARGET_LONG_DOUBLE_BIT
1921 fprintf_unfiltered (file
,
1922 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1923 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1924 fprintf_unfiltered (file
,
1925 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
1926 TARGET_LONG_DOUBLE_BIT
);
1928 #ifdef TARGET_LONG_DOUBLE_FORMAT
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1931 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1934 (long) TARGET_LONG_DOUBLE_FORMAT
);
1936 #ifdef TARGET_LONG_LONG_BIT
1937 fprintf_unfiltered (file
,
1938 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1939 XSTRING (TARGET_LONG_LONG_BIT
));
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
1942 TARGET_LONG_LONG_BIT
);
1944 #ifdef TARGET_PRINT_INSN
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: %s # %s\n",
1947 "TARGET_PRINT_INSN(vma, info)",
1948 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1952 (long) current_gdbarch
->print_insn
1953 /*TARGET_PRINT_INSN ()*/);
1955 #ifdef TARGET_PTR_BIT
1956 fprintf_unfiltered (file
,
1957 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1958 XSTRING (TARGET_PTR_BIT
));
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
1963 #ifdef TARGET_READ_FP
1964 fprintf_unfiltered (file
,
1965 "gdbarch_dump: %s # %s\n",
1967 XSTRING (TARGET_READ_FP ()));
1969 fprintf_unfiltered (file
,
1970 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1971 (long) current_gdbarch
->read_fp
1972 /*TARGET_READ_FP ()*/);
1974 #ifdef TARGET_READ_PC
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: %s # %s\n",
1977 "TARGET_READ_PC(ptid)",
1978 XSTRING (TARGET_READ_PC (ptid
)));
1980 fprintf_unfiltered (file
,
1981 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1982 (long) current_gdbarch
->read_pc
1983 /*TARGET_READ_PC ()*/);
1985 #ifdef TARGET_READ_SP
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: %s # %s\n",
1989 XSTRING (TARGET_READ_SP ()));
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1993 (long) current_gdbarch
->read_sp
1994 /*TARGET_READ_SP ()*/);
1996 #ifdef TARGET_SHORT_BIT
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1999 XSTRING (TARGET_SHORT_BIT
));
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2004 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2006 /* Macro might contain `[{}]' when not multi-arch */
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: %s # %s\n",
2009 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2010 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2015 (long) current_gdbarch
->virtual_frame_pointer
2016 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2018 #ifdef TARGET_WRITE_FP
2020 /* Macro might contain `[{}]' when not multi-arch */
2021 fprintf_unfiltered (file
,
2022 "gdbarch_dump: %s # %s\n",
2023 "TARGET_WRITE_FP(val)",
2024 XSTRING (TARGET_WRITE_FP (val
)));
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2029 (long) current_gdbarch
->write_fp
2030 /*TARGET_WRITE_FP ()*/);
2032 #ifdef TARGET_WRITE_PC
2034 /* Macro might contain `[{}]' when not multi-arch */
2035 fprintf_unfiltered (file
,
2036 "gdbarch_dump: %s # %s\n",
2037 "TARGET_WRITE_PC(val, ptid)",
2038 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2041 fprintf_unfiltered (file
,
2042 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2043 (long) current_gdbarch
->write_pc
2044 /*TARGET_WRITE_PC ()*/);
2046 #ifdef TARGET_WRITE_SP
2048 /* Macro might contain `[{}]' when not multi-arch */
2049 fprintf_unfiltered (file
,
2050 "gdbarch_dump: %s # %s\n",
2051 "TARGET_WRITE_SP(val)",
2052 XSTRING (TARGET_WRITE_SP (val
)));
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2057 (long) current_gdbarch
->write_sp
2058 /*TARGET_WRITE_SP ()*/);
2060 #ifdef USE_GENERIC_DUMMY_FRAMES
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2063 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2064 fprintf_unfiltered (file
,
2065 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2066 USE_GENERIC_DUMMY_FRAMES
);
2068 #ifdef USE_STRUCT_CONVENTION
2069 fprintf_unfiltered (file
,
2070 "gdbarch_dump: %s # %s\n",
2071 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2072 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2074 fprintf_unfiltered (file
,
2075 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2076 (long) current_gdbarch
->use_struct_convention
2077 /*USE_STRUCT_CONVENTION ()*/);
2079 if (current_gdbarch
->dump_tdep
!= NULL
)
2080 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2083 struct gdbarch_tdep
*
2084 gdbarch_tdep (struct gdbarch
*gdbarch
)
2086 if (gdbarch_debug
>= 2)
2087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2088 return gdbarch
->tdep
;
2092 const struct bfd_arch_info
*
2093 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2095 if (gdbarch_debug
>= 2)
2096 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2097 return gdbarch
->bfd_arch_info
;
2101 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2103 if (gdbarch_debug
>= 2)
2104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2105 return gdbarch
->byte_order
;
2109 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2111 /* Skip verify of short_bit, invalid_p == 0 */
2112 if (gdbarch_debug
>= 2)
2113 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2114 return gdbarch
->short_bit
;
2118 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2121 gdbarch
->short_bit
= short_bit
;
2125 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2127 /* Skip verify of int_bit, invalid_p == 0 */
2128 if (gdbarch_debug
>= 2)
2129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2130 return gdbarch
->int_bit
;
2134 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2137 gdbarch
->int_bit
= int_bit
;
2141 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2143 /* Skip verify of long_bit, invalid_p == 0 */
2144 if (gdbarch_debug
>= 2)
2145 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2146 return gdbarch
->long_bit
;
2150 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2153 gdbarch
->long_bit
= long_bit
;
2157 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2159 /* Skip verify of long_long_bit, invalid_p == 0 */
2160 if (gdbarch_debug
>= 2)
2161 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2162 return gdbarch
->long_long_bit
;
2166 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2169 gdbarch
->long_long_bit
= long_long_bit
;
2173 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2175 /* Skip verify of float_bit, invalid_p == 0 */
2176 if (gdbarch_debug
>= 2)
2177 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2178 return gdbarch
->float_bit
;
2182 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2185 gdbarch
->float_bit
= float_bit
;
2189 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2191 /* Skip verify of double_bit, invalid_p == 0 */
2192 if (gdbarch_debug
>= 2)
2193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2194 return gdbarch
->double_bit
;
2198 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2201 gdbarch
->double_bit
= double_bit
;
2205 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2207 /* Skip verify of long_double_bit, invalid_p == 0 */
2208 if (gdbarch_debug
>= 2)
2209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2210 return gdbarch
->long_double_bit
;
2214 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2215 int long_double_bit
)
2217 gdbarch
->long_double_bit
= long_double_bit
;
2221 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2223 /* Skip verify of ptr_bit, invalid_p == 0 */
2224 if (gdbarch_debug
>= 2)
2225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2226 return gdbarch
->ptr_bit
;
2230 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2233 gdbarch
->ptr_bit
= ptr_bit
;
2237 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2239 if (gdbarch
->addr_bit
== 0)
2240 internal_error (__FILE__
, __LINE__
,
2241 "gdbarch: gdbarch_addr_bit invalid");
2242 if (gdbarch_debug
>= 2)
2243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2244 return gdbarch
->addr_bit
;
2248 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2251 gdbarch
->addr_bit
= addr_bit
;
2255 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2257 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2258 if (gdbarch_debug
>= 2)
2259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2260 return gdbarch
->bfd_vma_bit
;
2264 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2267 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2271 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2273 if (gdbarch
->char_signed
== -1)
2274 internal_error (__FILE__
, __LINE__
,
2275 "gdbarch: gdbarch_char_signed invalid");
2276 if (gdbarch_debug
>= 2)
2277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2278 return gdbarch
->char_signed
;
2282 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2285 gdbarch
->char_signed
= char_signed
;
2289 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2291 if (gdbarch
->read_pc
== 0)
2292 internal_error (__FILE__
, __LINE__
,
2293 "gdbarch: gdbarch_read_pc invalid");
2294 if (gdbarch_debug
>= 2)
2295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2296 return gdbarch
->read_pc (ptid
);
2300 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2301 gdbarch_read_pc_ftype read_pc
)
2303 gdbarch
->read_pc
= read_pc
;
2307 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2309 if (gdbarch
->write_pc
== 0)
2310 internal_error (__FILE__
, __LINE__
,
2311 "gdbarch: gdbarch_write_pc invalid");
2312 if (gdbarch_debug
>= 2)
2313 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2314 gdbarch
->write_pc (val
, ptid
);
2318 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2319 gdbarch_write_pc_ftype write_pc
)
2321 gdbarch
->write_pc
= write_pc
;
2325 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2327 if (gdbarch
->read_fp
== 0)
2328 internal_error (__FILE__
, __LINE__
,
2329 "gdbarch: gdbarch_read_fp invalid");
2330 if (gdbarch_debug
>= 2)
2331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2332 return gdbarch
->read_fp ();
2336 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2337 gdbarch_read_fp_ftype read_fp
)
2339 gdbarch
->read_fp
= read_fp
;
2343 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2345 if (gdbarch
->write_fp
== 0)
2346 internal_error (__FILE__
, __LINE__
,
2347 "gdbarch: gdbarch_write_fp invalid");
2348 if (gdbarch_debug
>= 2)
2349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2350 gdbarch
->write_fp (val
);
2354 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2355 gdbarch_write_fp_ftype write_fp
)
2357 gdbarch
->write_fp
= write_fp
;
2361 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2363 if (gdbarch
->read_sp
== 0)
2364 internal_error (__FILE__
, __LINE__
,
2365 "gdbarch: gdbarch_read_sp invalid");
2366 if (gdbarch_debug
>= 2)
2367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2368 return gdbarch
->read_sp ();
2372 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2373 gdbarch_read_sp_ftype read_sp
)
2375 gdbarch
->read_sp
= read_sp
;
2379 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2381 if (gdbarch
->write_sp
== 0)
2382 internal_error (__FILE__
, __LINE__
,
2383 "gdbarch: gdbarch_write_sp invalid");
2384 if (gdbarch_debug
>= 2)
2385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2386 gdbarch
->write_sp (val
);
2390 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2391 gdbarch_write_sp_ftype write_sp
)
2393 gdbarch
->write_sp
= write_sp
;
2397 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2399 if (gdbarch
->virtual_frame_pointer
== 0)
2400 internal_error (__FILE__
, __LINE__
,
2401 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2402 if (gdbarch_debug
>= 2)
2403 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2404 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2408 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2409 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2411 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2415 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2417 return gdbarch
->register_read
!= 0;
2421 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2423 if (gdbarch
->register_read
== 0)
2424 internal_error (__FILE__
, __LINE__
,
2425 "gdbarch: gdbarch_register_read invalid");
2426 if (gdbarch_debug
>= 2)
2427 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2428 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2432 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2433 gdbarch_register_read_ftype register_read
)
2435 gdbarch
->register_read
= register_read
;
2439 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2441 return gdbarch
->register_write
!= 0;
2445 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2447 if (gdbarch
->register_write
== 0)
2448 internal_error (__FILE__
, __LINE__
,
2449 "gdbarch: gdbarch_register_write invalid");
2450 if (gdbarch_debug
>= 2)
2451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2452 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2456 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2457 gdbarch_register_write_ftype register_write
)
2459 gdbarch
->register_write
= register_write
;
2463 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2465 if (gdbarch
->num_regs
== -1)
2466 internal_error (__FILE__
, __LINE__
,
2467 "gdbarch: gdbarch_num_regs invalid");
2468 if (gdbarch_debug
>= 2)
2469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2470 return gdbarch
->num_regs
;
2474 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2477 gdbarch
->num_regs
= num_regs
;
2481 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2483 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2484 if (gdbarch_debug
>= 2)
2485 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2486 return gdbarch
->num_pseudo_regs
;
2490 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2491 int num_pseudo_regs
)
2493 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2497 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2499 if (gdbarch
->sp_regnum
== -1)
2500 internal_error (__FILE__
, __LINE__
,
2501 "gdbarch: gdbarch_sp_regnum invalid");
2502 if (gdbarch_debug
>= 2)
2503 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2504 return gdbarch
->sp_regnum
;
2508 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2511 gdbarch
->sp_regnum
= sp_regnum
;
2515 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2517 if (gdbarch
->fp_regnum
== -1)
2518 internal_error (__FILE__
, __LINE__
,
2519 "gdbarch: gdbarch_fp_regnum invalid");
2520 if (gdbarch_debug
>= 2)
2521 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2522 return gdbarch
->fp_regnum
;
2526 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2529 gdbarch
->fp_regnum
= fp_regnum
;
2533 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2535 if (gdbarch
->pc_regnum
== -1)
2536 internal_error (__FILE__
, __LINE__
,
2537 "gdbarch: gdbarch_pc_regnum invalid");
2538 if (gdbarch_debug
>= 2)
2539 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2540 return gdbarch
->pc_regnum
;
2544 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2547 gdbarch
->pc_regnum
= pc_regnum
;
2551 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2553 /* Skip verify of fp0_regnum, invalid_p == 0 */
2554 if (gdbarch_debug
>= 2)
2555 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2556 return gdbarch
->fp0_regnum
;
2560 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2563 gdbarch
->fp0_regnum
= fp0_regnum
;
2567 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2569 /* Skip verify of npc_regnum, invalid_p == 0 */
2570 if (gdbarch_debug
>= 2)
2571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2572 return gdbarch
->npc_regnum
;
2576 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2579 gdbarch
->npc_regnum
= npc_regnum
;
2583 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2585 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2586 if (gdbarch_debug
>= 2)
2587 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2588 return gdbarch
->nnpc_regnum
;
2592 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2595 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2599 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2601 if (gdbarch
->stab_reg_to_regnum
== 0)
2602 internal_error (__FILE__
, __LINE__
,
2603 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2604 if (gdbarch_debug
>= 2)
2605 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2606 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2610 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2611 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2613 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2617 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2619 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2620 internal_error (__FILE__
, __LINE__
,
2621 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2622 if (gdbarch_debug
>= 2)
2623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2624 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2628 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2629 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2631 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2635 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2637 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2638 internal_error (__FILE__
, __LINE__
,
2639 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2640 if (gdbarch_debug
>= 2)
2641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2642 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2646 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2647 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2649 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2653 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2655 if (gdbarch
->sdb_reg_to_regnum
== 0)
2656 internal_error (__FILE__
, __LINE__
,
2657 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2658 if (gdbarch_debug
>= 2)
2659 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2660 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2664 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2665 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2667 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2671 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2673 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2674 internal_error (__FILE__
, __LINE__
,
2675 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2676 if (gdbarch_debug
>= 2)
2677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2678 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2682 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2683 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2685 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2689 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2691 if (gdbarch
->register_name
== 0)
2692 internal_error (__FILE__
, __LINE__
,
2693 "gdbarch: gdbarch_register_name invalid");
2694 if (gdbarch_debug
>= 2)
2695 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2696 return gdbarch
->register_name (regnr
);
2700 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2701 gdbarch_register_name_ftype register_name
)
2703 gdbarch
->register_name
= register_name
;
2707 gdbarch_register_size (struct gdbarch
*gdbarch
)
2709 if (gdbarch
->register_size
== -1)
2710 internal_error (__FILE__
, __LINE__
,
2711 "gdbarch: gdbarch_register_size invalid");
2712 if (gdbarch_debug
>= 2)
2713 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2714 return gdbarch
->register_size
;
2718 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2721 gdbarch
->register_size
= register_size
;
2725 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2727 if (gdbarch
->register_bytes
== -1)
2728 internal_error (__FILE__
, __LINE__
,
2729 "gdbarch: gdbarch_register_bytes invalid");
2730 if (gdbarch_debug
>= 2)
2731 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2732 return gdbarch
->register_bytes
;
2736 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2739 gdbarch
->register_bytes
= register_bytes
;
2743 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2745 if (gdbarch
->register_byte
== 0)
2746 internal_error (__FILE__
, __LINE__
,
2747 "gdbarch: gdbarch_register_byte invalid");
2748 if (gdbarch_debug
>= 2)
2749 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2750 return gdbarch
->register_byte (reg_nr
);
2754 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2755 gdbarch_register_byte_ftype register_byte
)
2757 gdbarch
->register_byte
= register_byte
;
2761 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2763 if (gdbarch
->register_raw_size
== 0)
2764 internal_error (__FILE__
, __LINE__
,
2765 "gdbarch: gdbarch_register_raw_size invalid");
2766 if (gdbarch_debug
>= 2)
2767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2768 return gdbarch
->register_raw_size (reg_nr
);
2772 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2773 gdbarch_register_raw_size_ftype register_raw_size
)
2775 gdbarch
->register_raw_size
= register_raw_size
;
2779 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2781 if (gdbarch
->max_register_raw_size
== -1)
2782 internal_error (__FILE__
, __LINE__
,
2783 "gdbarch: gdbarch_max_register_raw_size invalid");
2784 if (gdbarch_debug
>= 2)
2785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2786 return gdbarch
->max_register_raw_size
;
2790 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2791 int max_register_raw_size
)
2793 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2797 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2799 if (gdbarch
->register_virtual_size
== 0)
2800 internal_error (__FILE__
, __LINE__
,
2801 "gdbarch: gdbarch_register_virtual_size invalid");
2802 if (gdbarch_debug
>= 2)
2803 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2804 return gdbarch
->register_virtual_size (reg_nr
);
2808 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2809 gdbarch_register_virtual_size_ftype register_virtual_size
)
2811 gdbarch
->register_virtual_size
= register_virtual_size
;
2815 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2817 if (gdbarch
->max_register_virtual_size
== -1)
2818 internal_error (__FILE__
, __LINE__
,
2819 "gdbarch: gdbarch_max_register_virtual_size invalid");
2820 if (gdbarch_debug
>= 2)
2821 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2822 return gdbarch
->max_register_virtual_size
;
2826 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2827 int max_register_virtual_size
)
2829 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2833 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2835 if (gdbarch
->register_virtual_type
== 0)
2836 internal_error (__FILE__
, __LINE__
,
2837 "gdbarch: gdbarch_register_virtual_type invalid");
2838 if (gdbarch_debug
>= 2)
2839 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2840 return gdbarch
->register_virtual_type (reg_nr
);
2844 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2845 gdbarch_register_virtual_type_ftype register_virtual_type
)
2847 gdbarch
->register_virtual_type
= register_virtual_type
;
2851 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2853 if (gdbarch
->do_registers_info
== 0)
2854 internal_error (__FILE__
, __LINE__
,
2855 "gdbarch: gdbarch_do_registers_info invalid");
2856 if (gdbarch_debug
>= 2)
2857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2858 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2862 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2863 gdbarch_do_registers_info_ftype do_registers_info
)
2865 gdbarch
->do_registers_info
= do_registers_info
;
2869 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2871 if (gdbarch
->register_sim_regno
== 0)
2872 internal_error (__FILE__
, __LINE__
,
2873 "gdbarch: gdbarch_register_sim_regno invalid");
2874 if (gdbarch_debug
>= 2)
2875 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2876 return gdbarch
->register_sim_regno (reg_nr
);
2880 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2881 gdbarch_register_sim_regno_ftype register_sim_regno
)
2883 gdbarch
->register_sim_regno
= register_sim_regno
;
2887 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2889 return gdbarch
->register_bytes_ok
!= 0;
2893 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2895 if (gdbarch
->register_bytes_ok
== 0)
2896 internal_error (__FILE__
, __LINE__
,
2897 "gdbarch: gdbarch_register_bytes_ok invalid");
2898 if (gdbarch_debug
>= 2)
2899 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2900 return gdbarch
->register_bytes_ok (nr_bytes
);
2904 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2905 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2907 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2911 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2913 if (gdbarch
->cannot_fetch_register
== 0)
2914 internal_error (__FILE__
, __LINE__
,
2915 "gdbarch: gdbarch_cannot_fetch_register invalid");
2916 if (gdbarch_debug
>= 2)
2917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2918 return gdbarch
->cannot_fetch_register (regnum
);
2922 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2923 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2925 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2929 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2931 if (gdbarch
->cannot_store_register
== 0)
2932 internal_error (__FILE__
, __LINE__
,
2933 "gdbarch: gdbarch_cannot_store_register invalid");
2934 if (gdbarch_debug
>= 2)
2935 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2936 return gdbarch
->cannot_store_register (regnum
);
2940 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2941 gdbarch_cannot_store_register_ftype cannot_store_register
)
2943 gdbarch
->cannot_store_register
= cannot_store_register
;
2947 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2949 if (gdbarch
->use_generic_dummy_frames
== -1)
2950 internal_error (__FILE__
, __LINE__
,
2951 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2952 if (gdbarch_debug
>= 2)
2953 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2954 return gdbarch
->use_generic_dummy_frames
;
2958 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2959 int use_generic_dummy_frames
)
2961 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2965 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2967 if (gdbarch
->call_dummy_location
== 0)
2968 internal_error (__FILE__
, __LINE__
,
2969 "gdbarch: gdbarch_call_dummy_location invalid");
2970 if (gdbarch_debug
>= 2)
2971 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2972 return gdbarch
->call_dummy_location
;
2976 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2977 int call_dummy_location
)
2979 gdbarch
->call_dummy_location
= call_dummy_location
;
2983 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2985 if (gdbarch
->call_dummy_address
== 0)
2986 internal_error (__FILE__
, __LINE__
,
2987 "gdbarch: gdbarch_call_dummy_address invalid");
2988 if (gdbarch_debug
>= 2)
2989 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2990 return gdbarch
->call_dummy_address ();
2994 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2995 gdbarch_call_dummy_address_ftype call_dummy_address
)
2997 gdbarch
->call_dummy_address
= call_dummy_address
;
3001 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3003 if (gdbarch
->call_dummy_start_offset
== -1)
3004 internal_error (__FILE__
, __LINE__
,
3005 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3006 if (gdbarch_debug
>= 2)
3007 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3008 return gdbarch
->call_dummy_start_offset
;
3012 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3013 CORE_ADDR call_dummy_start_offset
)
3015 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3019 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3021 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3022 internal_error (__FILE__
, __LINE__
,
3023 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3024 if (gdbarch_debug
>= 2)
3025 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3026 return gdbarch
->call_dummy_breakpoint_offset
;
3030 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3031 CORE_ADDR call_dummy_breakpoint_offset
)
3033 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3037 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3039 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3040 internal_error (__FILE__
, __LINE__
,
3041 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3042 if (gdbarch_debug
>= 2)
3043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3044 return gdbarch
->call_dummy_breakpoint_offset_p
;
3048 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3049 int call_dummy_breakpoint_offset_p
)
3051 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3055 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3057 if (gdbarch
->call_dummy_length
== -1)
3058 internal_error (__FILE__
, __LINE__
,
3059 "gdbarch: gdbarch_call_dummy_length invalid");
3060 if (gdbarch_debug
>= 2)
3061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3062 return gdbarch
->call_dummy_length
;
3066 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3067 int call_dummy_length
)
3069 gdbarch
->call_dummy_length
= call_dummy_length
;
3073 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3075 if (gdbarch
->pc_in_call_dummy
== 0)
3076 internal_error (__FILE__
, __LINE__
,
3077 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3078 if (gdbarch_debug
>= 2)
3079 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3080 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3084 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3085 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3087 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3091 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3093 if (gdbarch
->call_dummy_p
== -1)
3094 internal_error (__FILE__
, __LINE__
,
3095 "gdbarch: gdbarch_call_dummy_p invalid");
3096 if (gdbarch_debug
>= 2)
3097 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3098 return gdbarch
->call_dummy_p
;
3102 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3105 gdbarch
->call_dummy_p
= call_dummy_p
;
3109 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3111 /* Skip verify of call_dummy_words, invalid_p == 0 */
3112 if (gdbarch_debug
>= 2)
3113 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3114 return gdbarch
->call_dummy_words
;
3118 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3119 LONGEST
* call_dummy_words
)
3121 gdbarch
->call_dummy_words
= call_dummy_words
;
3125 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3127 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3128 if (gdbarch_debug
>= 2)
3129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3130 return gdbarch
->sizeof_call_dummy_words
;
3134 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3135 int sizeof_call_dummy_words
)
3137 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3141 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3143 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3144 internal_error (__FILE__
, __LINE__
,
3145 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3146 if (gdbarch_debug
>= 2)
3147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3148 return gdbarch
->call_dummy_stack_adjust_p
;
3152 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3153 int call_dummy_stack_adjust_p
)
3155 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3159 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3161 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3162 internal_error (__FILE__
, __LINE__
,
3163 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3164 if (gdbarch_debug
>= 2)
3165 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3166 return gdbarch
->call_dummy_stack_adjust
;
3170 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3171 int call_dummy_stack_adjust
)
3173 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3177 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
)
3179 if (gdbarch
->fix_call_dummy
== 0)
3180 internal_error (__FILE__
, __LINE__
,
3181 "gdbarch: gdbarch_fix_call_dummy invalid");
3182 if (gdbarch_debug
>= 2)
3183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3184 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3188 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3189 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3191 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3195 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3197 if (gdbarch
->init_frame_pc_first
== 0)
3198 internal_error (__FILE__
, __LINE__
,
3199 "gdbarch: gdbarch_init_frame_pc_first invalid");
3200 if (gdbarch_debug
>= 2)
3201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3202 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3206 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3207 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3209 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3213 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3215 if (gdbarch
->init_frame_pc
== 0)
3216 internal_error (__FILE__
, __LINE__
,
3217 "gdbarch: gdbarch_init_frame_pc invalid");
3218 if (gdbarch_debug
>= 2)
3219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3220 gdbarch
->init_frame_pc (fromleaf
, prev
);
3224 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3225 gdbarch_init_frame_pc_ftype init_frame_pc
)
3227 gdbarch
->init_frame_pc
= init_frame_pc
;
3231 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3233 if (gdbarch_debug
>= 2)
3234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3235 return gdbarch
->believe_pcc_promotion
;
3239 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3240 int believe_pcc_promotion
)
3242 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3246 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3248 if (gdbarch_debug
>= 2)
3249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3250 return gdbarch
->believe_pcc_promotion_type
;
3254 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3255 int believe_pcc_promotion_type
)
3257 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3261 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3263 if (gdbarch
->coerce_float_to_double
== 0)
3264 internal_error (__FILE__
, __LINE__
,
3265 "gdbarch: gdbarch_coerce_float_to_double invalid");
3266 if (gdbarch_debug
>= 2)
3267 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3268 return gdbarch
->coerce_float_to_double (formal
, actual
);
3272 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3273 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3275 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3279 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
)
3281 if (gdbarch
->get_saved_register
== 0)
3282 internal_error (__FILE__
, __LINE__
,
3283 "gdbarch: gdbarch_get_saved_register invalid");
3284 if (gdbarch_debug
>= 2)
3285 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3286 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3290 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3291 gdbarch_get_saved_register_ftype get_saved_register
)
3293 gdbarch
->get_saved_register
= get_saved_register
;
3297 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3299 if (gdbarch
->register_convertible
== 0)
3300 internal_error (__FILE__
, __LINE__
,
3301 "gdbarch: gdbarch_register_convertible invalid");
3302 if (gdbarch_debug
>= 2)
3303 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3304 return gdbarch
->register_convertible (nr
);
3308 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3309 gdbarch_register_convertible_ftype register_convertible
)
3311 gdbarch
->register_convertible
= register_convertible
;
3315 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3317 if (gdbarch
->register_convert_to_virtual
== 0)
3318 internal_error (__FILE__
, __LINE__
,
3319 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3320 if (gdbarch_debug
>= 2)
3321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3322 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3326 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3327 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3329 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3333 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3335 if (gdbarch
->register_convert_to_raw
== 0)
3336 internal_error (__FILE__
, __LINE__
,
3337 "gdbarch: gdbarch_register_convert_to_raw invalid");
3338 if (gdbarch_debug
>= 2)
3339 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3340 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3344 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3345 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3347 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3351 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3353 return gdbarch
->fetch_pseudo_register
!= 0;
3357 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3359 if (gdbarch
->fetch_pseudo_register
== 0)
3360 internal_error (__FILE__
, __LINE__
,
3361 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3362 if (gdbarch_debug
>= 2)
3363 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3364 gdbarch
->fetch_pseudo_register (regnum
);
3368 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3369 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3371 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3375 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3377 return gdbarch
->store_pseudo_register
!= 0;
3381 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3383 if (gdbarch
->store_pseudo_register
== 0)
3384 internal_error (__FILE__
, __LINE__
,
3385 "gdbarch: gdbarch_store_pseudo_register invalid");
3386 if (gdbarch_debug
>= 2)
3387 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3388 gdbarch
->store_pseudo_register (regnum
);
3392 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3393 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3395 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3399 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3401 if (gdbarch
->pointer_to_address
== 0)
3402 internal_error (__FILE__
, __LINE__
,
3403 "gdbarch: gdbarch_pointer_to_address invalid");
3404 if (gdbarch_debug
>= 2)
3405 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3406 return gdbarch
->pointer_to_address (type
, buf
);
3410 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3411 gdbarch_pointer_to_address_ftype pointer_to_address
)
3413 gdbarch
->pointer_to_address
= pointer_to_address
;
3417 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3419 if (gdbarch
->address_to_pointer
== 0)
3420 internal_error (__FILE__
, __LINE__
,
3421 "gdbarch: gdbarch_address_to_pointer invalid");
3422 if (gdbarch_debug
>= 2)
3423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3424 gdbarch
->address_to_pointer (type
, buf
, addr
);
3428 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3429 gdbarch_address_to_pointer_ftype address_to_pointer
)
3431 gdbarch
->address_to_pointer
= address_to_pointer
;
3435 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3437 return gdbarch
->integer_to_address
!= 0;
3441 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3443 if (gdbarch
->integer_to_address
== 0)
3444 internal_error (__FILE__
, __LINE__
,
3445 "gdbarch: gdbarch_integer_to_address invalid");
3446 if (gdbarch_debug
>= 2)
3447 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3448 return gdbarch
->integer_to_address (type
, buf
);
3452 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3453 gdbarch_integer_to_address_ftype integer_to_address
)
3455 gdbarch
->integer_to_address
= integer_to_address
;
3459 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3461 if (gdbarch
->return_value_on_stack
== 0)
3462 internal_error (__FILE__
, __LINE__
,
3463 "gdbarch: gdbarch_return_value_on_stack invalid");
3464 if (gdbarch_debug
>= 2)
3465 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3466 return gdbarch
->return_value_on_stack (type
);
3470 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3471 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3473 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3477 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3479 if (gdbarch
->extract_return_value
== 0)
3480 internal_error (__FILE__
, __LINE__
,
3481 "gdbarch: gdbarch_extract_return_value invalid");
3482 if (gdbarch_debug
>= 2)
3483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3484 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3488 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3489 gdbarch_extract_return_value_ftype extract_return_value
)
3491 gdbarch
->extract_return_value
= extract_return_value
;
3495 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3497 if (gdbarch
->push_arguments
== 0)
3498 internal_error (__FILE__
, __LINE__
,
3499 "gdbarch: gdbarch_push_arguments invalid");
3500 if (gdbarch_debug
>= 2)
3501 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3502 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3506 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3507 gdbarch_push_arguments_ftype push_arguments
)
3509 gdbarch
->push_arguments
= push_arguments
;
3513 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3515 if (gdbarch
->push_dummy_frame
== 0)
3516 internal_error (__FILE__
, __LINE__
,
3517 "gdbarch: gdbarch_push_dummy_frame invalid");
3518 if (gdbarch_debug
>= 2)
3519 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3520 gdbarch
->push_dummy_frame ();
3524 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3525 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3527 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3531 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3533 return gdbarch
->push_return_address
!= 0;
3537 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3539 if (gdbarch
->push_return_address
== 0)
3540 internal_error (__FILE__
, __LINE__
,
3541 "gdbarch: gdbarch_push_return_address invalid");
3542 if (gdbarch_debug
>= 2)
3543 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3544 return gdbarch
->push_return_address (pc
, sp
);
3548 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3549 gdbarch_push_return_address_ftype push_return_address
)
3551 gdbarch
->push_return_address
= push_return_address
;
3555 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3557 if (gdbarch
->pop_frame
== 0)
3558 internal_error (__FILE__
, __LINE__
,
3559 "gdbarch: gdbarch_pop_frame invalid");
3560 if (gdbarch_debug
>= 2)
3561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3562 gdbarch
->pop_frame ();
3566 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3567 gdbarch_pop_frame_ftype pop_frame
)
3569 gdbarch
->pop_frame
= pop_frame
;
3573 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3575 if (gdbarch
->store_struct_return
== 0)
3576 internal_error (__FILE__
, __LINE__
,
3577 "gdbarch: gdbarch_store_struct_return invalid");
3578 if (gdbarch_debug
>= 2)
3579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3580 gdbarch
->store_struct_return (addr
, sp
);
3584 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3585 gdbarch_store_struct_return_ftype store_struct_return
)
3587 gdbarch
->store_struct_return
= store_struct_return
;
3591 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3593 if (gdbarch
->store_return_value
== 0)
3594 internal_error (__FILE__
, __LINE__
,
3595 "gdbarch: gdbarch_store_return_value invalid");
3596 if (gdbarch_debug
>= 2)
3597 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3598 gdbarch
->store_return_value (type
, valbuf
);
3602 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3603 gdbarch_store_return_value_ftype store_return_value
)
3605 gdbarch
->store_return_value
= store_return_value
;
3609 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3611 return gdbarch
->extract_struct_value_address
!= 0;
3615 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3617 if (gdbarch
->extract_struct_value_address
== 0)
3618 internal_error (__FILE__
, __LINE__
,
3619 "gdbarch: gdbarch_extract_struct_value_address invalid");
3620 if (gdbarch_debug
>= 2)
3621 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3622 return gdbarch
->extract_struct_value_address (regbuf
);
3626 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3627 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3629 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3633 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3635 if (gdbarch
->use_struct_convention
== 0)
3636 internal_error (__FILE__
, __LINE__
,
3637 "gdbarch: gdbarch_use_struct_convention invalid");
3638 if (gdbarch_debug
>= 2)
3639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3640 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3644 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3645 gdbarch_use_struct_convention_ftype use_struct_convention
)
3647 gdbarch
->use_struct_convention
= use_struct_convention
;
3651 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3653 if (gdbarch
->frame_init_saved_regs
== 0)
3654 internal_error (__FILE__
, __LINE__
,
3655 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3656 if (gdbarch_debug
>= 2)
3657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3658 gdbarch
->frame_init_saved_regs (frame
);
3662 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3663 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3665 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3669 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3671 return gdbarch
->init_extra_frame_info
!= 0;
3675 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3677 if (gdbarch
->init_extra_frame_info
== 0)
3678 internal_error (__FILE__
, __LINE__
,
3679 "gdbarch: gdbarch_init_extra_frame_info invalid");
3680 if (gdbarch_debug
>= 2)
3681 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3682 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3686 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3687 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3689 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3693 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3695 if (gdbarch
->skip_prologue
== 0)
3696 internal_error (__FILE__
, __LINE__
,
3697 "gdbarch: gdbarch_skip_prologue invalid");
3698 if (gdbarch_debug
>= 2)
3699 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3700 return gdbarch
->skip_prologue (ip
);
3704 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3705 gdbarch_skip_prologue_ftype skip_prologue
)
3707 gdbarch
->skip_prologue
= skip_prologue
;
3711 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3713 if (gdbarch
->prologue_frameless_p
== 0)
3714 internal_error (__FILE__
, __LINE__
,
3715 "gdbarch: gdbarch_prologue_frameless_p invalid");
3716 if (gdbarch_debug
>= 2)
3717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3718 return gdbarch
->prologue_frameless_p (ip
);
3722 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3723 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3725 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3729 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3731 if (gdbarch
->inner_than
== 0)
3732 internal_error (__FILE__
, __LINE__
,
3733 "gdbarch: gdbarch_inner_than invalid");
3734 if (gdbarch_debug
>= 2)
3735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3736 return gdbarch
->inner_than (lhs
, rhs
);
3740 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3741 gdbarch_inner_than_ftype inner_than
)
3743 gdbarch
->inner_than
= inner_than
;
3747 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3749 if (gdbarch
->breakpoint_from_pc
== 0)
3750 internal_error (__FILE__
, __LINE__
,
3751 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3752 if (gdbarch_debug
>= 2)
3753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3754 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3758 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3759 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3761 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3765 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3767 if (gdbarch
->memory_insert_breakpoint
== 0)
3768 internal_error (__FILE__
, __LINE__
,
3769 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3770 if (gdbarch_debug
>= 2)
3771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3772 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3776 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3777 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3779 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3783 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3785 if (gdbarch
->memory_remove_breakpoint
== 0)
3786 internal_error (__FILE__
, __LINE__
,
3787 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3788 if (gdbarch_debug
>= 2)
3789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3790 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3794 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3795 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3797 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3801 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3803 if (gdbarch
->decr_pc_after_break
== -1)
3804 internal_error (__FILE__
, __LINE__
,
3805 "gdbarch: gdbarch_decr_pc_after_break invalid");
3806 if (gdbarch_debug
>= 2)
3807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3808 return gdbarch
->decr_pc_after_break
;
3812 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3813 CORE_ADDR decr_pc_after_break
)
3815 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3819 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3821 if (gdbarch
->prepare_to_proceed
== 0)
3822 internal_error (__FILE__
, __LINE__
,
3823 "gdbarch: gdbarch_prepare_to_proceed invalid");
3824 if (gdbarch_debug
>= 2)
3825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3826 return gdbarch
->prepare_to_proceed (select_it
);
3830 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3831 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3833 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3837 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3839 if (gdbarch
->function_start_offset
== -1)
3840 internal_error (__FILE__
, __LINE__
,
3841 "gdbarch: gdbarch_function_start_offset invalid");
3842 if (gdbarch_debug
>= 2)
3843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3844 return gdbarch
->function_start_offset
;
3848 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3849 CORE_ADDR function_start_offset
)
3851 gdbarch
->function_start_offset
= function_start_offset
;
3855 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3857 if (gdbarch
->remote_translate_xfer_address
== 0)
3858 internal_error (__FILE__
, __LINE__
,
3859 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3860 if (gdbarch_debug
>= 2)
3861 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3862 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3866 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3867 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3869 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3873 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3875 if (gdbarch
->frame_args_skip
== -1)
3876 internal_error (__FILE__
, __LINE__
,
3877 "gdbarch: gdbarch_frame_args_skip invalid");
3878 if (gdbarch_debug
>= 2)
3879 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3880 return gdbarch
->frame_args_skip
;
3884 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3885 CORE_ADDR frame_args_skip
)
3887 gdbarch
->frame_args_skip
= frame_args_skip
;
3891 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3893 if (gdbarch
->frameless_function_invocation
== 0)
3894 internal_error (__FILE__
, __LINE__
,
3895 "gdbarch: gdbarch_frameless_function_invocation invalid");
3896 if (gdbarch_debug
>= 2)
3897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3898 return gdbarch
->frameless_function_invocation (fi
);
3902 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3903 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3905 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3909 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3911 if (gdbarch
->frame_chain
== 0)
3912 internal_error (__FILE__
, __LINE__
,
3913 "gdbarch: gdbarch_frame_chain invalid");
3914 if (gdbarch_debug
>= 2)
3915 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3916 return gdbarch
->frame_chain (frame
);
3920 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3921 gdbarch_frame_chain_ftype frame_chain
)
3923 gdbarch
->frame_chain
= frame_chain
;
3927 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3929 if (gdbarch
->frame_chain_valid
== 0)
3930 internal_error (__FILE__
, __LINE__
,
3931 "gdbarch: gdbarch_frame_chain_valid invalid");
3932 if (gdbarch_debug
>= 2)
3933 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3934 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3938 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3939 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3941 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3945 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3947 if (gdbarch
->frame_saved_pc
== 0)
3948 internal_error (__FILE__
, __LINE__
,
3949 "gdbarch: gdbarch_frame_saved_pc invalid");
3950 if (gdbarch_debug
>= 2)
3951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3952 return gdbarch
->frame_saved_pc (fi
);
3956 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3957 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3959 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3963 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3965 if (gdbarch
->frame_args_address
== 0)
3966 internal_error (__FILE__
, __LINE__
,
3967 "gdbarch: gdbarch_frame_args_address invalid");
3968 if (gdbarch_debug
>= 2)
3969 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3970 return gdbarch
->frame_args_address (fi
);
3974 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3975 gdbarch_frame_args_address_ftype frame_args_address
)
3977 gdbarch
->frame_args_address
= frame_args_address
;
3981 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3983 if (gdbarch
->frame_locals_address
== 0)
3984 internal_error (__FILE__
, __LINE__
,
3985 "gdbarch: gdbarch_frame_locals_address invalid");
3986 if (gdbarch_debug
>= 2)
3987 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3988 return gdbarch
->frame_locals_address (fi
);
3992 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3993 gdbarch_frame_locals_address_ftype frame_locals_address
)
3995 gdbarch
->frame_locals_address
= frame_locals_address
;
3999 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4001 if (gdbarch
->saved_pc_after_call
== 0)
4002 internal_error (__FILE__
, __LINE__
,
4003 "gdbarch: gdbarch_saved_pc_after_call invalid");
4004 if (gdbarch_debug
>= 2)
4005 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4006 return gdbarch
->saved_pc_after_call (frame
);
4010 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4011 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4013 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4017 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4019 if (gdbarch
->frame_num_args
== 0)
4020 internal_error (__FILE__
, __LINE__
,
4021 "gdbarch: gdbarch_frame_num_args invalid");
4022 if (gdbarch_debug
>= 2)
4023 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4024 return gdbarch
->frame_num_args (frame
);
4028 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4029 gdbarch_frame_num_args_ftype frame_num_args
)
4031 gdbarch
->frame_num_args
= frame_num_args
;
4035 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4037 return gdbarch
->stack_align
!= 0;
4041 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4043 if (gdbarch
->stack_align
== 0)
4044 internal_error (__FILE__
, __LINE__
,
4045 "gdbarch: gdbarch_stack_align invalid");
4046 if (gdbarch_debug
>= 2)
4047 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4048 return gdbarch
->stack_align (sp
);
4052 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4053 gdbarch_stack_align_ftype stack_align
)
4055 gdbarch
->stack_align
= stack_align
;
4059 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4061 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4062 if (gdbarch_debug
>= 2)
4063 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4064 return gdbarch
->extra_stack_alignment_needed
;
4068 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4069 int extra_stack_alignment_needed
)
4071 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4075 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4077 return gdbarch
->reg_struct_has_addr
!= 0;
4081 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4083 if (gdbarch
->reg_struct_has_addr
== 0)
4084 internal_error (__FILE__
, __LINE__
,
4085 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4086 if (gdbarch_debug
>= 2)
4087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4088 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4092 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4093 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4095 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4099 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4101 return gdbarch
->save_dummy_frame_tos
!= 0;
4105 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4107 if (gdbarch
->save_dummy_frame_tos
== 0)
4108 internal_error (__FILE__
, __LINE__
,
4109 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4110 if (gdbarch_debug
>= 2)
4111 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4112 gdbarch
->save_dummy_frame_tos (sp
);
4116 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4117 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4119 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4123 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4125 if (gdbarch_debug
>= 2)
4126 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4127 return gdbarch
->parm_boundary
;
4131 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4134 gdbarch
->parm_boundary
= parm_boundary
;
4137 const struct floatformat
*
4138 gdbarch_float_format (struct gdbarch
*gdbarch
)
4140 if (gdbarch_debug
>= 2)
4141 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4142 return gdbarch
->float_format
;
4146 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4147 const struct floatformat
* float_format
)
4149 gdbarch
->float_format
= float_format
;
4152 const struct floatformat
*
4153 gdbarch_double_format (struct gdbarch
*gdbarch
)
4155 if (gdbarch_debug
>= 2)
4156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4157 return gdbarch
->double_format
;
4161 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4162 const struct floatformat
* double_format
)
4164 gdbarch
->double_format
= double_format
;
4167 const struct floatformat
*
4168 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4170 if (gdbarch_debug
>= 2)
4171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4172 return gdbarch
->long_double_format
;
4176 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4177 const struct floatformat
* long_double_format
)
4179 gdbarch
->long_double_format
= long_double_format
;
4183 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4185 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4186 internal_error (__FILE__
, __LINE__
,
4187 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4188 if (gdbarch_debug
>= 2)
4189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4190 return gdbarch
->convert_from_func_ptr_addr (addr
);
4194 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4195 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4197 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4201 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4203 if (gdbarch
->addr_bits_remove
== 0)
4204 internal_error (__FILE__
, __LINE__
,
4205 "gdbarch: gdbarch_addr_bits_remove invalid");
4206 if (gdbarch_debug
>= 2)
4207 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4208 return gdbarch
->addr_bits_remove (addr
);
4212 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4213 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4215 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4219 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4221 return gdbarch
->software_single_step
!= 0;
4225 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4227 if (gdbarch
->software_single_step
== 0)
4228 internal_error (__FILE__
, __LINE__
,
4229 "gdbarch: gdbarch_software_single_step invalid");
4230 if (gdbarch_debug
>= 2)
4231 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4232 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4236 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4237 gdbarch_software_single_step_ftype software_single_step
)
4239 gdbarch
->software_single_step
= software_single_step
;
4243 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4245 if (gdbarch
->print_insn
== 0)
4246 internal_error (__FILE__
, __LINE__
,
4247 "gdbarch: gdbarch_print_insn invalid");
4248 if (gdbarch_debug
>= 2)
4249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4250 return gdbarch
->print_insn (vma
, info
);
4254 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4255 gdbarch_print_insn_ftype print_insn
)
4257 gdbarch
->print_insn
= print_insn
;
4261 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4263 if (gdbarch
->skip_trampoline_code
== 0)
4264 internal_error (__FILE__
, __LINE__
,
4265 "gdbarch: gdbarch_skip_trampoline_code invalid");
4266 if (gdbarch_debug
>= 2)
4267 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4268 return gdbarch
->skip_trampoline_code (pc
);
4272 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4273 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4275 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4279 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4281 if (gdbarch
->in_solib_call_trampoline
== 0)
4282 internal_error (__FILE__
, __LINE__
,
4283 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4284 if (gdbarch_debug
>= 2)
4285 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4286 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4290 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4291 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4293 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4297 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4299 if (gdbarch
->in_function_epilogue_p
== 0)
4300 internal_error (__FILE__
, __LINE__
,
4301 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4302 if (gdbarch_debug
>= 2)
4303 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4304 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4308 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4309 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4311 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4315 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4317 if (gdbarch
->construct_inferior_arguments
== 0)
4318 internal_error (__FILE__
, __LINE__
,
4319 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4320 if (gdbarch_debug
>= 2)
4321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4322 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4326 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4327 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4329 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4333 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4335 return gdbarch
->dwarf2_build_frame_info
!= 0;
4339 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4341 if (gdbarch
->dwarf2_build_frame_info
== 0)
4342 internal_error (__FILE__
, __LINE__
,
4343 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4344 if (gdbarch_debug
>= 2)
4345 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4346 gdbarch
->dwarf2_build_frame_info (objfile
);
4350 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4351 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4353 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4357 /* Keep a registry of per-architecture data-pointers required by GDB
4363 gdbarch_data_init_ftype
*init
;
4364 gdbarch_data_free_ftype
*free
;
4367 struct gdbarch_data_registration
4369 struct gdbarch_data
*data
;
4370 struct gdbarch_data_registration
*next
;
4373 struct gdbarch_data_registry
4376 struct gdbarch_data_registration
*registrations
;
4379 struct gdbarch_data_registry gdbarch_data_registry
=
4384 struct gdbarch_data
*
4385 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4386 gdbarch_data_free_ftype
*free
)
4388 struct gdbarch_data_registration
**curr
;
4389 for (curr
= &gdbarch_data_registry
.registrations
;
4391 curr
= &(*curr
)->next
);
4392 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4393 (*curr
)->next
= NULL
;
4394 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4395 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4396 (*curr
)->data
->init
= init
;
4397 (*curr
)->data
->free
= free
;
4398 return (*curr
)->data
;
4402 /* Walk through all the registered users initializing each in turn. */
4405 init_gdbarch_data (struct gdbarch
*gdbarch
)
4407 struct gdbarch_data_registration
*rego
;
4408 for (rego
= gdbarch_data_registry
.registrations
;
4412 struct gdbarch_data
*data
= rego
->data
;
4413 gdb_assert (data
->index
< gdbarch
->nr_data
);
4414 if (data
->init
!= NULL
)
4416 void *pointer
= data
->init (gdbarch
);
4417 set_gdbarch_data (gdbarch
, data
, pointer
);
4422 /* Create/delete the gdbarch data vector. */
4425 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4427 gdb_assert (gdbarch
->data
== NULL
);
4428 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4429 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4433 free_gdbarch_data (struct gdbarch
*gdbarch
)
4435 struct gdbarch_data_registration
*rego
;
4436 gdb_assert (gdbarch
->data
!= NULL
);
4437 for (rego
= gdbarch_data_registry
.registrations
;
4441 struct gdbarch_data
*data
= rego
->data
;
4442 gdb_assert (data
->index
< gdbarch
->nr_data
);
4443 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4445 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4446 gdbarch
->data
[data
->index
] = NULL
;
4449 xfree (gdbarch
->data
);
4450 gdbarch
->data
= NULL
;
4454 /* Initialize the current value of thee specified per-architecture
4458 set_gdbarch_data (struct gdbarch
*gdbarch
,
4459 struct gdbarch_data
*data
,
4462 gdb_assert (data
->index
< gdbarch
->nr_data
);
4463 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4464 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4465 gdbarch
->data
[data
->index
] = pointer
;
4468 /* Return the current value of the specified per-architecture
4472 gdbarch_data (struct gdbarch_data
*data
)
4474 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4475 return current_gdbarch
->data
[data
->index
];
4480 /* Keep a registry of swapped data required by GDB modules. */
4485 struct gdbarch_swap_registration
*source
;
4486 struct gdbarch_swap
*next
;
4489 struct gdbarch_swap_registration
4492 unsigned long sizeof_data
;
4493 gdbarch_swap_ftype
*init
;
4494 struct gdbarch_swap_registration
*next
;
4497 struct gdbarch_swap_registry
4500 struct gdbarch_swap_registration
*registrations
;
4503 struct gdbarch_swap_registry gdbarch_swap_registry
=
4509 register_gdbarch_swap (void *data
,
4510 unsigned long sizeof_data
,
4511 gdbarch_swap_ftype
*init
)
4513 struct gdbarch_swap_registration
**rego
;
4514 for (rego
= &gdbarch_swap_registry
.registrations
;
4516 rego
= &(*rego
)->next
);
4517 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4518 (*rego
)->next
= NULL
;
4519 (*rego
)->init
= init
;
4520 (*rego
)->data
= data
;
4521 (*rego
)->sizeof_data
= sizeof_data
;
4526 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4528 struct gdbarch_swap_registration
*rego
;
4529 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4530 for (rego
= gdbarch_swap_registry
.registrations
;
4534 if (rego
->data
!= NULL
)
4536 (*curr
) = XMALLOC (struct gdbarch_swap
);
4537 (*curr
)->source
= rego
;
4538 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4539 (*curr
)->next
= NULL
;
4540 memset (rego
->data
, 0, rego
->sizeof_data
);
4541 curr
= &(*curr
)->next
;
4543 if (rego
->init
!= NULL
)
4549 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4551 struct gdbarch_swap
*curr
;
4552 for (curr
= gdbarch
->swap
;
4555 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4559 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4561 struct gdbarch_swap
*curr
;
4562 for (curr
= gdbarch
->swap
;
4565 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4569 /* Keep a registry of the architectures known by GDB. */
4571 struct gdbarch_registration
4573 enum bfd_architecture bfd_architecture
;
4574 gdbarch_init_ftype
*init
;
4575 gdbarch_dump_tdep_ftype
*dump_tdep
;
4576 struct gdbarch_list
*arches
;
4577 struct gdbarch_registration
*next
;
4580 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4583 append_name (const char ***buf
, int *nr
, const char *name
)
4585 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4591 gdbarch_printable_names (void)
4595 /* Accumulate a list of names based on the registed list of
4597 enum bfd_architecture a
;
4599 const char **arches
= NULL
;
4600 struct gdbarch_registration
*rego
;
4601 for (rego
= gdbarch_registry
;
4605 const struct bfd_arch_info
*ap
;
4606 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4608 internal_error (__FILE__
, __LINE__
,
4609 "gdbarch_architecture_names: multi-arch unknown");
4612 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4617 append_name (&arches
, &nr_arches
, NULL
);
4621 /* Just return all the architectures that BFD knows. Assume that
4622 the legacy architecture framework supports them. */
4623 return bfd_arch_list ();
4628 gdbarch_register (enum bfd_architecture bfd_architecture
,
4629 gdbarch_init_ftype
*init
,
4630 gdbarch_dump_tdep_ftype
*dump_tdep
)
4632 struct gdbarch_registration
**curr
;
4633 const struct bfd_arch_info
*bfd_arch_info
;
4634 /* Check that BFD recognizes this architecture */
4635 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4636 if (bfd_arch_info
== NULL
)
4638 internal_error (__FILE__
, __LINE__
,
4639 "gdbarch: Attempt to register unknown architecture (%d)",
4642 /* Check that we haven't seen this architecture before */
4643 for (curr
= &gdbarch_registry
;
4645 curr
= &(*curr
)->next
)
4647 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4648 internal_error (__FILE__
, __LINE__
,
4649 "gdbarch: Duplicate registraration of architecture (%s)",
4650 bfd_arch_info
->printable_name
);
4654 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4655 bfd_arch_info
->printable_name
,
4658 (*curr
) = XMALLOC (struct gdbarch_registration
);
4659 (*curr
)->bfd_architecture
= bfd_architecture
;
4660 (*curr
)->init
= init
;
4661 (*curr
)->dump_tdep
= dump_tdep
;
4662 (*curr
)->arches
= NULL
;
4663 (*curr
)->next
= NULL
;
4664 /* When non- multi-arch, install whatever target dump routine we've
4665 been provided - hopefully that routine has been written correctly
4666 and works regardless of multi-arch. */
4667 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4668 && startup_gdbarch
.dump_tdep
== NULL
)
4669 startup_gdbarch
.dump_tdep
= dump_tdep
;
4673 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4674 gdbarch_init_ftype
*init
)
4676 gdbarch_register (bfd_architecture
, init
, NULL
);
4680 /* Look for an architecture using gdbarch_info. Base search on only
4681 BFD_ARCH_INFO and BYTE_ORDER. */
4683 struct gdbarch_list
*
4684 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4685 const struct gdbarch_info
*info
)
4687 for (; arches
!= NULL
; arches
= arches
->next
)
4689 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4691 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4699 /* Update the current architecture. Return ZERO if the update request
4703 gdbarch_update_p (struct gdbarch_info info
)
4705 struct gdbarch
*new_gdbarch
;
4706 struct gdbarch_list
**list
;
4707 struct gdbarch_registration
*rego
;
4709 /* Fill in missing parts of the INFO struct using a number of
4710 sources: ``set ...''; INFOabfd supplied; existing target. */
4712 /* ``(gdb) set architecture ...'' */
4713 if (info
.bfd_arch_info
== NULL
4714 && !TARGET_ARCHITECTURE_AUTO
)
4715 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4716 if (info
.bfd_arch_info
== NULL
4717 && info
.abfd
!= NULL
4718 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4719 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4720 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4721 if (info
.bfd_arch_info
== NULL
)
4722 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4724 /* ``(gdb) set byte-order ...'' */
4725 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4726 && !TARGET_BYTE_ORDER_AUTO
)
4727 info
.byte_order
= TARGET_BYTE_ORDER
;
4728 /* From the INFO struct. */
4729 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4730 && info
.abfd
!= NULL
)
4731 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
4732 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
4733 : BFD_ENDIAN_UNKNOWN
);
4734 /* From the current target. */
4735 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
4736 info
.byte_order
= TARGET_BYTE_ORDER
;
4738 /* Must have found some sort of architecture. */
4739 gdb_assert (info
.bfd_arch_info
!= NULL
);
4743 fprintf_unfiltered (gdb_stdlog
,
4744 "gdbarch_update: info.bfd_arch_info %s\n",
4745 (info
.bfd_arch_info
!= NULL
4746 ? info
.bfd_arch_info
->printable_name
4748 fprintf_unfiltered (gdb_stdlog
,
4749 "gdbarch_update: info.byte_order %d (%s)\n",
4751 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4752 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4754 fprintf_unfiltered (gdb_stdlog
,
4755 "gdbarch_update: info.abfd 0x%lx\n",
4757 fprintf_unfiltered (gdb_stdlog
,
4758 "gdbarch_update: info.tdep_info 0x%lx\n",
4759 (long) info
.tdep_info
);
4762 /* Find the target that knows about this architecture. */
4763 for (rego
= gdbarch_registry
;
4766 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4775 /* Ask the target for a replacement architecture. */
4776 new_gdbarch
= rego
->init (info
, rego
->arches
);
4778 /* Did the target like it? No. Reject the change. */
4779 if (new_gdbarch
== NULL
)
4782 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4786 /* Did the architecture change? No. Do nothing. */
4787 if (current_gdbarch
== new_gdbarch
)
4790 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4792 new_gdbarch
->bfd_arch_info
->printable_name
);
4796 /* Swap all data belonging to the old target out */
4797 swapout_gdbarch_swap (current_gdbarch
);
4799 /* Is this a pre-existing architecture? Yes. Swap it in. */
4800 for (list
= ®o
->arches
;
4802 list
= &(*list
)->next
)
4804 if ((*list
)->gdbarch
== new_gdbarch
)
4807 fprintf_unfiltered (gdb_stdlog
,
4808 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4810 new_gdbarch
->bfd_arch_info
->printable_name
);
4811 current_gdbarch
= new_gdbarch
;
4812 swapin_gdbarch_swap (new_gdbarch
);
4813 architecture_changed_event ();
4818 /* Append this new architecture to this targets list. */
4819 (*list
) = XMALLOC (struct gdbarch_list
);
4820 (*list
)->next
= NULL
;
4821 (*list
)->gdbarch
= new_gdbarch
;
4823 /* Switch to this new architecture. Dump it out. */
4824 current_gdbarch
= new_gdbarch
;
4827 fprintf_unfiltered (gdb_stdlog
,
4828 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4830 new_gdbarch
->bfd_arch_info
->printable_name
);
4833 /* Check that the newly installed architecture is valid. Plug in
4834 any post init values. */
4835 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4836 verify_gdbarch (new_gdbarch
);
4838 /* Initialize the per-architecture memory (swap) areas.
4839 CURRENT_GDBARCH must be update before these modules are
4841 init_gdbarch_swap (new_gdbarch
);
4843 /* Initialize the per-architecture data-pointer of all parties that
4844 registered an interest in this architecture. CURRENT_GDBARCH
4845 must be updated before these modules are called. */
4846 init_gdbarch_data (new_gdbarch
);
4847 architecture_changed_event ();
4850 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4858 /* Pointer to the target-dependent disassembly function. */
4859 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4860 disassemble_info tm_print_insn_info
;
4863 extern void _initialize_gdbarch (void);
4866 _initialize_gdbarch (void)
4868 struct cmd_list_element
*c
;
4870 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4871 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4872 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4873 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4874 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4876 add_show_from_set (add_set_cmd ("arch",
4879 (char *)&gdbarch_debug
,
4880 "Set architecture debugging.\n\
4881 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4883 c
= add_set_cmd ("archdebug",
4886 (char *)&gdbarch_debug
,
4887 "Set architecture debugging.\n\
4888 When non-zero, architecture debugging is enabled.", &setlist
);
4890 deprecate_cmd (c
, "set debug arch");
4891 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");