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 */
61 #include "floatformat.h"
63 /* Static function declarations */
65 static void verify_gdbarch (struct gdbarch
*gdbarch
);
66 static void init_gdbarch_data (struct gdbarch
*);
67 static void init_gdbarch_swap (struct gdbarch
*);
68 static void swapout_gdbarch_swap (struct gdbarch
*);
69 static void swapin_gdbarch_swap (struct gdbarch
*);
71 /* Convenience macro for allocting typesafe memory. */
74 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
78 /* Non-zero if we want to trace architecture code. */
81 #define GDBARCH_DEBUG 0
83 int gdbarch_debug
= GDBARCH_DEBUG
;
86 /* Maintain the struct gdbarch object */
90 /* basic architectural information */
91 const struct bfd_arch_info
* bfd_arch_info
;
94 /* target specific vector. */
95 struct gdbarch_tdep
*tdep
;
96 gdbarch_dump_tdep_ftype
*dump_tdep
;
98 /* per-architecture data-pointers */
102 /* per-architecture swap-regions */
103 struct gdbarch_swap
*swap
;
105 /* Multi-arch values.
107 When extending this structure you must:
111 Declare set/get functions and define the corresponding
114 gdbarch_alloc(): If zero/NULL is not a suitable default,
115 initialize the new field.
117 verify_gdbarch(): Confirm that the target updated the field
120 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
123 ``startup_gdbarch()'': Append an initial value to the static
124 variable (base values on the host's c-type system).
126 get_gdbarch(): Implement the set/get functions (probably using
127 the macro's as shortcuts).
142 gdbarch_read_pc_ftype
*read_pc
;
143 gdbarch_write_pc_ftype
*write_pc
;
144 gdbarch_read_fp_ftype
*read_fp
;
145 gdbarch_write_fp_ftype
*write_fp
;
146 gdbarch_read_sp_ftype
*read_sp
;
147 gdbarch_write_sp_ftype
*write_sp
;
156 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
157 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
158 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
159 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
160 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
161 gdbarch_register_name_ftype
*register_name
;
164 gdbarch_register_byte_ftype
*register_byte
;
165 gdbarch_register_raw_size_ftype
*register_raw_size
;
166 int max_register_raw_size
;
167 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
168 int max_register_virtual_size
;
169 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
170 gdbarch_do_registers_info_ftype
*do_registers_info
;
171 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
172 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
173 int use_generic_dummy_frames
;
174 int call_dummy_location
;
175 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
176 CORE_ADDR call_dummy_start_offset
;
177 CORE_ADDR call_dummy_breakpoint_offset
;
178 int call_dummy_breakpoint_offset_p
;
179 int call_dummy_length
;
180 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
182 LONGEST
* call_dummy_words
;
183 int sizeof_call_dummy_words
;
184 int call_dummy_stack_adjust_p
;
185 int call_dummy_stack_adjust
;
186 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
187 int believe_pcc_promotion
;
188 int believe_pcc_promotion_type
;
189 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
190 gdbarch_get_saved_register_ftype
*get_saved_register
;
191 gdbarch_register_convertible_ftype
*register_convertible
;
192 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
193 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
194 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
195 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
196 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
197 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
198 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
199 gdbarch_extract_return_value_ftype
*extract_return_value
;
200 gdbarch_push_arguments_ftype
*push_arguments
;
201 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
202 gdbarch_push_return_address_ftype
*push_return_address
;
203 gdbarch_pop_frame_ftype
*pop_frame
;
204 gdbarch_d10v_make_daddr_ftype
*d10v_make_daddr
;
205 gdbarch_d10v_make_iaddr_ftype
*d10v_make_iaddr
;
206 gdbarch_d10v_daddr_p_ftype
*d10v_daddr_p
;
207 gdbarch_d10v_iaddr_p_ftype
*d10v_iaddr_p
;
208 gdbarch_d10v_convert_daddr_to_raw_ftype
*d10v_convert_daddr_to_raw
;
209 gdbarch_d10v_convert_iaddr_to_raw_ftype
*d10v_convert_iaddr_to_raw
;
210 gdbarch_store_struct_return_ftype
*store_struct_return
;
211 gdbarch_store_return_value_ftype
*store_return_value
;
212 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
213 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
214 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
215 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
216 gdbarch_skip_prologue_ftype
*skip_prologue
;
217 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
218 gdbarch_inner_than_ftype
*inner_than
;
219 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
220 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
221 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
222 CORE_ADDR decr_pc_after_break
;
223 CORE_ADDR function_start_offset
;
224 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
225 CORE_ADDR frame_args_skip
;
226 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
227 gdbarch_frame_chain_ftype
*frame_chain
;
228 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
229 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
230 gdbarch_frame_args_address_ftype
*frame_args_address
;
231 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
232 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
233 gdbarch_frame_num_args_ftype
*frame_num_args
;
234 gdbarch_stack_align_ftype
*stack_align
;
235 int extra_stack_alignment_needed
;
236 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
237 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
239 const struct floatformat
* float_format
;
240 const struct floatformat
* double_format
;
241 const struct floatformat
* long_double_format
;
242 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
246 /* The default architecture uses host values (for want of a better
249 extern const struct bfd_arch_info bfd_default_arch_struct
;
251 struct gdbarch startup_gdbarch
=
253 /* basic architecture information */
254 &bfd_default_arch_struct
,
256 /* target specific vector and its dump routine */
258 /*per-architecture data-pointers and swap regions */
260 /* Multi-arch values */
264 8 * sizeof (LONGEST
),
267 8 * sizeof (long double),
320 generic_get_saved_register
,
373 /* startup_gdbarch() */
376 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
379 /* Create a new ``struct gdbarch'' based on information provided by
380 ``struct gdbarch_info''. */
383 gdbarch_alloc (const struct gdbarch_info
*info
,
384 struct gdbarch_tdep
*tdep
)
386 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
387 memset (gdbarch
, 0, sizeof (*gdbarch
));
389 gdbarch
->tdep
= tdep
;
391 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
392 gdbarch
->byte_order
= info
->byte_order
;
394 /* Force the explicit initialization of these. */
395 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
396 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
397 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
398 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
399 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
400 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
401 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
402 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
403 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
404 gdbarch
->read_pc
= generic_target_read_pc
;
405 gdbarch
->write_pc
= generic_target_write_pc
;
406 gdbarch
->read_fp
= generic_target_read_fp
;
407 gdbarch
->write_fp
= generic_target_write_fp
;
408 gdbarch
->read_sp
= generic_target_read_sp
;
409 gdbarch
->write_sp
= generic_target_write_sp
;
410 gdbarch
->num_regs
= -1;
411 gdbarch
->sp_regnum
= -1;
412 gdbarch
->fp_regnum
= -1;
413 gdbarch
->pc_regnum
= -1;
414 gdbarch
->fp0_regnum
= -1;
415 gdbarch
->npc_regnum
= -1;
416 gdbarch
->nnpc_regnum
= -1;
417 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
418 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
419 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
420 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
421 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
422 gdbarch
->register_name
= legacy_register_name
;
423 gdbarch
->register_size
= -1;
424 gdbarch
->register_bytes
= -1;
425 gdbarch
->max_register_raw_size
= -1;
426 gdbarch
->max_register_virtual_size
= -1;
427 gdbarch
->do_registers_info
= do_registers_info
;
428 gdbarch
->register_sim_regno
= default_register_sim_regno
;
429 gdbarch
->use_generic_dummy_frames
= -1;
430 gdbarch
->call_dummy_start_offset
= -1;
431 gdbarch
->call_dummy_breakpoint_offset
= -1;
432 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
433 gdbarch
->call_dummy_length
= -1;
434 gdbarch
->call_dummy_p
= -1;
435 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
436 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
437 gdbarch
->call_dummy_stack_adjust_p
= -1;
438 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
439 gdbarch
->register_convertible
= generic_register_convertible_not
;
440 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
441 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
442 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
443 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
444 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
445 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
446 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
447 gdbarch
->decr_pc_after_break
= -1;
448 gdbarch
->function_start_offset
= -1;
449 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
450 gdbarch
->frame_args_skip
= -1;
451 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
452 gdbarch
->extra_stack_alignment_needed
= 1;
453 gdbarch
->convert_from_func_ptr_addr
= default_convert_from_func_ptr_addr
;
454 /* gdbarch_alloc() */
460 /* Free a gdbarch struct. This should never happen in normal
461 operation --- once you've created a gdbarch, you keep it around.
462 However, if an architecture's init function encounters an error
463 building the structure, it may need to clean up a partially
464 constructed gdbarch. */
467 gdbarch_free (struct gdbarch
*arch
)
469 /* At the moment, this is trivial. */
474 /* Ensure that all values in a GDBARCH are reasonable. */
477 verify_gdbarch (struct gdbarch
*gdbarch
)
479 /* Only perform sanity checks on a multi-arch target. */
483 if (gdbarch
->byte_order
== 0)
484 internal_error ("verify_gdbarch: byte-order unset");
485 if (gdbarch
->bfd_arch_info
== NULL
)
486 internal_error ("verify_gdbarch: bfd_arch_info unset");
487 /* Check those that need to be defined for the given multi-arch level. */
488 /* Skip verify of short_bit, invalid_p == 0 */
489 /* Skip verify of int_bit, invalid_p == 0 */
490 /* Skip verify of long_bit, invalid_p == 0 */
491 /* Skip verify of long_long_bit, invalid_p == 0 */
492 /* Skip verify of float_bit, invalid_p == 0 */
493 /* Skip verify of double_bit, invalid_p == 0 */
494 /* Skip verify of long_double_bit, invalid_p == 0 */
495 /* Skip verify of ptr_bit, invalid_p == 0 */
496 if (gdbarch
->addr_bit
== 0)
497 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
498 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
499 /* Skip verify of ieee_float, invalid_p == 0 */
500 /* Skip verify of read_pc, invalid_p == 0 */
501 /* Skip verify of write_pc, invalid_p == 0 */
502 /* Skip verify of read_fp, invalid_p == 0 */
503 /* Skip verify of write_fp, invalid_p == 0 */
504 /* Skip verify of read_sp, invalid_p == 0 */
505 /* Skip verify of write_sp, invalid_p == 0 */
506 if ((GDB_MULTI_ARCH
>= 2)
507 && (gdbarch
->num_regs
== -1))
508 internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
509 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
510 if ((GDB_MULTI_ARCH
>= 2)
511 && (gdbarch
->sp_regnum
== -1))
512 internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
513 if ((GDB_MULTI_ARCH
>= 2)
514 && (gdbarch
->fp_regnum
== -1))
515 internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
516 if ((GDB_MULTI_ARCH
>= 2)
517 && (gdbarch
->pc_regnum
== -1))
518 internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
519 /* Skip verify of fp0_regnum, invalid_p == 0 */
520 /* Skip verify of npc_regnum, invalid_p == 0 */
521 /* Skip verify of nnpc_regnum, invalid_p == 0 */
522 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
523 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
524 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
525 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
526 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
527 /* Skip verify of register_name, invalid_p == 0 */
528 if ((GDB_MULTI_ARCH
>= 2)
529 && (gdbarch
->register_size
== -1))
530 internal_error ("gdbarch: verify_gdbarch: register_size invalid");
531 if ((GDB_MULTI_ARCH
>= 2)
532 && (gdbarch
->register_bytes
== -1))
533 internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
534 if ((GDB_MULTI_ARCH
>= 2)
535 && (gdbarch
->register_byte
== 0))
536 internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
537 if ((GDB_MULTI_ARCH
>= 2)
538 && (gdbarch
->register_raw_size
== 0))
539 internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
540 if ((GDB_MULTI_ARCH
>= 2)
541 && (gdbarch
->max_register_raw_size
== -1))
542 internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
543 if ((GDB_MULTI_ARCH
>= 2)
544 && (gdbarch
->register_virtual_size
== 0))
545 internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
546 if ((GDB_MULTI_ARCH
>= 2)
547 && (gdbarch
->max_register_virtual_size
== -1))
548 internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
549 if ((GDB_MULTI_ARCH
>= 2)
550 && (gdbarch
->register_virtual_type
== 0))
551 internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
552 /* Skip verify of do_registers_info, invalid_p == 0 */
553 /* Skip verify of register_sim_regno, invalid_p == 0 */
554 /* Skip verify of register_bytes_ok, has predicate */
555 if ((GDB_MULTI_ARCH
>= 1)
556 && (gdbarch
->use_generic_dummy_frames
== -1))
557 internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
558 if ((GDB_MULTI_ARCH
>= 2)
559 && (gdbarch
->call_dummy_location
== 0))
560 internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
561 if ((GDB_MULTI_ARCH
>= 2)
562 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
563 internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
564 if ((GDB_MULTI_ARCH
>= 2)
565 && (gdbarch
->call_dummy_start_offset
== -1))
566 internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
567 if ((GDB_MULTI_ARCH
>= 2)
568 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
569 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
570 if ((GDB_MULTI_ARCH
>= 1)
571 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
572 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
573 if ((GDB_MULTI_ARCH
>= 2)
574 && (gdbarch
->call_dummy_length
== -1))
575 internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
576 if ((GDB_MULTI_ARCH
>= 2)
577 && (gdbarch
->pc_in_call_dummy
== 0))
578 internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
579 if ((GDB_MULTI_ARCH
>= 1)
580 && (gdbarch
->call_dummy_p
== -1))
581 internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
582 /* Skip verify of call_dummy_words, invalid_p == 0 */
583 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
584 if ((GDB_MULTI_ARCH
>= 1)
585 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
586 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
587 if ((GDB_MULTI_ARCH
>= 2)
588 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
589 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
590 if ((GDB_MULTI_ARCH
>= 2)
591 && (gdbarch
->fix_call_dummy
== 0))
592 internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
593 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
594 if ((GDB_MULTI_ARCH
>= 1)
595 && (gdbarch
->get_saved_register
== 0))
596 internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
597 /* Skip verify of register_convertible, invalid_p == 0 */
598 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
599 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
600 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
601 /* Skip verify of store_pseudo_register, invalid_p == 0 */
602 /* Skip verify of pointer_to_address, invalid_p == 0 */
603 /* Skip verify of address_to_pointer, invalid_p == 0 */
604 /* Skip verify of return_value_on_stack, invalid_p == 0 */
605 if ((GDB_MULTI_ARCH
>= 2)
606 && (gdbarch
->extract_return_value
== 0))
607 internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
608 if ((GDB_MULTI_ARCH
>= 1)
609 && (gdbarch
->push_arguments
== 0))
610 internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
611 if ((GDB_MULTI_ARCH
>= 2)
612 && (gdbarch
->push_dummy_frame
== 0))
613 internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
614 if ((GDB_MULTI_ARCH
>= 1)
615 && (gdbarch
->push_return_address
== 0))
616 internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
617 if ((GDB_MULTI_ARCH
>= 2)
618 && (gdbarch
->pop_frame
== 0))
619 internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
620 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
621 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
622 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
623 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
624 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
625 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
626 if ((GDB_MULTI_ARCH
>= 2)
627 && (gdbarch
->store_struct_return
== 0))
628 internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
629 if ((GDB_MULTI_ARCH
>= 2)
630 && (gdbarch
->store_return_value
== 0))
631 internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
632 if ((GDB_MULTI_ARCH
>= 2)
633 && (gdbarch
->extract_struct_value_address
== 0))
634 internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
635 if ((GDB_MULTI_ARCH
>= 2)
636 && (gdbarch
->use_struct_convention
== 0))
637 internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
638 if ((GDB_MULTI_ARCH
>= 2)
639 && (gdbarch
->frame_init_saved_regs
== 0))
640 internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
641 if ((GDB_MULTI_ARCH
>= 2)
642 && (gdbarch
->init_extra_frame_info
== 0))
643 internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
644 if ((GDB_MULTI_ARCH
>= 2)
645 && (gdbarch
->skip_prologue
== 0))
646 internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
647 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
648 if ((GDB_MULTI_ARCH
>= 2)
649 && (gdbarch
->inner_than
== 0))
650 internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
651 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
652 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
653 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
654 if ((GDB_MULTI_ARCH
>= 2)
655 && (gdbarch
->decr_pc_after_break
== -1))
656 internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
657 if ((GDB_MULTI_ARCH
>= 2)
658 && (gdbarch
->function_start_offset
== -1))
659 internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
660 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
661 if ((GDB_MULTI_ARCH
>= 2)
662 && (gdbarch
->frame_args_skip
== -1))
663 internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
664 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
665 if ((GDB_MULTI_ARCH
>= 2)
666 && (gdbarch
->frame_chain
== 0))
667 internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
668 if ((GDB_MULTI_ARCH
>= 1)
669 && (gdbarch
->frame_chain_valid
== 0))
670 internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
671 if ((GDB_MULTI_ARCH
>= 2)
672 && (gdbarch
->frame_saved_pc
== 0))
673 internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
674 if ((GDB_MULTI_ARCH
>= 2)
675 && (gdbarch
->frame_args_address
== 0))
676 internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
677 if ((GDB_MULTI_ARCH
>= 2)
678 && (gdbarch
->frame_locals_address
== 0))
679 internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
680 if ((GDB_MULTI_ARCH
>= 2)
681 && (gdbarch
->saved_pc_after_call
== 0))
682 internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
683 if ((GDB_MULTI_ARCH
>= 2)
684 && (gdbarch
->frame_num_args
== 0))
685 internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
686 /* Skip verify of stack_align, has predicate */
687 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
688 /* Skip verify of reg_struct_has_addr, has predicate */
689 /* Skip verify of save_dummy_frame_tos, has predicate */
690 if (gdbarch
->float_format
== 0)
691 gdbarch
->float_format
= default_float_format (gdbarch
);
692 if (gdbarch
->double_format
== 0)
693 gdbarch
->double_format
= default_double_format (gdbarch
);
694 if (gdbarch
->long_double_format
== 0)
695 gdbarch
->long_double_format
= &floatformat_unknown
;
696 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
700 /* Print out the details of the current architecture. */
702 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
703 just happens to match the global variable ``current_gdbarch''. That
704 way macros refering to that variable get the local and not the global
705 version - ulgh. Once everything is parameterised with gdbarch, this
709 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
711 fprintf_unfiltered (file
,
712 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
714 #ifdef TARGET_ARCHITECTURE
715 fprintf_unfiltered (file
,
716 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
717 XSTRING (TARGET_ARCHITECTURE
));
719 #ifdef TARGET_BYTE_ORDER
720 fprintf_unfiltered (file
,
721 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
722 XSTRING (TARGET_BYTE_ORDER
));
724 #ifdef TARGET_SHORT_BIT
725 fprintf_unfiltered (file
,
726 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
727 XSTRING (TARGET_SHORT_BIT
));
729 #ifdef TARGET_INT_BIT
730 fprintf_unfiltered (file
,
731 "gdbarch_dump: TARGET_INT_BIT # %s\n",
732 XSTRING (TARGET_INT_BIT
));
734 #ifdef TARGET_LONG_BIT
735 fprintf_unfiltered (file
,
736 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
737 XSTRING (TARGET_LONG_BIT
));
739 #ifdef TARGET_LONG_LONG_BIT
740 fprintf_unfiltered (file
,
741 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
742 XSTRING (TARGET_LONG_LONG_BIT
));
744 #ifdef TARGET_FLOAT_BIT
745 fprintf_unfiltered (file
,
746 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
747 XSTRING (TARGET_FLOAT_BIT
));
749 #ifdef TARGET_DOUBLE_BIT
750 fprintf_unfiltered (file
,
751 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
752 XSTRING (TARGET_DOUBLE_BIT
));
754 #ifdef TARGET_LONG_DOUBLE_BIT
755 fprintf_unfiltered (file
,
756 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
757 XSTRING (TARGET_LONG_DOUBLE_BIT
));
759 #ifdef TARGET_PTR_BIT
760 fprintf_unfiltered (file
,
761 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
762 XSTRING (TARGET_PTR_BIT
));
764 #ifdef TARGET_ADDR_BIT
765 fprintf_unfiltered (file
,
766 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
767 XSTRING (TARGET_ADDR_BIT
));
769 #ifdef TARGET_BFD_VMA_BIT
770 fprintf_unfiltered (file
,
771 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
772 XSTRING (TARGET_BFD_VMA_BIT
));
775 fprintf_unfiltered (file
,
776 "gdbarch_dump: IEEE_FLOAT # %s\n",
777 XSTRING (IEEE_FLOAT
));
779 #ifdef TARGET_READ_PC
780 fprintf_unfiltered (file
,
781 "gdbarch_dump: %s # %s\n",
782 "TARGET_READ_PC(pid)",
783 XSTRING (TARGET_READ_PC (pid
)));
785 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
786 /* Macro might contain `[{}]' when not multi-arch */
787 fprintf_unfiltered (file
,
788 "gdbarch_dump: %s # %s\n",
789 "TARGET_WRITE_PC(val, pid)",
790 XSTRING (TARGET_WRITE_PC (val
, pid
)));
792 #ifdef TARGET_READ_FP
793 fprintf_unfiltered (file
,
794 "gdbarch_dump: %s # %s\n",
796 XSTRING (TARGET_READ_FP ()));
798 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
799 /* Macro might contain `[{}]' when not multi-arch */
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: %s # %s\n",
802 "TARGET_WRITE_FP(val)",
803 XSTRING (TARGET_WRITE_FP (val
)));
805 #ifdef TARGET_READ_SP
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: %s # %s\n",
809 XSTRING (TARGET_READ_SP ()));
811 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
812 /* Macro might contain `[{}]' when not multi-arch */
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: %s # %s\n",
815 "TARGET_WRITE_SP(val)",
816 XSTRING (TARGET_WRITE_SP (val
)));
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: NUM_REGS # %s\n",
823 #ifdef NUM_PSEUDO_REGS
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
826 XSTRING (NUM_PSEUDO_REGS
));
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: SP_REGNUM # %s\n",
831 XSTRING (SP_REGNUM
));
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: FP_REGNUM # %s\n",
836 XSTRING (FP_REGNUM
));
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: PC_REGNUM # %s\n",
841 XSTRING (PC_REGNUM
));
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: FP0_REGNUM # %s\n",
846 XSTRING (FP0_REGNUM
));
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: NPC_REGNUM # %s\n",
851 XSTRING (NPC_REGNUM
));
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: NNPC_REGNUM # %s\n",
856 XSTRING (NNPC_REGNUM
));
858 #ifdef STAB_REG_TO_REGNUM
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: %s # %s\n",
861 "STAB_REG_TO_REGNUM(stab_regnr)",
862 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
864 #ifdef ECOFF_REG_TO_REGNUM
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: %s # %s\n",
867 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
868 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
870 #ifdef DWARF_REG_TO_REGNUM
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: %s # %s\n",
873 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
874 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
876 #ifdef SDB_REG_TO_REGNUM
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: %s # %s\n",
879 "SDB_REG_TO_REGNUM(sdb_regnr)",
880 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
882 #ifdef DWARF2_REG_TO_REGNUM
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: %s # %s\n",
885 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
886 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: %s # %s\n",
891 "REGISTER_NAME(regnr)",
892 XSTRING (REGISTER_NAME (regnr
)));
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: REGISTER_SIZE # %s\n",
897 XSTRING (REGISTER_SIZE
));
899 #ifdef REGISTER_BYTES
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: REGISTER_BYTES # %s\n",
902 XSTRING (REGISTER_BYTES
));
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: %s # %s\n",
907 "REGISTER_BYTE(reg_nr)",
908 XSTRING (REGISTER_BYTE (reg_nr
)));
910 #ifdef REGISTER_RAW_SIZE
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: %s # %s\n",
913 "REGISTER_RAW_SIZE(reg_nr)",
914 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
916 #ifdef MAX_REGISTER_RAW_SIZE
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
919 XSTRING (MAX_REGISTER_RAW_SIZE
));
921 #ifdef REGISTER_VIRTUAL_SIZE
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: %s # %s\n",
924 "REGISTER_VIRTUAL_SIZE(reg_nr)",
925 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
927 #ifdef MAX_REGISTER_VIRTUAL_SIZE
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
930 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
932 #ifdef REGISTER_VIRTUAL_TYPE
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: %s # %s\n",
935 "REGISTER_VIRTUAL_TYPE(reg_nr)",
936 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
938 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
939 /* Macro might contain `[{}]' when not multi-arch */
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: %s # %s\n",
942 "DO_REGISTERS_INFO(reg_nr, fpregs)",
943 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
945 #ifdef REGISTER_SIM_REGNO
946 fprintf_unfiltered (file
,
947 "gdbarch_dump: %s # %s\n",
948 "REGISTER_SIM_REGNO(reg_nr)",
949 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
951 #ifdef REGISTER_BYTES_OK
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: %s # %s\n",
954 "REGISTER_BYTES_OK(nr_bytes)",
955 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
957 #ifdef USE_GENERIC_DUMMY_FRAMES
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
960 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
962 #ifdef CALL_DUMMY_LOCATION
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
965 XSTRING (CALL_DUMMY_LOCATION
));
967 #ifdef CALL_DUMMY_ADDRESS
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: %s # %s\n",
970 "CALL_DUMMY_ADDRESS()",
971 XSTRING (CALL_DUMMY_ADDRESS ()));
973 #ifdef CALL_DUMMY_START_OFFSET
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
976 XSTRING (CALL_DUMMY_START_OFFSET
));
978 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
981 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
983 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
986 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
988 #ifdef CALL_DUMMY_LENGTH
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
991 XSTRING (CALL_DUMMY_LENGTH
));
993 #ifdef PC_IN_CALL_DUMMY
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: %s # %s\n",
996 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
997 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1002 XSTRING (CALL_DUMMY_P
));
1004 #ifdef CALL_DUMMY_WORDS
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1007 XSTRING (CALL_DUMMY_WORDS
));
1009 #ifdef SIZEOF_CALL_DUMMY_WORDS
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1012 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1014 #ifdef CALL_DUMMY_STACK_ADJUST_P
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1017 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1019 #ifdef CALL_DUMMY_STACK_ADJUST
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1022 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1024 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1025 /* Macro might contain `[{}]' when not multi-arch */
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: %s # %s\n",
1028 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1029 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1031 #ifdef BELIEVE_PCC_PROMOTION
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1034 XSTRING (BELIEVE_PCC_PROMOTION
));
1036 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1039 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1041 #ifdef COERCE_FLOAT_TO_DOUBLE
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: %s # %s\n",
1044 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1045 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1047 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1048 /* Macro might contain `[{}]' when not multi-arch */
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: %s # %s\n",
1051 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1052 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1054 #ifdef REGISTER_CONVERTIBLE
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: %s # %s\n",
1057 "REGISTER_CONVERTIBLE(nr)",
1058 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1060 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1061 /* Macro might contain `[{}]' when not multi-arch */
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: %s # %s\n",
1064 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1065 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1067 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1068 /* Macro might contain `[{}]' when not multi-arch */
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: %s # %s\n",
1071 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1072 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1074 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1075 /* Macro might contain `[{}]' when not multi-arch */
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: %s # %s\n",
1078 "FETCH_PSEUDO_REGISTER(regnum)",
1079 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1081 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1082 /* Macro might contain `[{}]' when not multi-arch */
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: %s # %s\n",
1085 "STORE_PSEUDO_REGISTER(regnum)",
1086 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1088 #ifdef POINTER_TO_ADDRESS
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: %s # %s\n",
1091 "POINTER_TO_ADDRESS(type, buf)",
1092 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1094 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1095 /* Macro might contain `[{}]' when not multi-arch */
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: %s # %s\n",
1098 "ADDRESS_TO_POINTER(type, buf, addr)",
1099 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1101 #ifdef RETURN_VALUE_ON_STACK
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: %s # %s\n",
1104 "RETURN_VALUE_ON_STACK(type)",
1105 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1107 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1108 /* Macro might contain `[{}]' when not multi-arch */
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: %s # %s\n",
1111 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1112 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1114 #ifdef PUSH_ARGUMENTS
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: %s # %s\n",
1117 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1118 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1120 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1121 /* Macro might contain `[{}]' when not multi-arch */
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: %s # %s\n",
1124 "PUSH_DUMMY_FRAME(-)",
1125 XSTRING (PUSH_DUMMY_FRAME (-)));
1127 #ifdef PUSH_RETURN_ADDRESS
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: %s # %s\n",
1130 "PUSH_RETURN_ADDRESS(pc, sp)",
1131 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1133 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1134 /* Macro might contain `[{}]' when not multi-arch */
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: %s # %s\n",
1138 XSTRING (POP_FRAME (-)));
1140 #ifdef D10V_MAKE_DADDR
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: %s # %s\n",
1143 "D10V_MAKE_DADDR(x)",
1144 XSTRING (D10V_MAKE_DADDR (x
)));
1146 #ifdef D10V_MAKE_IADDR
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: %s # %s\n",
1149 "D10V_MAKE_IADDR(x)",
1150 XSTRING (D10V_MAKE_IADDR (x
)));
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: %s # %s\n",
1156 XSTRING (D10V_DADDR_P (x
)));
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: %s # %s\n",
1162 XSTRING (D10V_IADDR_P (x
)));
1164 #ifdef D10V_CONVERT_DADDR_TO_RAW
1165 fprintf_unfiltered (file
,
1166 "gdbarch_dump: %s # %s\n",
1167 "D10V_CONVERT_DADDR_TO_RAW(x)",
1168 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1170 #ifdef D10V_CONVERT_IADDR_TO_RAW
1171 fprintf_unfiltered (file
,
1172 "gdbarch_dump: %s # %s\n",
1173 "D10V_CONVERT_IADDR_TO_RAW(x)",
1174 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1176 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1177 /* Macro might contain `[{}]' when not multi-arch */
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: %s # %s\n",
1180 "STORE_STRUCT_RETURN(addr, sp)",
1181 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1183 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1184 /* Macro might contain `[{}]' when not multi-arch */
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: %s # %s\n",
1187 "STORE_RETURN_VALUE(type, valbuf)",
1188 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1190 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: %s # %s\n",
1193 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1194 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1196 #ifdef USE_STRUCT_CONVENTION
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: %s # %s\n",
1199 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1200 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1202 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1203 /* Macro might contain `[{}]' when not multi-arch */
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: %s # %s\n",
1206 "FRAME_INIT_SAVED_REGS(frame)",
1207 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1209 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1210 /* Macro might contain `[{}]' when not multi-arch */
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1213 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1214 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1216 #ifdef SKIP_PROLOGUE
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: %s # %s\n",
1219 "SKIP_PROLOGUE(ip)",
1220 XSTRING (SKIP_PROLOGUE (ip
)));
1222 #ifdef PROLOGUE_FRAMELESS_P
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: %s # %s\n",
1225 "PROLOGUE_FRAMELESS_P(ip)",
1226 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: %s # %s\n",
1231 "INNER_THAN(lhs, rhs)",
1232 XSTRING (INNER_THAN (lhs
, rhs
)));
1234 #ifdef BREAKPOINT_FROM_PC
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: %s # %s\n",
1237 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1238 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1240 #ifdef MEMORY_INSERT_BREAKPOINT
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: %s # %s\n",
1243 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1244 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1246 #ifdef MEMORY_REMOVE_BREAKPOINT
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: %s # %s\n",
1249 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1250 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1252 #ifdef DECR_PC_AFTER_BREAK
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1255 XSTRING (DECR_PC_AFTER_BREAK
));
1257 #ifdef FUNCTION_START_OFFSET
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1260 XSTRING (FUNCTION_START_OFFSET
));
1262 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1263 /* Macro might contain `[{}]' when not multi-arch */
1264 fprintf_unfiltered (file
,
1265 "gdbarch_dump: %s # %s\n",
1266 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1267 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1269 #ifdef FRAME_ARGS_SKIP
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1272 XSTRING (FRAME_ARGS_SKIP
));
1274 #ifdef FRAMELESS_FUNCTION_INVOCATION
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: %s # %s\n",
1277 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1278 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: %s # %s\n",
1283 "FRAME_CHAIN(frame)",
1284 XSTRING (FRAME_CHAIN (frame
)));
1286 #ifdef FRAME_CHAIN_VALID
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: %s # %s\n",
1289 "FRAME_CHAIN_VALID(chain, thisframe)",
1290 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1292 #ifdef FRAME_SAVED_PC
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "FRAME_SAVED_PC(fi)",
1296 XSTRING (FRAME_SAVED_PC (fi
)));
1298 #ifdef FRAME_ARGS_ADDRESS
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: %s # %s\n",
1301 "FRAME_ARGS_ADDRESS(fi)",
1302 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1304 #ifdef FRAME_LOCALS_ADDRESS
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "FRAME_LOCALS_ADDRESS(fi)",
1308 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1310 #ifdef SAVED_PC_AFTER_CALL
1311 fprintf_unfiltered (file
,
1312 "gdbarch_dump: %s # %s\n",
1313 "SAVED_PC_AFTER_CALL(frame)",
1314 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1316 #ifdef FRAME_NUM_ARGS
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: %s # %s\n",
1319 "FRAME_NUM_ARGS(frame)",
1320 XSTRING (FRAME_NUM_ARGS (frame
)));
1323 fprintf_unfiltered (file
,
1324 "gdbarch_dump: %s # %s\n",
1326 XSTRING (STACK_ALIGN (sp
)));
1328 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1331 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1333 #ifdef REG_STRUCT_HAS_ADDR
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: %s # %s\n",
1336 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1337 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1339 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1340 /* Macro might contain `[{}]' when not multi-arch */
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: %s # %s\n",
1343 "SAVE_DUMMY_FRAME_TOS(sp)",
1344 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1346 #ifdef PARM_BOUNDARY
1347 fprintf_unfiltered (file
,
1348 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1349 XSTRING (PARM_BOUNDARY
));
1351 #ifdef TARGET_FLOAT_FORMAT
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1354 XSTRING (TARGET_FLOAT_FORMAT
));
1356 #ifdef TARGET_DOUBLE_FORMAT
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1359 XSTRING (TARGET_DOUBLE_FORMAT
));
1361 #ifdef TARGET_LONG_DOUBLE_FORMAT
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1364 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1366 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: %s # %s\n",
1369 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1370 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1372 #ifdef TARGET_ARCHITECTURE
1373 if (TARGET_ARCHITECTURE
!= NULL
)
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1376 TARGET_ARCHITECTURE
->printable_name
);
1378 #ifdef TARGET_BYTE_ORDER
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1381 (long) TARGET_BYTE_ORDER
);
1383 #ifdef TARGET_SHORT_BIT
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1386 (long) TARGET_SHORT_BIT
);
1388 #ifdef TARGET_INT_BIT
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1391 (long) TARGET_INT_BIT
);
1393 #ifdef TARGET_LONG_BIT
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1396 (long) TARGET_LONG_BIT
);
1398 #ifdef TARGET_LONG_LONG_BIT
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1401 (long) TARGET_LONG_LONG_BIT
);
1403 #ifdef TARGET_FLOAT_BIT
1404 fprintf_unfiltered (file
,
1405 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1406 (long) TARGET_FLOAT_BIT
);
1408 #ifdef TARGET_DOUBLE_BIT
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1411 (long) TARGET_DOUBLE_BIT
);
1413 #ifdef TARGET_LONG_DOUBLE_BIT
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1416 (long) TARGET_LONG_DOUBLE_BIT
);
1418 #ifdef TARGET_PTR_BIT
1419 fprintf_unfiltered (file
,
1420 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1421 (long) TARGET_PTR_BIT
);
1423 #ifdef TARGET_ADDR_BIT
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1426 (long) TARGET_ADDR_BIT
);
1428 #ifdef TARGET_BFD_VMA_BIT
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1431 (long) TARGET_BFD_VMA_BIT
);
1434 fprintf_unfiltered (file
,
1435 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1438 #ifdef TARGET_READ_PC
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1442 (long) current_gdbarch
->read_pc
1443 /*TARGET_READ_PC ()*/);
1445 #ifdef TARGET_WRITE_PC
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1449 (long) current_gdbarch
->write_pc
1450 /*TARGET_WRITE_PC ()*/);
1452 #ifdef TARGET_READ_FP
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1456 (long) current_gdbarch
->read_fp
1457 /*TARGET_READ_FP ()*/);
1459 #ifdef TARGET_WRITE_FP
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1463 (long) current_gdbarch
->write_fp
1464 /*TARGET_WRITE_FP ()*/);
1466 #ifdef TARGET_READ_SP
1468 fprintf_unfiltered (file
,
1469 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1470 (long) current_gdbarch
->read_sp
1471 /*TARGET_READ_SP ()*/);
1473 #ifdef TARGET_WRITE_SP
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1477 (long) current_gdbarch
->write_sp
1478 /*TARGET_WRITE_SP ()*/);
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: NUM_REGS = %ld\n",
1485 #ifdef NUM_PSEUDO_REGS
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1488 (long) NUM_PSEUDO_REGS
);
1491 fprintf_unfiltered (file
,
1492 "gdbarch_dump: SP_REGNUM = %ld\n",
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: FP_REGNUM = %ld\n",
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: PC_REGNUM = %ld\n",
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: FP0_REGNUM = %ld\n",
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: NPC_REGNUM = %ld\n",
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1518 (long) NNPC_REGNUM
);
1520 #ifdef STAB_REG_TO_REGNUM
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1524 (long) current_gdbarch
->stab_reg_to_regnum
1525 /*STAB_REG_TO_REGNUM ()*/);
1527 #ifdef ECOFF_REG_TO_REGNUM
1529 fprintf_unfiltered (file
,
1530 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1531 (long) current_gdbarch
->ecoff_reg_to_regnum
1532 /*ECOFF_REG_TO_REGNUM ()*/);
1534 #ifdef DWARF_REG_TO_REGNUM
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1538 (long) current_gdbarch
->dwarf_reg_to_regnum
1539 /*DWARF_REG_TO_REGNUM ()*/);
1541 #ifdef SDB_REG_TO_REGNUM
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1545 (long) current_gdbarch
->sdb_reg_to_regnum
1546 /*SDB_REG_TO_REGNUM ()*/);
1548 #ifdef DWARF2_REG_TO_REGNUM
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1552 (long) current_gdbarch
->dwarf2_reg_to_regnum
1553 /*DWARF2_REG_TO_REGNUM ()*/);
1555 #ifdef REGISTER_NAME
1557 fprintf_unfiltered (file
,
1558 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1559 (long) current_gdbarch
->register_name
1560 /*REGISTER_NAME ()*/);
1562 #ifdef REGISTER_SIZE
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1565 (long) REGISTER_SIZE
);
1567 #ifdef REGISTER_BYTES
1568 fprintf_unfiltered (file
,
1569 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1570 (long) REGISTER_BYTES
);
1572 #ifdef REGISTER_BYTE
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1576 (long) current_gdbarch
->register_byte
1577 /*REGISTER_BYTE ()*/);
1579 #ifdef REGISTER_RAW_SIZE
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1583 (long) current_gdbarch
->register_raw_size
1584 /*REGISTER_RAW_SIZE ()*/);
1586 #ifdef MAX_REGISTER_RAW_SIZE
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1589 (long) MAX_REGISTER_RAW_SIZE
);
1591 #ifdef REGISTER_VIRTUAL_SIZE
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1595 (long) current_gdbarch
->register_virtual_size
1596 /*REGISTER_VIRTUAL_SIZE ()*/);
1598 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1599 fprintf_unfiltered (file
,
1600 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1601 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1603 #ifdef REGISTER_VIRTUAL_TYPE
1605 fprintf_unfiltered (file
,
1606 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1607 (long) current_gdbarch
->register_virtual_type
1608 /*REGISTER_VIRTUAL_TYPE ()*/);
1610 #ifdef DO_REGISTERS_INFO
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1614 (long) current_gdbarch
->do_registers_info
1615 /*DO_REGISTERS_INFO ()*/);
1617 #ifdef REGISTER_SIM_REGNO
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1621 (long) current_gdbarch
->register_sim_regno
1622 /*REGISTER_SIM_REGNO ()*/);
1624 #ifdef REGISTER_BYTES_OK
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1628 (long) current_gdbarch
->register_bytes_ok
1629 /*REGISTER_BYTES_OK ()*/);
1631 #ifdef USE_GENERIC_DUMMY_FRAMES
1632 fprintf_unfiltered (file
,
1633 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1634 (long) USE_GENERIC_DUMMY_FRAMES
);
1636 #ifdef CALL_DUMMY_LOCATION
1637 fprintf_unfiltered (file
,
1638 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1639 (long) CALL_DUMMY_LOCATION
);
1641 #ifdef CALL_DUMMY_ADDRESS
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1645 (long) current_gdbarch
->call_dummy_address
1646 /*CALL_DUMMY_ADDRESS ()*/);
1648 #ifdef CALL_DUMMY_START_OFFSET
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1651 (long) CALL_DUMMY_START_OFFSET
);
1653 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1654 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1657 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1659 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1662 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1664 #ifdef CALL_DUMMY_LENGTH
1665 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1666 fprintf_unfiltered (file
,
1667 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1668 (long) CALL_DUMMY_LENGTH
);
1670 #ifdef PC_IN_CALL_DUMMY
1672 fprintf_unfiltered (file
,
1673 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1674 (long) current_gdbarch
->pc_in_call_dummy
1675 /*PC_IN_CALL_DUMMY ()*/);
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1680 (long) CALL_DUMMY_P
);
1682 #ifdef CALL_DUMMY_WORDS
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1685 (long) CALL_DUMMY_WORDS
);
1687 #ifdef SIZEOF_CALL_DUMMY_WORDS
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1690 (long) SIZEOF_CALL_DUMMY_WORDS
);
1692 #ifdef CALL_DUMMY_STACK_ADJUST_P
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1695 (long) CALL_DUMMY_STACK_ADJUST_P
);
1697 #ifdef CALL_DUMMY_STACK_ADJUST
1698 if (CALL_DUMMY_STACK_ADJUST_P
)
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1701 (long) CALL_DUMMY_STACK_ADJUST
);
1703 #ifdef FIX_CALL_DUMMY
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1707 (long) current_gdbarch
->fix_call_dummy
1708 /*FIX_CALL_DUMMY ()*/);
1710 #ifdef BELIEVE_PCC_PROMOTION
1711 fprintf_unfiltered (file
,
1712 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1713 (long) BELIEVE_PCC_PROMOTION
);
1715 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1718 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1720 #ifdef COERCE_FLOAT_TO_DOUBLE
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1724 (long) current_gdbarch
->coerce_float_to_double
1725 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1727 #ifdef GET_SAVED_REGISTER
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1731 (long) current_gdbarch
->get_saved_register
1732 /*GET_SAVED_REGISTER ()*/);
1734 #ifdef REGISTER_CONVERTIBLE
1736 fprintf_unfiltered (file
,
1737 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1738 (long) current_gdbarch
->register_convertible
1739 /*REGISTER_CONVERTIBLE ()*/);
1741 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1743 fprintf_unfiltered (file
,
1744 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1745 (long) current_gdbarch
->register_convert_to_virtual
1746 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1748 #ifdef REGISTER_CONVERT_TO_RAW
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1752 (long) current_gdbarch
->register_convert_to_raw
1753 /*REGISTER_CONVERT_TO_RAW ()*/);
1755 #ifdef FETCH_PSEUDO_REGISTER
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1759 (long) current_gdbarch
->fetch_pseudo_register
1760 /*FETCH_PSEUDO_REGISTER ()*/);
1762 #ifdef STORE_PSEUDO_REGISTER
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1766 (long) current_gdbarch
->store_pseudo_register
1767 /*STORE_PSEUDO_REGISTER ()*/);
1769 #ifdef POINTER_TO_ADDRESS
1771 fprintf_unfiltered (file
,
1772 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1773 (long) current_gdbarch
->pointer_to_address
1774 /*POINTER_TO_ADDRESS ()*/);
1776 #ifdef ADDRESS_TO_POINTER
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1780 (long) current_gdbarch
->address_to_pointer
1781 /*ADDRESS_TO_POINTER ()*/);
1783 #ifdef RETURN_VALUE_ON_STACK
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1787 (long) current_gdbarch
->return_value_on_stack
1788 /*RETURN_VALUE_ON_STACK ()*/);
1790 #ifdef EXTRACT_RETURN_VALUE
1792 fprintf_unfiltered (file
,
1793 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1794 (long) current_gdbarch
->extract_return_value
1795 /*EXTRACT_RETURN_VALUE ()*/);
1797 #ifdef PUSH_ARGUMENTS
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1801 (long) current_gdbarch
->push_arguments
1802 /*PUSH_ARGUMENTS ()*/);
1804 #ifdef PUSH_DUMMY_FRAME
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1808 (long) current_gdbarch
->push_dummy_frame
1809 /*PUSH_DUMMY_FRAME ()*/);
1811 #ifdef PUSH_RETURN_ADDRESS
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1815 (long) current_gdbarch
->push_return_address
1816 /*PUSH_RETURN_ADDRESS ()*/);
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1822 (long) current_gdbarch
->pop_frame
1825 #ifdef D10V_MAKE_DADDR
1827 fprintf_unfiltered (file
,
1828 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1829 (long) current_gdbarch
->d10v_make_daddr
1830 /*D10V_MAKE_DADDR ()*/);
1832 #ifdef D10V_MAKE_IADDR
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1836 (long) current_gdbarch
->d10v_make_iaddr
1837 /*D10V_MAKE_IADDR ()*/);
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1843 (long) current_gdbarch
->d10v_daddr_p
1844 /*D10V_DADDR_P ()*/);
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1850 (long) current_gdbarch
->d10v_iaddr_p
1851 /*D10V_IADDR_P ()*/);
1853 #ifdef D10V_CONVERT_DADDR_TO_RAW
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1857 (long) current_gdbarch
->d10v_convert_daddr_to_raw
1858 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1860 #ifdef D10V_CONVERT_IADDR_TO_RAW
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1864 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
1865 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1867 #ifdef STORE_STRUCT_RETURN
1869 fprintf_unfiltered (file
,
1870 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1871 (long) current_gdbarch
->store_struct_return
1872 /*STORE_STRUCT_RETURN ()*/);
1874 #ifdef STORE_RETURN_VALUE
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1878 (long) current_gdbarch
->store_return_value
1879 /*STORE_RETURN_VALUE ()*/);
1881 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1885 (long) current_gdbarch
->extract_struct_value_address
1886 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1888 #ifdef USE_STRUCT_CONVENTION
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1892 (long) current_gdbarch
->use_struct_convention
1893 /*USE_STRUCT_CONVENTION ()*/);
1895 #ifdef FRAME_INIT_SAVED_REGS
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1899 (long) current_gdbarch
->frame_init_saved_regs
1900 /*FRAME_INIT_SAVED_REGS ()*/);
1902 #ifdef INIT_EXTRA_FRAME_INFO
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1906 (long) current_gdbarch
->init_extra_frame_info
1907 /*INIT_EXTRA_FRAME_INFO ()*/);
1909 #ifdef SKIP_PROLOGUE
1911 fprintf_unfiltered (file
,
1912 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1913 (long) current_gdbarch
->skip_prologue
1914 /*SKIP_PROLOGUE ()*/);
1916 #ifdef PROLOGUE_FRAMELESS_P
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1920 (long) current_gdbarch
->prologue_frameless_p
1921 /*PROLOGUE_FRAMELESS_P ()*/);
1925 fprintf_unfiltered (file
,
1926 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1927 (long) current_gdbarch
->inner_than
1930 #ifdef BREAKPOINT_FROM_PC
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
1934 (long) current_gdbarch
->breakpoint_from_pc
1935 /*BREAKPOINT_FROM_PC ()*/);
1937 #ifdef MEMORY_INSERT_BREAKPOINT
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1941 (long) current_gdbarch
->memory_insert_breakpoint
1942 /*MEMORY_INSERT_BREAKPOINT ()*/);
1944 #ifdef MEMORY_REMOVE_BREAKPOINT
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1948 (long) current_gdbarch
->memory_remove_breakpoint
1949 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1951 #ifdef DECR_PC_AFTER_BREAK
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1954 (long) DECR_PC_AFTER_BREAK
);
1956 #ifdef FUNCTION_START_OFFSET
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1959 (long) FUNCTION_START_OFFSET
);
1961 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1965 (long) current_gdbarch
->remote_translate_xfer_address
1966 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1968 #ifdef FRAME_ARGS_SKIP
1969 fprintf_unfiltered (file
,
1970 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1971 (long) FRAME_ARGS_SKIP
);
1973 #ifdef FRAMELESS_FUNCTION_INVOCATION
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1977 (long) current_gdbarch
->frameless_function_invocation
1978 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1984 (long) current_gdbarch
->frame_chain
1985 /*FRAME_CHAIN ()*/);
1987 #ifdef FRAME_CHAIN_VALID
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1991 (long) current_gdbarch
->frame_chain_valid
1992 /*FRAME_CHAIN_VALID ()*/);
1994 #ifdef FRAME_SAVED_PC
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1998 (long) current_gdbarch
->frame_saved_pc
1999 /*FRAME_SAVED_PC ()*/);
2001 #ifdef FRAME_ARGS_ADDRESS
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2005 (long) current_gdbarch
->frame_args_address
2006 /*FRAME_ARGS_ADDRESS ()*/);
2008 #ifdef FRAME_LOCALS_ADDRESS
2010 fprintf_unfiltered (file
,
2011 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2012 (long) current_gdbarch
->frame_locals_address
2013 /*FRAME_LOCALS_ADDRESS ()*/);
2015 #ifdef SAVED_PC_AFTER_CALL
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2019 (long) current_gdbarch
->saved_pc_after_call
2020 /*SAVED_PC_AFTER_CALL ()*/);
2022 #ifdef FRAME_NUM_ARGS
2024 fprintf_unfiltered (file
,
2025 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2026 (long) current_gdbarch
->frame_num_args
2027 /*FRAME_NUM_ARGS ()*/);
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2033 (long) current_gdbarch
->stack_align
2034 /*STACK_ALIGN ()*/);
2036 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2039 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2041 #ifdef REG_STRUCT_HAS_ADDR
2043 fprintf_unfiltered (file
,
2044 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2045 (long) current_gdbarch
->reg_struct_has_addr
2046 /*REG_STRUCT_HAS_ADDR ()*/);
2048 #ifdef SAVE_DUMMY_FRAME_TOS
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2052 (long) current_gdbarch
->save_dummy_frame_tos
2053 /*SAVE_DUMMY_FRAME_TOS ()*/);
2055 #ifdef PARM_BOUNDARY
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2058 (long) PARM_BOUNDARY
);
2060 #ifdef TARGET_FLOAT_FORMAT
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2063 (long) TARGET_FLOAT_FORMAT
);
2065 #ifdef TARGET_DOUBLE_FORMAT
2066 fprintf_unfiltered (file
,
2067 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2068 (long) TARGET_DOUBLE_FORMAT
);
2070 #ifdef TARGET_LONG_DOUBLE_FORMAT
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2073 (long) TARGET_LONG_DOUBLE_FORMAT
);
2075 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2077 fprintf_unfiltered (file
,
2078 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2079 (long) current_gdbarch
->convert_from_func_ptr_addr
2080 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2082 if (current_gdbarch
->dump_tdep
!= NULL
)
2083 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2086 struct gdbarch_tdep
*
2087 gdbarch_tdep (struct gdbarch
*gdbarch
)
2089 if (gdbarch_debug
>= 2)
2090 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2091 return gdbarch
->tdep
;
2095 const struct bfd_arch_info
*
2096 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2098 if (gdbarch_debug
>= 2)
2099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2100 return gdbarch
->bfd_arch_info
;
2104 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2106 if (gdbarch_debug
>= 2)
2107 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2108 return gdbarch
->byte_order
;
2112 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2114 /* Skip verify of short_bit, invalid_p == 0 */
2115 if (gdbarch_debug
>= 2)
2116 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2117 return gdbarch
->short_bit
;
2121 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2124 gdbarch
->short_bit
= short_bit
;
2128 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2130 /* Skip verify of int_bit, invalid_p == 0 */
2131 if (gdbarch_debug
>= 2)
2132 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2133 return gdbarch
->int_bit
;
2137 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2140 gdbarch
->int_bit
= int_bit
;
2144 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2146 /* Skip verify of long_bit, invalid_p == 0 */
2147 if (gdbarch_debug
>= 2)
2148 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2149 return gdbarch
->long_bit
;
2153 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2156 gdbarch
->long_bit
= long_bit
;
2160 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2162 /* Skip verify of long_long_bit, invalid_p == 0 */
2163 if (gdbarch_debug
>= 2)
2164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2165 return gdbarch
->long_long_bit
;
2169 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2172 gdbarch
->long_long_bit
= long_long_bit
;
2176 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2178 /* Skip verify of float_bit, invalid_p == 0 */
2179 if (gdbarch_debug
>= 2)
2180 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2181 return gdbarch
->float_bit
;
2185 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2188 gdbarch
->float_bit
= float_bit
;
2192 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2194 /* Skip verify of double_bit, invalid_p == 0 */
2195 if (gdbarch_debug
>= 2)
2196 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2197 return gdbarch
->double_bit
;
2201 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2204 gdbarch
->double_bit
= double_bit
;
2208 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2210 /* Skip verify of long_double_bit, invalid_p == 0 */
2211 if (gdbarch_debug
>= 2)
2212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2213 return gdbarch
->long_double_bit
;
2217 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2218 int long_double_bit
)
2220 gdbarch
->long_double_bit
= long_double_bit
;
2224 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2226 /* Skip verify of ptr_bit, invalid_p == 0 */
2227 if (gdbarch_debug
>= 2)
2228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2229 return gdbarch
->ptr_bit
;
2233 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2236 gdbarch
->ptr_bit
= ptr_bit
;
2240 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2242 if (gdbarch
->addr_bit
== 0)
2243 internal_error ("gdbarch: gdbarch_addr_bit invalid");
2244 if (gdbarch_debug
>= 2)
2245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2246 return gdbarch
->addr_bit
;
2250 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2253 gdbarch
->addr_bit
= addr_bit
;
2257 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2259 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2260 if (gdbarch_debug
>= 2)
2261 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2262 return gdbarch
->bfd_vma_bit
;
2266 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2269 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2273 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2275 /* Skip verify of ieee_float, invalid_p == 0 */
2276 if (gdbarch_debug
>= 2)
2277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2278 return gdbarch
->ieee_float
;
2282 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2285 gdbarch
->ieee_float
= ieee_float
;
2289 gdbarch_read_pc (struct gdbarch
*gdbarch
, int pid
)
2291 if (gdbarch
->read_pc
== 0)
2292 internal_error ("gdbarch: gdbarch_read_pc invalid");
2293 if (gdbarch_debug
>= 2)
2294 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2295 return gdbarch
->read_pc (pid
);
2299 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2300 gdbarch_read_pc_ftype read_pc
)
2302 gdbarch
->read_pc
= read_pc
;
2306 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, int pid
)
2308 if (gdbarch
->write_pc
== 0)
2309 internal_error ("gdbarch: gdbarch_write_pc invalid");
2310 if (gdbarch_debug
>= 2)
2311 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2312 gdbarch
->write_pc (val
, pid
);
2316 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2317 gdbarch_write_pc_ftype write_pc
)
2319 gdbarch
->write_pc
= write_pc
;
2323 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2325 if (gdbarch
->read_fp
== 0)
2326 internal_error ("gdbarch: gdbarch_read_fp invalid");
2327 if (gdbarch_debug
>= 2)
2328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2329 return gdbarch
->read_fp ();
2333 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2334 gdbarch_read_fp_ftype read_fp
)
2336 gdbarch
->read_fp
= read_fp
;
2340 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2342 if (gdbarch
->write_fp
== 0)
2343 internal_error ("gdbarch: gdbarch_write_fp invalid");
2344 if (gdbarch_debug
>= 2)
2345 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2346 gdbarch
->write_fp (val
);
2350 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2351 gdbarch_write_fp_ftype write_fp
)
2353 gdbarch
->write_fp
= write_fp
;
2357 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2359 if (gdbarch
->read_sp
== 0)
2360 internal_error ("gdbarch: gdbarch_read_sp invalid");
2361 if (gdbarch_debug
>= 2)
2362 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2363 return gdbarch
->read_sp ();
2367 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2368 gdbarch_read_sp_ftype read_sp
)
2370 gdbarch
->read_sp
= read_sp
;
2374 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2376 if (gdbarch
->write_sp
== 0)
2377 internal_error ("gdbarch: gdbarch_write_sp invalid");
2378 if (gdbarch_debug
>= 2)
2379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2380 gdbarch
->write_sp (val
);
2384 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2385 gdbarch_write_sp_ftype write_sp
)
2387 gdbarch
->write_sp
= write_sp
;
2391 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2393 if (gdbarch
->num_regs
== -1)
2394 internal_error ("gdbarch: gdbarch_num_regs invalid");
2395 if (gdbarch_debug
>= 2)
2396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2397 return gdbarch
->num_regs
;
2401 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2404 gdbarch
->num_regs
= num_regs
;
2408 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2410 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2411 if (gdbarch_debug
>= 2)
2412 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2413 return gdbarch
->num_pseudo_regs
;
2417 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2418 int num_pseudo_regs
)
2420 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2424 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2426 if (gdbarch
->sp_regnum
== -1)
2427 internal_error ("gdbarch: gdbarch_sp_regnum invalid");
2428 if (gdbarch_debug
>= 2)
2429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2430 return gdbarch
->sp_regnum
;
2434 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2437 gdbarch
->sp_regnum
= sp_regnum
;
2441 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2443 if (gdbarch
->fp_regnum
== -1)
2444 internal_error ("gdbarch: gdbarch_fp_regnum invalid");
2445 if (gdbarch_debug
>= 2)
2446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2447 return gdbarch
->fp_regnum
;
2451 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2454 gdbarch
->fp_regnum
= fp_regnum
;
2458 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2460 if (gdbarch
->pc_regnum
== -1)
2461 internal_error ("gdbarch: gdbarch_pc_regnum invalid");
2462 if (gdbarch_debug
>= 2)
2463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2464 return gdbarch
->pc_regnum
;
2468 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2471 gdbarch
->pc_regnum
= pc_regnum
;
2475 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2477 /* Skip verify of fp0_regnum, invalid_p == 0 */
2478 if (gdbarch_debug
>= 2)
2479 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2480 return gdbarch
->fp0_regnum
;
2484 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2487 gdbarch
->fp0_regnum
= fp0_regnum
;
2491 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2493 /* Skip verify of npc_regnum, invalid_p == 0 */
2494 if (gdbarch_debug
>= 2)
2495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2496 return gdbarch
->npc_regnum
;
2500 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2503 gdbarch
->npc_regnum
= npc_regnum
;
2507 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2509 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2510 if (gdbarch_debug
>= 2)
2511 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2512 return gdbarch
->nnpc_regnum
;
2516 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2519 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2523 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2525 if (gdbarch
->stab_reg_to_regnum
== 0)
2526 internal_error ("gdbarch: gdbarch_stab_reg_to_regnum invalid");
2527 if (gdbarch_debug
>= 2)
2528 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2529 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2533 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2534 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2536 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2540 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2542 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2543 internal_error ("gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2546 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2550 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2551 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2553 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2557 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2559 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2560 internal_error ("gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2561 if (gdbarch_debug
>= 2)
2562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2563 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2567 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2568 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2570 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2574 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2576 if (gdbarch
->sdb_reg_to_regnum
== 0)
2577 internal_error ("gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2578 if (gdbarch_debug
>= 2)
2579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2580 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2584 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2585 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2587 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2591 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2593 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2594 internal_error ("gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2595 if (gdbarch_debug
>= 2)
2596 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2597 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2601 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2602 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2604 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2608 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2610 if (gdbarch
->register_name
== 0)
2611 internal_error ("gdbarch: gdbarch_register_name invalid");
2612 if (gdbarch_debug
>= 2)
2613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2614 return gdbarch
->register_name (regnr
);
2618 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2619 gdbarch_register_name_ftype register_name
)
2621 gdbarch
->register_name
= register_name
;
2625 gdbarch_register_size (struct gdbarch
*gdbarch
)
2627 if (gdbarch
->register_size
== -1)
2628 internal_error ("gdbarch: gdbarch_register_size invalid");
2629 if (gdbarch_debug
>= 2)
2630 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2631 return gdbarch
->register_size
;
2635 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2638 gdbarch
->register_size
= register_size
;
2642 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2644 if (gdbarch
->register_bytes
== -1)
2645 internal_error ("gdbarch: gdbarch_register_bytes invalid");
2646 if (gdbarch_debug
>= 2)
2647 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2648 return gdbarch
->register_bytes
;
2652 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2655 gdbarch
->register_bytes
= register_bytes
;
2659 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2661 if (gdbarch
->register_byte
== 0)
2662 internal_error ("gdbarch: gdbarch_register_byte invalid");
2663 if (gdbarch_debug
>= 2)
2664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2665 return gdbarch
->register_byte (reg_nr
);
2669 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2670 gdbarch_register_byte_ftype register_byte
)
2672 gdbarch
->register_byte
= register_byte
;
2676 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2678 if (gdbarch
->register_raw_size
== 0)
2679 internal_error ("gdbarch: gdbarch_register_raw_size invalid");
2680 if (gdbarch_debug
>= 2)
2681 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2682 return gdbarch
->register_raw_size (reg_nr
);
2686 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2687 gdbarch_register_raw_size_ftype register_raw_size
)
2689 gdbarch
->register_raw_size
= register_raw_size
;
2693 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2695 if (gdbarch
->max_register_raw_size
== -1)
2696 internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
2697 if (gdbarch_debug
>= 2)
2698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2699 return gdbarch
->max_register_raw_size
;
2703 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2704 int max_register_raw_size
)
2706 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2710 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2712 if (gdbarch
->register_virtual_size
== 0)
2713 internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
2714 if (gdbarch_debug
>= 2)
2715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2716 return gdbarch
->register_virtual_size (reg_nr
);
2720 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2721 gdbarch_register_virtual_size_ftype register_virtual_size
)
2723 gdbarch
->register_virtual_size
= register_virtual_size
;
2727 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2729 if (gdbarch
->max_register_virtual_size
== -1)
2730 internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
2731 if (gdbarch_debug
>= 2)
2732 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2733 return gdbarch
->max_register_virtual_size
;
2737 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2738 int max_register_virtual_size
)
2740 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2744 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2746 if (gdbarch
->register_virtual_type
== 0)
2747 internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
2748 if (gdbarch_debug
>= 2)
2749 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2750 return gdbarch
->register_virtual_type (reg_nr
);
2754 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2755 gdbarch_register_virtual_type_ftype register_virtual_type
)
2757 gdbarch
->register_virtual_type
= register_virtual_type
;
2761 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2763 if (gdbarch
->do_registers_info
== 0)
2764 internal_error ("gdbarch: gdbarch_do_registers_info invalid");
2765 if (gdbarch_debug
>= 2)
2766 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2767 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2771 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2772 gdbarch_do_registers_info_ftype do_registers_info
)
2774 gdbarch
->do_registers_info
= do_registers_info
;
2778 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2780 if (gdbarch
->register_sim_regno
== 0)
2781 internal_error ("gdbarch: gdbarch_register_sim_regno invalid");
2782 if (gdbarch_debug
>= 2)
2783 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2784 return gdbarch
->register_sim_regno (reg_nr
);
2788 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2789 gdbarch_register_sim_regno_ftype register_sim_regno
)
2791 gdbarch
->register_sim_regno
= register_sim_regno
;
2795 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2797 return gdbarch
->register_bytes_ok
!= 0;
2801 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2803 if (gdbarch
->register_bytes_ok
== 0)
2804 internal_error ("gdbarch: gdbarch_register_bytes_ok invalid");
2805 if (gdbarch_debug
>= 2)
2806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2807 return gdbarch
->register_bytes_ok (nr_bytes
);
2811 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2812 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2814 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2818 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2820 if (gdbarch
->use_generic_dummy_frames
== -1)
2821 internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
2822 if (gdbarch_debug
>= 2)
2823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2824 return gdbarch
->use_generic_dummy_frames
;
2828 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2829 int use_generic_dummy_frames
)
2831 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2835 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2837 if (gdbarch
->call_dummy_location
== 0)
2838 internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
2839 if (gdbarch_debug
>= 2)
2840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2841 return gdbarch
->call_dummy_location
;
2845 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2846 int call_dummy_location
)
2848 gdbarch
->call_dummy_location
= call_dummy_location
;
2852 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2854 if (gdbarch
->call_dummy_address
== 0)
2855 internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
2856 if (gdbarch_debug
>= 2)
2857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2858 return gdbarch
->call_dummy_address ();
2862 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2863 gdbarch_call_dummy_address_ftype call_dummy_address
)
2865 gdbarch
->call_dummy_address
= call_dummy_address
;
2869 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2871 if (gdbarch
->call_dummy_start_offset
== -1)
2872 internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
2873 if (gdbarch_debug
>= 2)
2874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2875 return gdbarch
->call_dummy_start_offset
;
2879 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
2880 CORE_ADDR call_dummy_start_offset
)
2882 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
2886 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
2888 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
2889 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2890 if (gdbarch_debug
>= 2)
2891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
2892 return gdbarch
->call_dummy_breakpoint_offset
;
2896 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
2897 CORE_ADDR call_dummy_breakpoint_offset
)
2899 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
2903 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
2905 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
2906 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
2907 if (gdbarch_debug
>= 2)
2908 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
2909 return gdbarch
->call_dummy_breakpoint_offset_p
;
2913 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
2914 int call_dummy_breakpoint_offset_p
)
2916 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
2920 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
2922 if (gdbarch
->call_dummy_length
== -1)
2923 internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
2924 if (gdbarch_debug
>= 2)
2925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
2926 return gdbarch
->call_dummy_length
;
2930 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
2931 int call_dummy_length
)
2933 gdbarch
->call_dummy_length
= call_dummy_length
;
2937 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
2939 if (gdbarch
->pc_in_call_dummy
== 0)
2940 internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
2941 if (gdbarch_debug
>= 2)
2942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
2943 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
2947 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
2948 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
2950 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
2954 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
2956 if (gdbarch
->call_dummy_p
== -1)
2957 internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
2958 if (gdbarch_debug
>= 2)
2959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
2960 return gdbarch
->call_dummy_p
;
2964 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
2967 gdbarch
->call_dummy_p
= call_dummy_p
;
2971 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
2973 /* Skip verify of call_dummy_words, invalid_p == 0 */
2974 if (gdbarch_debug
>= 2)
2975 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
2976 return gdbarch
->call_dummy_words
;
2980 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
2981 LONGEST
* call_dummy_words
)
2983 gdbarch
->call_dummy_words
= call_dummy_words
;
2987 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
2989 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
2990 if (gdbarch_debug
>= 2)
2991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
2992 return gdbarch
->sizeof_call_dummy_words
;
2996 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
2997 int sizeof_call_dummy_words
)
2999 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3003 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3005 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3006 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3007 if (gdbarch_debug
>= 2)
3008 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3009 return gdbarch
->call_dummy_stack_adjust_p
;
3013 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3014 int call_dummy_stack_adjust_p
)
3016 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3020 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3022 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3023 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3024 if (gdbarch_debug
>= 2)
3025 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3026 return gdbarch
->call_dummy_stack_adjust
;
3030 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3031 int call_dummy_stack_adjust
)
3033 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3037 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
)
3039 if (gdbarch
->fix_call_dummy
== 0)
3040 internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
3041 if (gdbarch_debug
>= 2)
3042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3043 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3047 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3048 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3050 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3054 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3056 if (gdbarch_debug
>= 2)
3057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3058 return gdbarch
->believe_pcc_promotion
;
3062 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3063 int believe_pcc_promotion
)
3065 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3069 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3071 if (gdbarch_debug
>= 2)
3072 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3073 return gdbarch
->believe_pcc_promotion_type
;
3077 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3078 int believe_pcc_promotion_type
)
3080 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3084 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3086 if (gdbarch
->coerce_float_to_double
== 0)
3087 internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
3088 if (gdbarch_debug
>= 2)
3089 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3090 return gdbarch
->coerce_float_to_double (formal
, actual
);
3094 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3095 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3097 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3101 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
)
3103 if (gdbarch
->get_saved_register
== 0)
3104 internal_error ("gdbarch: gdbarch_get_saved_register invalid");
3105 if (gdbarch_debug
>= 2)
3106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3107 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3111 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3112 gdbarch_get_saved_register_ftype get_saved_register
)
3114 gdbarch
->get_saved_register
= get_saved_register
;
3118 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3120 if (gdbarch
->register_convertible
== 0)
3121 internal_error ("gdbarch: gdbarch_register_convertible invalid");
3122 if (gdbarch_debug
>= 2)
3123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3124 return gdbarch
->register_convertible (nr
);
3128 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3129 gdbarch_register_convertible_ftype register_convertible
)
3131 gdbarch
->register_convertible
= register_convertible
;
3135 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3137 if (gdbarch
->register_convert_to_virtual
== 0)
3138 internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
3139 if (gdbarch_debug
>= 2)
3140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3141 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3145 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3146 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3148 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3152 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3154 if (gdbarch
->register_convert_to_raw
== 0)
3155 internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
3156 if (gdbarch_debug
>= 2)
3157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3158 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3162 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3163 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3165 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3169 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3171 if (gdbarch
->fetch_pseudo_register
== 0)
3172 internal_error ("gdbarch: gdbarch_fetch_pseudo_register invalid");
3173 if (gdbarch_debug
>= 2)
3174 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3175 gdbarch
->fetch_pseudo_register (regnum
);
3179 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3180 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3182 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3186 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3188 if (gdbarch
->store_pseudo_register
== 0)
3189 internal_error ("gdbarch: gdbarch_store_pseudo_register invalid");
3190 if (gdbarch_debug
>= 2)
3191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3192 gdbarch
->store_pseudo_register (regnum
);
3196 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3197 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3199 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3203 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3205 if (gdbarch
->pointer_to_address
== 0)
3206 internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3209 return gdbarch
->pointer_to_address (type
, buf
);
3213 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3214 gdbarch_pointer_to_address_ftype pointer_to_address
)
3216 gdbarch
->pointer_to_address
= pointer_to_address
;
3220 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3222 if (gdbarch
->address_to_pointer
== 0)
3223 internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
3224 if (gdbarch_debug
>= 2)
3225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3226 gdbarch
->address_to_pointer (type
, buf
, addr
);
3230 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3231 gdbarch_address_to_pointer_ftype address_to_pointer
)
3233 gdbarch
->address_to_pointer
= address_to_pointer
;
3237 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3239 if (gdbarch
->return_value_on_stack
== 0)
3240 internal_error ("gdbarch: gdbarch_return_value_on_stack invalid");
3241 if (gdbarch_debug
>= 2)
3242 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3243 return gdbarch
->return_value_on_stack (type
);
3247 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3248 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3250 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3254 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3256 if (gdbarch
->extract_return_value
== 0)
3257 internal_error ("gdbarch: gdbarch_extract_return_value invalid");
3258 if (gdbarch_debug
>= 2)
3259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3260 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3264 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3265 gdbarch_extract_return_value_ftype extract_return_value
)
3267 gdbarch
->extract_return_value
= extract_return_value
;
3271 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3273 if (gdbarch
->push_arguments
== 0)
3274 internal_error ("gdbarch: gdbarch_push_arguments invalid");
3275 if (gdbarch_debug
>= 2)
3276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3277 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3281 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3282 gdbarch_push_arguments_ftype push_arguments
)
3284 gdbarch
->push_arguments
= push_arguments
;
3288 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3290 if (gdbarch
->push_dummy_frame
== 0)
3291 internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
3292 if (gdbarch_debug
>= 2)
3293 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3294 gdbarch
->push_dummy_frame ();
3298 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3299 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3301 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3305 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3307 if (gdbarch
->push_return_address
== 0)
3308 internal_error ("gdbarch: gdbarch_push_return_address invalid");
3309 if (gdbarch_debug
>= 2)
3310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3311 return gdbarch
->push_return_address (pc
, sp
);
3315 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3316 gdbarch_push_return_address_ftype push_return_address
)
3318 gdbarch
->push_return_address
= push_return_address
;
3322 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3324 if (gdbarch
->pop_frame
== 0)
3325 internal_error ("gdbarch: gdbarch_pop_frame invalid");
3326 if (gdbarch_debug
>= 2)
3327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3328 gdbarch
->pop_frame ();
3332 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3333 gdbarch_pop_frame_ftype pop_frame
)
3335 gdbarch
->pop_frame
= pop_frame
;
3339 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3341 if (gdbarch
->d10v_make_daddr
== 0)
3342 internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
3343 if (gdbarch_debug
>= 2)
3344 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3345 return gdbarch
->d10v_make_daddr (x
);
3349 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3350 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3352 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3356 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3358 if (gdbarch
->d10v_make_iaddr
== 0)
3359 internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
3360 if (gdbarch_debug
>= 2)
3361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3362 return gdbarch
->d10v_make_iaddr (x
);
3366 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3367 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3369 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3373 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3375 if (gdbarch
->d10v_daddr_p
== 0)
3376 internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
3377 if (gdbarch_debug
>= 2)
3378 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3379 return gdbarch
->d10v_daddr_p (x
);
3383 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3384 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3386 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3390 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3392 if (gdbarch
->d10v_iaddr_p
== 0)
3393 internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
3394 if (gdbarch_debug
>= 2)
3395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3396 return gdbarch
->d10v_iaddr_p (x
);
3400 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3401 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3403 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3407 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3409 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3410 internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3411 if (gdbarch_debug
>= 2)
3412 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3413 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3417 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3418 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3420 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3424 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3426 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3427 internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3428 if (gdbarch_debug
>= 2)
3429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3430 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3434 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3435 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3437 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3441 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3443 if (gdbarch
->store_struct_return
== 0)
3444 internal_error ("gdbarch: gdbarch_store_struct_return invalid");
3445 if (gdbarch_debug
>= 2)
3446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3447 gdbarch
->store_struct_return (addr
, sp
);
3451 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3452 gdbarch_store_struct_return_ftype store_struct_return
)
3454 gdbarch
->store_struct_return
= store_struct_return
;
3458 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3460 if (gdbarch
->store_return_value
== 0)
3461 internal_error ("gdbarch: gdbarch_store_return_value invalid");
3462 if (gdbarch_debug
>= 2)
3463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3464 gdbarch
->store_return_value (type
, valbuf
);
3468 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3469 gdbarch_store_return_value_ftype store_return_value
)
3471 gdbarch
->store_return_value
= store_return_value
;
3475 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3477 if (gdbarch
->extract_struct_value_address
== 0)
3478 internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
3479 if (gdbarch_debug
>= 2)
3480 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3481 return gdbarch
->extract_struct_value_address (regbuf
);
3485 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3486 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3488 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3492 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3494 if (gdbarch
->use_struct_convention
== 0)
3495 internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
3496 if (gdbarch_debug
>= 2)
3497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3498 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3502 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3503 gdbarch_use_struct_convention_ftype use_struct_convention
)
3505 gdbarch
->use_struct_convention
= use_struct_convention
;
3509 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3511 if (gdbarch
->frame_init_saved_regs
== 0)
3512 internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
3513 if (gdbarch_debug
>= 2)
3514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3515 gdbarch
->frame_init_saved_regs (frame
);
3519 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3520 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3522 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3526 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3528 if (gdbarch
->init_extra_frame_info
== 0)
3529 internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
3530 if (gdbarch_debug
>= 2)
3531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3532 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3536 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3537 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3539 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3543 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3545 if (gdbarch
->skip_prologue
== 0)
3546 internal_error ("gdbarch: gdbarch_skip_prologue invalid");
3547 if (gdbarch_debug
>= 2)
3548 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3549 return gdbarch
->skip_prologue (ip
);
3553 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3554 gdbarch_skip_prologue_ftype skip_prologue
)
3556 gdbarch
->skip_prologue
= skip_prologue
;
3560 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3562 if (gdbarch
->prologue_frameless_p
== 0)
3563 internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
3564 if (gdbarch_debug
>= 2)
3565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3566 return gdbarch
->prologue_frameless_p (ip
);
3570 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3571 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3573 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3577 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3579 if (gdbarch
->inner_than
== 0)
3580 internal_error ("gdbarch: gdbarch_inner_than invalid");
3581 if (gdbarch_debug
>= 2)
3582 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3583 return gdbarch
->inner_than (lhs
, rhs
);
3587 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3588 gdbarch_inner_than_ftype inner_than
)
3590 gdbarch
->inner_than
= inner_than
;
3594 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3596 if (gdbarch
->breakpoint_from_pc
== 0)
3597 internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
3598 if (gdbarch_debug
>= 2)
3599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3600 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3604 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3605 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3607 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3611 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3613 if (gdbarch
->memory_insert_breakpoint
== 0)
3614 internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
3615 if (gdbarch_debug
>= 2)
3616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3617 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3621 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3622 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3624 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3628 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3630 if (gdbarch
->memory_remove_breakpoint
== 0)
3631 internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
3632 if (gdbarch_debug
>= 2)
3633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3634 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3638 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3639 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3641 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3645 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3647 if (gdbarch
->decr_pc_after_break
== -1)
3648 internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
3649 if (gdbarch_debug
>= 2)
3650 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3651 return gdbarch
->decr_pc_after_break
;
3655 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3656 CORE_ADDR decr_pc_after_break
)
3658 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3662 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3664 if (gdbarch
->function_start_offset
== -1)
3665 internal_error ("gdbarch: gdbarch_function_start_offset invalid");
3666 if (gdbarch_debug
>= 2)
3667 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3668 return gdbarch
->function_start_offset
;
3672 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3673 CORE_ADDR function_start_offset
)
3675 gdbarch
->function_start_offset
= function_start_offset
;
3679 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3681 if (gdbarch
->remote_translate_xfer_address
== 0)
3682 internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
3683 if (gdbarch_debug
>= 2)
3684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3685 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3689 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3690 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3692 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3696 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3698 if (gdbarch
->frame_args_skip
== -1)
3699 internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
3700 if (gdbarch_debug
>= 2)
3701 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3702 return gdbarch
->frame_args_skip
;
3706 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3707 CORE_ADDR frame_args_skip
)
3709 gdbarch
->frame_args_skip
= frame_args_skip
;
3713 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3715 if (gdbarch
->frameless_function_invocation
== 0)
3716 internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
3717 if (gdbarch_debug
>= 2)
3718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3719 return gdbarch
->frameless_function_invocation (fi
);
3723 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3724 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3726 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3730 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3732 if (gdbarch
->frame_chain
== 0)
3733 internal_error ("gdbarch: gdbarch_frame_chain invalid");
3734 if (gdbarch_debug
>= 2)
3735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3736 return gdbarch
->frame_chain (frame
);
3740 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3741 gdbarch_frame_chain_ftype frame_chain
)
3743 gdbarch
->frame_chain
= frame_chain
;
3747 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3749 if (gdbarch
->frame_chain_valid
== 0)
3750 internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
3751 if (gdbarch_debug
>= 2)
3752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3753 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3757 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3758 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3760 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3764 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3766 if (gdbarch
->frame_saved_pc
== 0)
3767 internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
3768 if (gdbarch_debug
>= 2)
3769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3770 return gdbarch
->frame_saved_pc (fi
);
3774 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3775 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3777 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3781 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3783 if (gdbarch
->frame_args_address
== 0)
3784 internal_error ("gdbarch: gdbarch_frame_args_address invalid");
3785 if (gdbarch_debug
>= 2)
3786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3787 return gdbarch
->frame_args_address (fi
);
3791 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3792 gdbarch_frame_args_address_ftype frame_args_address
)
3794 gdbarch
->frame_args_address
= frame_args_address
;
3798 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3800 if (gdbarch
->frame_locals_address
== 0)
3801 internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
3802 if (gdbarch_debug
>= 2)
3803 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3804 return gdbarch
->frame_locals_address (fi
);
3808 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3809 gdbarch_frame_locals_address_ftype frame_locals_address
)
3811 gdbarch
->frame_locals_address
= frame_locals_address
;
3815 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3817 if (gdbarch
->saved_pc_after_call
== 0)
3818 internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
3819 if (gdbarch_debug
>= 2)
3820 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3821 return gdbarch
->saved_pc_after_call (frame
);
3825 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3826 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3828 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3832 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3834 if (gdbarch
->frame_num_args
== 0)
3835 internal_error ("gdbarch: gdbarch_frame_num_args invalid");
3836 if (gdbarch_debug
>= 2)
3837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3838 return gdbarch
->frame_num_args (frame
);
3842 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3843 gdbarch_frame_num_args_ftype frame_num_args
)
3845 gdbarch
->frame_num_args
= frame_num_args
;
3849 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
3851 return gdbarch
->stack_align
!= 0;
3855 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3857 if (gdbarch
->stack_align
== 0)
3858 internal_error ("gdbarch: gdbarch_stack_align invalid");
3859 if (gdbarch_debug
>= 2)
3860 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
3861 return gdbarch
->stack_align (sp
);
3865 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
3866 gdbarch_stack_align_ftype stack_align
)
3868 gdbarch
->stack_align
= stack_align
;
3872 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
3874 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
3875 if (gdbarch_debug
>= 2)
3876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
3877 return gdbarch
->extra_stack_alignment_needed
;
3881 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
3882 int extra_stack_alignment_needed
)
3884 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
3888 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
3890 return gdbarch
->reg_struct_has_addr
!= 0;
3894 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
3896 if (gdbarch
->reg_struct_has_addr
== 0)
3897 internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
3898 if (gdbarch_debug
>= 2)
3899 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
3900 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
3904 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
3905 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
3907 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
3911 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
3913 return gdbarch
->save_dummy_frame_tos
!= 0;
3917 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3919 if (gdbarch
->save_dummy_frame_tos
== 0)
3920 internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid");
3921 if (gdbarch_debug
>= 2)
3922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
3923 gdbarch
->save_dummy_frame_tos (sp
);
3927 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
3928 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
3930 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
3934 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
3936 if (gdbarch_debug
>= 2)
3937 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
3938 return gdbarch
->parm_boundary
;
3942 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
3945 gdbarch
->parm_boundary
= parm_boundary
;
3948 const struct floatformat
*
3949 gdbarch_float_format (struct gdbarch
*gdbarch
)
3951 if (gdbarch_debug
>= 2)
3952 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
3953 return gdbarch
->float_format
;
3957 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
3958 const struct floatformat
* float_format
)
3960 gdbarch
->float_format
= float_format
;
3963 const struct floatformat
*
3964 gdbarch_double_format (struct gdbarch
*gdbarch
)
3966 if (gdbarch_debug
>= 2)
3967 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
3968 return gdbarch
->double_format
;
3972 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
3973 const struct floatformat
* double_format
)
3975 gdbarch
->double_format
= double_format
;
3978 const struct floatformat
*
3979 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
3981 if (gdbarch_debug
>= 2)
3982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
3983 return gdbarch
->long_double_format
;
3987 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
3988 const struct floatformat
* long_double_format
)
3990 gdbarch
->long_double_format
= long_double_format
;
3994 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3996 if (gdbarch
->convert_from_func_ptr_addr
== 0)
3997 internal_error ("gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
3998 if (gdbarch_debug
>= 2)
3999 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4000 return gdbarch
->convert_from_func_ptr_addr (addr
);
4004 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4005 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4007 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4011 /* Keep a registry of per-architecture data-pointers required by GDB
4019 struct gdbarch_data_registration
4021 gdbarch_data_ftype
*init
;
4022 struct gdbarch_data
*data
;
4023 struct gdbarch_data_registration
*next
;
4026 struct gdbarch_data_registry
4029 struct gdbarch_data_registration
*registrations
;
4032 struct gdbarch_data_registry gdbarch_data_registry
=
4037 struct gdbarch_data
*
4038 register_gdbarch_data (gdbarch_data_ftype
*init
)
4040 struct gdbarch_data_registration
**curr
;
4041 for (curr
= &gdbarch_data_registry
.registrations
;
4043 curr
= &(*curr
)->next
);
4044 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4045 (*curr
)->next
= NULL
;
4046 (*curr
)->init
= init
;
4047 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4048 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4049 return (*curr
)->data
;
4053 /* Walk through all the registered users initializing each in turn. */
4056 init_gdbarch_data (struct gdbarch
*gdbarch
)
4058 struct gdbarch_data_registration
*rego
;
4059 gdbarch
->nr_data
= gdbarch_data_registry
.nr
+ 1;
4060 gdbarch
->data
= xmalloc (sizeof (void*) * gdbarch
->nr_data
);
4061 for (rego
= gdbarch_data_registry
.registrations
;
4065 if (rego
->data
->index
< gdbarch
->nr_data
)
4066 gdbarch
->data
[rego
->data
->index
] = rego
->init ();
4071 /* Return the current value of the specified per-architecture
4075 gdbarch_data (struct gdbarch_data
*data
)
4077 if (data
->index
>= current_gdbarch
->nr_data
)
4078 internal_error ("gdbarch_data: request for non-existant data.");
4079 return current_gdbarch
->data
[data
->index
];
4084 /* Keep a registry of swapped data required by GDB modules. */
4089 struct gdbarch_swap_registration
*source
;
4090 struct gdbarch_swap
*next
;
4093 struct gdbarch_swap_registration
4096 unsigned long sizeof_data
;
4097 gdbarch_swap_ftype
*init
;
4098 struct gdbarch_swap_registration
*next
;
4101 struct gdbarch_swap_registry
4104 struct gdbarch_swap_registration
*registrations
;
4107 struct gdbarch_swap_registry gdbarch_swap_registry
=
4113 register_gdbarch_swap (void *data
,
4114 unsigned long sizeof_data
,
4115 gdbarch_swap_ftype
*init
)
4117 struct gdbarch_swap_registration
**rego
;
4118 for (rego
= &gdbarch_swap_registry
.registrations
;
4120 rego
= &(*rego
)->next
);
4121 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4122 (*rego
)->next
= NULL
;
4123 (*rego
)->init
= init
;
4124 (*rego
)->data
= data
;
4125 (*rego
)->sizeof_data
= sizeof_data
;
4130 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4132 struct gdbarch_swap_registration
*rego
;
4133 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4134 for (rego
= gdbarch_swap_registry
.registrations
;
4138 if (rego
->data
!= NULL
)
4140 (*curr
) = XMALLOC (struct gdbarch_swap
);
4141 (*curr
)->source
= rego
;
4142 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4143 (*curr
)->next
= NULL
;
4144 memset (rego
->data
, 0, rego
->sizeof_data
);
4145 curr
= &(*curr
)->next
;
4147 if (rego
->init
!= NULL
)
4153 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4155 struct gdbarch_swap
*curr
;
4156 for (curr
= gdbarch
->swap
;
4159 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4163 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4165 struct gdbarch_swap
*curr
;
4166 for (curr
= gdbarch
->swap
;
4169 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4173 /* Keep a registry of the architectures known by GDB. */
4175 struct gdbarch_registration
4177 enum bfd_architecture bfd_architecture
;
4178 gdbarch_init_ftype
*init
;
4179 gdbarch_dump_tdep_ftype
*dump_tdep
;
4180 struct gdbarch_list
*arches
;
4181 struct gdbarch_registration
*next
;
4184 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4187 append_name (const char ***buf
, int *nr
, const char *name
)
4189 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4195 gdbarch_printable_names (void)
4199 /* Accumulate a list of names based on the registed list of
4201 enum bfd_architecture a
;
4203 const char **arches
= NULL
;
4204 struct gdbarch_registration
*rego
;
4205 for (rego
= gdbarch_registry
;
4209 const struct bfd_arch_info
*ap
;
4210 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4212 internal_error ("gdbarch_architecture_names: multi-arch unknown");
4215 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4220 append_name (&arches
, &nr_arches
, NULL
);
4224 /* Just return all the architectures that BFD knows. Assume that
4225 the legacy architecture framework supports them. */
4226 return bfd_arch_list ();
4231 gdbarch_register (enum bfd_architecture bfd_architecture
,
4232 gdbarch_init_ftype
*init
,
4233 gdbarch_dump_tdep_ftype
*dump_tdep
)
4235 struct gdbarch_registration
**curr
;
4236 const struct bfd_arch_info
*bfd_arch_info
;
4237 /* Check that BFD recognizes this architecture */
4238 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4239 if (bfd_arch_info
== NULL
)
4241 internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture
);
4243 /* Check that we haven't seen this architecture before */
4244 for (curr
= &gdbarch_registry
;
4246 curr
= &(*curr
)->next
)
4248 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4249 internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
4250 bfd_arch_info
->printable_name
);
4254 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4255 bfd_arch_info
->printable_name
,
4258 (*curr
) = XMALLOC (struct gdbarch_registration
);
4259 (*curr
)->bfd_architecture
= bfd_architecture
;
4260 (*curr
)->init
= init
;
4261 (*curr
)->dump_tdep
= dump_tdep
;
4262 (*curr
)->arches
= NULL
;
4263 (*curr
)->next
= NULL
;
4264 /* When non- multi-arch, install whatever target dump routine we've
4265 been provided - hopefully that routine has been written correctly
4266 and works regardless of multi-arch. */
4267 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4268 && startup_gdbarch
.dump_tdep
== NULL
)
4269 startup_gdbarch
.dump_tdep
= dump_tdep
;
4273 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4274 gdbarch_init_ftype
*init
)
4276 gdbarch_register (bfd_architecture
, init
, NULL
);
4280 /* Look for an architecture using gdbarch_info. Base search on only
4281 BFD_ARCH_INFO and BYTE_ORDER. */
4283 struct gdbarch_list
*
4284 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4285 const struct gdbarch_info
*info
)
4287 for (; arches
!= NULL
; arches
= arches
->next
)
4289 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4291 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4299 /* Update the current architecture. Return ZERO if the update request
4303 gdbarch_update_p (struct gdbarch_info info
)
4305 struct gdbarch
*new_gdbarch
;
4306 struct gdbarch_list
**list
;
4307 struct gdbarch_registration
*rego
;
4309 /* Fill in any missing bits. Most important is the bfd_architecture
4310 which is used to select the target architecture. */
4311 if (info
.bfd_architecture
== bfd_arch_unknown
)
4313 if (info
.bfd_arch_info
!= NULL
)
4314 info
.bfd_architecture
= info
.bfd_arch_info
->arch
;
4315 else if (info
.abfd
!= NULL
)
4316 info
.bfd_architecture
= bfd_get_arch (info
.abfd
);
4317 /* FIXME - should query BFD for its default architecture. */
4319 info
.bfd_architecture
= current_gdbarch
->bfd_arch_info
->arch
;
4321 if (info
.bfd_arch_info
== NULL
)
4323 if (target_architecture_auto
&& info
.abfd
!= NULL
)
4324 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4326 info
.bfd_arch_info
= current_gdbarch
->bfd_arch_info
;
4328 if (info
.byte_order
== 0)
4330 if (target_byte_order_auto
&& info
.abfd
!= NULL
)
4331 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4332 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4335 info
.byte_order
= current_gdbarch
->byte_order
;
4336 /* FIXME - should query BFD for its default byte-order. */
4338 /* A default for abfd? */
4340 /* Find the target that knows about this architecture. */
4341 for (rego
= gdbarch_registry
;
4344 if (rego
->bfd_architecture
== info
.bfd_architecture
)
4349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4355 fprintf_unfiltered (gdb_stdlog
,
4356 "gdbarch_update: info.bfd_architecture %d (%s)\n",
4357 info
.bfd_architecture
,
4358 bfd_lookup_arch (info
.bfd_architecture
, 0)->printable_name
);
4359 fprintf_unfiltered (gdb_stdlog
,
4360 "gdbarch_update: info.bfd_arch_info %s\n",
4361 (info
.bfd_arch_info
!= NULL
4362 ? info
.bfd_arch_info
->printable_name
4364 fprintf_unfiltered (gdb_stdlog
,
4365 "gdbarch_update: info.byte_order %d (%s)\n",
4367 (info
.byte_order
== BIG_ENDIAN
? "big"
4368 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4370 fprintf_unfiltered (gdb_stdlog
,
4371 "gdbarch_update: info.abfd 0x%lx\n",
4373 fprintf_unfiltered (gdb_stdlog
,
4374 "gdbarch_update: info.tdep_info 0x%lx\n",
4375 (long) info
.tdep_info
);
4378 /* Ask the target for a replacement architecture. */
4379 new_gdbarch
= rego
->init (info
, rego
->arches
);
4381 /* Did the target like it? No. Reject the change. */
4382 if (new_gdbarch
== NULL
)
4385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4389 /* Did the architecture change? No. Do nothing. */
4390 if (current_gdbarch
== new_gdbarch
)
4393 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4395 new_gdbarch
->bfd_arch_info
->printable_name
);
4399 /* Swap all data belonging to the old target out */
4400 swapout_gdbarch_swap (current_gdbarch
);
4402 /* Is this a pre-existing architecture? Yes. Swap it in. */
4403 for (list
= ®o
->arches
;
4405 list
= &(*list
)->next
)
4407 if ((*list
)->gdbarch
== new_gdbarch
)
4410 fprintf_unfiltered (gdb_stdlog
,
4411 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4413 new_gdbarch
->bfd_arch_info
->printable_name
);
4414 current_gdbarch
= new_gdbarch
;
4415 swapin_gdbarch_swap (new_gdbarch
);
4420 /* Append this new architecture to this targets list. */
4421 (*list
) = XMALLOC (struct gdbarch_list
);
4422 (*list
)->next
= NULL
;
4423 (*list
)->gdbarch
= new_gdbarch
;
4425 /* Switch to this new architecture. Dump it out. */
4426 current_gdbarch
= new_gdbarch
;
4429 fprintf_unfiltered (gdb_stdlog
,
4430 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4432 new_gdbarch
->bfd_arch_info
->printable_name
);
4435 /* Check that the newly installed architecture is valid. Plug in
4436 any post init values. */
4437 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4438 verify_gdbarch (new_gdbarch
);
4440 /* Initialize the per-architecture memory (swap) areas.
4441 CURRENT_GDBARCH must be update before these modules are
4443 init_gdbarch_swap (new_gdbarch
);
4445 /* Initialize the per-architecture data-pointer of all parties that
4446 registered an interest in this architecture. CURRENT_GDBARCH
4447 must be updated before these modules are called. */
4448 init_gdbarch_data (new_gdbarch
);
4451 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4459 /* Pointer to the target-dependent disassembly function. */
4460 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4461 disassemble_info tm_print_insn_info
;
4464 extern void _initialize_gdbarch (void);
4467 _initialize_gdbarch (void)
4469 struct cmd_list_element
*c
;
4471 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4472 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4473 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4474 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4475 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4477 add_show_from_set (add_set_cmd ("arch",
4480 (char *)&gdbarch_debug
,
4481 "Set architecture debugging.\n\
4482 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4484 c
= add_set_cmd ("archdebug",
4487 (char *)&gdbarch_debug
,
4488 "Set architecture debugging.\n\
4489 When non-zero, architecture debugging is enabled.", &setlist
);
4491 deprecate_cmd (c
, "set debug arch");
4492 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");