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 #include "gdb_assert.h"
65 /* Static function declarations */
67 static void verify_gdbarch (struct gdbarch
*gdbarch
);
68 static void alloc_gdbarch_data (struct gdbarch
*);
69 static void init_gdbarch_data (struct gdbarch
*);
70 static void free_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_swap (struct gdbarch
*);
72 static void swapout_gdbarch_swap (struct gdbarch
*);
73 static void swapin_gdbarch_swap (struct gdbarch
*);
75 /* Convenience macro for allocting typesafe memory. */
78 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
82 /* Non-zero if we want to trace architecture code. */
85 #define GDBARCH_DEBUG 0
87 int gdbarch_debug
= GDBARCH_DEBUG
;
90 /* Maintain the struct gdbarch object */
94 /* basic architectural information */
95 const struct bfd_arch_info
* bfd_arch_info
;
98 /* target specific vector. */
99 struct gdbarch_tdep
*tdep
;
100 gdbarch_dump_tdep_ftype
*dump_tdep
;
102 /* per-architecture data-pointers */
106 /* per-architecture swap-regions */
107 struct gdbarch_swap
*swap
;
109 /* Multi-arch values.
111 When extending this structure you must:
115 Declare set/get functions and define the corresponding
118 gdbarch_alloc(): If zero/NULL is not a suitable default,
119 initialize the new field.
121 verify_gdbarch(): Confirm that the target updated the field
124 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
127 ``startup_gdbarch()'': Append an initial value to the static
128 variable (base values on the host's c-type system).
130 get_gdbarch(): Implement the set/get functions (probably using
131 the macro's as shortcuts).
146 gdbarch_read_pc_ftype
*read_pc
;
147 gdbarch_write_pc_ftype
*write_pc
;
148 gdbarch_read_fp_ftype
*read_fp
;
149 gdbarch_write_fp_ftype
*write_fp
;
150 gdbarch_read_sp_ftype
*read_sp
;
151 gdbarch_write_sp_ftype
*write_sp
;
160 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
161 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
162 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
163 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
164 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
165 gdbarch_register_name_ftype
*register_name
;
168 gdbarch_register_byte_ftype
*register_byte
;
169 gdbarch_register_raw_size_ftype
*register_raw_size
;
170 int max_register_raw_size
;
171 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
172 int max_register_virtual_size
;
173 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
174 gdbarch_do_registers_info_ftype
*do_registers_info
;
175 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
176 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
177 int use_generic_dummy_frames
;
178 int call_dummy_location
;
179 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
180 CORE_ADDR call_dummy_start_offset
;
181 CORE_ADDR call_dummy_breakpoint_offset
;
182 int call_dummy_breakpoint_offset_p
;
183 int call_dummy_length
;
184 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
186 LONGEST
* call_dummy_words
;
187 int sizeof_call_dummy_words
;
188 int call_dummy_stack_adjust_p
;
189 int call_dummy_stack_adjust
;
190 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
191 int believe_pcc_promotion
;
192 int believe_pcc_promotion_type
;
193 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
194 gdbarch_get_saved_register_ftype
*get_saved_register
;
195 gdbarch_register_convertible_ftype
*register_convertible
;
196 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
197 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
198 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
199 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
200 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
201 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
202 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
203 gdbarch_extract_return_value_ftype
*extract_return_value
;
204 gdbarch_push_arguments_ftype
*push_arguments
;
205 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
206 gdbarch_push_return_address_ftype
*push_return_address
;
207 gdbarch_pop_frame_ftype
*pop_frame
;
208 gdbarch_d10v_make_daddr_ftype
*d10v_make_daddr
;
209 gdbarch_d10v_make_iaddr_ftype
*d10v_make_iaddr
;
210 gdbarch_d10v_daddr_p_ftype
*d10v_daddr_p
;
211 gdbarch_d10v_iaddr_p_ftype
*d10v_iaddr_p
;
212 gdbarch_d10v_convert_daddr_to_raw_ftype
*d10v_convert_daddr_to_raw
;
213 gdbarch_d10v_convert_iaddr_to_raw_ftype
*d10v_convert_iaddr_to_raw
;
214 gdbarch_store_struct_return_ftype
*store_struct_return
;
215 gdbarch_store_return_value_ftype
*store_return_value
;
216 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
217 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
218 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
219 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
220 gdbarch_skip_prologue_ftype
*skip_prologue
;
221 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
222 gdbarch_inner_than_ftype
*inner_than
;
223 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
224 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
225 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
226 CORE_ADDR decr_pc_after_break
;
227 CORE_ADDR function_start_offset
;
228 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
229 CORE_ADDR frame_args_skip
;
230 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
231 gdbarch_frame_chain_ftype
*frame_chain
;
232 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
233 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
234 gdbarch_frame_args_address_ftype
*frame_args_address
;
235 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
236 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
237 gdbarch_frame_num_args_ftype
*frame_num_args
;
238 gdbarch_stack_align_ftype
*stack_align
;
239 int extra_stack_alignment_needed
;
240 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
241 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
243 const struct floatformat
* float_format
;
244 const struct floatformat
* double_format
;
245 const struct floatformat
* long_double_format
;
246 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
250 /* The default architecture uses host values (for want of a better
253 extern const struct bfd_arch_info bfd_default_arch_struct
;
255 struct gdbarch startup_gdbarch
=
257 /* basic architecture information */
258 &bfd_default_arch_struct
,
260 /* target specific vector and its dump routine */
262 /*per-architecture data-pointers and swap regions */
264 /* Multi-arch values */
268 8 * sizeof (LONGEST
),
271 8 * sizeof (long double),
324 generic_get_saved_register
,
377 /* startup_gdbarch() */
380 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
383 /* Create a new ``struct gdbarch'' based on information provided by
384 ``struct gdbarch_info''. */
387 gdbarch_alloc (const struct gdbarch_info
*info
,
388 struct gdbarch_tdep
*tdep
)
390 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
391 memset (gdbarch
, 0, sizeof (*gdbarch
));
393 alloc_gdbarch_data (gdbarch
);
395 gdbarch
->tdep
= tdep
;
397 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
398 gdbarch
->byte_order
= info
->byte_order
;
400 /* Force the explicit initialization of these. */
401 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
402 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
403 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
404 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
405 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
406 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
407 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
408 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
409 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
410 gdbarch
->read_pc
= generic_target_read_pc
;
411 gdbarch
->write_pc
= generic_target_write_pc
;
412 gdbarch
->read_fp
= generic_target_read_fp
;
413 gdbarch
->write_fp
= generic_target_write_fp
;
414 gdbarch
->read_sp
= generic_target_read_sp
;
415 gdbarch
->write_sp
= generic_target_write_sp
;
416 gdbarch
->num_regs
= -1;
417 gdbarch
->sp_regnum
= -1;
418 gdbarch
->fp_regnum
= -1;
419 gdbarch
->pc_regnum
= -1;
420 gdbarch
->fp0_regnum
= -1;
421 gdbarch
->npc_regnum
= -1;
422 gdbarch
->nnpc_regnum
= -1;
423 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
424 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
425 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
426 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
427 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
428 gdbarch
->register_name
= legacy_register_name
;
429 gdbarch
->register_size
= -1;
430 gdbarch
->register_bytes
= -1;
431 gdbarch
->max_register_raw_size
= -1;
432 gdbarch
->max_register_virtual_size
= -1;
433 gdbarch
->do_registers_info
= do_registers_info
;
434 gdbarch
->register_sim_regno
= default_register_sim_regno
;
435 gdbarch
->use_generic_dummy_frames
= -1;
436 gdbarch
->call_dummy_start_offset
= -1;
437 gdbarch
->call_dummy_breakpoint_offset
= -1;
438 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
439 gdbarch
->call_dummy_length
= -1;
440 gdbarch
->call_dummy_p
= -1;
441 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
442 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
443 gdbarch
->call_dummy_stack_adjust_p
= -1;
444 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
445 gdbarch
->register_convertible
= generic_register_convertible_not
;
446 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
447 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
448 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
449 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
450 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
451 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
452 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
453 gdbarch
->decr_pc_after_break
= -1;
454 gdbarch
->function_start_offset
= -1;
455 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
456 gdbarch
->frame_args_skip
= -1;
457 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
458 gdbarch
->extra_stack_alignment_needed
= 1;
459 gdbarch
->convert_from_func_ptr_addr
= default_convert_from_func_ptr_addr
;
460 /* gdbarch_alloc() */
466 /* Free a gdbarch struct. This should never happen in normal
467 operation --- once you've created a gdbarch, you keep it around.
468 However, if an architecture's init function encounters an error
469 building the structure, it may need to clean up a partially
470 constructed gdbarch. */
473 gdbarch_free (struct gdbarch
*arch
)
475 gdb_assert (arch
!= NULL
);
476 free_gdbarch_data (arch
);
481 /* Ensure that all values in a GDBARCH are reasonable. */
484 verify_gdbarch (struct gdbarch
*gdbarch
)
486 /* Only perform sanity checks on a multi-arch target. */
490 if (gdbarch
->byte_order
== 0)
491 internal_error ("verify_gdbarch: byte-order unset");
492 if (gdbarch
->bfd_arch_info
== NULL
)
493 internal_error ("verify_gdbarch: bfd_arch_info unset");
494 /* Check those that need to be defined for the given multi-arch level. */
495 /* Skip verify of short_bit, invalid_p == 0 */
496 /* Skip verify of int_bit, invalid_p == 0 */
497 /* Skip verify of long_bit, invalid_p == 0 */
498 /* Skip verify of long_long_bit, invalid_p == 0 */
499 /* Skip verify of float_bit, invalid_p == 0 */
500 /* Skip verify of double_bit, invalid_p == 0 */
501 /* Skip verify of long_double_bit, invalid_p == 0 */
502 /* Skip verify of ptr_bit, invalid_p == 0 */
503 if (gdbarch
->addr_bit
== 0)
504 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
505 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
506 /* Skip verify of ieee_float, invalid_p == 0 */
507 /* Skip verify of read_pc, invalid_p == 0 */
508 /* Skip verify of write_pc, invalid_p == 0 */
509 /* Skip verify of read_fp, invalid_p == 0 */
510 /* Skip verify of write_fp, invalid_p == 0 */
511 /* Skip verify of read_sp, invalid_p == 0 */
512 /* Skip verify of write_sp, invalid_p == 0 */
513 if ((GDB_MULTI_ARCH
>= 2)
514 && (gdbarch
->num_regs
== -1))
515 internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
516 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
517 if ((GDB_MULTI_ARCH
>= 2)
518 && (gdbarch
->sp_regnum
== -1))
519 internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
520 if ((GDB_MULTI_ARCH
>= 2)
521 && (gdbarch
->fp_regnum
== -1))
522 internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
523 if ((GDB_MULTI_ARCH
>= 2)
524 && (gdbarch
->pc_regnum
== -1))
525 internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
526 /* Skip verify of fp0_regnum, invalid_p == 0 */
527 /* Skip verify of npc_regnum, invalid_p == 0 */
528 /* Skip verify of nnpc_regnum, invalid_p == 0 */
529 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
530 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
531 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
532 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
533 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
534 /* Skip verify of register_name, invalid_p == 0 */
535 if ((GDB_MULTI_ARCH
>= 2)
536 && (gdbarch
->register_size
== -1))
537 internal_error ("gdbarch: verify_gdbarch: register_size invalid");
538 if ((GDB_MULTI_ARCH
>= 2)
539 && (gdbarch
->register_bytes
== -1))
540 internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
541 if ((GDB_MULTI_ARCH
>= 2)
542 && (gdbarch
->register_byte
== 0))
543 internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
544 if ((GDB_MULTI_ARCH
>= 2)
545 && (gdbarch
->register_raw_size
== 0))
546 internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
547 if ((GDB_MULTI_ARCH
>= 2)
548 && (gdbarch
->max_register_raw_size
== -1))
549 internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
550 if ((GDB_MULTI_ARCH
>= 2)
551 && (gdbarch
->register_virtual_size
== 0))
552 internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
553 if ((GDB_MULTI_ARCH
>= 2)
554 && (gdbarch
->max_register_virtual_size
== -1))
555 internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
556 if ((GDB_MULTI_ARCH
>= 2)
557 && (gdbarch
->register_virtual_type
== 0))
558 internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
559 /* Skip verify of do_registers_info, invalid_p == 0 */
560 /* Skip verify of register_sim_regno, invalid_p == 0 */
561 /* Skip verify of register_bytes_ok, has predicate */
562 if ((GDB_MULTI_ARCH
>= 1)
563 && (gdbarch
->use_generic_dummy_frames
== -1))
564 internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
565 if ((GDB_MULTI_ARCH
>= 2)
566 && (gdbarch
->call_dummy_location
== 0))
567 internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
568 if ((GDB_MULTI_ARCH
>= 2)
569 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
570 internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
571 if ((GDB_MULTI_ARCH
>= 2)
572 && (gdbarch
->call_dummy_start_offset
== -1))
573 internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
574 if ((GDB_MULTI_ARCH
>= 2)
575 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
576 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
577 if ((GDB_MULTI_ARCH
>= 1)
578 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
579 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
580 if ((GDB_MULTI_ARCH
>= 2)
581 && (gdbarch
->call_dummy_length
== -1))
582 internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
583 if ((GDB_MULTI_ARCH
>= 2)
584 && (gdbarch
->pc_in_call_dummy
== 0))
585 internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
586 if ((GDB_MULTI_ARCH
>= 1)
587 && (gdbarch
->call_dummy_p
== -1))
588 internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
589 /* Skip verify of call_dummy_words, invalid_p == 0 */
590 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
591 if ((GDB_MULTI_ARCH
>= 1)
592 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
593 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
594 if ((GDB_MULTI_ARCH
>= 2)
595 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
596 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
597 if ((GDB_MULTI_ARCH
>= 2)
598 && (gdbarch
->fix_call_dummy
== 0))
599 internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
600 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
601 if ((GDB_MULTI_ARCH
>= 1)
602 && (gdbarch
->get_saved_register
== 0))
603 internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
604 /* Skip verify of register_convertible, invalid_p == 0 */
605 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
606 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
607 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
608 /* Skip verify of store_pseudo_register, invalid_p == 0 */
609 /* Skip verify of pointer_to_address, invalid_p == 0 */
610 /* Skip verify of address_to_pointer, invalid_p == 0 */
611 /* Skip verify of return_value_on_stack, invalid_p == 0 */
612 if ((GDB_MULTI_ARCH
>= 2)
613 && (gdbarch
->extract_return_value
== 0))
614 internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
615 if ((GDB_MULTI_ARCH
>= 1)
616 && (gdbarch
->push_arguments
== 0))
617 internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
618 if ((GDB_MULTI_ARCH
>= 2)
619 && (gdbarch
->push_dummy_frame
== 0))
620 internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
621 if ((GDB_MULTI_ARCH
>= 1)
622 && (gdbarch
->push_return_address
== 0))
623 internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
624 if ((GDB_MULTI_ARCH
>= 2)
625 && (gdbarch
->pop_frame
== 0))
626 internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
627 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
628 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
629 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
630 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
631 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
632 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
633 if ((GDB_MULTI_ARCH
>= 2)
634 && (gdbarch
->store_struct_return
== 0))
635 internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
636 if ((GDB_MULTI_ARCH
>= 2)
637 && (gdbarch
->store_return_value
== 0))
638 internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
639 if ((GDB_MULTI_ARCH
>= 2)
640 && (gdbarch
->extract_struct_value_address
== 0))
641 internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
642 if ((GDB_MULTI_ARCH
>= 2)
643 && (gdbarch
->use_struct_convention
== 0))
644 internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
645 if ((GDB_MULTI_ARCH
>= 2)
646 && (gdbarch
->frame_init_saved_regs
== 0))
647 internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
648 if ((GDB_MULTI_ARCH
>= 2)
649 && (gdbarch
->init_extra_frame_info
== 0))
650 internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
651 if ((GDB_MULTI_ARCH
>= 2)
652 && (gdbarch
->skip_prologue
== 0))
653 internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
654 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
655 if ((GDB_MULTI_ARCH
>= 2)
656 && (gdbarch
->inner_than
== 0))
657 internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
658 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
659 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
660 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
661 if ((GDB_MULTI_ARCH
>= 2)
662 && (gdbarch
->decr_pc_after_break
== -1))
663 internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
664 if ((GDB_MULTI_ARCH
>= 2)
665 && (gdbarch
->function_start_offset
== -1))
666 internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
667 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
668 if ((GDB_MULTI_ARCH
>= 2)
669 && (gdbarch
->frame_args_skip
== -1))
670 internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
671 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
672 if ((GDB_MULTI_ARCH
>= 2)
673 && (gdbarch
->frame_chain
== 0))
674 internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
675 if ((GDB_MULTI_ARCH
>= 1)
676 && (gdbarch
->frame_chain_valid
== 0))
677 internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
678 if ((GDB_MULTI_ARCH
>= 2)
679 && (gdbarch
->frame_saved_pc
== 0))
680 internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
681 if ((GDB_MULTI_ARCH
>= 2)
682 && (gdbarch
->frame_args_address
== 0))
683 internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
684 if ((GDB_MULTI_ARCH
>= 2)
685 && (gdbarch
->frame_locals_address
== 0))
686 internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
687 if ((GDB_MULTI_ARCH
>= 2)
688 && (gdbarch
->saved_pc_after_call
== 0))
689 internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
690 if ((GDB_MULTI_ARCH
>= 2)
691 && (gdbarch
->frame_num_args
== 0))
692 internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
693 /* Skip verify of stack_align, has predicate */
694 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
695 /* Skip verify of reg_struct_has_addr, has predicate */
696 /* Skip verify of save_dummy_frame_tos, has predicate */
697 if (gdbarch
->float_format
== 0)
698 gdbarch
->float_format
= default_float_format (gdbarch
);
699 if (gdbarch
->double_format
== 0)
700 gdbarch
->double_format
= default_double_format (gdbarch
);
701 if (gdbarch
->long_double_format
== 0)
702 gdbarch
->long_double_format
= &floatformat_unknown
;
703 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
707 /* Print out the details of the current architecture. */
709 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
710 just happens to match the global variable ``current_gdbarch''. That
711 way macros refering to that variable get the local and not the global
712 version - ulgh. Once everything is parameterised with gdbarch, this
716 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
718 fprintf_unfiltered (file
,
719 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
721 #ifdef TARGET_ARCHITECTURE
722 fprintf_unfiltered (file
,
723 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
724 XSTRING (TARGET_ARCHITECTURE
));
726 #ifdef TARGET_BYTE_ORDER
727 fprintf_unfiltered (file
,
728 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
729 XSTRING (TARGET_BYTE_ORDER
));
731 #ifdef TARGET_SHORT_BIT
732 fprintf_unfiltered (file
,
733 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
734 XSTRING (TARGET_SHORT_BIT
));
736 #ifdef TARGET_INT_BIT
737 fprintf_unfiltered (file
,
738 "gdbarch_dump: TARGET_INT_BIT # %s\n",
739 XSTRING (TARGET_INT_BIT
));
741 #ifdef TARGET_LONG_BIT
742 fprintf_unfiltered (file
,
743 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
744 XSTRING (TARGET_LONG_BIT
));
746 #ifdef TARGET_LONG_LONG_BIT
747 fprintf_unfiltered (file
,
748 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
749 XSTRING (TARGET_LONG_LONG_BIT
));
751 #ifdef TARGET_FLOAT_BIT
752 fprintf_unfiltered (file
,
753 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
754 XSTRING (TARGET_FLOAT_BIT
));
756 #ifdef TARGET_DOUBLE_BIT
757 fprintf_unfiltered (file
,
758 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
759 XSTRING (TARGET_DOUBLE_BIT
));
761 #ifdef TARGET_LONG_DOUBLE_BIT
762 fprintf_unfiltered (file
,
763 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
764 XSTRING (TARGET_LONG_DOUBLE_BIT
));
766 #ifdef TARGET_PTR_BIT
767 fprintf_unfiltered (file
,
768 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
769 XSTRING (TARGET_PTR_BIT
));
771 #ifdef TARGET_ADDR_BIT
772 fprintf_unfiltered (file
,
773 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
774 XSTRING (TARGET_ADDR_BIT
));
776 #ifdef TARGET_BFD_VMA_BIT
777 fprintf_unfiltered (file
,
778 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
779 XSTRING (TARGET_BFD_VMA_BIT
));
782 fprintf_unfiltered (file
,
783 "gdbarch_dump: IEEE_FLOAT # %s\n",
784 XSTRING (IEEE_FLOAT
));
786 #ifdef TARGET_READ_PC
787 fprintf_unfiltered (file
,
788 "gdbarch_dump: %s # %s\n",
789 "TARGET_READ_PC(pid)",
790 XSTRING (TARGET_READ_PC (pid
)));
792 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
793 /* Macro might contain `[{}]' when not multi-arch */
794 fprintf_unfiltered (file
,
795 "gdbarch_dump: %s # %s\n",
796 "TARGET_WRITE_PC(val, pid)",
797 XSTRING (TARGET_WRITE_PC (val
, pid
)));
799 #ifdef TARGET_READ_FP
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: %s # %s\n",
803 XSTRING (TARGET_READ_FP ()));
805 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
806 /* Macro might contain `[{}]' when not multi-arch */
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: %s # %s\n",
809 "TARGET_WRITE_FP(val)",
810 XSTRING (TARGET_WRITE_FP (val
)));
812 #ifdef TARGET_READ_SP
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: %s # %s\n",
816 XSTRING (TARGET_READ_SP ()));
818 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
819 /* Macro might contain `[{}]' when not multi-arch */
820 fprintf_unfiltered (file
,
821 "gdbarch_dump: %s # %s\n",
822 "TARGET_WRITE_SP(val)",
823 XSTRING (TARGET_WRITE_SP (val
)));
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: NUM_REGS # %s\n",
830 #ifdef NUM_PSEUDO_REGS
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
833 XSTRING (NUM_PSEUDO_REGS
));
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: SP_REGNUM # %s\n",
838 XSTRING (SP_REGNUM
));
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: FP_REGNUM # %s\n",
843 XSTRING (FP_REGNUM
));
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: PC_REGNUM # %s\n",
848 XSTRING (PC_REGNUM
));
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: FP0_REGNUM # %s\n",
853 XSTRING (FP0_REGNUM
));
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: NPC_REGNUM # %s\n",
858 XSTRING (NPC_REGNUM
));
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: NNPC_REGNUM # %s\n",
863 XSTRING (NNPC_REGNUM
));
865 #ifdef STAB_REG_TO_REGNUM
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: %s # %s\n",
868 "STAB_REG_TO_REGNUM(stab_regnr)",
869 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
871 #ifdef ECOFF_REG_TO_REGNUM
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: %s # %s\n",
874 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
875 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
877 #ifdef DWARF_REG_TO_REGNUM
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: %s # %s\n",
880 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
881 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
883 #ifdef SDB_REG_TO_REGNUM
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: %s # %s\n",
886 "SDB_REG_TO_REGNUM(sdb_regnr)",
887 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
889 #ifdef DWARF2_REG_TO_REGNUM
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: %s # %s\n",
892 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
893 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: %s # %s\n",
898 "REGISTER_NAME(regnr)",
899 XSTRING (REGISTER_NAME (regnr
)));
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: REGISTER_SIZE # %s\n",
904 XSTRING (REGISTER_SIZE
));
906 #ifdef REGISTER_BYTES
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: REGISTER_BYTES # %s\n",
909 XSTRING (REGISTER_BYTES
));
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: %s # %s\n",
914 "REGISTER_BYTE(reg_nr)",
915 XSTRING (REGISTER_BYTE (reg_nr
)));
917 #ifdef REGISTER_RAW_SIZE
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: %s # %s\n",
920 "REGISTER_RAW_SIZE(reg_nr)",
921 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
923 #ifdef MAX_REGISTER_RAW_SIZE
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
926 XSTRING (MAX_REGISTER_RAW_SIZE
));
928 #ifdef REGISTER_VIRTUAL_SIZE
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: %s # %s\n",
931 "REGISTER_VIRTUAL_SIZE(reg_nr)",
932 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
934 #ifdef MAX_REGISTER_VIRTUAL_SIZE
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
937 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
939 #ifdef REGISTER_VIRTUAL_TYPE
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: %s # %s\n",
942 "REGISTER_VIRTUAL_TYPE(reg_nr)",
943 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
945 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
946 /* Macro might contain `[{}]' when not multi-arch */
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: %s # %s\n",
949 "DO_REGISTERS_INFO(reg_nr, fpregs)",
950 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
952 #ifdef REGISTER_SIM_REGNO
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: %s # %s\n",
955 "REGISTER_SIM_REGNO(reg_nr)",
956 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
958 #ifdef REGISTER_BYTES_OK
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: %s # %s\n",
961 "REGISTER_BYTES_OK(nr_bytes)",
962 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
964 #ifdef USE_GENERIC_DUMMY_FRAMES
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
967 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
969 #ifdef CALL_DUMMY_LOCATION
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
972 XSTRING (CALL_DUMMY_LOCATION
));
974 #ifdef CALL_DUMMY_ADDRESS
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: %s # %s\n",
977 "CALL_DUMMY_ADDRESS()",
978 XSTRING (CALL_DUMMY_ADDRESS ()));
980 #ifdef CALL_DUMMY_START_OFFSET
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
983 XSTRING (CALL_DUMMY_START_OFFSET
));
985 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
986 fprintf_unfiltered (file
,
987 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
988 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
990 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
993 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
995 #ifdef CALL_DUMMY_LENGTH
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
998 XSTRING (CALL_DUMMY_LENGTH
));
1000 #ifdef PC_IN_CALL_DUMMY
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: %s # %s\n",
1003 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1004 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1009 XSTRING (CALL_DUMMY_P
));
1011 #ifdef CALL_DUMMY_WORDS
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1014 XSTRING (CALL_DUMMY_WORDS
));
1016 #ifdef SIZEOF_CALL_DUMMY_WORDS
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1019 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1021 #ifdef CALL_DUMMY_STACK_ADJUST_P
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1024 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1026 #ifdef CALL_DUMMY_STACK_ADJUST
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1029 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1031 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1032 /* Macro might contain `[{}]' when not multi-arch */
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: %s # %s\n",
1035 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1036 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1038 #ifdef BELIEVE_PCC_PROMOTION
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1041 XSTRING (BELIEVE_PCC_PROMOTION
));
1043 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1046 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1048 #ifdef COERCE_FLOAT_TO_DOUBLE
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: %s # %s\n",
1051 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1052 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1054 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1055 /* Macro might contain `[{}]' when not multi-arch */
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: %s # %s\n",
1058 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1059 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1061 #ifdef REGISTER_CONVERTIBLE
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: %s # %s\n",
1064 "REGISTER_CONVERTIBLE(nr)",
1065 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1067 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && 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_VIRTUAL(regnum, type, from, to)",
1072 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1074 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1075 /* Macro might contain `[{}]' when not multi-arch */
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: %s # %s\n",
1078 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1079 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1081 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1082 /* Macro might contain `[{}]' when not multi-arch */
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: %s # %s\n",
1085 "FETCH_PSEUDO_REGISTER(regnum)",
1086 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1088 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1089 /* Macro might contain `[{}]' when not multi-arch */
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: %s # %s\n",
1092 "STORE_PSEUDO_REGISTER(regnum)",
1093 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1095 #ifdef POINTER_TO_ADDRESS
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: %s # %s\n",
1098 "POINTER_TO_ADDRESS(type, buf)",
1099 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1101 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1102 /* Macro might contain `[{}]' when not multi-arch */
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: %s # %s\n",
1105 "ADDRESS_TO_POINTER(type, buf, addr)",
1106 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1108 #ifdef RETURN_VALUE_ON_STACK
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: %s # %s\n",
1111 "RETURN_VALUE_ON_STACK(type)",
1112 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1114 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1115 /* Macro might contain `[{}]' when not multi-arch */
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: %s # %s\n",
1118 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1119 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1121 #ifdef PUSH_ARGUMENTS
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: %s # %s\n",
1124 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1125 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1127 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1128 /* Macro might contain `[{}]' when not multi-arch */
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: %s # %s\n",
1131 "PUSH_DUMMY_FRAME(-)",
1132 XSTRING (PUSH_DUMMY_FRAME (-)));
1134 #ifdef PUSH_RETURN_ADDRESS
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: %s # %s\n",
1137 "PUSH_RETURN_ADDRESS(pc, sp)",
1138 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1140 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1141 /* Macro might contain `[{}]' when not multi-arch */
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: %s # %s\n",
1145 XSTRING (POP_FRAME (-)));
1147 #ifdef D10V_MAKE_DADDR
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: %s # %s\n",
1150 "D10V_MAKE_DADDR(x)",
1151 XSTRING (D10V_MAKE_DADDR (x
)));
1153 #ifdef D10V_MAKE_IADDR
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: %s # %s\n",
1156 "D10V_MAKE_IADDR(x)",
1157 XSTRING (D10V_MAKE_IADDR (x
)));
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: %s # %s\n",
1163 XSTRING (D10V_DADDR_P (x
)));
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: %s # %s\n",
1169 XSTRING (D10V_IADDR_P (x
)));
1171 #ifdef D10V_CONVERT_DADDR_TO_RAW
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: %s # %s\n",
1174 "D10V_CONVERT_DADDR_TO_RAW(x)",
1175 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1177 #ifdef D10V_CONVERT_IADDR_TO_RAW
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: %s # %s\n",
1180 "D10V_CONVERT_IADDR_TO_RAW(x)",
1181 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1183 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1184 /* Macro might contain `[{}]' when not multi-arch */
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: %s # %s\n",
1187 "STORE_STRUCT_RETURN(addr, sp)",
1188 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1190 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1191 /* Macro might contain `[{}]' when not multi-arch */
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: %s # %s\n",
1194 "STORE_RETURN_VALUE(type, valbuf)",
1195 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1197 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: %s # %s\n",
1200 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1201 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1203 #ifdef USE_STRUCT_CONVENTION
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: %s # %s\n",
1206 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1207 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1209 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1210 /* Macro might contain `[{}]' when not multi-arch */
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1213 "FRAME_INIT_SAVED_REGS(frame)",
1214 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1216 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1217 /* Macro might contain `[{}]' when not multi-arch */
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: %s # %s\n",
1220 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1221 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1223 #ifdef SKIP_PROLOGUE
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: %s # %s\n",
1226 "SKIP_PROLOGUE(ip)",
1227 XSTRING (SKIP_PROLOGUE (ip
)));
1229 #ifdef PROLOGUE_FRAMELESS_P
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: %s # %s\n",
1232 "PROLOGUE_FRAMELESS_P(ip)",
1233 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: %s # %s\n",
1238 "INNER_THAN(lhs, rhs)",
1239 XSTRING (INNER_THAN (lhs
, rhs
)));
1241 #ifdef BREAKPOINT_FROM_PC
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: %s # %s\n",
1244 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1245 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1247 #ifdef MEMORY_INSERT_BREAKPOINT
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: %s # %s\n",
1250 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1251 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1253 #ifdef MEMORY_REMOVE_BREAKPOINT
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: %s # %s\n",
1256 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1257 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1259 #ifdef DECR_PC_AFTER_BREAK
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1262 XSTRING (DECR_PC_AFTER_BREAK
));
1264 #ifdef FUNCTION_START_OFFSET
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1267 XSTRING (FUNCTION_START_OFFSET
));
1269 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1270 /* Macro might contain `[{}]' when not multi-arch */
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: %s # %s\n",
1273 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1274 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1276 #ifdef FRAME_ARGS_SKIP
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1279 XSTRING (FRAME_ARGS_SKIP
));
1281 #ifdef FRAMELESS_FUNCTION_INVOCATION
1282 fprintf_unfiltered (file
,
1283 "gdbarch_dump: %s # %s\n",
1284 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1285 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1288 fprintf_unfiltered (file
,
1289 "gdbarch_dump: %s # %s\n",
1290 "FRAME_CHAIN(frame)",
1291 XSTRING (FRAME_CHAIN (frame
)));
1293 #ifdef FRAME_CHAIN_VALID
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: %s # %s\n",
1296 "FRAME_CHAIN_VALID(chain, thisframe)",
1297 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1299 #ifdef FRAME_SAVED_PC
1300 fprintf_unfiltered (file
,
1301 "gdbarch_dump: %s # %s\n",
1302 "FRAME_SAVED_PC(fi)",
1303 XSTRING (FRAME_SAVED_PC (fi
)));
1305 #ifdef FRAME_ARGS_ADDRESS
1306 fprintf_unfiltered (file
,
1307 "gdbarch_dump: %s # %s\n",
1308 "FRAME_ARGS_ADDRESS(fi)",
1309 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1311 #ifdef FRAME_LOCALS_ADDRESS
1312 fprintf_unfiltered (file
,
1313 "gdbarch_dump: %s # %s\n",
1314 "FRAME_LOCALS_ADDRESS(fi)",
1315 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1317 #ifdef SAVED_PC_AFTER_CALL
1318 fprintf_unfiltered (file
,
1319 "gdbarch_dump: %s # %s\n",
1320 "SAVED_PC_AFTER_CALL(frame)",
1321 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1323 #ifdef FRAME_NUM_ARGS
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: %s # %s\n",
1326 "FRAME_NUM_ARGS(frame)",
1327 XSTRING (FRAME_NUM_ARGS (frame
)));
1330 fprintf_unfiltered (file
,
1331 "gdbarch_dump: %s # %s\n",
1333 XSTRING (STACK_ALIGN (sp
)));
1335 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1336 fprintf_unfiltered (file
,
1337 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1338 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1340 #ifdef REG_STRUCT_HAS_ADDR
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: %s # %s\n",
1343 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1344 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1346 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1347 /* Macro might contain `[{}]' when not multi-arch */
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: %s # %s\n",
1350 "SAVE_DUMMY_FRAME_TOS(sp)",
1351 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1353 #ifdef PARM_BOUNDARY
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1356 XSTRING (PARM_BOUNDARY
));
1358 #ifdef TARGET_FLOAT_FORMAT
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1361 XSTRING (TARGET_FLOAT_FORMAT
));
1363 #ifdef TARGET_DOUBLE_FORMAT
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1366 XSTRING (TARGET_DOUBLE_FORMAT
));
1368 #ifdef TARGET_LONG_DOUBLE_FORMAT
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1371 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1373 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: %s # %s\n",
1376 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1377 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1379 #ifdef TARGET_ARCHITECTURE
1380 if (TARGET_ARCHITECTURE
!= NULL
)
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1383 TARGET_ARCHITECTURE
->printable_name
);
1385 #ifdef TARGET_BYTE_ORDER
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1388 (long) TARGET_BYTE_ORDER
);
1390 #ifdef TARGET_SHORT_BIT
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1393 (long) TARGET_SHORT_BIT
);
1395 #ifdef TARGET_INT_BIT
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1398 (long) TARGET_INT_BIT
);
1400 #ifdef TARGET_LONG_BIT
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1403 (long) TARGET_LONG_BIT
);
1405 #ifdef TARGET_LONG_LONG_BIT
1406 fprintf_unfiltered (file
,
1407 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1408 (long) TARGET_LONG_LONG_BIT
);
1410 #ifdef TARGET_FLOAT_BIT
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1413 (long) TARGET_FLOAT_BIT
);
1415 #ifdef TARGET_DOUBLE_BIT
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1418 (long) TARGET_DOUBLE_BIT
);
1420 #ifdef TARGET_LONG_DOUBLE_BIT
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1423 (long) TARGET_LONG_DOUBLE_BIT
);
1425 #ifdef TARGET_PTR_BIT
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1428 (long) TARGET_PTR_BIT
);
1430 #ifdef TARGET_ADDR_BIT
1431 fprintf_unfiltered (file
,
1432 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1433 (long) TARGET_ADDR_BIT
);
1435 #ifdef TARGET_BFD_VMA_BIT
1436 fprintf_unfiltered (file
,
1437 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1438 (long) TARGET_BFD_VMA_BIT
);
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1445 #ifdef TARGET_READ_PC
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1449 (long) current_gdbarch
->read_pc
1450 /*TARGET_READ_PC ()*/);
1452 #ifdef TARGET_WRITE_PC
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1456 (long) current_gdbarch
->write_pc
1457 /*TARGET_WRITE_PC ()*/);
1459 #ifdef TARGET_READ_FP
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1463 (long) current_gdbarch
->read_fp
1464 /*TARGET_READ_FP ()*/);
1466 #ifdef TARGET_WRITE_FP
1468 fprintf_unfiltered (file
,
1469 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1470 (long) current_gdbarch
->write_fp
1471 /*TARGET_WRITE_FP ()*/);
1473 #ifdef TARGET_READ_SP
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1477 (long) current_gdbarch
->read_sp
1478 /*TARGET_READ_SP ()*/);
1480 #ifdef TARGET_WRITE_SP
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1484 (long) current_gdbarch
->write_sp
1485 /*TARGET_WRITE_SP ()*/);
1488 fprintf_unfiltered (file
,
1489 "gdbarch_dump: NUM_REGS = %ld\n",
1492 #ifdef NUM_PSEUDO_REGS
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1495 (long) NUM_PSEUDO_REGS
);
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: SP_REGNUM = %ld\n",
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: FP_REGNUM = %ld\n",
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: PC_REGNUM = %ld\n",
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: FP0_REGNUM = %ld\n",
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: NPC_REGNUM = %ld\n",
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1525 (long) NNPC_REGNUM
);
1527 #ifdef STAB_REG_TO_REGNUM
1529 fprintf_unfiltered (file
,
1530 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1531 (long) current_gdbarch
->stab_reg_to_regnum
1532 /*STAB_REG_TO_REGNUM ()*/);
1534 #ifdef ECOFF_REG_TO_REGNUM
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1538 (long) current_gdbarch
->ecoff_reg_to_regnum
1539 /*ECOFF_REG_TO_REGNUM ()*/);
1541 #ifdef DWARF_REG_TO_REGNUM
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1545 (long) current_gdbarch
->dwarf_reg_to_regnum
1546 /*DWARF_REG_TO_REGNUM ()*/);
1548 #ifdef SDB_REG_TO_REGNUM
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1552 (long) current_gdbarch
->sdb_reg_to_regnum
1553 /*SDB_REG_TO_REGNUM ()*/);
1555 #ifdef DWARF2_REG_TO_REGNUM
1557 fprintf_unfiltered (file
,
1558 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1559 (long) current_gdbarch
->dwarf2_reg_to_regnum
1560 /*DWARF2_REG_TO_REGNUM ()*/);
1562 #ifdef REGISTER_NAME
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1566 (long) current_gdbarch
->register_name
1567 /*REGISTER_NAME ()*/);
1569 #ifdef REGISTER_SIZE
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1572 (long) REGISTER_SIZE
);
1574 #ifdef REGISTER_BYTES
1575 fprintf_unfiltered (file
,
1576 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1577 (long) REGISTER_BYTES
);
1579 #ifdef REGISTER_BYTE
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1583 (long) current_gdbarch
->register_byte
1584 /*REGISTER_BYTE ()*/);
1586 #ifdef REGISTER_RAW_SIZE
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1590 (long) current_gdbarch
->register_raw_size
1591 /*REGISTER_RAW_SIZE ()*/);
1593 #ifdef MAX_REGISTER_RAW_SIZE
1594 fprintf_unfiltered (file
,
1595 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1596 (long) MAX_REGISTER_RAW_SIZE
);
1598 #ifdef REGISTER_VIRTUAL_SIZE
1600 fprintf_unfiltered (file
,
1601 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1602 (long) current_gdbarch
->register_virtual_size
1603 /*REGISTER_VIRTUAL_SIZE ()*/);
1605 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1608 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1610 #ifdef REGISTER_VIRTUAL_TYPE
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1614 (long) current_gdbarch
->register_virtual_type
1615 /*REGISTER_VIRTUAL_TYPE ()*/);
1617 #ifdef DO_REGISTERS_INFO
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1621 (long) current_gdbarch
->do_registers_info
1622 /*DO_REGISTERS_INFO ()*/);
1624 #ifdef REGISTER_SIM_REGNO
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1628 (long) current_gdbarch
->register_sim_regno
1629 /*REGISTER_SIM_REGNO ()*/);
1631 #ifdef REGISTER_BYTES_OK
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1635 (long) current_gdbarch
->register_bytes_ok
1636 /*REGISTER_BYTES_OK ()*/);
1638 #ifdef USE_GENERIC_DUMMY_FRAMES
1639 fprintf_unfiltered (file
,
1640 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1641 (long) USE_GENERIC_DUMMY_FRAMES
);
1643 #ifdef CALL_DUMMY_LOCATION
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1646 (long) CALL_DUMMY_LOCATION
);
1648 #ifdef CALL_DUMMY_ADDRESS
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1652 (long) current_gdbarch
->call_dummy_address
1653 /*CALL_DUMMY_ADDRESS ()*/);
1655 #ifdef CALL_DUMMY_START_OFFSET
1656 fprintf_unfiltered (file
,
1657 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1658 (long) CALL_DUMMY_START_OFFSET
);
1660 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1661 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1662 fprintf_unfiltered (file
,
1663 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1664 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1666 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1669 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1671 #ifdef CALL_DUMMY_LENGTH
1672 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1673 fprintf_unfiltered (file
,
1674 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1675 (long) CALL_DUMMY_LENGTH
);
1677 #ifdef PC_IN_CALL_DUMMY
1679 fprintf_unfiltered (file
,
1680 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1681 (long) current_gdbarch
->pc_in_call_dummy
1682 /*PC_IN_CALL_DUMMY ()*/);
1685 fprintf_unfiltered (file
,
1686 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1687 (long) CALL_DUMMY_P
);
1689 #ifdef CALL_DUMMY_WORDS
1690 fprintf_unfiltered (file
,
1691 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1692 (long) CALL_DUMMY_WORDS
);
1694 #ifdef SIZEOF_CALL_DUMMY_WORDS
1695 fprintf_unfiltered (file
,
1696 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1697 (long) SIZEOF_CALL_DUMMY_WORDS
);
1699 #ifdef CALL_DUMMY_STACK_ADJUST_P
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1702 (long) CALL_DUMMY_STACK_ADJUST_P
);
1704 #ifdef CALL_DUMMY_STACK_ADJUST
1705 if (CALL_DUMMY_STACK_ADJUST_P
)
1706 fprintf_unfiltered (file
,
1707 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1708 (long) CALL_DUMMY_STACK_ADJUST
);
1710 #ifdef FIX_CALL_DUMMY
1712 fprintf_unfiltered (file
,
1713 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1714 (long) current_gdbarch
->fix_call_dummy
1715 /*FIX_CALL_DUMMY ()*/);
1717 #ifdef BELIEVE_PCC_PROMOTION
1718 fprintf_unfiltered (file
,
1719 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1720 (long) BELIEVE_PCC_PROMOTION
);
1722 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1725 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1727 #ifdef COERCE_FLOAT_TO_DOUBLE
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1731 (long) current_gdbarch
->coerce_float_to_double
1732 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1734 #ifdef GET_SAVED_REGISTER
1736 fprintf_unfiltered (file
,
1737 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1738 (long) current_gdbarch
->get_saved_register
1739 /*GET_SAVED_REGISTER ()*/);
1741 #ifdef REGISTER_CONVERTIBLE
1743 fprintf_unfiltered (file
,
1744 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1745 (long) current_gdbarch
->register_convertible
1746 /*REGISTER_CONVERTIBLE ()*/);
1748 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1752 (long) current_gdbarch
->register_convert_to_virtual
1753 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1755 #ifdef REGISTER_CONVERT_TO_RAW
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1759 (long) current_gdbarch
->register_convert_to_raw
1760 /*REGISTER_CONVERT_TO_RAW ()*/);
1762 #ifdef FETCH_PSEUDO_REGISTER
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1766 (long) current_gdbarch
->fetch_pseudo_register
1767 /*FETCH_PSEUDO_REGISTER ()*/);
1769 #ifdef STORE_PSEUDO_REGISTER
1771 fprintf_unfiltered (file
,
1772 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1773 (long) current_gdbarch
->store_pseudo_register
1774 /*STORE_PSEUDO_REGISTER ()*/);
1776 #ifdef POINTER_TO_ADDRESS
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1780 (long) current_gdbarch
->pointer_to_address
1781 /*POINTER_TO_ADDRESS ()*/);
1783 #ifdef ADDRESS_TO_POINTER
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1787 (long) current_gdbarch
->address_to_pointer
1788 /*ADDRESS_TO_POINTER ()*/);
1790 #ifdef RETURN_VALUE_ON_STACK
1792 fprintf_unfiltered (file
,
1793 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1794 (long) current_gdbarch
->return_value_on_stack
1795 /*RETURN_VALUE_ON_STACK ()*/);
1797 #ifdef EXTRACT_RETURN_VALUE
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1801 (long) current_gdbarch
->extract_return_value
1802 /*EXTRACT_RETURN_VALUE ()*/);
1804 #ifdef PUSH_ARGUMENTS
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1808 (long) current_gdbarch
->push_arguments
1809 /*PUSH_ARGUMENTS ()*/);
1811 #ifdef PUSH_DUMMY_FRAME
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1815 (long) current_gdbarch
->push_dummy_frame
1816 /*PUSH_DUMMY_FRAME ()*/);
1818 #ifdef PUSH_RETURN_ADDRESS
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1822 (long) current_gdbarch
->push_return_address
1823 /*PUSH_RETURN_ADDRESS ()*/);
1827 fprintf_unfiltered (file
,
1828 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1829 (long) current_gdbarch
->pop_frame
1832 #ifdef D10V_MAKE_DADDR
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1836 (long) current_gdbarch
->d10v_make_daddr
1837 /*D10V_MAKE_DADDR ()*/);
1839 #ifdef D10V_MAKE_IADDR
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1843 (long) current_gdbarch
->d10v_make_iaddr
1844 /*D10V_MAKE_IADDR ()*/);
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1850 (long) current_gdbarch
->d10v_daddr_p
1851 /*D10V_DADDR_P ()*/);
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1857 (long) current_gdbarch
->d10v_iaddr_p
1858 /*D10V_IADDR_P ()*/);
1860 #ifdef D10V_CONVERT_DADDR_TO_RAW
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1864 (long) current_gdbarch
->d10v_convert_daddr_to_raw
1865 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1867 #ifdef D10V_CONVERT_IADDR_TO_RAW
1869 fprintf_unfiltered (file
,
1870 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1871 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
1872 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1874 #ifdef STORE_STRUCT_RETURN
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1878 (long) current_gdbarch
->store_struct_return
1879 /*STORE_STRUCT_RETURN ()*/);
1881 #ifdef STORE_RETURN_VALUE
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1885 (long) current_gdbarch
->store_return_value
1886 /*STORE_RETURN_VALUE ()*/);
1888 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1892 (long) current_gdbarch
->extract_struct_value_address
1893 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1895 #ifdef USE_STRUCT_CONVENTION
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1899 (long) current_gdbarch
->use_struct_convention
1900 /*USE_STRUCT_CONVENTION ()*/);
1902 #ifdef FRAME_INIT_SAVED_REGS
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1906 (long) current_gdbarch
->frame_init_saved_regs
1907 /*FRAME_INIT_SAVED_REGS ()*/);
1909 #ifdef INIT_EXTRA_FRAME_INFO
1911 fprintf_unfiltered (file
,
1912 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1913 (long) current_gdbarch
->init_extra_frame_info
1914 /*INIT_EXTRA_FRAME_INFO ()*/);
1916 #ifdef SKIP_PROLOGUE
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1920 (long) current_gdbarch
->skip_prologue
1921 /*SKIP_PROLOGUE ()*/);
1923 #ifdef PROLOGUE_FRAMELESS_P
1925 fprintf_unfiltered (file
,
1926 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1927 (long) current_gdbarch
->prologue_frameless_p
1928 /*PROLOGUE_FRAMELESS_P ()*/);
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1934 (long) current_gdbarch
->inner_than
1937 #ifdef BREAKPOINT_FROM_PC
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
1941 (long) current_gdbarch
->breakpoint_from_pc
1942 /*BREAKPOINT_FROM_PC ()*/);
1944 #ifdef MEMORY_INSERT_BREAKPOINT
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1948 (long) current_gdbarch
->memory_insert_breakpoint
1949 /*MEMORY_INSERT_BREAKPOINT ()*/);
1951 #ifdef MEMORY_REMOVE_BREAKPOINT
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1955 (long) current_gdbarch
->memory_remove_breakpoint
1956 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1958 #ifdef DECR_PC_AFTER_BREAK
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1961 (long) DECR_PC_AFTER_BREAK
);
1963 #ifdef FUNCTION_START_OFFSET
1964 fprintf_unfiltered (file
,
1965 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1966 (long) FUNCTION_START_OFFSET
);
1968 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1972 (long) current_gdbarch
->remote_translate_xfer_address
1973 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1975 #ifdef FRAME_ARGS_SKIP
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1978 (long) FRAME_ARGS_SKIP
);
1980 #ifdef FRAMELESS_FUNCTION_INVOCATION
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1984 (long) current_gdbarch
->frameless_function_invocation
1985 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1991 (long) current_gdbarch
->frame_chain
1992 /*FRAME_CHAIN ()*/);
1994 #ifdef FRAME_CHAIN_VALID
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1998 (long) current_gdbarch
->frame_chain_valid
1999 /*FRAME_CHAIN_VALID ()*/);
2001 #ifdef FRAME_SAVED_PC
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2005 (long) current_gdbarch
->frame_saved_pc
2006 /*FRAME_SAVED_PC ()*/);
2008 #ifdef FRAME_ARGS_ADDRESS
2010 fprintf_unfiltered (file
,
2011 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2012 (long) current_gdbarch
->frame_args_address
2013 /*FRAME_ARGS_ADDRESS ()*/);
2015 #ifdef FRAME_LOCALS_ADDRESS
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2019 (long) current_gdbarch
->frame_locals_address
2020 /*FRAME_LOCALS_ADDRESS ()*/);
2022 #ifdef SAVED_PC_AFTER_CALL
2024 fprintf_unfiltered (file
,
2025 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2026 (long) current_gdbarch
->saved_pc_after_call
2027 /*SAVED_PC_AFTER_CALL ()*/);
2029 #ifdef FRAME_NUM_ARGS
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2033 (long) current_gdbarch
->frame_num_args
2034 /*FRAME_NUM_ARGS ()*/);
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2040 (long) current_gdbarch
->stack_align
2041 /*STACK_ALIGN ()*/);
2043 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2046 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2048 #ifdef REG_STRUCT_HAS_ADDR
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2052 (long) current_gdbarch
->reg_struct_has_addr
2053 /*REG_STRUCT_HAS_ADDR ()*/);
2055 #ifdef SAVE_DUMMY_FRAME_TOS
2057 fprintf_unfiltered (file
,
2058 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2059 (long) current_gdbarch
->save_dummy_frame_tos
2060 /*SAVE_DUMMY_FRAME_TOS ()*/);
2062 #ifdef PARM_BOUNDARY
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2065 (long) PARM_BOUNDARY
);
2067 #ifdef TARGET_FLOAT_FORMAT
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2070 (long) TARGET_FLOAT_FORMAT
);
2072 #ifdef TARGET_DOUBLE_FORMAT
2073 fprintf_unfiltered (file
,
2074 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2075 (long) TARGET_DOUBLE_FORMAT
);
2077 #ifdef TARGET_LONG_DOUBLE_FORMAT
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2080 (long) TARGET_LONG_DOUBLE_FORMAT
);
2082 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2086 (long) current_gdbarch
->convert_from_func_ptr_addr
2087 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2089 if (current_gdbarch
->dump_tdep
!= NULL
)
2090 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2093 struct gdbarch_tdep
*
2094 gdbarch_tdep (struct gdbarch
*gdbarch
)
2096 if (gdbarch_debug
>= 2)
2097 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2098 return gdbarch
->tdep
;
2102 const struct bfd_arch_info
*
2103 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2105 if (gdbarch_debug
>= 2)
2106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2107 return gdbarch
->bfd_arch_info
;
2111 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2113 if (gdbarch_debug
>= 2)
2114 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2115 return gdbarch
->byte_order
;
2119 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2121 /* Skip verify of short_bit, invalid_p == 0 */
2122 if (gdbarch_debug
>= 2)
2123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2124 return gdbarch
->short_bit
;
2128 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2131 gdbarch
->short_bit
= short_bit
;
2135 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2137 /* Skip verify of int_bit, invalid_p == 0 */
2138 if (gdbarch_debug
>= 2)
2139 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2140 return gdbarch
->int_bit
;
2144 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2147 gdbarch
->int_bit
= int_bit
;
2151 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2153 /* Skip verify of long_bit, invalid_p == 0 */
2154 if (gdbarch_debug
>= 2)
2155 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2156 return gdbarch
->long_bit
;
2160 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2163 gdbarch
->long_bit
= long_bit
;
2167 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2169 /* Skip verify of long_long_bit, invalid_p == 0 */
2170 if (gdbarch_debug
>= 2)
2171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2172 return gdbarch
->long_long_bit
;
2176 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2179 gdbarch
->long_long_bit
= long_long_bit
;
2183 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2185 /* Skip verify of float_bit, invalid_p == 0 */
2186 if (gdbarch_debug
>= 2)
2187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2188 return gdbarch
->float_bit
;
2192 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2195 gdbarch
->float_bit
= float_bit
;
2199 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2201 /* Skip verify of double_bit, invalid_p == 0 */
2202 if (gdbarch_debug
>= 2)
2203 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2204 return gdbarch
->double_bit
;
2208 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2211 gdbarch
->double_bit
= double_bit
;
2215 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2217 /* Skip verify of long_double_bit, invalid_p == 0 */
2218 if (gdbarch_debug
>= 2)
2219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2220 return gdbarch
->long_double_bit
;
2224 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2225 int long_double_bit
)
2227 gdbarch
->long_double_bit
= long_double_bit
;
2231 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2233 /* Skip verify of ptr_bit, invalid_p == 0 */
2234 if (gdbarch_debug
>= 2)
2235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2236 return gdbarch
->ptr_bit
;
2240 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2243 gdbarch
->ptr_bit
= ptr_bit
;
2247 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2249 if (gdbarch
->addr_bit
== 0)
2250 internal_error ("gdbarch: gdbarch_addr_bit invalid");
2251 if (gdbarch_debug
>= 2)
2252 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2253 return gdbarch
->addr_bit
;
2257 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2260 gdbarch
->addr_bit
= addr_bit
;
2264 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2266 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2267 if (gdbarch_debug
>= 2)
2268 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2269 return gdbarch
->bfd_vma_bit
;
2273 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2276 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2280 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2282 /* Skip verify of ieee_float, invalid_p == 0 */
2283 if (gdbarch_debug
>= 2)
2284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2285 return gdbarch
->ieee_float
;
2289 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2292 gdbarch
->ieee_float
= ieee_float
;
2296 gdbarch_read_pc (struct gdbarch
*gdbarch
, int pid
)
2298 if (gdbarch
->read_pc
== 0)
2299 internal_error ("gdbarch: gdbarch_read_pc invalid");
2300 if (gdbarch_debug
>= 2)
2301 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2302 return gdbarch
->read_pc (pid
);
2306 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2307 gdbarch_read_pc_ftype read_pc
)
2309 gdbarch
->read_pc
= read_pc
;
2313 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, int pid
)
2315 if (gdbarch
->write_pc
== 0)
2316 internal_error ("gdbarch: gdbarch_write_pc invalid");
2317 if (gdbarch_debug
>= 2)
2318 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2319 gdbarch
->write_pc (val
, pid
);
2323 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2324 gdbarch_write_pc_ftype write_pc
)
2326 gdbarch
->write_pc
= write_pc
;
2330 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2332 if (gdbarch
->read_fp
== 0)
2333 internal_error ("gdbarch: gdbarch_read_fp invalid");
2334 if (gdbarch_debug
>= 2)
2335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2336 return gdbarch
->read_fp ();
2340 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2341 gdbarch_read_fp_ftype read_fp
)
2343 gdbarch
->read_fp
= read_fp
;
2347 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2349 if (gdbarch
->write_fp
== 0)
2350 internal_error ("gdbarch: gdbarch_write_fp invalid");
2351 if (gdbarch_debug
>= 2)
2352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2353 gdbarch
->write_fp (val
);
2357 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2358 gdbarch_write_fp_ftype write_fp
)
2360 gdbarch
->write_fp
= write_fp
;
2364 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2366 if (gdbarch
->read_sp
== 0)
2367 internal_error ("gdbarch: gdbarch_read_sp invalid");
2368 if (gdbarch_debug
>= 2)
2369 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2370 return gdbarch
->read_sp ();
2374 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2375 gdbarch_read_sp_ftype read_sp
)
2377 gdbarch
->read_sp
= read_sp
;
2381 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2383 if (gdbarch
->write_sp
== 0)
2384 internal_error ("gdbarch: gdbarch_write_sp invalid");
2385 if (gdbarch_debug
>= 2)
2386 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2387 gdbarch
->write_sp (val
);
2391 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2392 gdbarch_write_sp_ftype write_sp
)
2394 gdbarch
->write_sp
= write_sp
;
2398 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2400 if (gdbarch
->num_regs
== -1)
2401 internal_error ("gdbarch: gdbarch_num_regs invalid");
2402 if (gdbarch_debug
>= 2)
2403 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2404 return gdbarch
->num_regs
;
2408 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2411 gdbarch
->num_regs
= num_regs
;
2415 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2417 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2418 if (gdbarch_debug
>= 2)
2419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2420 return gdbarch
->num_pseudo_regs
;
2424 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2425 int num_pseudo_regs
)
2427 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2431 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2433 if (gdbarch
->sp_regnum
== -1)
2434 internal_error ("gdbarch: gdbarch_sp_regnum invalid");
2435 if (gdbarch_debug
>= 2)
2436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2437 return gdbarch
->sp_regnum
;
2441 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2444 gdbarch
->sp_regnum
= sp_regnum
;
2448 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2450 if (gdbarch
->fp_regnum
== -1)
2451 internal_error ("gdbarch: gdbarch_fp_regnum invalid");
2452 if (gdbarch_debug
>= 2)
2453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2454 return gdbarch
->fp_regnum
;
2458 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2461 gdbarch
->fp_regnum
= fp_regnum
;
2465 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2467 if (gdbarch
->pc_regnum
== -1)
2468 internal_error ("gdbarch: gdbarch_pc_regnum invalid");
2469 if (gdbarch_debug
>= 2)
2470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2471 return gdbarch
->pc_regnum
;
2475 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2478 gdbarch
->pc_regnum
= pc_regnum
;
2482 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2484 /* Skip verify of fp0_regnum, invalid_p == 0 */
2485 if (gdbarch_debug
>= 2)
2486 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2487 return gdbarch
->fp0_regnum
;
2491 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2494 gdbarch
->fp0_regnum
= fp0_regnum
;
2498 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2500 /* Skip verify of npc_regnum, invalid_p == 0 */
2501 if (gdbarch_debug
>= 2)
2502 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2503 return gdbarch
->npc_regnum
;
2507 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2510 gdbarch
->npc_regnum
= npc_regnum
;
2514 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2516 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2517 if (gdbarch_debug
>= 2)
2518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2519 return gdbarch
->nnpc_regnum
;
2523 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2526 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2530 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2532 if (gdbarch
->stab_reg_to_regnum
== 0)
2533 internal_error ("gdbarch: gdbarch_stab_reg_to_regnum invalid");
2534 if (gdbarch_debug
>= 2)
2535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2536 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2540 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2541 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2543 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2547 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2549 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2550 internal_error ("gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2551 if (gdbarch_debug
>= 2)
2552 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2553 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2557 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2558 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2560 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2564 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2566 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2567 internal_error ("gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2568 if (gdbarch_debug
>= 2)
2569 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2570 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2574 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2575 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2577 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2581 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2583 if (gdbarch
->sdb_reg_to_regnum
== 0)
2584 internal_error ("gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2585 if (gdbarch_debug
>= 2)
2586 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2587 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2591 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2592 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2594 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2598 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2600 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2601 internal_error ("gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2602 if (gdbarch_debug
>= 2)
2603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2604 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2608 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2609 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2611 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2615 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2617 if (gdbarch
->register_name
== 0)
2618 internal_error ("gdbarch: gdbarch_register_name invalid");
2619 if (gdbarch_debug
>= 2)
2620 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2621 return gdbarch
->register_name (regnr
);
2625 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2626 gdbarch_register_name_ftype register_name
)
2628 gdbarch
->register_name
= register_name
;
2632 gdbarch_register_size (struct gdbarch
*gdbarch
)
2634 if (gdbarch
->register_size
== -1)
2635 internal_error ("gdbarch: gdbarch_register_size invalid");
2636 if (gdbarch_debug
>= 2)
2637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2638 return gdbarch
->register_size
;
2642 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2645 gdbarch
->register_size
= register_size
;
2649 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2651 if (gdbarch
->register_bytes
== -1)
2652 internal_error ("gdbarch: gdbarch_register_bytes invalid");
2653 if (gdbarch_debug
>= 2)
2654 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2655 return gdbarch
->register_bytes
;
2659 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2662 gdbarch
->register_bytes
= register_bytes
;
2666 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2668 if (gdbarch
->register_byte
== 0)
2669 internal_error ("gdbarch: gdbarch_register_byte invalid");
2670 if (gdbarch_debug
>= 2)
2671 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2672 return gdbarch
->register_byte (reg_nr
);
2676 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2677 gdbarch_register_byte_ftype register_byte
)
2679 gdbarch
->register_byte
= register_byte
;
2683 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2685 if (gdbarch
->register_raw_size
== 0)
2686 internal_error ("gdbarch: gdbarch_register_raw_size invalid");
2687 if (gdbarch_debug
>= 2)
2688 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2689 return gdbarch
->register_raw_size (reg_nr
);
2693 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2694 gdbarch_register_raw_size_ftype register_raw_size
)
2696 gdbarch
->register_raw_size
= register_raw_size
;
2700 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2702 if (gdbarch
->max_register_raw_size
== -1)
2703 internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
2704 if (gdbarch_debug
>= 2)
2705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2706 return gdbarch
->max_register_raw_size
;
2710 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2711 int max_register_raw_size
)
2713 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2717 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2719 if (gdbarch
->register_virtual_size
== 0)
2720 internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
2721 if (gdbarch_debug
>= 2)
2722 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2723 return gdbarch
->register_virtual_size (reg_nr
);
2727 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2728 gdbarch_register_virtual_size_ftype register_virtual_size
)
2730 gdbarch
->register_virtual_size
= register_virtual_size
;
2734 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2736 if (gdbarch
->max_register_virtual_size
== -1)
2737 internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
2738 if (gdbarch_debug
>= 2)
2739 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2740 return gdbarch
->max_register_virtual_size
;
2744 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2745 int max_register_virtual_size
)
2747 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2751 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2753 if (gdbarch
->register_virtual_type
== 0)
2754 internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
2755 if (gdbarch_debug
>= 2)
2756 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2757 return gdbarch
->register_virtual_type (reg_nr
);
2761 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2762 gdbarch_register_virtual_type_ftype register_virtual_type
)
2764 gdbarch
->register_virtual_type
= register_virtual_type
;
2768 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2770 if (gdbarch
->do_registers_info
== 0)
2771 internal_error ("gdbarch: gdbarch_do_registers_info invalid");
2772 if (gdbarch_debug
>= 2)
2773 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2774 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2778 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2779 gdbarch_do_registers_info_ftype do_registers_info
)
2781 gdbarch
->do_registers_info
= do_registers_info
;
2785 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2787 if (gdbarch
->register_sim_regno
== 0)
2788 internal_error ("gdbarch: gdbarch_register_sim_regno invalid");
2789 if (gdbarch_debug
>= 2)
2790 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2791 return gdbarch
->register_sim_regno (reg_nr
);
2795 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2796 gdbarch_register_sim_regno_ftype register_sim_regno
)
2798 gdbarch
->register_sim_regno
= register_sim_regno
;
2802 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2804 return gdbarch
->register_bytes_ok
!= 0;
2808 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2810 if (gdbarch
->register_bytes_ok
== 0)
2811 internal_error ("gdbarch: gdbarch_register_bytes_ok invalid");
2812 if (gdbarch_debug
>= 2)
2813 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2814 return gdbarch
->register_bytes_ok (nr_bytes
);
2818 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2819 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2821 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2825 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2827 if (gdbarch
->use_generic_dummy_frames
== -1)
2828 internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
2829 if (gdbarch_debug
>= 2)
2830 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2831 return gdbarch
->use_generic_dummy_frames
;
2835 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2836 int use_generic_dummy_frames
)
2838 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2842 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2844 if (gdbarch
->call_dummy_location
== 0)
2845 internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
2846 if (gdbarch_debug
>= 2)
2847 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2848 return gdbarch
->call_dummy_location
;
2852 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2853 int call_dummy_location
)
2855 gdbarch
->call_dummy_location
= call_dummy_location
;
2859 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2861 if (gdbarch
->call_dummy_address
== 0)
2862 internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
2863 if (gdbarch_debug
>= 2)
2864 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2865 return gdbarch
->call_dummy_address ();
2869 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2870 gdbarch_call_dummy_address_ftype call_dummy_address
)
2872 gdbarch
->call_dummy_address
= call_dummy_address
;
2876 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2878 if (gdbarch
->call_dummy_start_offset
== -1)
2879 internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
2880 if (gdbarch_debug
>= 2)
2881 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2882 return gdbarch
->call_dummy_start_offset
;
2886 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
2887 CORE_ADDR call_dummy_start_offset
)
2889 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
2893 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
2895 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
2896 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2897 if (gdbarch_debug
>= 2)
2898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
2899 return gdbarch
->call_dummy_breakpoint_offset
;
2903 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
2904 CORE_ADDR call_dummy_breakpoint_offset
)
2906 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
2910 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
2912 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
2913 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
2914 if (gdbarch_debug
>= 2)
2915 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
2916 return gdbarch
->call_dummy_breakpoint_offset_p
;
2920 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
2921 int call_dummy_breakpoint_offset_p
)
2923 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
2927 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
2929 if (gdbarch
->call_dummy_length
== -1)
2930 internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
2931 if (gdbarch_debug
>= 2)
2932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
2933 return gdbarch
->call_dummy_length
;
2937 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
2938 int call_dummy_length
)
2940 gdbarch
->call_dummy_length
= call_dummy_length
;
2944 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
2946 if (gdbarch
->pc_in_call_dummy
== 0)
2947 internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
2948 if (gdbarch_debug
>= 2)
2949 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
2950 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
2954 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
2955 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
2957 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
2961 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
2963 if (gdbarch
->call_dummy_p
== -1)
2964 internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
2965 if (gdbarch_debug
>= 2)
2966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
2967 return gdbarch
->call_dummy_p
;
2971 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
2974 gdbarch
->call_dummy_p
= call_dummy_p
;
2978 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
2980 /* Skip verify of call_dummy_words, invalid_p == 0 */
2981 if (gdbarch_debug
>= 2)
2982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
2983 return gdbarch
->call_dummy_words
;
2987 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
2988 LONGEST
* call_dummy_words
)
2990 gdbarch
->call_dummy_words
= call_dummy_words
;
2994 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
2996 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
2997 if (gdbarch_debug
>= 2)
2998 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
2999 return gdbarch
->sizeof_call_dummy_words
;
3003 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3004 int sizeof_call_dummy_words
)
3006 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3010 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3012 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3013 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3014 if (gdbarch_debug
>= 2)
3015 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3016 return gdbarch
->call_dummy_stack_adjust_p
;
3020 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3021 int call_dummy_stack_adjust_p
)
3023 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3027 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3029 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3030 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3031 if (gdbarch_debug
>= 2)
3032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3033 return gdbarch
->call_dummy_stack_adjust
;
3037 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3038 int call_dummy_stack_adjust
)
3040 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3044 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
)
3046 if (gdbarch
->fix_call_dummy
== 0)
3047 internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
3048 if (gdbarch_debug
>= 2)
3049 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3050 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3054 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3055 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3057 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3061 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3063 if (gdbarch_debug
>= 2)
3064 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3065 return gdbarch
->believe_pcc_promotion
;
3069 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3070 int believe_pcc_promotion
)
3072 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3076 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3078 if (gdbarch_debug
>= 2)
3079 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3080 return gdbarch
->believe_pcc_promotion_type
;
3084 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3085 int believe_pcc_promotion_type
)
3087 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3091 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3093 if (gdbarch
->coerce_float_to_double
== 0)
3094 internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
3095 if (gdbarch_debug
>= 2)
3096 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3097 return gdbarch
->coerce_float_to_double (formal
, actual
);
3101 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3102 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3104 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3108 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
)
3110 if (gdbarch
->get_saved_register
== 0)
3111 internal_error ("gdbarch: gdbarch_get_saved_register invalid");
3112 if (gdbarch_debug
>= 2)
3113 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3114 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3118 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3119 gdbarch_get_saved_register_ftype get_saved_register
)
3121 gdbarch
->get_saved_register
= get_saved_register
;
3125 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3127 if (gdbarch
->register_convertible
== 0)
3128 internal_error ("gdbarch: gdbarch_register_convertible invalid");
3129 if (gdbarch_debug
>= 2)
3130 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3131 return gdbarch
->register_convertible (nr
);
3135 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3136 gdbarch_register_convertible_ftype register_convertible
)
3138 gdbarch
->register_convertible
= register_convertible
;
3142 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3144 if (gdbarch
->register_convert_to_virtual
== 0)
3145 internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
3146 if (gdbarch_debug
>= 2)
3147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3148 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3152 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3153 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3155 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3159 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3161 if (gdbarch
->register_convert_to_raw
== 0)
3162 internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
3163 if (gdbarch_debug
>= 2)
3164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3165 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3169 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3170 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3172 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3176 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3178 if (gdbarch
->fetch_pseudo_register
== 0)
3179 internal_error ("gdbarch: gdbarch_fetch_pseudo_register invalid");
3180 if (gdbarch_debug
>= 2)
3181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3182 gdbarch
->fetch_pseudo_register (regnum
);
3186 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3187 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3189 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3193 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3195 if (gdbarch
->store_pseudo_register
== 0)
3196 internal_error ("gdbarch: gdbarch_store_pseudo_register invalid");
3197 if (gdbarch_debug
>= 2)
3198 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3199 gdbarch
->store_pseudo_register (regnum
);
3203 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3204 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3206 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3210 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3212 if (gdbarch
->pointer_to_address
== 0)
3213 internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
3214 if (gdbarch_debug
>= 2)
3215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3216 return gdbarch
->pointer_to_address (type
, buf
);
3220 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3221 gdbarch_pointer_to_address_ftype pointer_to_address
)
3223 gdbarch
->pointer_to_address
= pointer_to_address
;
3227 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3229 if (gdbarch
->address_to_pointer
== 0)
3230 internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
3231 if (gdbarch_debug
>= 2)
3232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3233 gdbarch
->address_to_pointer (type
, buf
, addr
);
3237 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3238 gdbarch_address_to_pointer_ftype address_to_pointer
)
3240 gdbarch
->address_to_pointer
= address_to_pointer
;
3244 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3246 if (gdbarch
->return_value_on_stack
== 0)
3247 internal_error ("gdbarch: gdbarch_return_value_on_stack invalid");
3248 if (gdbarch_debug
>= 2)
3249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3250 return gdbarch
->return_value_on_stack (type
);
3254 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3255 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3257 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3261 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3263 if (gdbarch
->extract_return_value
== 0)
3264 internal_error ("gdbarch: gdbarch_extract_return_value invalid");
3265 if (gdbarch_debug
>= 2)
3266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3267 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3271 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3272 gdbarch_extract_return_value_ftype extract_return_value
)
3274 gdbarch
->extract_return_value
= extract_return_value
;
3278 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3280 if (gdbarch
->push_arguments
== 0)
3281 internal_error ("gdbarch: gdbarch_push_arguments invalid");
3282 if (gdbarch_debug
>= 2)
3283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3284 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3288 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3289 gdbarch_push_arguments_ftype push_arguments
)
3291 gdbarch
->push_arguments
= push_arguments
;
3295 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3297 if (gdbarch
->push_dummy_frame
== 0)
3298 internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
3299 if (gdbarch_debug
>= 2)
3300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3301 gdbarch
->push_dummy_frame ();
3305 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3306 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3308 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3312 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3314 if (gdbarch
->push_return_address
== 0)
3315 internal_error ("gdbarch: gdbarch_push_return_address invalid");
3316 if (gdbarch_debug
>= 2)
3317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3318 return gdbarch
->push_return_address (pc
, sp
);
3322 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3323 gdbarch_push_return_address_ftype push_return_address
)
3325 gdbarch
->push_return_address
= push_return_address
;
3329 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3331 if (gdbarch
->pop_frame
== 0)
3332 internal_error ("gdbarch: gdbarch_pop_frame invalid");
3333 if (gdbarch_debug
>= 2)
3334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3335 gdbarch
->pop_frame ();
3339 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3340 gdbarch_pop_frame_ftype pop_frame
)
3342 gdbarch
->pop_frame
= pop_frame
;
3346 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3348 if (gdbarch
->d10v_make_daddr
== 0)
3349 internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
3350 if (gdbarch_debug
>= 2)
3351 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3352 return gdbarch
->d10v_make_daddr (x
);
3356 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3357 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3359 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3363 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3365 if (gdbarch
->d10v_make_iaddr
== 0)
3366 internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
3367 if (gdbarch_debug
>= 2)
3368 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3369 return gdbarch
->d10v_make_iaddr (x
);
3373 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3374 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3376 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3380 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3382 if (gdbarch
->d10v_daddr_p
== 0)
3383 internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
3384 if (gdbarch_debug
>= 2)
3385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3386 return gdbarch
->d10v_daddr_p (x
);
3390 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3391 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3393 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3397 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3399 if (gdbarch
->d10v_iaddr_p
== 0)
3400 internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
3401 if (gdbarch_debug
>= 2)
3402 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3403 return gdbarch
->d10v_iaddr_p (x
);
3407 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3408 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3410 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3414 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3416 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3417 internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3418 if (gdbarch_debug
>= 2)
3419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3420 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3424 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3425 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3427 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3431 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3433 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3434 internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3435 if (gdbarch_debug
>= 2)
3436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3437 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3441 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3442 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3444 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3448 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3450 if (gdbarch
->store_struct_return
== 0)
3451 internal_error ("gdbarch: gdbarch_store_struct_return invalid");
3452 if (gdbarch_debug
>= 2)
3453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3454 gdbarch
->store_struct_return (addr
, sp
);
3458 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3459 gdbarch_store_struct_return_ftype store_struct_return
)
3461 gdbarch
->store_struct_return
= store_struct_return
;
3465 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3467 if (gdbarch
->store_return_value
== 0)
3468 internal_error ("gdbarch: gdbarch_store_return_value invalid");
3469 if (gdbarch_debug
>= 2)
3470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3471 gdbarch
->store_return_value (type
, valbuf
);
3475 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3476 gdbarch_store_return_value_ftype store_return_value
)
3478 gdbarch
->store_return_value
= store_return_value
;
3482 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3484 if (gdbarch
->extract_struct_value_address
== 0)
3485 internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
3486 if (gdbarch_debug
>= 2)
3487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3488 return gdbarch
->extract_struct_value_address (regbuf
);
3492 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3493 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3495 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3499 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3501 if (gdbarch
->use_struct_convention
== 0)
3502 internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
3503 if (gdbarch_debug
>= 2)
3504 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3505 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3509 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3510 gdbarch_use_struct_convention_ftype use_struct_convention
)
3512 gdbarch
->use_struct_convention
= use_struct_convention
;
3516 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3518 if (gdbarch
->frame_init_saved_regs
== 0)
3519 internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
3520 if (gdbarch_debug
>= 2)
3521 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3522 gdbarch
->frame_init_saved_regs (frame
);
3526 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3527 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3529 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3533 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3535 if (gdbarch
->init_extra_frame_info
== 0)
3536 internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
3537 if (gdbarch_debug
>= 2)
3538 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3539 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3543 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3544 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3546 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3550 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3552 if (gdbarch
->skip_prologue
== 0)
3553 internal_error ("gdbarch: gdbarch_skip_prologue invalid");
3554 if (gdbarch_debug
>= 2)
3555 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3556 return gdbarch
->skip_prologue (ip
);
3560 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3561 gdbarch_skip_prologue_ftype skip_prologue
)
3563 gdbarch
->skip_prologue
= skip_prologue
;
3567 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3569 if (gdbarch
->prologue_frameless_p
== 0)
3570 internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
3571 if (gdbarch_debug
>= 2)
3572 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3573 return gdbarch
->prologue_frameless_p (ip
);
3577 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3578 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3580 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3584 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3586 if (gdbarch
->inner_than
== 0)
3587 internal_error ("gdbarch: gdbarch_inner_than invalid");
3588 if (gdbarch_debug
>= 2)
3589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3590 return gdbarch
->inner_than (lhs
, rhs
);
3594 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3595 gdbarch_inner_than_ftype inner_than
)
3597 gdbarch
->inner_than
= inner_than
;
3601 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3603 if (gdbarch
->breakpoint_from_pc
== 0)
3604 internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
3605 if (gdbarch_debug
>= 2)
3606 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3607 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3611 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3612 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3614 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3618 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3620 if (gdbarch
->memory_insert_breakpoint
== 0)
3621 internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
3622 if (gdbarch_debug
>= 2)
3623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3624 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3628 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3629 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3631 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3635 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3637 if (gdbarch
->memory_remove_breakpoint
== 0)
3638 internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
3639 if (gdbarch_debug
>= 2)
3640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3641 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3645 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3646 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3648 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3652 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3654 if (gdbarch
->decr_pc_after_break
== -1)
3655 internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
3656 if (gdbarch_debug
>= 2)
3657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3658 return gdbarch
->decr_pc_after_break
;
3662 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3663 CORE_ADDR decr_pc_after_break
)
3665 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3669 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3671 if (gdbarch
->function_start_offset
== -1)
3672 internal_error ("gdbarch: gdbarch_function_start_offset invalid");
3673 if (gdbarch_debug
>= 2)
3674 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3675 return gdbarch
->function_start_offset
;
3679 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3680 CORE_ADDR function_start_offset
)
3682 gdbarch
->function_start_offset
= function_start_offset
;
3686 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3688 if (gdbarch
->remote_translate_xfer_address
== 0)
3689 internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
3690 if (gdbarch_debug
>= 2)
3691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3692 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3696 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3697 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3699 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3703 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3705 if (gdbarch
->frame_args_skip
== -1)
3706 internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
3707 if (gdbarch_debug
>= 2)
3708 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3709 return gdbarch
->frame_args_skip
;
3713 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3714 CORE_ADDR frame_args_skip
)
3716 gdbarch
->frame_args_skip
= frame_args_skip
;
3720 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3722 if (gdbarch
->frameless_function_invocation
== 0)
3723 internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
3724 if (gdbarch_debug
>= 2)
3725 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3726 return gdbarch
->frameless_function_invocation (fi
);
3730 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3731 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3733 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3737 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3739 if (gdbarch
->frame_chain
== 0)
3740 internal_error ("gdbarch: gdbarch_frame_chain invalid");
3741 if (gdbarch_debug
>= 2)
3742 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3743 return gdbarch
->frame_chain (frame
);
3747 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3748 gdbarch_frame_chain_ftype frame_chain
)
3750 gdbarch
->frame_chain
= frame_chain
;
3754 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3756 if (gdbarch
->frame_chain_valid
== 0)
3757 internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
3758 if (gdbarch_debug
>= 2)
3759 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3760 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3764 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3765 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3767 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3771 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3773 if (gdbarch
->frame_saved_pc
== 0)
3774 internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
3775 if (gdbarch_debug
>= 2)
3776 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3777 return gdbarch
->frame_saved_pc (fi
);
3781 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3782 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3784 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3788 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3790 if (gdbarch
->frame_args_address
== 0)
3791 internal_error ("gdbarch: gdbarch_frame_args_address invalid");
3792 if (gdbarch_debug
>= 2)
3793 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3794 return gdbarch
->frame_args_address (fi
);
3798 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3799 gdbarch_frame_args_address_ftype frame_args_address
)
3801 gdbarch
->frame_args_address
= frame_args_address
;
3805 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3807 if (gdbarch
->frame_locals_address
== 0)
3808 internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
3809 if (gdbarch_debug
>= 2)
3810 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3811 return gdbarch
->frame_locals_address (fi
);
3815 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3816 gdbarch_frame_locals_address_ftype frame_locals_address
)
3818 gdbarch
->frame_locals_address
= frame_locals_address
;
3822 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3824 if (gdbarch
->saved_pc_after_call
== 0)
3825 internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
3826 if (gdbarch_debug
>= 2)
3827 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3828 return gdbarch
->saved_pc_after_call (frame
);
3832 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3833 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3835 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3839 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3841 if (gdbarch
->frame_num_args
== 0)
3842 internal_error ("gdbarch: gdbarch_frame_num_args invalid");
3843 if (gdbarch_debug
>= 2)
3844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3845 return gdbarch
->frame_num_args (frame
);
3849 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3850 gdbarch_frame_num_args_ftype frame_num_args
)
3852 gdbarch
->frame_num_args
= frame_num_args
;
3856 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
3858 return gdbarch
->stack_align
!= 0;
3862 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3864 if (gdbarch
->stack_align
== 0)
3865 internal_error ("gdbarch: gdbarch_stack_align invalid");
3866 if (gdbarch_debug
>= 2)
3867 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
3868 return gdbarch
->stack_align (sp
);
3872 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
3873 gdbarch_stack_align_ftype stack_align
)
3875 gdbarch
->stack_align
= stack_align
;
3879 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
3881 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
3882 if (gdbarch_debug
>= 2)
3883 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
3884 return gdbarch
->extra_stack_alignment_needed
;
3888 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
3889 int extra_stack_alignment_needed
)
3891 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
3895 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
3897 return gdbarch
->reg_struct_has_addr
!= 0;
3901 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
3903 if (gdbarch
->reg_struct_has_addr
== 0)
3904 internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
3905 if (gdbarch_debug
>= 2)
3906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
3907 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
3911 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
3912 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
3914 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
3918 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
3920 return gdbarch
->save_dummy_frame_tos
!= 0;
3924 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3926 if (gdbarch
->save_dummy_frame_tos
== 0)
3927 internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid");
3928 if (gdbarch_debug
>= 2)
3929 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
3930 gdbarch
->save_dummy_frame_tos (sp
);
3934 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
3935 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
3937 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
3941 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
3943 if (gdbarch_debug
>= 2)
3944 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
3945 return gdbarch
->parm_boundary
;
3949 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
3952 gdbarch
->parm_boundary
= parm_boundary
;
3955 const struct floatformat
*
3956 gdbarch_float_format (struct gdbarch
*gdbarch
)
3958 if (gdbarch_debug
>= 2)
3959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
3960 return gdbarch
->float_format
;
3964 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
3965 const struct floatformat
* float_format
)
3967 gdbarch
->float_format
= float_format
;
3970 const struct floatformat
*
3971 gdbarch_double_format (struct gdbarch
*gdbarch
)
3973 if (gdbarch_debug
>= 2)
3974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
3975 return gdbarch
->double_format
;
3979 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
3980 const struct floatformat
* double_format
)
3982 gdbarch
->double_format
= double_format
;
3985 const struct floatformat
*
3986 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
3988 if (gdbarch_debug
>= 2)
3989 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
3990 return gdbarch
->long_double_format
;
3994 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
3995 const struct floatformat
* long_double_format
)
3997 gdbarch
->long_double_format
= long_double_format
;
4001 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4003 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4004 internal_error ("gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4005 if (gdbarch_debug
>= 2)
4006 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4007 return gdbarch
->convert_from_func_ptr_addr (addr
);
4011 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4012 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4014 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4018 /* Keep a registry of per-architecture data-pointers required by GDB
4024 gdbarch_data_init_ftype
*init
;
4025 gdbarch_data_free_ftype
*free
;
4028 struct gdbarch_data_registration
4030 struct gdbarch_data
*data
;
4031 struct gdbarch_data_registration
*next
;
4034 struct gdbarch_data_registry
4037 struct gdbarch_data_registration
*registrations
;
4040 struct gdbarch_data_registry gdbarch_data_registry
=
4045 struct gdbarch_data
*
4046 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4047 gdbarch_data_free_ftype
*free
)
4049 struct gdbarch_data_registration
**curr
;
4050 for (curr
= &gdbarch_data_registry
.registrations
;
4052 curr
= &(*curr
)->next
);
4053 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4054 (*curr
)->next
= NULL
;
4055 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4056 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4057 (*curr
)->data
->init
= init
;
4058 (*curr
)->data
->free
= free
;
4059 return (*curr
)->data
;
4063 /* Walk through all the registered users initializing each in turn. */
4066 init_gdbarch_data (struct gdbarch
*gdbarch
)
4068 struct gdbarch_data_registration
*rego
;
4069 for (rego
= gdbarch_data_registry
.registrations
;
4073 struct gdbarch_data
*data
= rego
->data
;
4074 gdb_assert (data
->index
< gdbarch
->nr_data
);
4075 if (data
->init
!= NULL
)
4077 void *pointer
= data
->init (gdbarch
);
4078 set_gdbarch_data (gdbarch
, data
, pointer
);
4083 /* Create/delete the gdbarch data vector. */
4086 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4088 gdb_assert (gdbarch
->data
== NULL
);
4089 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4090 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4094 free_gdbarch_data (struct gdbarch
*gdbarch
)
4096 struct gdbarch_data_registration
*rego
;
4097 gdb_assert (gdbarch
->data
!= NULL
);
4098 for (rego
= gdbarch_data_registry
.registrations
;
4102 struct gdbarch_data
*data
= rego
->data
;
4103 gdb_assert (data
->index
< gdbarch
->nr_data
);
4104 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4106 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4107 gdbarch
->data
[data
->index
] = NULL
;
4110 xfree (gdbarch
->data
);
4111 gdbarch
->data
= NULL
;
4115 /* Initialize the current value of thee specified per-architecture
4119 set_gdbarch_data (struct gdbarch
*gdbarch
,
4120 struct gdbarch_data
*data
,
4123 gdb_assert (data
->index
< gdbarch
->nr_data
);
4124 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4125 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4126 gdbarch
->data
[data
->index
] = pointer
;
4129 /* Return the current value of the specified per-architecture
4133 gdbarch_data (struct gdbarch_data
*data
)
4135 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4136 return current_gdbarch
->data
[data
->index
];
4141 /* Keep a registry of swapped data required by GDB modules. */
4146 struct gdbarch_swap_registration
*source
;
4147 struct gdbarch_swap
*next
;
4150 struct gdbarch_swap_registration
4153 unsigned long sizeof_data
;
4154 gdbarch_swap_ftype
*init
;
4155 struct gdbarch_swap_registration
*next
;
4158 struct gdbarch_swap_registry
4161 struct gdbarch_swap_registration
*registrations
;
4164 struct gdbarch_swap_registry gdbarch_swap_registry
=
4170 register_gdbarch_swap (void *data
,
4171 unsigned long sizeof_data
,
4172 gdbarch_swap_ftype
*init
)
4174 struct gdbarch_swap_registration
**rego
;
4175 for (rego
= &gdbarch_swap_registry
.registrations
;
4177 rego
= &(*rego
)->next
);
4178 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4179 (*rego
)->next
= NULL
;
4180 (*rego
)->init
= init
;
4181 (*rego
)->data
= data
;
4182 (*rego
)->sizeof_data
= sizeof_data
;
4187 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4189 struct gdbarch_swap_registration
*rego
;
4190 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4191 for (rego
= gdbarch_swap_registry
.registrations
;
4195 if (rego
->data
!= NULL
)
4197 (*curr
) = XMALLOC (struct gdbarch_swap
);
4198 (*curr
)->source
= rego
;
4199 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4200 (*curr
)->next
= NULL
;
4201 memset (rego
->data
, 0, rego
->sizeof_data
);
4202 curr
= &(*curr
)->next
;
4204 if (rego
->init
!= NULL
)
4210 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4212 struct gdbarch_swap
*curr
;
4213 for (curr
= gdbarch
->swap
;
4216 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4220 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4222 struct gdbarch_swap
*curr
;
4223 for (curr
= gdbarch
->swap
;
4226 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4230 /* Keep a registry of the architectures known by GDB. */
4232 struct gdbarch_registration
4234 enum bfd_architecture bfd_architecture
;
4235 gdbarch_init_ftype
*init
;
4236 gdbarch_dump_tdep_ftype
*dump_tdep
;
4237 struct gdbarch_list
*arches
;
4238 struct gdbarch_registration
*next
;
4241 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4244 append_name (const char ***buf
, int *nr
, const char *name
)
4246 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4252 gdbarch_printable_names (void)
4256 /* Accumulate a list of names based on the registed list of
4258 enum bfd_architecture a
;
4260 const char **arches
= NULL
;
4261 struct gdbarch_registration
*rego
;
4262 for (rego
= gdbarch_registry
;
4266 const struct bfd_arch_info
*ap
;
4267 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4269 internal_error ("gdbarch_architecture_names: multi-arch unknown");
4272 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4277 append_name (&arches
, &nr_arches
, NULL
);
4281 /* Just return all the architectures that BFD knows. Assume that
4282 the legacy architecture framework supports them. */
4283 return bfd_arch_list ();
4288 gdbarch_register (enum bfd_architecture bfd_architecture
,
4289 gdbarch_init_ftype
*init
,
4290 gdbarch_dump_tdep_ftype
*dump_tdep
)
4292 struct gdbarch_registration
**curr
;
4293 const struct bfd_arch_info
*bfd_arch_info
;
4294 /* Check that BFD recognizes this architecture */
4295 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4296 if (bfd_arch_info
== NULL
)
4298 internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture
);
4300 /* Check that we haven't seen this architecture before */
4301 for (curr
= &gdbarch_registry
;
4303 curr
= &(*curr
)->next
)
4305 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4306 internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
4307 bfd_arch_info
->printable_name
);
4311 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4312 bfd_arch_info
->printable_name
,
4315 (*curr
) = XMALLOC (struct gdbarch_registration
);
4316 (*curr
)->bfd_architecture
= bfd_architecture
;
4317 (*curr
)->init
= init
;
4318 (*curr
)->dump_tdep
= dump_tdep
;
4319 (*curr
)->arches
= NULL
;
4320 (*curr
)->next
= NULL
;
4321 /* When non- multi-arch, install whatever target dump routine we've
4322 been provided - hopefully that routine has been written correctly
4323 and works regardless of multi-arch. */
4324 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4325 && startup_gdbarch
.dump_tdep
== NULL
)
4326 startup_gdbarch
.dump_tdep
= dump_tdep
;
4330 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4331 gdbarch_init_ftype
*init
)
4333 gdbarch_register (bfd_architecture
, init
, NULL
);
4337 /* Look for an architecture using gdbarch_info. Base search on only
4338 BFD_ARCH_INFO and BYTE_ORDER. */
4340 struct gdbarch_list
*
4341 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4342 const struct gdbarch_info
*info
)
4344 for (; arches
!= NULL
; arches
= arches
->next
)
4346 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4348 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4356 /* Update the current architecture. Return ZERO if the update request
4360 gdbarch_update_p (struct gdbarch_info info
)
4362 struct gdbarch
*new_gdbarch
;
4363 struct gdbarch_list
**list
;
4364 struct gdbarch_registration
*rego
;
4366 /* Fill in any missing bits. Most important is the bfd_architecture
4367 which is used to select the target architecture. */
4368 if (info
.bfd_architecture
== bfd_arch_unknown
)
4370 if (info
.bfd_arch_info
!= NULL
)
4371 info
.bfd_architecture
= info
.bfd_arch_info
->arch
;
4372 else if (info
.abfd
!= NULL
)
4373 info
.bfd_architecture
= bfd_get_arch (info
.abfd
);
4374 /* FIXME - should query BFD for its default architecture. */
4376 info
.bfd_architecture
= current_gdbarch
->bfd_arch_info
->arch
;
4378 if (info
.bfd_arch_info
== NULL
)
4380 if (target_architecture_auto
&& info
.abfd
!= NULL
)
4381 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4383 info
.bfd_arch_info
= current_gdbarch
->bfd_arch_info
;
4385 if (info
.byte_order
== 0)
4387 if (target_byte_order_auto
&& info
.abfd
!= NULL
)
4388 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4389 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4392 info
.byte_order
= current_gdbarch
->byte_order
;
4393 /* FIXME - should query BFD for its default byte-order. */
4395 /* A default for abfd? */
4397 /* Find the target that knows about this architecture. */
4398 for (rego
= gdbarch_registry
;
4401 if (rego
->bfd_architecture
== info
.bfd_architecture
)
4406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4412 fprintf_unfiltered (gdb_stdlog
,
4413 "gdbarch_update: info.bfd_architecture %d (%s)\n",
4414 info
.bfd_architecture
,
4415 bfd_lookup_arch (info
.bfd_architecture
, 0)->printable_name
);
4416 fprintf_unfiltered (gdb_stdlog
,
4417 "gdbarch_update: info.bfd_arch_info %s\n",
4418 (info
.bfd_arch_info
!= NULL
4419 ? info
.bfd_arch_info
->printable_name
4421 fprintf_unfiltered (gdb_stdlog
,
4422 "gdbarch_update: info.byte_order %d (%s)\n",
4424 (info
.byte_order
== BIG_ENDIAN
? "big"
4425 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4427 fprintf_unfiltered (gdb_stdlog
,
4428 "gdbarch_update: info.abfd 0x%lx\n",
4430 fprintf_unfiltered (gdb_stdlog
,
4431 "gdbarch_update: info.tdep_info 0x%lx\n",
4432 (long) info
.tdep_info
);
4435 /* Ask the target for a replacement architecture. */
4436 new_gdbarch
= rego
->init (info
, rego
->arches
);
4438 /* Did the target like it? No. Reject the change. */
4439 if (new_gdbarch
== NULL
)
4442 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4446 /* Did the architecture change? No. Do nothing. */
4447 if (current_gdbarch
== new_gdbarch
)
4450 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4452 new_gdbarch
->bfd_arch_info
->printable_name
);
4456 /* Swap all data belonging to the old target out */
4457 swapout_gdbarch_swap (current_gdbarch
);
4459 /* Is this a pre-existing architecture? Yes. Swap it in. */
4460 for (list
= ®o
->arches
;
4462 list
= &(*list
)->next
)
4464 if ((*list
)->gdbarch
== new_gdbarch
)
4467 fprintf_unfiltered (gdb_stdlog
,
4468 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4470 new_gdbarch
->bfd_arch_info
->printable_name
);
4471 current_gdbarch
= new_gdbarch
;
4472 swapin_gdbarch_swap (new_gdbarch
);
4477 /* Append this new architecture to this targets list. */
4478 (*list
) = XMALLOC (struct gdbarch_list
);
4479 (*list
)->next
= NULL
;
4480 (*list
)->gdbarch
= new_gdbarch
;
4482 /* Switch to this new architecture. Dump it out. */
4483 current_gdbarch
= new_gdbarch
;
4486 fprintf_unfiltered (gdb_stdlog
,
4487 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4489 new_gdbarch
->bfd_arch_info
->printable_name
);
4492 /* Check that the newly installed architecture is valid. Plug in
4493 any post init values. */
4494 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4495 verify_gdbarch (new_gdbarch
);
4497 /* Initialize the per-architecture memory (swap) areas.
4498 CURRENT_GDBARCH must be update before these modules are
4500 init_gdbarch_swap (new_gdbarch
);
4502 /* Initialize the per-architecture data-pointer of all parties that
4503 registered an interest in this architecture. CURRENT_GDBARCH
4504 must be updated before these modules are called. */
4505 init_gdbarch_data (new_gdbarch
);
4508 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4516 /* Pointer to the target-dependent disassembly function. */
4517 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4518 disassemble_info tm_print_insn_info
;
4521 extern void _initialize_gdbarch (void);
4524 _initialize_gdbarch (void)
4526 struct cmd_list_element
*c
;
4528 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4529 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4530 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4531 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4532 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4534 add_show_from_set (add_set_cmd ("arch",
4537 (char *)&gdbarch_debug
,
4538 "Set architecture debugging.\n\
4539 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4541 c
= add_set_cmd ("archdebug",
4544 (char *)&gdbarch_debug
,
4545 "Set architecture debugging.\n\
4546 When non-zero, architecture debugging is enabled.", &setlist
);
4548 deprecate_cmd (c
, "set debug arch");
4549 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");