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
;
152 gdbarch_register_read_ftype
*register_read
;
153 gdbarch_register_write_ftype
*register_write
;
162 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
163 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
164 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
165 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
166 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
167 gdbarch_register_name_ftype
*register_name
;
170 gdbarch_register_byte_ftype
*register_byte
;
171 gdbarch_register_raw_size_ftype
*register_raw_size
;
172 int max_register_raw_size
;
173 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
174 int max_register_virtual_size
;
175 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
176 gdbarch_do_registers_info_ftype
*do_registers_info
;
177 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
178 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
179 int use_generic_dummy_frames
;
180 int call_dummy_location
;
181 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
182 CORE_ADDR call_dummy_start_offset
;
183 CORE_ADDR call_dummy_breakpoint_offset
;
184 int call_dummy_breakpoint_offset_p
;
185 int call_dummy_length
;
186 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
188 LONGEST
* call_dummy_words
;
189 int sizeof_call_dummy_words
;
190 int call_dummy_stack_adjust_p
;
191 int call_dummy_stack_adjust
;
192 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
193 int believe_pcc_promotion
;
194 int believe_pcc_promotion_type
;
195 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
196 gdbarch_get_saved_register_ftype
*get_saved_register
;
197 gdbarch_register_convertible_ftype
*register_convertible
;
198 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
199 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
200 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
201 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
202 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
203 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
204 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
205 gdbarch_extract_return_value_ftype
*extract_return_value
;
206 gdbarch_push_arguments_ftype
*push_arguments
;
207 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
208 gdbarch_push_return_address_ftype
*push_return_address
;
209 gdbarch_pop_frame_ftype
*pop_frame
;
210 gdbarch_d10v_make_daddr_ftype
*d10v_make_daddr
;
211 gdbarch_d10v_make_iaddr_ftype
*d10v_make_iaddr
;
212 gdbarch_d10v_daddr_p_ftype
*d10v_daddr_p
;
213 gdbarch_d10v_iaddr_p_ftype
*d10v_iaddr_p
;
214 gdbarch_d10v_convert_daddr_to_raw_ftype
*d10v_convert_daddr_to_raw
;
215 gdbarch_d10v_convert_iaddr_to_raw_ftype
*d10v_convert_iaddr_to_raw
;
216 gdbarch_store_struct_return_ftype
*store_struct_return
;
217 gdbarch_store_return_value_ftype
*store_return_value
;
218 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
219 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
220 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
221 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
222 gdbarch_skip_prologue_ftype
*skip_prologue
;
223 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
224 gdbarch_inner_than_ftype
*inner_than
;
225 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
226 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
227 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
228 CORE_ADDR decr_pc_after_break
;
229 CORE_ADDR function_start_offset
;
230 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
231 CORE_ADDR frame_args_skip
;
232 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
233 gdbarch_frame_chain_ftype
*frame_chain
;
234 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
235 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
236 gdbarch_frame_args_address_ftype
*frame_args_address
;
237 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
238 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
239 gdbarch_frame_num_args_ftype
*frame_num_args
;
240 gdbarch_stack_align_ftype
*stack_align
;
241 int extra_stack_alignment_needed
;
242 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
243 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
245 const struct floatformat
* float_format
;
246 const struct floatformat
* double_format
;
247 const struct floatformat
* long_double_format
;
248 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
249 gdbarch_software_single_step_ftype
*software_single_step
;
253 /* The default architecture uses host values (for want of a better
256 extern const struct bfd_arch_info bfd_default_arch_struct
;
258 struct gdbarch startup_gdbarch
=
260 /* basic architecture information */
261 &bfd_default_arch_struct
,
263 /* target specific vector and its dump routine */
265 /*per-architecture data-pointers and swap regions */
267 /* Multi-arch values */
271 8 * sizeof (LONGEST
),
274 8 * sizeof (long double),
329 generic_get_saved_register
,
383 /* startup_gdbarch() */
386 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
389 /* Create a new ``struct gdbarch'' based on information provided by
390 ``struct gdbarch_info''. */
393 gdbarch_alloc (const struct gdbarch_info
*info
,
394 struct gdbarch_tdep
*tdep
)
396 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
397 memset (gdbarch
, 0, sizeof (*gdbarch
));
399 alloc_gdbarch_data (gdbarch
);
401 gdbarch
->tdep
= tdep
;
403 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
404 gdbarch
->byte_order
= info
->byte_order
;
406 /* Force the explicit initialization of these. */
407 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
408 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
409 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
410 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
411 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
412 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
413 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
414 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
415 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
416 gdbarch
->read_pc
= generic_target_read_pc
;
417 gdbarch
->write_pc
= generic_target_write_pc
;
418 gdbarch
->read_fp
= generic_target_read_fp
;
419 gdbarch
->write_fp
= generic_target_write_fp
;
420 gdbarch
->read_sp
= generic_target_read_sp
;
421 gdbarch
->write_sp
= generic_target_write_sp
;
422 gdbarch
->num_regs
= -1;
423 gdbarch
->sp_regnum
= -1;
424 gdbarch
->fp_regnum
= -1;
425 gdbarch
->pc_regnum
= -1;
426 gdbarch
->fp0_regnum
= -1;
427 gdbarch
->npc_regnum
= -1;
428 gdbarch
->nnpc_regnum
= -1;
429 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
430 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
431 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
432 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
433 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
434 gdbarch
->register_name
= legacy_register_name
;
435 gdbarch
->register_size
= -1;
436 gdbarch
->register_bytes
= -1;
437 gdbarch
->max_register_raw_size
= -1;
438 gdbarch
->max_register_virtual_size
= -1;
439 gdbarch
->do_registers_info
= do_registers_info
;
440 gdbarch
->register_sim_regno
= default_register_sim_regno
;
441 gdbarch
->use_generic_dummy_frames
= -1;
442 gdbarch
->call_dummy_start_offset
= -1;
443 gdbarch
->call_dummy_breakpoint_offset
= -1;
444 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
445 gdbarch
->call_dummy_length
= -1;
446 gdbarch
->call_dummy_p
= -1;
447 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
448 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
449 gdbarch
->call_dummy_stack_adjust_p
= -1;
450 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
451 gdbarch
->register_convertible
= generic_register_convertible_not
;
452 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
453 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
454 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
455 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
456 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
457 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
458 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
459 gdbarch
->decr_pc_after_break
= -1;
460 gdbarch
->function_start_offset
= -1;
461 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
462 gdbarch
->frame_args_skip
= -1;
463 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
464 gdbarch
->extra_stack_alignment_needed
= 1;
465 gdbarch
->convert_from_func_ptr_addr
= default_convert_from_func_ptr_addr
;
466 /* gdbarch_alloc() */
472 /* Free a gdbarch struct. This should never happen in normal
473 operation --- once you've created a gdbarch, you keep it around.
474 However, if an architecture's init function encounters an error
475 building the structure, it may need to clean up a partially
476 constructed gdbarch. */
479 gdbarch_free (struct gdbarch
*arch
)
481 gdb_assert (arch
!= NULL
);
482 free_gdbarch_data (arch
);
487 /* Ensure that all values in a GDBARCH are reasonable. */
490 verify_gdbarch (struct gdbarch
*gdbarch
)
492 /* Only perform sanity checks on a multi-arch target. */
496 if (gdbarch
->byte_order
== 0)
497 internal_error (__FILE__
, __LINE__
,
498 "verify_gdbarch: byte-order unset");
499 if (gdbarch
->bfd_arch_info
== NULL
)
500 internal_error (__FILE__
, __LINE__
,
501 "verify_gdbarch: bfd_arch_info unset");
502 /* Check those that need to be defined for the given multi-arch level. */
503 /* Skip verify of short_bit, invalid_p == 0 */
504 /* Skip verify of int_bit, invalid_p == 0 */
505 /* Skip verify of long_bit, invalid_p == 0 */
506 /* Skip verify of long_long_bit, invalid_p == 0 */
507 /* Skip verify of float_bit, invalid_p == 0 */
508 /* Skip verify of double_bit, invalid_p == 0 */
509 /* Skip verify of long_double_bit, invalid_p == 0 */
510 /* Skip verify of ptr_bit, invalid_p == 0 */
511 if (gdbarch
->addr_bit
== 0)
512 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
513 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
514 /* Skip verify of ieee_float, invalid_p == 0 */
515 /* Skip verify of read_pc, invalid_p == 0 */
516 /* Skip verify of write_pc, invalid_p == 0 */
517 /* Skip verify of read_fp, invalid_p == 0 */
518 /* Skip verify of write_fp, invalid_p == 0 */
519 /* Skip verify of read_sp, invalid_p == 0 */
520 /* Skip verify of write_sp, invalid_p == 0 */
521 /* Skip verify of register_read, has predicate */
522 /* Skip verify of register_write, has predicate */
523 if ((GDB_MULTI_ARCH
>= 2)
524 && (gdbarch
->num_regs
== -1))
525 internal_error (__FILE__
, __LINE__
,
526 "gdbarch: verify_gdbarch: num_regs invalid");
527 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
528 if ((GDB_MULTI_ARCH
>= 2)
529 && (gdbarch
->sp_regnum
== -1))
530 internal_error (__FILE__
, __LINE__
,
531 "gdbarch: verify_gdbarch: sp_regnum invalid");
532 if ((GDB_MULTI_ARCH
>= 2)
533 && (gdbarch
->fp_regnum
== -1))
534 internal_error (__FILE__
, __LINE__
,
535 "gdbarch: verify_gdbarch: fp_regnum invalid");
536 if ((GDB_MULTI_ARCH
>= 2)
537 && (gdbarch
->pc_regnum
== -1))
538 internal_error (__FILE__
, __LINE__
,
539 "gdbarch: verify_gdbarch: pc_regnum invalid");
540 /* Skip verify of fp0_regnum, invalid_p == 0 */
541 /* Skip verify of npc_regnum, invalid_p == 0 */
542 /* Skip verify of nnpc_regnum, invalid_p == 0 */
543 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
544 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
545 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
546 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
547 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
548 /* Skip verify of register_name, invalid_p == 0 */
549 if ((GDB_MULTI_ARCH
>= 2)
550 && (gdbarch
->register_size
== -1))
551 internal_error (__FILE__
, __LINE__
,
552 "gdbarch: verify_gdbarch: register_size invalid");
553 if ((GDB_MULTI_ARCH
>= 2)
554 && (gdbarch
->register_bytes
== -1))
555 internal_error (__FILE__
, __LINE__
,
556 "gdbarch: verify_gdbarch: register_bytes invalid");
557 if ((GDB_MULTI_ARCH
>= 2)
558 && (gdbarch
->register_byte
== 0))
559 internal_error (__FILE__
, __LINE__
,
560 "gdbarch: verify_gdbarch: register_byte invalid");
561 if ((GDB_MULTI_ARCH
>= 2)
562 && (gdbarch
->register_raw_size
== 0))
563 internal_error (__FILE__
, __LINE__
,
564 "gdbarch: verify_gdbarch: register_raw_size invalid");
565 if ((GDB_MULTI_ARCH
>= 2)
566 && (gdbarch
->max_register_raw_size
== -1))
567 internal_error (__FILE__
, __LINE__
,
568 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
569 if ((GDB_MULTI_ARCH
>= 2)
570 && (gdbarch
->register_virtual_size
== 0))
571 internal_error (__FILE__
, __LINE__
,
572 "gdbarch: verify_gdbarch: register_virtual_size invalid");
573 if ((GDB_MULTI_ARCH
>= 2)
574 && (gdbarch
->max_register_virtual_size
== -1))
575 internal_error (__FILE__
, __LINE__
,
576 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
577 if ((GDB_MULTI_ARCH
>= 2)
578 && (gdbarch
->register_virtual_type
== 0))
579 internal_error (__FILE__
, __LINE__
,
580 "gdbarch: verify_gdbarch: register_virtual_type invalid");
581 /* Skip verify of do_registers_info, invalid_p == 0 */
582 /* Skip verify of register_sim_regno, invalid_p == 0 */
583 /* Skip verify of register_bytes_ok, has predicate */
584 if ((GDB_MULTI_ARCH
>= 1)
585 && (gdbarch
->use_generic_dummy_frames
== -1))
586 internal_error (__FILE__
, __LINE__
,
587 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
588 if ((GDB_MULTI_ARCH
>= 2)
589 && (gdbarch
->call_dummy_location
== 0))
590 internal_error (__FILE__
, __LINE__
,
591 "gdbarch: verify_gdbarch: call_dummy_location invalid");
592 if ((GDB_MULTI_ARCH
>= 2)
593 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
594 internal_error (__FILE__
, __LINE__
,
595 "gdbarch: verify_gdbarch: call_dummy_address invalid");
596 if ((GDB_MULTI_ARCH
>= 2)
597 && (gdbarch
->call_dummy_start_offset
== -1))
598 internal_error (__FILE__
, __LINE__
,
599 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
600 if ((GDB_MULTI_ARCH
>= 2)
601 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
602 internal_error (__FILE__
, __LINE__
,
603 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
604 if ((GDB_MULTI_ARCH
>= 1)
605 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
606 internal_error (__FILE__
, __LINE__
,
607 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
608 if ((GDB_MULTI_ARCH
>= 2)
609 && (gdbarch
->call_dummy_length
== -1))
610 internal_error (__FILE__
, __LINE__
,
611 "gdbarch: verify_gdbarch: call_dummy_length invalid");
612 if ((GDB_MULTI_ARCH
>= 2)
613 && (gdbarch
->pc_in_call_dummy
== 0))
614 internal_error (__FILE__
, __LINE__
,
615 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
616 if ((GDB_MULTI_ARCH
>= 1)
617 && (gdbarch
->call_dummy_p
== -1))
618 internal_error (__FILE__
, __LINE__
,
619 "gdbarch: verify_gdbarch: call_dummy_p invalid");
620 /* Skip verify of call_dummy_words, invalid_p == 0 */
621 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
622 if ((GDB_MULTI_ARCH
>= 1)
623 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
624 internal_error (__FILE__
, __LINE__
,
625 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
626 if ((GDB_MULTI_ARCH
>= 2)
627 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
628 internal_error (__FILE__
, __LINE__
,
629 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
630 if ((GDB_MULTI_ARCH
>= 2)
631 && (gdbarch
->fix_call_dummy
== 0))
632 internal_error (__FILE__
, __LINE__
,
633 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
634 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
635 if ((GDB_MULTI_ARCH
>= 1)
636 && (gdbarch
->get_saved_register
== 0))
637 internal_error (__FILE__
, __LINE__
,
638 "gdbarch: verify_gdbarch: get_saved_register invalid");
639 /* Skip verify of register_convertible, invalid_p == 0 */
640 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
641 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
642 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
643 /* Skip verify of store_pseudo_register, invalid_p == 0 */
644 /* Skip verify of pointer_to_address, invalid_p == 0 */
645 /* Skip verify of address_to_pointer, invalid_p == 0 */
646 /* Skip verify of return_value_on_stack, invalid_p == 0 */
647 if ((GDB_MULTI_ARCH
>= 2)
648 && (gdbarch
->extract_return_value
== 0))
649 internal_error (__FILE__
, __LINE__
,
650 "gdbarch: verify_gdbarch: extract_return_value invalid");
651 if ((GDB_MULTI_ARCH
>= 1)
652 && (gdbarch
->push_arguments
== 0))
653 internal_error (__FILE__
, __LINE__
,
654 "gdbarch: verify_gdbarch: push_arguments invalid");
655 if ((GDB_MULTI_ARCH
>= 2)
656 && (gdbarch
->push_dummy_frame
== 0))
657 internal_error (__FILE__
, __LINE__
,
658 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
659 if ((GDB_MULTI_ARCH
>= 1)
660 && (gdbarch
->push_return_address
== 0))
661 internal_error (__FILE__
, __LINE__
,
662 "gdbarch: verify_gdbarch: push_return_address invalid");
663 if ((GDB_MULTI_ARCH
>= 2)
664 && (gdbarch
->pop_frame
== 0))
665 internal_error (__FILE__
, __LINE__
,
666 "gdbarch: verify_gdbarch: pop_frame invalid");
667 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
668 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
669 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
670 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
671 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
672 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
673 if ((GDB_MULTI_ARCH
>= 2)
674 && (gdbarch
->store_struct_return
== 0))
675 internal_error (__FILE__
, __LINE__
,
676 "gdbarch: verify_gdbarch: store_struct_return invalid");
677 if ((GDB_MULTI_ARCH
>= 2)
678 && (gdbarch
->store_return_value
== 0))
679 internal_error (__FILE__
, __LINE__
,
680 "gdbarch: verify_gdbarch: store_return_value invalid");
681 if ((GDB_MULTI_ARCH
>= 2)
682 && (gdbarch
->extract_struct_value_address
== 0))
683 internal_error (__FILE__
, __LINE__
,
684 "gdbarch: verify_gdbarch: extract_struct_value_address invalid");
685 if ((GDB_MULTI_ARCH
>= 2)
686 && (gdbarch
->use_struct_convention
== 0))
687 internal_error (__FILE__
, __LINE__
,
688 "gdbarch: verify_gdbarch: use_struct_convention invalid");
689 if ((GDB_MULTI_ARCH
>= 2)
690 && (gdbarch
->frame_init_saved_regs
== 0))
691 internal_error (__FILE__
, __LINE__
,
692 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
693 if ((GDB_MULTI_ARCH
>= 2)
694 && (gdbarch
->init_extra_frame_info
== 0))
695 internal_error (__FILE__
, __LINE__
,
696 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
697 if ((GDB_MULTI_ARCH
>= 2)
698 && (gdbarch
->skip_prologue
== 0))
699 internal_error (__FILE__
, __LINE__
,
700 "gdbarch: verify_gdbarch: skip_prologue invalid");
701 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
702 if ((GDB_MULTI_ARCH
>= 2)
703 && (gdbarch
->inner_than
== 0))
704 internal_error (__FILE__
, __LINE__
,
705 "gdbarch: verify_gdbarch: inner_than invalid");
706 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
707 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
708 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
709 if ((GDB_MULTI_ARCH
>= 2)
710 && (gdbarch
->decr_pc_after_break
== -1))
711 internal_error (__FILE__
, __LINE__
,
712 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
713 if ((GDB_MULTI_ARCH
>= 2)
714 && (gdbarch
->function_start_offset
== -1))
715 internal_error (__FILE__
, __LINE__
,
716 "gdbarch: verify_gdbarch: function_start_offset invalid");
717 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
718 if ((GDB_MULTI_ARCH
>= 2)
719 && (gdbarch
->frame_args_skip
== -1))
720 internal_error (__FILE__
, __LINE__
,
721 "gdbarch: verify_gdbarch: frame_args_skip invalid");
722 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
723 if ((GDB_MULTI_ARCH
>= 2)
724 && (gdbarch
->frame_chain
== 0))
725 internal_error (__FILE__
, __LINE__
,
726 "gdbarch: verify_gdbarch: frame_chain invalid");
727 if ((GDB_MULTI_ARCH
>= 1)
728 && (gdbarch
->frame_chain_valid
== 0))
729 internal_error (__FILE__
, __LINE__
,
730 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
731 if ((GDB_MULTI_ARCH
>= 2)
732 && (gdbarch
->frame_saved_pc
== 0))
733 internal_error (__FILE__
, __LINE__
,
734 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
735 if ((GDB_MULTI_ARCH
>= 2)
736 && (gdbarch
->frame_args_address
== 0))
737 internal_error (__FILE__
, __LINE__
,
738 "gdbarch: verify_gdbarch: frame_args_address invalid");
739 if ((GDB_MULTI_ARCH
>= 2)
740 && (gdbarch
->frame_locals_address
== 0))
741 internal_error (__FILE__
, __LINE__
,
742 "gdbarch: verify_gdbarch: frame_locals_address invalid");
743 if ((GDB_MULTI_ARCH
>= 2)
744 && (gdbarch
->saved_pc_after_call
== 0))
745 internal_error (__FILE__
, __LINE__
,
746 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
747 if ((GDB_MULTI_ARCH
>= 2)
748 && (gdbarch
->frame_num_args
== 0))
749 internal_error (__FILE__
, __LINE__
,
750 "gdbarch: verify_gdbarch: frame_num_args invalid");
751 /* Skip verify of stack_align, has predicate */
752 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
753 /* Skip verify of reg_struct_has_addr, has predicate */
754 /* Skip verify of save_dummy_frame_tos, has predicate */
755 if (gdbarch
->float_format
== 0)
756 gdbarch
->float_format
= default_float_format (gdbarch
);
757 if (gdbarch
->double_format
== 0)
758 gdbarch
->double_format
= default_double_format (gdbarch
);
759 if (gdbarch
->long_double_format
== 0)
760 gdbarch
->long_double_format
= &floatformat_unknown
;
761 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
762 /* Skip verify of software_single_step, has predicate */
766 /* Print out the details of the current architecture. */
768 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
769 just happens to match the global variable ``current_gdbarch''. That
770 way macros refering to that variable get the local and not the global
771 version - ulgh. Once everything is parameterised with gdbarch, this
775 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
777 fprintf_unfiltered (file
,
778 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
780 #ifdef TARGET_ARCHITECTURE
781 fprintf_unfiltered (file
,
782 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
783 XSTRING (TARGET_ARCHITECTURE
));
785 #ifdef TARGET_BYTE_ORDER
786 fprintf_unfiltered (file
,
787 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
788 XSTRING (TARGET_BYTE_ORDER
));
790 #ifdef TARGET_SHORT_BIT
791 fprintf_unfiltered (file
,
792 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
793 XSTRING (TARGET_SHORT_BIT
));
795 #ifdef TARGET_INT_BIT
796 fprintf_unfiltered (file
,
797 "gdbarch_dump: TARGET_INT_BIT # %s\n",
798 XSTRING (TARGET_INT_BIT
));
800 #ifdef TARGET_LONG_BIT
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
803 XSTRING (TARGET_LONG_BIT
));
805 #ifdef TARGET_LONG_LONG_BIT
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
808 XSTRING (TARGET_LONG_LONG_BIT
));
810 #ifdef TARGET_FLOAT_BIT
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
813 XSTRING (TARGET_FLOAT_BIT
));
815 #ifdef TARGET_DOUBLE_BIT
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
818 XSTRING (TARGET_DOUBLE_BIT
));
820 #ifdef TARGET_LONG_DOUBLE_BIT
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
823 XSTRING (TARGET_LONG_DOUBLE_BIT
));
825 #ifdef TARGET_PTR_BIT
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
828 XSTRING (TARGET_PTR_BIT
));
830 #ifdef TARGET_ADDR_BIT
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
833 XSTRING (TARGET_ADDR_BIT
));
835 #ifdef TARGET_BFD_VMA_BIT
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
838 XSTRING (TARGET_BFD_VMA_BIT
));
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: IEEE_FLOAT # %s\n",
843 XSTRING (IEEE_FLOAT
));
845 #ifdef TARGET_READ_PC
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: %s # %s\n",
848 "TARGET_READ_PC(pid)",
849 XSTRING (TARGET_READ_PC (pid
)));
851 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
852 /* Macro might contain `[{}]' when not multi-arch */
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: %s # %s\n",
855 "TARGET_WRITE_PC(val, pid)",
856 XSTRING (TARGET_WRITE_PC (val
, pid
)));
858 #ifdef TARGET_READ_FP
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: %s # %s\n",
862 XSTRING (TARGET_READ_FP ()));
864 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
865 /* Macro might contain `[{}]' when not multi-arch */
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: %s # %s\n",
868 "TARGET_WRITE_FP(val)",
869 XSTRING (TARGET_WRITE_FP (val
)));
871 #ifdef TARGET_READ_SP
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: %s # %s\n",
875 XSTRING (TARGET_READ_SP ()));
877 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
878 /* Macro might contain `[{}]' when not multi-arch */
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: %s # %s\n",
881 "TARGET_WRITE_SP(val)",
882 XSTRING (TARGET_WRITE_SP (val
)));
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: NUM_REGS # %s\n",
889 #ifdef NUM_PSEUDO_REGS
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
892 XSTRING (NUM_PSEUDO_REGS
));
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: SP_REGNUM # %s\n",
897 XSTRING (SP_REGNUM
));
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: FP_REGNUM # %s\n",
902 XSTRING (FP_REGNUM
));
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: PC_REGNUM # %s\n",
907 XSTRING (PC_REGNUM
));
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: FP0_REGNUM # %s\n",
912 XSTRING (FP0_REGNUM
));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: NPC_REGNUM # %s\n",
917 XSTRING (NPC_REGNUM
));
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: NNPC_REGNUM # %s\n",
922 XSTRING (NNPC_REGNUM
));
924 #ifdef STAB_REG_TO_REGNUM
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: %s # %s\n",
927 "STAB_REG_TO_REGNUM(stab_regnr)",
928 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
930 #ifdef ECOFF_REG_TO_REGNUM
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: %s # %s\n",
933 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
934 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
936 #ifdef DWARF_REG_TO_REGNUM
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: %s # %s\n",
939 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
940 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
942 #ifdef SDB_REG_TO_REGNUM
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: %s # %s\n",
945 "SDB_REG_TO_REGNUM(sdb_regnr)",
946 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
948 #ifdef DWARF2_REG_TO_REGNUM
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: %s # %s\n",
951 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
952 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: %s # %s\n",
957 "REGISTER_NAME(regnr)",
958 XSTRING (REGISTER_NAME (regnr
)));
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: REGISTER_SIZE # %s\n",
963 XSTRING (REGISTER_SIZE
));
965 #ifdef REGISTER_BYTES
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: REGISTER_BYTES # %s\n",
968 XSTRING (REGISTER_BYTES
));
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: %s # %s\n",
973 "REGISTER_BYTE(reg_nr)",
974 XSTRING (REGISTER_BYTE (reg_nr
)));
976 #ifdef REGISTER_RAW_SIZE
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: %s # %s\n",
979 "REGISTER_RAW_SIZE(reg_nr)",
980 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
982 #ifdef MAX_REGISTER_RAW_SIZE
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
985 XSTRING (MAX_REGISTER_RAW_SIZE
));
987 #ifdef REGISTER_VIRTUAL_SIZE
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: %s # %s\n",
990 "REGISTER_VIRTUAL_SIZE(reg_nr)",
991 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
993 #ifdef MAX_REGISTER_VIRTUAL_SIZE
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
996 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
998 #ifdef REGISTER_VIRTUAL_TYPE
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: %s # %s\n",
1001 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1002 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1004 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1005 /* Macro might contain `[{}]' when not multi-arch */
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: %s # %s\n",
1008 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1009 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1011 #ifdef REGISTER_SIM_REGNO
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: %s # %s\n",
1014 "REGISTER_SIM_REGNO(reg_nr)",
1015 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1017 #ifdef REGISTER_BYTES_OK
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: %s # %s\n",
1020 "REGISTER_BYTES_OK(nr_bytes)",
1021 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1023 #ifdef USE_GENERIC_DUMMY_FRAMES
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1026 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1028 #ifdef CALL_DUMMY_LOCATION
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1031 XSTRING (CALL_DUMMY_LOCATION
));
1033 #ifdef CALL_DUMMY_ADDRESS
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: %s # %s\n",
1036 "CALL_DUMMY_ADDRESS()",
1037 XSTRING (CALL_DUMMY_ADDRESS ()));
1039 #ifdef CALL_DUMMY_START_OFFSET
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1042 XSTRING (CALL_DUMMY_START_OFFSET
));
1044 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1047 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1049 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1052 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1054 #ifdef CALL_DUMMY_LENGTH
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1057 XSTRING (CALL_DUMMY_LENGTH
));
1059 #ifdef PC_IN_CALL_DUMMY
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: %s # %s\n",
1062 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1063 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1066 fprintf_unfiltered (file
,
1067 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1068 XSTRING (CALL_DUMMY_P
));
1070 #ifdef CALL_DUMMY_WORDS
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1073 XSTRING (CALL_DUMMY_WORDS
));
1075 #ifdef SIZEOF_CALL_DUMMY_WORDS
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1078 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1080 #ifdef CALL_DUMMY_STACK_ADJUST_P
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1083 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1085 #ifdef CALL_DUMMY_STACK_ADJUST
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1088 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1090 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1091 /* Macro might contain `[{}]' when not multi-arch */
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: %s # %s\n",
1094 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1095 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1097 #ifdef BELIEVE_PCC_PROMOTION
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1100 XSTRING (BELIEVE_PCC_PROMOTION
));
1102 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1105 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1107 #ifdef COERCE_FLOAT_TO_DOUBLE
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: %s # %s\n",
1110 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1111 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1113 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1114 /* Macro might contain `[{}]' when not multi-arch */
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: %s # %s\n",
1117 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1118 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1120 #ifdef REGISTER_CONVERTIBLE
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: %s # %s\n",
1123 "REGISTER_CONVERTIBLE(nr)",
1124 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1126 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1127 /* Macro might contain `[{}]' when not multi-arch */
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: %s # %s\n",
1130 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1131 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1133 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1134 /* Macro might contain `[{}]' when not multi-arch */
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: %s # %s\n",
1137 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1138 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1140 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1141 /* Macro might contain `[{}]' when not multi-arch */
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: %s # %s\n",
1144 "FETCH_PSEUDO_REGISTER(regnum)",
1145 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1147 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1148 /* Macro might contain `[{}]' when not multi-arch */
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: %s # %s\n",
1151 "STORE_PSEUDO_REGISTER(regnum)",
1152 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1154 #ifdef POINTER_TO_ADDRESS
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: %s # %s\n",
1157 "POINTER_TO_ADDRESS(type, buf)",
1158 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1160 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1161 /* Macro might contain `[{}]' when not multi-arch */
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: %s # %s\n",
1164 "ADDRESS_TO_POINTER(type, buf, addr)",
1165 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1167 #ifdef RETURN_VALUE_ON_STACK
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: %s # %s\n",
1170 "RETURN_VALUE_ON_STACK(type)",
1171 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1173 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1174 /* Macro might contain `[{}]' when not multi-arch */
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: %s # %s\n",
1177 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1178 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1180 #ifdef PUSH_ARGUMENTS
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: %s # %s\n",
1183 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1184 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1186 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1187 /* Macro might contain `[{}]' when not multi-arch */
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: %s # %s\n",
1190 "PUSH_DUMMY_FRAME(-)",
1191 XSTRING (PUSH_DUMMY_FRAME (-)));
1193 #ifdef PUSH_RETURN_ADDRESS
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: %s # %s\n",
1196 "PUSH_RETURN_ADDRESS(pc, sp)",
1197 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1199 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1200 /* Macro might contain `[{}]' when not multi-arch */
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: %s # %s\n",
1204 XSTRING (POP_FRAME (-)));
1206 #ifdef D10V_MAKE_DADDR
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: %s # %s\n",
1209 "D10V_MAKE_DADDR(x)",
1210 XSTRING (D10V_MAKE_DADDR (x
)));
1212 #ifdef D10V_MAKE_IADDR
1213 fprintf_unfiltered (file
,
1214 "gdbarch_dump: %s # %s\n",
1215 "D10V_MAKE_IADDR(x)",
1216 XSTRING (D10V_MAKE_IADDR (x
)));
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: %s # %s\n",
1222 XSTRING (D10V_DADDR_P (x
)));
1225 fprintf_unfiltered (file
,
1226 "gdbarch_dump: %s # %s\n",
1228 XSTRING (D10V_IADDR_P (x
)));
1230 #ifdef D10V_CONVERT_DADDR_TO_RAW
1231 fprintf_unfiltered (file
,
1232 "gdbarch_dump: %s # %s\n",
1233 "D10V_CONVERT_DADDR_TO_RAW(x)",
1234 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1236 #ifdef D10V_CONVERT_IADDR_TO_RAW
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: %s # %s\n",
1239 "D10V_CONVERT_IADDR_TO_RAW(x)",
1240 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1242 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1243 /* Macro might contain `[{}]' when not multi-arch */
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: %s # %s\n",
1246 "STORE_STRUCT_RETURN(addr, sp)",
1247 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1249 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1250 /* Macro might contain `[{}]' when not multi-arch */
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: %s # %s\n",
1253 "STORE_RETURN_VALUE(type, valbuf)",
1254 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1256 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: %s # %s\n",
1259 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1260 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1262 #ifdef USE_STRUCT_CONVENTION
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: %s # %s\n",
1265 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1266 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1268 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1269 /* Macro might contain `[{}]' when not multi-arch */
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: %s # %s\n",
1272 "FRAME_INIT_SAVED_REGS(frame)",
1273 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1275 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1276 /* Macro might contain `[{}]' when not multi-arch */
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: %s # %s\n",
1279 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1280 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1282 #ifdef SKIP_PROLOGUE
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: %s # %s\n",
1285 "SKIP_PROLOGUE(ip)",
1286 XSTRING (SKIP_PROLOGUE (ip
)));
1288 #ifdef PROLOGUE_FRAMELESS_P
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: %s # %s\n",
1291 "PROLOGUE_FRAMELESS_P(ip)",
1292 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1295 fprintf_unfiltered (file
,
1296 "gdbarch_dump: %s # %s\n",
1297 "INNER_THAN(lhs, rhs)",
1298 XSTRING (INNER_THAN (lhs
, rhs
)));
1300 #ifdef BREAKPOINT_FROM_PC
1301 fprintf_unfiltered (file
,
1302 "gdbarch_dump: %s # %s\n",
1303 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1304 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1306 #ifdef MEMORY_INSERT_BREAKPOINT
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: %s # %s\n",
1309 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1310 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1312 #ifdef MEMORY_REMOVE_BREAKPOINT
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: %s # %s\n",
1315 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1316 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1318 #ifdef DECR_PC_AFTER_BREAK
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1321 XSTRING (DECR_PC_AFTER_BREAK
));
1323 #ifdef FUNCTION_START_OFFSET
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1326 XSTRING (FUNCTION_START_OFFSET
));
1328 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1329 /* Macro might contain `[{}]' when not multi-arch */
1330 fprintf_unfiltered (file
,
1331 "gdbarch_dump: %s # %s\n",
1332 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1333 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1335 #ifdef FRAME_ARGS_SKIP
1336 fprintf_unfiltered (file
,
1337 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1338 XSTRING (FRAME_ARGS_SKIP
));
1340 #ifdef FRAMELESS_FUNCTION_INVOCATION
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: %s # %s\n",
1343 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1344 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1347 fprintf_unfiltered (file
,
1348 "gdbarch_dump: %s # %s\n",
1349 "FRAME_CHAIN(frame)",
1350 XSTRING (FRAME_CHAIN (frame
)));
1352 #ifdef FRAME_CHAIN_VALID
1353 fprintf_unfiltered (file
,
1354 "gdbarch_dump: %s # %s\n",
1355 "FRAME_CHAIN_VALID(chain, thisframe)",
1356 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1358 #ifdef FRAME_SAVED_PC
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: %s # %s\n",
1361 "FRAME_SAVED_PC(fi)",
1362 XSTRING (FRAME_SAVED_PC (fi
)));
1364 #ifdef FRAME_ARGS_ADDRESS
1365 fprintf_unfiltered (file
,
1366 "gdbarch_dump: %s # %s\n",
1367 "FRAME_ARGS_ADDRESS(fi)",
1368 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1370 #ifdef FRAME_LOCALS_ADDRESS
1371 fprintf_unfiltered (file
,
1372 "gdbarch_dump: %s # %s\n",
1373 "FRAME_LOCALS_ADDRESS(fi)",
1374 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1376 #ifdef SAVED_PC_AFTER_CALL
1377 fprintf_unfiltered (file
,
1378 "gdbarch_dump: %s # %s\n",
1379 "SAVED_PC_AFTER_CALL(frame)",
1380 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1382 #ifdef FRAME_NUM_ARGS
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: %s # %s\n",
1385 "FRAME_NUM_ARGS(frame)",
1386 XSTRING (FRAME_NUM_ARGS (frame
)));
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: %s # %s\n",
1392 XSTRING (STACK_ALIGN (sp
)));
1394 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1397 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1399 #ifdef REG_STRUCT_HAS_ADDR
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: %s # %s\n",
1402 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1403 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1405 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1406 /* Macro might contain `[{}]' when not multi-arch */
1407 fprintf_unfiltered (file
,
1408 "gdbarch_dump: %s # %s\n",
1409 "SAVE_DUMMY_FRAME_TOS(sp)",
1410 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1412 #ifdef PARM_BOUNDARY
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1415 XSTRING (PARM_BOUNDARY
));
1417 #ifdef TARGET_FLOAT_FORMAT
1418 fprintf_unfiltered (file
,
1419 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1420 XSTRING (TARGET_FLOAT_FORMAT
));
1422 #ifdef TARGET_DOUBLE_FORMAT
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1425 XSTRING (TARGET_DOUBLE_FORMAT
));
1427 #ifdef TARGET_LONG_DOUBLE_FORMAT
1428 fprintf_unfiltered (file
,
1429 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1430 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1432 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: %s # %s\n",
1435 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1436 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1438 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1439 /* Macro might contain `[{}]' when not multi-arch */
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: %s # %s\n",
1442 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1443 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1445 #ifdef TARGET_ARCHITECTURE
1446 if (TARGET_ARCHITECTURE
!= NULL
)
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1449 TARGET_ARCHITECTURE
->printable_name
);
1451 #ifdef TARGET_BYTE_ORDER
1452 fprintf_unfiltered (file
,
1453 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1454 (long) TARGET_BYTE_ORDER
);
1456 #ifdef TARGET_SHORT_BIT
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1459 (long) TARGET_SHORT_BIT
);
1461 #ifdef TARGET_INT_BIT
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1464 (long) TARGET_INT_BIT
);
1466 #ifdef TARGET_LONG_BIT
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1469 (long) TARGET_LONG_BIT
);
1471 #ifdef TARGET_LONG_LONG_BIT
1472 fprintf_unfiltered (file
,
1473 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1474 (long) TARGET_LONG_LONG_BIT
);
1476 #ifdef TARGET_FLOAT_BIT
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1479 (long) TARGET_FLOAT_BIT
);
1481 #ifdef TARGET_DOUBLE_BIT
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1484 (long) TARGET_DOUBLE_BIT
);
1486 #ifdef TARGET_LONG_DOUBLE_BIT
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1489 (long) TARGET_LONG_DOUBLE_BIT
);
1491 #ifdef TARGET_PTR_BIT
1492 fprintf_unfiltered (file
,
1493 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1494 (long) TARGET_PTR_BIT
);
1496 #ifdef TARGET_ADDR_BIT
1497 fprintf_unfiltered (file
,
1498 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1499 (long) TARGET_ADDR_BIT
);
1501 #ifdef TARGET_BFD_VMA_BIT
1502 fprintf_unfiltered (file
,
1503 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1504 (long) TARGET_BFD_VMA_BIT
);
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1511 #ifdef TARGET_READ_PC
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1515 (long) current_gdbarch
->read_pc
1516 /*TARGET_READ_PC ()*/);
1518 #ifdef TARGET_WRITE_PC
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1522 (long) current_gdbarch
->write_pc
1523 /*TARGET_WRITE_PC ()*/);
1525 #ifdef TARGET_READ_FP
1527 fprintf_unfiltered (file
,
1528 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1529 (long) current_gdbarch
->read_fp
1530 /*TARGET_READ_FP ()*/);
1532 #ifdef TARGET_WRITE_FP
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1536 (long) current_gdbarch
->write_fp
1537 /*TARGET_WRITE_FP ()*/);
1539 #ifdef TARGET_READ_SP
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1543 (long) current_gdbarch
->read_sp
1544 /*TARGET_READ_SP ()*/);
1546 #ifdef TARGET_WRITE_SP
1548 fprintf_unfiltered (file
,
1549 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1550 (long) current_gdbarch
->write_sp
1551 /*TARGET_WRITE_SP ()*/);
1554 fprintf_unfiltered (file
,
1555 "gdbarch_dump: register_read = 0x%08lx\n",
1556 (long) current_gdbarch
->register_read
);
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: register_write = 0x%08lx\n",
1560 (long) current_gdbarch
->register_write
);
1562 fprintf_unfiltered (file
,
1563 "gdbarch_dump: NUM_REGS = %ld\n",
1566 #ifdef NUM_PSEUDO_REGS
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1569 (long) NUM_PSEUDO_REGS
);
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: SP_REGNUM = %ld\n",
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: FP_REGNUM = %ld\n",
1582 fprintf_unfiltered (file
,
1583 "gdbarch_dump: PC_REGNUM = %ld\n",
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: FP0_REGNUM = %ld\n",
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: NPC_REGNUM = %ld\n",
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1599 (long) NNPC_REGNUM
);
1601 #ifdef STAB_REG_TO_REGNUM
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1605 (long) current_gdbarch
->stab_reg_to_regnum
1606 /*STAB_REG_TO_REGNUM ()*/);
1608 #ifdef ECOFF_REG_TO_REGNUM
1610 fprintf_unfiltered (file
,
1611 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1612 (long) current_gdbarch
->ecoff_reg_to_regnum
1613 /*ECOFF_REG_TO_REGNUM ()*/);
1615 #ifdef DWARF_REG_TO_REGNUM
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1619 (long) current_gdbarch
->dwarf_reg_to_regnum
1620 /*DWARF_REG_TO_REGNUM ()*/);
1622 #ifdef SDB_REG_TO_REGNUM
1624 fprintf_unfiltered (file
,
1625 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1626 (long) current_gdbarch
->sdb_reg_to_regnum
1627 /*SDB_REG_TO_REGNUM ()*/);
1629 #ifdef DWARF2_REG_TO_REGNUM
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1633 (long) current_gdbarch
->dwarf2_reg_to_regnum
1634 /*DWARF2_REG_TO_REGNUM ()*/);
1636 #ifdef REGISTER_NAME
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1640 (long) current_gdbarch
->register_name
1641 /*REGISTER_NAME ()*/);
1643 #ifdef REGISTER_SIZE
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1646 (long) REGISTER_SIZE
);
1648 #ifdef REGISTER_BYTES
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1651 (long) REGISTER_BYTES
);
1653 #ifdef REGISTER_BYTE
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1657 (long) current_gdbarch
->register_byte
1658 /*REGISTER_BYTE ()*/);
1660 #ifdef REGISTER_RAW_SIZE
1662 fprintf_unfiltered (file
,
1663 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1664 (long) current_gdbarch
->register_raw_size
1665 /*REGISTER_RAW_SIZE ()*/);
1667 #ifdef MAX_REGISTER_RAW_SIZE
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1670 (long) MAX_REGISTER_RAW_SIZE
);
1672 #ifdef REGISTER_VIRTUAL_SIZE
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1676 (long) current_gdbarch
->register_virtual_size
1677 /*REGISTER_VIRTUAL_SIZE ()*/);
1679 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1682 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1684 #ifdef REGISTER_VIRTUAL_TYPE
1686 fprintf_unfiltered (file
,
1687 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1688 (long) current_gdbarch
->register_virtual_type
1689 /*REGISTER_VIRTUAL_TYPE ()*/);
1691 #ifdef DO_REGISTERS_INFO
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1695 (long) current_gdbarch
->do_registers_info
1696 /*DO_REGISTERS_INFO ()*/);
1698 #ifdef REGISTER_SIM_REGNO
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1702 (long) current_gdbarch
->register_sim_regno
1703 /*REGISTER_SIM_REGNO ()*/);
1705 #ifdef REGISTER_BYTES_OK
1707 fprintf_unfiltered (file
,
1708 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1709 (long) current_gdbarch
->register_bytes_ok
1710 /*REGISTER_BYTES_OK ()*/);
1712 #ifdef USE_GENERIC_DUMMY_FRAMES
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1715 (long) USE_GENERIC_DUMMY_FRAMES
);
1717 #ifdef CALL_DUMMY_LOCATION
1718 fprintf_unfiltered (file
,
1719 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1720 (long) CALL_DUMMY_LOCATION
);
1722 #ifdef CALL_DUMMY_ADDRESS
1724 fprintf_unfiltered (file
,
1725 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1726 (long) current_gdbarch
->call_dummy_address
1727 /*CALL_DUMMY_ADDRESS ()*/);
1729 #ifdef CALL_DUMMY_START_OFFSET
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1732 (long) CALL_DUMMY_START_OFFSET
);
1734 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1735 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1736 fprintf_unfiltered (file
,
1737 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1738 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1740 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1743 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1745 #ifdef CALL_DUMMY_LENGTH
1746 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1749 (long) CALL_DUMMY_LENGTH
);
1751 #ifdef PC_IN_CALL_DUMMY
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1755 (long) current_gdbarch
->pc_in_call_dummy
1756 /*PC_IN_CALL_DUMMY ()*/);
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1761 (long) CALL_DUMMY_P
);
1763 #ifdef CALL_DUMMY_WORDS
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1766 (long) CALL_DUMMY_WORDS
);
1768 #ifdef SIZEOF_CALL_DUMMY_WORDS
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1771 (long) SIZEOF_CALL_DUMMY_WORDS
);
1773 #ifdef CALL_DUMMY_STACK_ADJUST_P
1774 fprintf_unfiltered (file
,
1775 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1776 (long) CALL_DUMMY_STACK_ADJUST_P
);
1778 #ifdef CALL_DUMMY_STACK_ADJUST
1779 if (CALL_DUMMY_STACK_ADJUST_P
)
1780 fprintf_unfiltered (file
,
1781 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1782 (long) CALL_DUMMY_STACK_ADJUST
);
1784 #ifdef FIX_CALL_DUMMY
1786 fprintf_unfiltered (file
,
1787 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1788 (long) current_gdbarch
->fix_call_dummy
1789 /*FIX_CALL_DUMMY ()*/);
1791 #ifdef BELIEVE_PCC_PROMOTION
1792 fprintf_unfiltered (file
,
1793 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1794 (long) BELIEVE_PCC_PROMOTION
);
1796 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1797 fprintf_unfiltered (file
,
1798 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1799 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1801 #ifdef COERCE_FLOAT_TO_DOUBLE
1803 fprintf_unfiltered (file
,
1804 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1805 (long) current_gdbarch
->coerce_float_to_double
1806 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1808 #ifdef GET_SAVED_REGISTER
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1812 (long) current_gdbarch
->get_saved_register
1813 /*GET_SAVED_REGISTER ()*/);
1815 #ifdef REGISTER_CONVERTIBLE
1817 fprintf_unfiltered (file
,
1818 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1819 (long) current_gdbarch
->register_convertible
1820 /*REGISTER_CONVERTIBLE ()*/);
1822 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1826 (long) current_gdbarch
->register_convert_to_virtual
1827 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1829 #ifdef REGISTER_CONVERT_TO_RAW
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1833 (long) current_gdbarch
->register_convert_to_raw
1834 /*REGISTER_CONVERT_TO_RAW ()*/);
1836 #ifdef FETCH_PSEUDO_REGISTER
1838 fprintf_unfiltered (file
,
1839 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1840 (long) current_gdbarch
->fetch_pseudo_register
1841 /*FETCH_PSEUDO_REGISTER ()*/);
1843 #ifdef STORE_PSEUDO_REGISTER
1845 fprintf_unfiltered (file
,
1846 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1847 (long) current_gdbarch
->store_pseudo_register
1848 /*STORE_PSEUDO_REGISTER ()*/);
1850 #ifdef POINTER_TO_ADDRESS
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1854 (long) current_gdbarch
->pointer_to_address
1855 /*POINTER_TO_ADDRESS ()*/);
1857 #ifdef ADDRESS_TO_POINTER
1859 fprintf_unfiltered (file
,
1860 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1861 (long) current_gdbarch
->address_to_pointer
1862 /*ADDRESS_TO_POINTER ()*/);
1864 #ifdef RETURN_VALUE_ON_STACK
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1868 (long) current_gdbarch
->return_value_on_stack
1869 /*RETURN_VALUE_ON_STACK ()*/);
1871 #ifdef EXTRACT_RETURN_VALUE
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1875 (long) current_gdbarch
->extract_return_value
1876 /*EXTRACT_RETURN_VALUE ()*/);
1878 #ifdef PUSH_ARGUMENTS
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1882 (long) current_gdbarch
->push_arguments
1883 /*PUSH_ARGUMENTS ()*/);
1885 #ifdef PUSH_DUMMY_FRAME
1887 fprintf_unfiltered (file
,
1888 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1889 (long) current_gdbarch
->push_dummy_frame
1890 /*PUSH_DUMMY_FRAME ()*/);
1892 #ifdef PUSH_RETURN_ADDRESS
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1896 (long) current_gdbarch
->push_return_address
1897 /*PUSH_RETURN_ADDRESS ()*/);
1901 fprintf_unfiltered (file
,
1902 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1903 (long) current_gdbarch
->pop_frame
1906 #ifdef D10V_MAKE_DADDR
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1910 (long) current_gdbarch
->d10v_make_daddr
1911 /*D10V_MAKE_DADDR ()*/);
1913 #ifdef D10V_MAKE_IADDR
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1917 (long) current_gdbarch
->d10v_make_iaddr
1918 /*D10V_MAKE_IADDR ()*/);
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1924 (long) current_gdbarch
->d10v_daddr_p
1925 /*D10V_DADDR_P ()*/);
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1931 (long) current_gdbarch
->d10v_iaddr_p
1932 /*D10V_IADDR_P ()*/);
1934 #ifdef D10V_CONVERT_DADDR_TO_RAW
1936 fprintf_unfiltered (file
,
1937 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1938 (long) current_gdbarch
->d10v_convert_daddr_to_raw
1939 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1941 #ifdef D10V_CONVERT_IADDR_TO_RAW
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1945 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
1946 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1948 #ifdef STORE_STRUCT_RETURN
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1952 (long) current_gdbarch
->store_struct_return
1953 /*STORE_STRUCT_RETURN ()*/);
1955 #ifdef STORE_RETURN_VALUE
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1959 (long) current_gdbarch
->store_return_value
1960 /*STORE_RETURN_VALUE ()*/);
1962 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1964 fprintf_unfiltered (file
,
1965 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1966 (long) current_gdbarch
->extract_struct_value_address
1967 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1969 #ifdef USE_STRUCT_CONVENTION
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1973 (long) current_gdbarch
->use_struct_convention
1974 /*USE_STRUCT_CONVENTION ()*/);
1976 #ifdef FRAME_INIT_SAVED_REGS
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1980 (long) current_gdbarch
->frame_init_saved_regs
1981 /*FRAME_INIT_SAVED_REGS ()*/);
1983 #ifdef INIT_EXTRA_FRAME_INFO
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1987 (long) current_gdbarch
->init_extra_frame_info
1988 /*INIT_EXTRA_FRAME_INFO ()*/);
1990 #ifdef SKIP_PROLOGUE
1992 fprintf_unfiltered (file
,
1993 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1994 (long) current_gdbarch
->skip_prologue
1995 /*SKIP_PROLOGUE ()*/);
1997 #ifdef PROLOGUE_FRAMELESS_P
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2001 (long) current_gdbarch
->prologue_frameless_p
2002 /*PROLOGUE_FRAMELESS_P ()*/);
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2008 (long) current_gdbarch
->inner_than
2011 #ifdef BREAKPOINT_FROM_PC
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2015 (long) current_gdbarch
->breakpoint_from_pc
2016 /*BREAKPOINT_FROM_PC ()*/);
2018 #ifdef MEMORY_INSERT_BREAKPOINT
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2022 (long) current_gdbarch
->memory_insert_breakpoint
2023 /*MEMORY_INSERT_BREAKPOINT ()*/);
2025 #ifdef MEMORY_REMOVE_BREAKPOINT
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2029 (long) current_gdbarch
->memory_remove_breakpoint
2030 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2032 #ifdef DECR_PC_AFTER_BREAK
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2035 (long) DECR_PC_AFTER_BREAK
);
2037 #ifdef FUNCTION_START_OFFSET
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2040 (long) FUNCTION_START_OFFSET
);
2042 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2046 (long) current_gdbarch
->remote_translate_xfer_address
2047 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2049 #ifdef FRAME_ARGS_SKIP
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2052 (long) FRAME_ARGS_SKIP
);
2054 #ifdef FRAMELESS_FUNCTION_INVOCATION
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2058 (long) current_gdbarch
->frameless_function_invocation
2059 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2065 (long) current_gdbarch
->frame_chain
2066 /*FRAME_CHAIN ()*/);
2068 #ifdef FRAME_CHAIN_VALID
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2072 (long) current_gdbarch
->frame_chain_valid
2073 /*FRAME_CHAIN_VALID ()*/);
2075 #ifdef FRAME_SAVED_PC
2077 fprintf_unfiltered (file
,
2078 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2079 (long) current_gdbarch
->frame_saved_pc
2080 /*FRAME_SAVED_PC ()*/);
2082 #ifdef FRAME_ARGS_ADDRESS
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2086 (long) current_gdbarch
->frame_args_address
2087 /*FRAME_ARGS_ADDRESS ()*/);
2089 #ifdef FRAME_LOCALS_ADDRESS
2091 fprintf_unfiltered (file
,
2092 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2093 (long) current_gdbarch
->frame_locals_address
2094 /*FRAME_LOCALS_ADDRESS ()*/);
2096 #ifdef SAVED_PC_AFTER_CALL
2098 fprintf_unfiltered (file
,
2099 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2100 (long) current_gdbarch
->saved_pc_after_call
2101 /*SAVED_PC_AFTER_CALL ()*/);
2103 #ifdef FRAME_NUM_ARGS
2105 fprintf_unfiltered (file
,
2106 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2107 (long) current_gdbarch
->frame_num_args
2108 /*FRAME_NUM_ARGS ()*/);
2112 fprintf_unfiltered (file
,
2113 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2114 (long) current_gdbarch
->stack_align
2115 /*STACK_ALIGN ()*/);
2117 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2118 fprintf_unfiltered (file
,
2119 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2120 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2122 #ifdef REG_STRUCT_HAS_ADDR
2124 fprintf_unfiltered (file
,
2125 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2126 (long) current_gdbarch
->reg_struct_has_addr
2127 /*REG_STRUCT_HAS_ADDR ()*/);
2129 #ifdef SAVE_DUMMY_FRAME_TOS
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2133 (long) current_gdbarch
->save_dummy_frame_tos
2134 /*SAVE_DUMMY_FRAME_TOS ()*/);
2136 #ifdef PARM_BOUNDARY
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2139 (long) PARM_BOUNDARY
);
2141 #ifdef TARGET_FLOAT_FORMAT
2142 fprintf_unfiltered (file
,
2143 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2144 (long) TARGET_FLOAT_FORMAT
);
2146 #ifdef TARGET_DOUBLE_FORMAT
2147 fprintf_unfiltered (file
,
2148 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2149 (long) TARGET_DOUBLE_FORMAT
);
2151 #ifdef TARGET_LONG_DOUBLE_FORMAT
2152 fprintf_unfiltered (file
,
2153 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2154 (long) TARGET_LONG_DOUBLE_FORMAT
);
2156 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2158 fprintf_unfiltered (file
,
2159 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2160 (long) current_gdbarch
->convert_from_func_ptr_addr
2161 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2163 #ifdef SOFTWARE_SINGLE_STEP
2165 fprintf_unfiltered (file
,
2166 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2167 (long) current_gdbarch
->software_single_step
2168 /*SOFTWARE_SINGLE_STEP ()*/);
2170 if (current_gdbarch
->dump_tdep
!= NULL
)
2171 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2174 struct gdbarch_tdep
*
2175 gdbarch_tdep (struct gdbarch
*gdbarch
)
2177 if (gdbarch_debug
>= 2)
2178 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2179 return gdbarch
->tdep
;
2183 const struct bfd_arch_info
*
2184 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2186 if (gdbarch_debug
>= 2)
2187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2188 return gdbarch
->bfd_arch_info
;
2192 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2194 if (gdbarch_debug
>= 2)
2195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2196 return gdbarch
->byte_order
;
2200 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2202 /* Skip verify of short_bit, invalid_p == 0 */
2203 if (gdbarch_debug
>= 2)
2204 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2205 return gdbarch
->short_bit
;
2209 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2212 gdbarch
->short_bit
= short_bit
;
2216 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2218 /* Skip verify of int_bit, invalid_p == 0 */
2219 if (gdbarch_debug
>= 2)
2220 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2221 return gdbarch
->int_bit
;
2225 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2228 gdbarch
->int_bit
= int_bit
;
2232 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2234 /* Skip verify of long_bit, invalid_p == 0 */
2235 if (gdbarch_debug
>= 2)
2236 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2237 return gdbarch
->long_bit
;
2241 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2244 gdbarch
->long_bit
= long_bit
;
2248 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2250 /* Skip verify of long_long_bit, invalid_p == 0 */
2251 if (gdbarch_debug
>= 2)
2252 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2253 return gdbarch
->long_long_bit
;
2257 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2260 gdbarch
->long_long_bit
= long_long_bit
;
2264 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2266 /* Skip verify of float_bit, invalid_p == 0 */
2267 if (gdbarch_debug
>= 2)
2268 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2269 return gdbarch
->float_bit
;
2273 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2276 gdbarch
->float_bit
= float_bit
;
2280 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2282 /* Skip verify of double_bit, invalid_p == 0 */
2283 if (gdbarch_debug
>= 2)
2284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2285 return gdbarch
->double_bit
;
2289 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2292 gdbarch
->double_bit
= double_bit
;
2296 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2298 /* Skip verify of long_double_bit, invalid_p == 0 */
2299 if (gdbarch_debug
>= 2)
2300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2301 return gdbarch
->long_double_bit
;
2305 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2306 int long_double_bit
)
2308 gdbarch
->long_double_bit
= long_double_bit
;
2312 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2314 /* Skip verify of ptr_bit, invalid_p == 0 */
2315 if (gdbarch_debug
>= 2)
2316 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2317 return gdbarch
->ptr_bit
;
2321 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2324 gdbarch
->ptr_bit
= ptr_bit
;
2328 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2330 if (gdbarch
->addr_bit
== 0)
2331 internal_error (__FILE__
, __LINE__
,
2332 "gdbarch: gdbarch_addr_bit invalid");
2333 if (gdbarch_debug
>= 2)
2334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2335 return gdbarch
->addr_bit
;
2339 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2342 gdbarch
->addr_bit
= addr_bit
;
2346 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2348 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2349 if (gdbarch_debug
>= 2)
2350 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2351 return gdbarch
->bfd_vma_bit
;
2355 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2358 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2362 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2364 /* Skip verify of ieee_float, invalid_p == 0 */
2365 if (gdbarch_debug
>= 2)
2366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2367 return gdbarch
->ieee_float
;
2371 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2374 gdbarch
->ieee_float
= ieee_float
;
2378 gdbarch_read_pc (struct gdbarch
*gdbarch
, int pid
)
2380 if (gdbarch
->read_pc
== 0)
2381 internal_error (__FILE__
, __LINE__
,
2382 "gdbarch: gdbarch_read_pc invalid");
2383 if (gdbarch_debug
>= 2)
2384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2385 return gdbarch
->read_pc (pid
);
2389 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2390 gdbarch_read_pc_ftype read_pc
)
2392 gdbarch
->read_pc
= read_pc
;
2396 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, int pid
)
2398 if (gdbarch
->write_pc
== 0)
2399 internal_error (__FILE__
, __LINE__
,
2400 "gdbarch: gdbarch_write_pc invalid");
2401 if (gdbarch_debug
>= 2)
2402 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2403 gdbarch
->write_pc (val
, pid
);
2407 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2408 gdbarch_write_pc_ftype write_pc
)
2410 gdbarch
->write_pc
= write_pc
;
2414 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2416 if (gdbarch
->read_fp
== 0)
2417 internal_error (__FILE__
, __LINE__
,
2418 "gdbarch: gdbarch_read_fp invalid");
2419 if (gdbarch_debug
>= 2)
2420 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2421 return gdbarch
->read_fp ();
2425 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2426 gdbarch_read_fp_ftype read_fp
)
2428 gdbarch
->read_fp
= read_fp
;
2432 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2434 if (gdbarch
->write_fp
== 0)
2435 internal_error (__FILE__
, __LINE__
,
2436 "gdbarch: gdbarch_write_fp invalid");
2437 if (gdbarch_debug
>= 2)
2438 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2439 gdbarch
->write_fp (val
);
2443 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2444 gdbarch_write_fp_ftype write_fp
)
2446 gdbarch
->write_fp
= write_fp
;
2450 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2452 if (gdbarch
->read_sp
== 0)
2453 internal_error (__FILE__
, __LINE__
,
2454 "gdbarch: gdbarch_read_sp invalid");
2455 if (gdbarch_debug
>= 2)
2456 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2457 return gdbarch
->read_sp ();
2461 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2462 gdbarch_read_sp_ftype read_sp
)
2464 gdbarch
->read_sp
= read_sp
;
2468 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2470 if (gdbarch
->write_sp
== 0)
2471 internal_error (__FILE__
, __LINE__
,
2472 "gdbarch: gdbarch_write_sp invalid");
2473 if (gdbarch_debug
>= 2)
2474 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2475 gdbarch
->write_sp (val
);
2479 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2480 gdbarch_write_sp_ftype write_sp
)
2482 gdbarch
->write_sp
= write_sp
;
2486 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2488 return gdbarch
->register_read
!= 0;
2492 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2494 if (gdbarch
->register_read
== 0)
2495 internal_error (__FILE__
, __LINE__
,
2496 "gdbarch: gdbarch_register_read invalid");
2497 if (gdbarch_debug
>= 2)
2498 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2499 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2503 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2504 gdbarch_register_read_ftype register_read
)
2506 gdbarch
->register_read
= register_read
;
2510 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2512 return gdbarch
->register_write
!= 0;
2516 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2518 if (gdbarch
->register_write
== 0)
2519 internal_error (__FILE__
, __LINE__
,
2520 "gdbarch: gdbarch_register_write invalid");
2521 if (gdbarch_debug
>= 2)
2522 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2523 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2527 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2528 gdbarch_register_write_ftype register_write
)
2530 gdbarch
->register_write
= register_write
;
2534 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2536 if (gdbarch
->num_regs
== -1)
2537 internal_error (__FILE__
, __LINE__
,
2538 "gdbarch: gdbarch_num_regs invalid");
2539 if (gdbarch_debug
>= 2)
2540 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2541 return gdbarch
->num_regs
;
2545 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2548 gdbarch
->num_regs
= num_regs
;
2552 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2554 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2555 if (gdbarch_debug
>= 2)
2556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2557 return gdbarch
->num_pseudo_regs
;
2561 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2562 int num_pseudo_regs
)
2564 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2568 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2570 if (gdbarch
->sp_regnum
== -1)
2571 internal_error (__FILE__
, __LINE__
,
2572 "gdbarch: gdbarch_sp_regnum invalid");
2573 if (gdbarch_debug
>= 2)
2574 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2575 return gdbarch
->sp_regnum
;
2579 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2582 gdbarch
->sp_regnum
= sp_regnum
;
2586 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2588 if (gdbarch
->fp_regnum
== -1)
2589 internal_error (__FILE__
, __LINE__
,
2590 "gdbarch: gdbarch_fp_regnum invalid");
2591 if (gdbarch_debug
>= 2)
2592 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2593 return gdbarch
->fp_regnum
;
2597 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2600 gdbarch
->fp_regnum
= fp_regnum
;
2604 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2606 if (gdbarch
->pc_regnum
== -1)
2607 internal_error (__FILE__
, __LINE__
,
2608 "gdbarch: gdbarch_pc_regnum invalid");
2609 if (gdbarch_debug
>= 2)
2610 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2611 return gdbarch
->pc_regnum
;
2615 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2618 gdbarch
->pc_regnum
= pc_regnum
;
2622 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2624 /* Skip verify of fp0_regnum, invalid_p == 0 */
2625 if (gdbarch_debug
>= 2)
2626 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2627 return gdbarch
->fp0_regnum
;
2631 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2634 gdbarch
->fp0_regnum
= fp0_regnum
;
2638 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2640 /* Skip verify of npc_regnum, invalid_p == 0 */
2641 if (gdbarch_debug
>= 2)
2642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2643 return gdbarch
->npc_regnum
;
2647 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2650 gdbarch
->npc_regnum
= npc_regnum
;
2654 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2656 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2657 if (gdbarch_debug
>= 2)
2658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2659 return gdbarch
->nnpc_regnum
;
2663 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2666 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2670 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2672 if (gdbarch
->stab_reg_to_regnum
== 0)
2673 internal_error (__FILE__
, __LINE__
,
2674 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2675 if (gdbarch_debug
>= 2)
2676 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2677 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2681 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2682 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2684 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2688 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2690 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2691 internal_error (__FILE__
, __LINE__
,
2692 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2693 if (gdbarch_debug
>= 2)
2694 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2695 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2699 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2700 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2702 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2706 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2708 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2709 internal_error (__FILE__
, __LINE__
,
2710 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2711 if (gdbarch_debug
>= 2)
2712 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2713 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2717 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2718 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2720 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2724 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2726 if (gdbarch
->sdb_reg_to_regnum
== 0)
2727 internal_error (__FILE__
, __LINE__
,
2728 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2729 if (gdbarch_debug
>= 2)
2730 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2731 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2735 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2736 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2738 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2742 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2744 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2745 internal_error (__FILE__
, __LINE__
,
2746 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2747 if (gdbarch_debug
>= 2)
2748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2749 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2753 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2754 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2756 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2760 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2762 if (gdbarch
->register_name
== 0)
2763 internal_error (__FILE__
, __LINE__
,
2764 "gdbarch: gdbarch_register_name invalid");
2765 if (gdbarch_debug
>= 2)
2766 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2767 return gdbarch
->register_name (regnr
);
2771 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2772 gdbarch_register_name_ftype register_name
)
2774 gdbarch
->register_name
= register_name
;
2778 gdbarch_register_size (struct gdbarch
*gdbarch
)
2780 if (gdbarch
->register_size
== -1)
2781 internal_error (__FILE__
, __LINE__
,
2782 "gdbarch: gdbarch_register_size invalid");
2783 if (gdbarch_debug
>= 2)
2784 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2785 return gdbarch
->register_size
;
2789 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2792 gdbarch
->register_size
= register_size
;
2796 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2798 if (gdbarch
->register_bytes
== -1)
2799 internal_error (__FILE__
, __LINE__
,
2800 "gdbarch: gdbarch_register_bytes invalid");
2801 if (gdbarch_debug
>= 2)
2802 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2803 return gdbarch
->register_bytes
;
2807 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2810 gdbarch
->register_bytes
= register_bytes
;
2814 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2816 if (gdbarch
->register_byte
== 0)
2817 internal_error (__FILE__
, __LINE__
,
2818 "gdbarch: gdbarch_register_byte invalid");
2819 if (gdbarch_debug
>= 2)
2820 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2821 return gdbarch
->register_byte (reg_nr
);
2825 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2826 gdbarch_register_byte_ftype register_byte
)
2828 gdbarch
->register_byte
= register_byte
;
2832 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2834 if (gdbarch
->register_raw_size
== 0)
2835 internal_error (__FILE__
, __LINE__
,
2836 "gdbarch: gdbarch_register_raw_size invalid");
2837 if (gdbarch_debug
>= 2)
2838 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2839 return gdbarch
->register_raw_size (reg_nr
);
2843 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2844 gdbarch_register_raw_size_ftype register_raw_size
)
2846 gdbarch
->register_raw_size
= register_raw_size
;
2850 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2852 if (gdbarch
->max_register_raw_size
== -1)
2853 internal_error (__FILE__
, __LINE__
,
2854 "gdbarch: gdbarch_max_register_raw_size invalid");
2855 if (gdbarch_debug
>= 2)
2856 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2857 return gdbarch
->max_register_raw_size
;
2861 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2862 int max_register_raw_size
)
2864 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2868 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2870 if (gdbarch
->register_virtual_size
== 0)
2871 internal_error (__FILE__
, __LINE__
,
2872 "gdbarch: gdbarch_register_virtual_size invalid");
2873 if (gdbarch_debug
>= 2)
2874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2875 return gdbarch
->register_virtual_size (reg_nr
);
2879 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2880 gdbarch_register_virtual_size_ftype register_virtual_size
)
2882 gdbarch
->register_virtual_size
= register_virtual_size
;
2886 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2888 if (gdbarch
->max_register_virtual_size
== -1)
2889 internal_error (__FILE__
, __LINE__
,
2890 "gdbarch: gdbarch_max_register_virtual_size invalid");
2891 if (gdbarch_debug
>= 2)
2892 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2893 return gdbarch
->max_register_virtual_size
;
2897 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2898 int max_register_virtual_size
)
2900 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2904 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2906 if (gdbarch
->register_virtual_type
== 0)
2907 internal_error (__FILE__
, __LINE__
,
2908 "gdbarch: gdbarch_register_virtual_type invalid");
2909 if (gdbarch_debug
>= 2)
2910 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2911 return gdbarch
->register_virtual_type (reg_nr
);
2915 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2916 gdbarch_register_virtual_type_ftype register_virtual_type
)
2918 gdbarch
->register_virtual_type
= register_virtual_type
;
2922 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2924 if (gdbarch
->do_registers_info
== 0)
2925 internal_error (__FILE__
, __LINE__
,
2926 "gdbarch: gdbarch_do_registers_info invalid");
2927 if (gdbarch_debug
>= 2)
2928 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2929 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2933 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2934 gdbarch_do_registers_info_ftype do_registers_info
)
2936 gdbarch
->do_registers_info
= do_registers_info
;
2940 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2942 if (gdbarch
->register_sim_regno
== 0)
2943 internal_error (__FILE__
, __LINE__
,
2944 "gdbarch: gdbarch_register_sim_regno invalid");
2945 if (gdbarch_debug
>= 2)
2946 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2947 return gdbarch
->register_sim_regno (reg_nr
);
2951 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2952 gdbarch_register_sim_regno_ftype register_sim_regno
)
2954 gdbarch
->register_sim_regno
= register_sim_regno
;
2958 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2960 return gdbarch
->register_bytes_ok
!= 0;
2964 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2966 if (gdbarch
->register_bytes_ok
== 0)
2967 internal_error (__FILE__
, __LINE__
,
2968 "gdbarch: gdbarch_register_bytes_ok invalid");
2969 if (gdbarch_debug
>= 2)
2970 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2971 return gdbarch
->register_bytes_ok (nr_bytes
);
2975 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2976 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2978 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2982 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2984 if (gdbarch
->use_generic_dummy_frames
== -1)
2985 internal_error (__FILE__
, __LINE__
,
2986 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2987 if (gdbarch_debug
>= 2)
2988 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2989 return gdbarch
->use_generic_dummy_frames
;
2993 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2994 int use_generic_dummy_frames
)
2996 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3000 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3002 if (gdbarch
->call_dummy_location
== 0)
3003 internal_error (__FILE__
, __LINE__
,
3004 "gdbarch: gdbarch_call_dummy_location invalid");
3005 if (gdbarch_debug
>= 2)
3006 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3007 return gdbarch
->call_dummy_location
;
3011 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3012 int call_dummy_location
)
3014 gdbarch
->call_dummy_location
= call_dummy_location
;
3018 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3020 if (gdbarch
->call_dummy_address
== 0)
3021 internal_error (__FILE__
, __LINE__
,
3022 "gdbarch: gdbarch_call_dummy_address invalid");
3023 if (gdbarch_debug
>= 2)
3024 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3025 return gdbarch
->call_dummy_address ();
3029 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3030 gdbarch_call_dummy_address_ftype call_dummy_address
)
3032 gdbarch
->call_dummy_address
= call_dummy_address
;
3036 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3038 if (gdbarch
->call_dummy_start_offset
== -1)
3039 internal_error (__FILE__
, __LINE__
,
3040 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3041 if (gdbarch_debug
>= 2)
3042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3043 return gdbarch
->call_dummy_start_offset
;
3047 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3048 CORE_ADDR call_dummy_start_offset
)
3050 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3054 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3056 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3057 internal_error (__FILE__
, __LINE__
,
3058 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3059 if (gdbarch_debug
>= 2)
3060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3061 return gdbarch
->call_dummy_breakpoint_offset
;
3065 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3066 CORE_ADDR call_dummy_breakpoint_offset
)
3068 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3072 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3074 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3075 internal_error (__FILE__
, __LINE__
,
3076 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3077 if (gdbarch_debug
>= 2)
3078 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3079 return gdbarch
->call_dummy_breakpoint_offset_p
;
3083 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3084 int call_dummy_breakpoint_offset_p
)
3086 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3090 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3092 if (gdbarch
->call_dummy_length
== -1)
3093 internal_error (__FILE__
, __LINE__
,
3094 "gdbarch: gdbarch_call_dummy_length invalid");
3095 if (gdbarch_debug
>= 2)
3096 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3097 return gdbarch
->call_dummy_length
;
3101 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3102 int call_dummy_length
)
3104 gdbarch
->call_dummy_length
= call_dummy_length
;
3108 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3110 if (gdbarch
->pc_in_call_dummy
== 0)
3111 internal_error (__FILE__
, __LINE__
,
3112 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3113 if (gdbarch_debug
>= 2)
3114 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3115 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3119 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3120 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3122 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3126 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3128 if (gdbarch
->call_dummy_p
== -1)
3129 internal_error (__FILE__
, __LINE__
,
3130 "gdbarch: gdbarch_call_dummy_p invalid");
3131 if (gdbarch_debug
>= 2)
3132 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3133 return gdbarch
->call_dummy_p
;
3137 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3140 gdbarch
->call_dummy_p
= call_dummy_p
;
3144 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3146 /* Skip verify of call_dummy_words, invalid_p == 0 */
3147 if (gdbarch_debug
>= 2)
3148 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3149 return gdbarch
->call_dummy_words
;
3153 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3154 LONGEST
* call_dummy_words
)
3156 gdbarch
->call_dummy_words
= call_dummy_words
;
3160 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3162 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3163 if (gdbarch_debug
>= 2)
3164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3165 return gdbarch
->sizeof_call_dummy_words
;
3169 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3170 int sizeof_call_dummy_words
)
3172 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3176 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3178 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3179 internal_error (__FILE__
, __LINE__
,
3180 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3181 if (gdbarch_debug
>= 2)
3182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3183 return gdbarch
->call_dummy_stack_adjust_p
;
3187 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3188 int call_dummy_stack_adjust_p
)
3190 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3194 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3196 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3197 internal_error (__FILE__
, __LINE__
,
3198 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3199 if (gdbarch_debug
>= 2)
3200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3201 return gdbarch
->call_dummy_stack_adjust
;
3205 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3206 int call_dummy_stack_adjust
)
3208 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3212 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
)
3214 if (gdbarch
->fix_call_dummy
== 0)
3215 internal_error (__FILE__
, __LINE__
,
3216 "gdbarch: gdbarch_fix_call_dummy invalid");
3217 if (gdbarch_debug
>= 2)
3218 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3219 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3223 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3224 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3226 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3230 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3232 if (gdbarch_debug
>= 2)
3233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3234 return gdbarch
->believe_pcc_promotion
;
3238 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3239 int believe_pcc_promotion
)
3241 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3245 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3247 if (gdbarch_debug
>= 2)
3248 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3249 return gdbarch
->believe_pcc_promotion_type
;
3253 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3254 int believe_pcc_promotion_type
)
3256 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3260 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3262 if (gdbarch
->coerce_float_to_double
== 0)
3263 internal_error (__FILE__
, __LINE__
,
3264 "gdbarch: gdbarch_coerce_float_to_double invalid");
3265 if (gdbarch_debug
>= 2)
3266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3267 return gdbarch
->coerce_float_to_double (formal
, actual
);
3271 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3272 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3274 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3278 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
)
3280 if (gdbarch
->get_saved_register
== 0)
3281 internal_error (__FILE__
, __LINE__
,
3282 "gdbarch: gdbarch_get_saved_register invalid");
3283 if (gdbarch_debug
>= 2)
3284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3285 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3289 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3290 gdbarch_get_saved_register_ftype get_saved_register
)
3292 gdbarch
->get_saved_register
= get_saved_register
;
3296 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3298 if (gdbarch
->register_convertible
== 0)
3299 internal_error (__FILE__
, __LINE__
,
3300 "gdbarch: gdbarch_register_convertible invalid");
3301 if (gdbarch_debug
>= 2)
3302 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3303 return gdbarch
->register_convertible (nr
);
3307 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3308 gdbarch_register_convertible_ftype register_convertible
)
3310 gdbarch
->register_convertible
= register_convertible
;
3314 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3316 if (gdbarch
->register_convert_to_virtual
== 0)
3317 internal_error (__FILE__
, __LINE__
,
3318 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3319 if (gdbarch_debug
>= 2)
3320 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3321 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3325 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3326 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3328 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3332 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3334 if (gdbarch
->register_convert_to_raw
== 0)
3335 internal_error (__FILE__
, __LINE__
,
3336 "gdbarch: gdbarch_register_convert_to_raw invalid");
3337 if (gdbarch_debug
>= 2)
3338 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3339 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3343 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3344 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3346 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3350 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3352 if (gdbarch
->fetch_pseudo_register
== 0)
3353 internal_error (__FILE__
, __LINE__
,
3354 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3355 if (gdbarch_debug
>= 2)
3356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3357 gdbarch
->fetch_pseudo_register (regnum
);
3361 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3362 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3364 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3368 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3370 if (gdbarch
->store_pseudo_register
== 0)
3371 internal_error (__FILE__
, __LINE__
,
3372 "gdbarch: gdbarch_store_pseudo_register invalid");
3373 if (gdbarch_debug
>= 2)
3374 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3375 gdbarch
->store_pseudo_register (regnum
);
3379 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3380 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3382 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3386 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3388 if (gdbarch
->pointer_to_address
== 0)
3389 internal_error (__FILE__
, __LINE__
,
3390 "gdbarch: gdbarch_pointer_to_address invalid");
3391 if (gdbarch_debug
>= 2)
3392 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3393 return gdbarch
->pointer_to_address (type
, buf
);
3397 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3398 gdbarch_pointer_to_address_ftype pointer_to_address
)
3400 gdbarch
->pointer_to_address
= pointer_to_address
;
3404 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3406 if (gdbarch
->address_to_pointer
== 0)
3407 internal_error (__FILE__
, __LINE__
,
3408 "gdbarch: gdbarch_address_to_pointer invalid");
3409 if (gdbarch_debug
>= 2)
3410 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3411 gdbarch
->address_to_pointer (type
, buf
, addr
);
3415 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3416 gdbarch_address_to_pointer_ftype address_to_pointer
)
3418 gdbarch
->address_to_pointer
= address_to_pointer
;
3422 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3424 if (gdbarch
->return_value_on_stack
== 0)
3425 internal_error (__FILE__
, __LINE__
,
3426 "gdbarch: gdbarch_return_value_on_stack invalid");
3427 if (gdbarch_debug
>= 2)
3428 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3429 return gdbarch
->return_value_on_stack (type
);
3433 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3434 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3436 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3440 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3442 if (gdbarch
->extract_return_value
== 0)
3443 internal_error (__FILE__
, __LINE__
,
3444 "gdbarch: gdbarch_extract_return_value invalid");
3445 if (gdbarch_debug
>= 2)
3446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3447 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3451 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3452 gdbarch_extract_return_value_ftype extract_return_value
)
3454 gdbarch
->extract_return_value
= extract_return_value
;
3458 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3460 if (gdbarch
->push_arguments
== 0)
3461 internal_error (__FILE__
, __LINE__
,
3462 "gdbarch: gdbarch_push_arguments invalid");
3463 if (gdbarch_debug
>= 2)
3464 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3465 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3469 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3470 gdbarch_push_arguments_ftype push_arguments
)
3472 gdbarch
->push_arguments
= push_arguments
;
3476 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3478 if (gdbarch
->push_dummy_frame
== 0)
3479 internal_error (__FILE__
, __LINE__
,
3480 "gdbarch: gdbarch_push_dummy_frame invalid");
3481 if (gdbarch_debug
>= 2)
3482 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3483 gdbarch
->push_dummy_frame ();
3487 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3488 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3490 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3494 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3496 if (gdbarch
->push_return_address
== 0)
3497 internal_error (__FILE__
, __LINE__
,
3498 "gdbarch: gdbarch_push_return_address invalid");
3499 if (gdbarch_debug
>= 2)
3500 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3501 return gdbarch
->push_return_address (pc
, sp
);
3505 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3506 gdbarch_push_return_address_ftype push_return_address
)
3508 gdbarch
->push_return_address
= push_return_address
;
3512 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3514 if (gdbarch
->pop_frame
== 0)
3515 internal_error (__FILE__
, __LINE__
,
3516 "gdbarch: gdbarch_pop_frame invalid");
3517 if (gdbarch_debug
>= 2)
3518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3519 gdbarch
->pop_frame ();
3523 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3524 gdbarch_pop_frame_ftype pop_frame
)
3526 gdbarch
->pop_frame
= pop_frame
;
3530 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3532 if (gdbarch
->d10v_make_daddr
== 0)
3533 internal_error (__FILE__
, __LINE__
,
3534 "gdbarch: gdbarch_d10v_make_daddr invalid");
3535 if (gdbarch_debug
>= 2)
3536 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3537 return gdbarch
->d10v_make_daddr (x
);
3541 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3542 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3544 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3548 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3550 if (gdbarch
->d10v_make_iaddr
== 0)
3551 internal_error (__FILE__
, __LINE__
,
3552 "gdbarch: gdbarch_d10v_make_iaddr invalid");
3553 if (gdbarch_debug
>= 2)
3554 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3555 return gdbarch
->d10v_make_iaddr (x
);
3559 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3560 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3562 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3566 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3568 if (gdbarch
->d10v_daddr_p
== 0)
3569 internal_error (__FILE__
, __LINE__
,
3570 "gdbarch: gdbarch_d10v_daddr_p invalid");
3571 if (gdbarch_debug
>= 2)
3572 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3573 return gdbarch
->d10v_daddr_p (x
);
3577 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3578 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3580 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3584 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3586 if (gdbarch
->d10v_iaddr_p
== 0)
3587 internal_error (__FILE__
, __LINE__
,
3588 "gdbarch: gdbarch_d10v_iaddr_p invalid");
3589 if (gdbarch_debug
>= 2)
3590 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3591 return gdbarch
->d10v_iaddr_p (x
);
3595 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3596 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3598 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3602 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3604 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3605 internal_error (__FILE__
, __LINE__
,
3606 "gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3607 if (gdbarch_debug
>= 2)
3608 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3609 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3613 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3614 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3616 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3620 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3622 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3623 internal_error (__FILE__
, __LINE__
,
3624 "gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3625 if (gdbarch_debug
>= 2)
3626 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3627 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3631 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3632 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3634 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3638 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3640 if (gdbarch
->store_struct_return
== 0)
3641 internal_error (__FILE__
, __LINE__
,
3642 "gdbarch: gdbarch_store_struct_return invalid");
3643 if (gdbarch_debug
>= 2)
3644 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3645 gdbarch
->store_struct_return (addr
, sp
);
3649 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3650 gdbarch_store_struct_return_ftype store_struct_return
)
3652 gdbarch
->store_struct_return
= store_struct_return
;
3656 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3658 if (gdbarch
->store_return_value
== 0)
3659 internal_error (__FILE__
, __LINE__
,
3660 "gdbarch: gdbarch_store_return_value invalid");
3661 if (gdbarch_debug
>= 2)
3662 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3663 gdbarch
->store_return_value (type
, valbuf
);
3667 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3668 gdbarch_store_return_value_ftype store_return_value
)
3670 gdbarch
->store_return_value
= store_return_value
;
3674 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3676 if (gdbarch
->extract_struct_value_address
== 0)
3677 internal_error (__FILE__
, __LINE__
,
3678 "gdbarch: gdbarch_extract_struct_value_address invalid");
3679 if (gdbarch_debug
>= 2)
3680 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3681 return gdbarch
->extract_struct_value_address (regbuf
);
3685 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3686 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3688 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3692 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3694 if (gdbarch
->use_struct_convention
== 0)
3695 internal_error (__FILE__
, __LINE__
,
3696 "gdbarch: gdbarch_use_struct_convention invalid");
3697 if (gdbarch_debug
>= 2)
3698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3699 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3703 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3704 gdbarch_use_struct_convention_ftype use_struct_convention
)
3706 gdbarch
->use_struct_convention
= use_struct_convention
;
3710 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3712 if (gdbarch
->frame_init_saved_regs
== 0)
3713 internal_error (__FILE__
, __LINE__
,
3714 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3715 if (gdbarch_debug
>= 2)
3716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3717 gdbarch
->frame_init_saved_regs (frame
);
3721 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3722 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3724 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3728 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3730 if (gdbarch
->init_extra_frame_info
== 0)
3731 internal_error (__FILE__
, __LINE__
,
3732 "gdbarch: gdbarch_init_extra_frame_info invalid");
3733 if (gdbarch_debug
>= 2)
3734 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3735 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3739 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3740 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3742 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3746 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3748 if (gdbarch
->skip_prologue
== 0)
3749 internal_error (__FILE__
, __LINE__
,
3750 "gdbarch: gdbarch_skip_prologue invalid");
3751 if (gdbarch_debug
>= 2)
3752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3753 return gdbarch
->skip_prologue (ip
);
3757 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3758 gdbarch_skip_prologue_ftype skip_prologue
)
3760 gdbarch
->skip_prologue
= skip_prologue
;
3764 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3766 if (gdbarch
->prologue_frameless_p
== 0)
3767 internal_error (__FILE__
, __LINE__
,
3768 "gdbarch: gdbarch_prologue_frameless_p invalid");
3769 if (gdbarch_debug
>= 2)
3770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3771 return gdbarch
->prologue_frameless_p (ip
);
3775 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3776 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3778 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3782 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3784 if (gdbarch
->inner_than
== 0)
3785 internal_error (__FILE__
, __LINE__
,
3786 "gdbarch: gdbarch_inner_than invalid");
3787 if (gdbarch_debug
>= 2)
3788 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3789 return gdbarch
->inner_than (lhs
, rhs
);
3793 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3794 gdbarch_inner_than_ftype inner_than
)
3796 gdbarch
->inner_than
= inner_than
;
3800 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3802 if (gdbarch
->breakpoint_from_pc
== 0)
3803 internal_error (__FILE__
, __LINE__
,
3804 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3805 if (gdbarch_debug
>= 2)
3806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3807 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3811 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3812 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3814 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3818 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3820 if (gdbarch
->memory_insert_breakpoint
== 0)
3821 internal_error (__FILE__
, __LINE__
,
3822 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3823 if (gdbarch_debug
>= 2)
3824 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3825 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3829 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3830 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3832 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3836 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3838 if (gdbarch
->memory_remove_breakpoint
== 0)
3839 internal_error (__FILE__
, __LINE__
,
3840 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3841 if (gdbarch_debug
>= 2)
3842 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3843 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3847 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3848 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3850 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3854 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3856 if (gdbarch
->decr_pc_after_break
== -1)
3857 internal_error (__FILE__
, __LINE__
,
3858 "gdbarch: gdbarch_decr_pc_after_break invalid");
3859 if (gdbarch_debug
>= 2)
3860 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3861 return gdbarch
->decr_pc_after_break
;
3865 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3866 CORE_ADDR decr_pc_after_break
)
3868 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3872 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3874 if (gdbarch
->function_start_offset
== -1)
3875 internal_error (__FILE__
, __LINE__
,
3876 "gdbarch: gdbarch_function_start_offset invalid");
3877 if (gdbarch_debug
>= 2)
3878 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3879 return gdbarch
->function_start_offset
;
3883 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3884 CORE_ADDR function_start_offset
)
3886 gdbarch
->function_start_offset
= function_start_offset
;
3890 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3892 if (gdbarch
->remote_translate_xfer_address
== 0)
3893 internal_error (__FILE__
, __LINE__
,
3894 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3895 if (gdbarch_debug
>= 2)
3896 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3897 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3901 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3902 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3904 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3908 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3910 if (gdbarch
->frame_args_skip
== -1)
3911 internal_error (__FILE__
, __LINE__
,
3912 "gdbarch: gdbarch_frame_args_skip invalid");
3913 if (gdbarch_debug
>= 2)
3914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3915 return gdbarch
->frame_args_skip
;
3919 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3920 CORE_ADDR frame_args_skip
)
3922 gdbarch
->frame_args_skip
= frame_args_skip
;
3926 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3928 if (gdbarch
->frameless_function_invocation
== 0)
3929 internal_error (__FILE__
, __LINE__
,
3930 "gdbarch: gdbarch_frameless_function_invocation invalid");
3931 if (gdbarch_debug
>= 2)
3932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3933 return gdbarch
->frameless_function_invocation (fi
);
3937 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3938 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3940 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3944 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3946 if (gdbarch
->frame_chain
== 0)
3947 internal_error (__FILE__
, __LINE__
,
3948 "gdbarch: gdbarch_frame_chain invalid");
3949 if (gdbarch_debug
>= 2)
3950 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3951 return gdbarch
->frame_chain (frame
);
3955 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3956 gdbarch_frame_chain_ftype frame_chain
)
3958 gdbarch
->frame_chain
= frame_chain
;
3962 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3964 if (gdbarch
->frame_chain_valid
== 0)
3965 internal_error (__FILE__
, __LINE__
,
3966 "gdbarch: gdbarch_frame_chain_valid invalid");
3967 if (gdbarch_debug
>= 2)
3968 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3969 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3973 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3974 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3976 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3980 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3982 if (gdbarch
->frame_saved_pc
== 0)
3983 internal_error (__FILE__
, __LINE__
,
3984 "gdbarch: gdbarch_frame_saved_pc invalid");
3985 if (gdbarch_debug
>= 2)
3986 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3987 return gdbarch
->frame_saved_pc (fi
);
3991 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3992 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3994 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3998 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4000 if (gdbarch
->frame_args_address
== 0)
4001 internal_error (__FILE__
, __LINE__
,
4002 "gdbarch: gdbarch_frame_args_address invalid");
4003 if (gdbarch_debug
>= 2)
4004 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4005 return gdbarch
->frame_args_address (fi
);
4009 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4010 gdbarch_frame_args_address_ftype frame_args_address
)
4012 gdbarch
->frame_args_address
= frame_args_address
;
4016 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4018 if (gdbarch
->frame_locals_address
== 0)
4019 internal_error (__FILE__
, __LINE__
,
4020 "gdbarch: gdbarch_frame_locals_address invalid");
4021 if (gdbarch_debug
>= 2)
4022 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4023 return gdbarch
->frame_locals_address (fi
);
4027 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4028 gdbarch_frame_locals_address_ftype frame_locals_address
)
4030 gdbarch
->frame_locals_address
= frame_locals_address
;
4034 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4036 if (gdbarch
->saved_pc_after_call
== 0)
4037 internal_error (__FILE__
, __LINE__
,
4038 "gdbarch: gdbarch_saved_pc_after_call invalid");
4039 if (gdbarch_debug
>= 2)
4040 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4041 return gdbarch
->saved_pc_after_call (frame
);
4045 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4046 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4048 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4052 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4054 if (gdbarch
->frame_num_args
== 0)
4055 internal_error (__FILE__
, __LINE__
,
4056 "gdbarch: gdbarch_frame_num_args invalid");
4057 if (gdbarch_debug
>= 2)
4058 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4059 return gdbarch
->frame_num_args (frame
);
4063 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4064 gdbarch_frame_num_args_ftype frame_num_args
)
4066 gdbarch
->frame_num_args
= frame_num_args
;
4070 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4072 return gdbarch
->stack_align
!= 0;
4076 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4078 if (gdbarch
->stack_align
== 0)
4079 internal_error (__FILE__
, __LINE__
,
4080 "gdbarch: gdbarch_stack_align invalid");
4081 if (gdbarch_debug
>= 2)
4082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4083 return gdbarch
->stack_align (sp
);
4087 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4088 gdbarch_stack_align_ftype stack_align
)
4090 gdbarch
->stack_align
= stack_align
;
4094 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4096 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4097 if (gdbarch_debug
>= 2)
4098 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4099 return gdbarch
->extra_stack_alignment_needed
;
4103 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4104 int extra_stack_alignment_needed
)
4106 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4110 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4112 return gdbarch
->reg_struct_has_addr
!= 0;
4116 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4118 if (gdbarch
->reg_struct_has_addr
== 0)
4119 internal_error (__FILE__
, __LINE__
,
4120 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4121 if (gdbarch_debug
>= 2)
4122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4123 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4127 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4128 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4130 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4134 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4136 return gdbarch
->save_dummy_frame_tos
!= 0;
4140 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4142 if (gdbarch
->save_dummy_frame_tos
== 0)
4143 internal_error (__FILE__
, __LINE__
,
4144 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4145 if (gdbarch_debug
>= 2)
4146 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4147 gdbarch
->save_dummy_frame_tos (sp
);
4151 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4152 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4154 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4158 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4160 if (gdbarch_debug
>= 2)
4161 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4162 return gdbarch
->parm_boundary
;
4166 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4169 gdbarch
->parm_boundary
= parm_boundary
;
4172 const struct floatformat
*
4173 gdbarch_float_format (struct gdbarch
*gdbarch
)
4175 if (gdbarch_debug
>= 2)
4176 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4177 return gdbarch
->float_format
;
4181 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4182 const struct floatformat
* float_format
)
4184 gdbarch
->float_format
= float_format
;
4187 const struct floatformat
*
4188 gdbarch_double_format (struct gdbarch
*gdbarch
)
4190 if (gdbarch_debug
>= 2)
4191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4192 return gdbarch
->double_format
;
4196 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4197 const struct floatformat
* double_format
)
4199 gdbarch
->double_format
= double_format
;
4202 const struct floatformat
*
4203 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4205 if (gdbarch_debug
>= 2)
4206 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4207 return gdbarch
->long_double_format
;
4211 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4212 const struct floatformat
* long_double_format
)
4214 gdbarch
->long_double_format
= long_double_format
;
4218 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4220 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4221 internal_error (__FILE__
, __LINE__
,
4222 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4223 if (gdbarch_debug
>= 2)
4224 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4225 return gdbarch
->convert_from_func_ptr_addr (addr
);
4229 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4230 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4232 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4236 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4238 return gdbarch
->software_single_step
!= 0;
4242 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4244 if (gdbarch
->software_single_step
== 0)
4245 internal_error (__FILE__
, __LINE__
,
4246 "gdbarch: gdbarch_software_single_step invalid");
4247 if (gdbarch_debug
>= 2)
4248 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4249 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4253 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4254 gdbarch_software_single_step_ftype software_single_step
)
4256 gdbarch
->software_single_step
= software_single_step
;
4260 /* Keep a registry of per-architecture data-pointers required by GDB
4266 gdbarch_data_init_ftype
*init
;
4267 gdbarch_data_free_ftype
*free
;
4270 struct gdbarch_data_registration
4272 struct gdbarch_data
*data
;
4273 struct gdbarch_data_registration
*next
;
4276 struct gdbarch_data_registry
4279 struct gdbarch_data_registration
*registrations
;
4282 struct gdbarch_data_registry gdbarch_data_registry
=
4287 struct gdbarch_data
*
4288 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4289 gdbarch_data_free_ftype
*free
)
4291 struct gdbarch_data_registration
**curr
;
4292 for (curr
= &gdbarch_data_registry
.registrations
;
4294 curr
= &(*curr
)->next
);
4295 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4296 (*curr
)->next
= NULL
;
4297 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4298 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4299 (*curr
)->data
->init
= init
;
4300 (*curr
)->data
->free
= free
;
4301 return (*curr
)->data
;
4305 /* Walk through all the registered users initializing each in turn. */
4308 init_gdbarch_data (struct gdbarch
*gdbarch
)
4310 struct gdbarch_data_registration
*rego
;
4311 for (rego
= gdbarch_data_registry
.registrations
;
4315 struct gdbarch_data
*data
= rego
->data
;
4316 gdb_assert (data
->index
< gdbarch
->nr_data
);
4317 if (data
->init
!= NULL
)
4319 void *pointer
= data
->init (gdbarch
);
4320 set_gdbarch_data (gdbarch
, data
, pointer
);
4325 /* Create/delete the gdbarch data vector. */
4328 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4330 gdb_assert (gdbarch
->data
== NULL
);
4331 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4332 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4336 free_gdbarch_data (struct gdbarch
*gdbarch
)
4338 struct gdbarch_data_registration
*rego
;
4339 gdb_assert (gdbarch
->data
!= NULL
);
4340 for (rego
= gdbarch_data_registry
.registrations
;
4344 struct gdbarch_data
*data
= rego
->data
;
4345 gdb_assert (data
->index
< gdbarch
->nr_data
);
4346 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4348 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4349 gdbarch
->data
[data
->index
] = NULL
;
4352 xfree (gdbarch
->data
);
4353 gdbarch
->data
= NULL
;
4357 /* Initialize the current value of thee specified per-architecture
4361 set_gdbarch_data (struct gdbarch
*gdbarch
,
4362 struct gdbarch_data
*data
,
4365 gdb_assert (data
->index
< gdbarch
->nr_data
);
4366 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4367 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4368 gdbarch
->data
[data
->index
] = pointer
;
4371 /* Return the current value of the specified per-architecture
4375 gdbarch_data (struct gdbarch_data
*data
)
4377 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4378 return current_gdbarch
->data
[data
->index
];
4383 /* Keep a registry of swapped data required by GDB modules. */
4388 struct gdbarch_swap_registration
*source
;
4389 struct gdbarch_swap
*next
;
4392 struct gdbarch_swap_registration
4395 unsigned long sizeof_data
;
4396 gdbarch_swap_ftype
*init
;
4397 struct gdbarch_swap_registration
*next
;
4400 struct gdbarch_swap_registry
4403 struct gdbarch_swap_registration
*registrations
;
4406 struct gdbarch_swap_registry gdbarch_swap_registry
=
4412 register_gdbarch_swap (void *data
,
4413 unsigned long sizeof_data
,
4414 gdbarch_swap_ftype
*init
)
4416 struct gdbarch_swap_registration
**rego
;
4417 for (rego
= &gdbarch_swap_registry
.registrations
;
4419 rego
= &(*rego
)->next
);
4420 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4421 (*rego
)->next
= NULL
;
4422 (*rego
)->init
= init
;
4423 (*rego
)->data
= data
;
4424 (*rego
)->sizeof_data
= sizeof_data
;
4429 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4431 struct gdbarch_swap_registration
*rego
;
4432 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4433 for (rego
= gdbarch_swap_registry
.registrations
;
4437 if (rego
->data
!= NULL
)
4439 (*curr
) = XMALLOC (struct gdbarch_swap
);
4440 (*curr
)->source
= rego
;
4441 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4442 (*curr
)->next
= NULL
;
4443 memset (rego
->data
, 0, rego
->sizeof_data
);
4444 curr
= &(*curr
)->next
;
4446 if (rego
->init
!= NULL
)
4452 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4454 struct gdbarch_swap
*curr
;
4455 for (curr
= gdbarch
->swap
;
4458 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4462 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4464 struct gdbarch_swap
*curr
;
4465 for (curr
= gdbarch
->swap
;
4468 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4472 /* Keep a registry of the architectures known by GDB. */
4474 struct gdbarch_registration
4476 enum bfd_architecture bfd_architecture
;
4477 gdbarch_init_ftype
*init
;
4478 gdbarch_dump_tdep_ftype
*dump_tdep
;
4479 struct gdbarch_list
*arches
;
4480 struct gdbarch_registration
*next
;
4483 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4486 append_name (const char ***buf
, int *nr
, const char *name
)
4488 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4494 gdbarch_printable_names (void)
4498 /* Accumulate a list of names based on the registed list of
4500 enum bfd_architecture a
;
4502 const char **arches
= NULL
;
4503 struct gdbarch_registration
*rego
;
4504 for (rego
= gdbarch_registry
;
4508 const struct bfd_arch_info
*ap
;
4509 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4511 internal_error (__FILE__
, __LINE__
,
4512 "gdbarch_architecture_names: multi-arch unknown");
4515 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4520 append_name (&arches
, &nr_arches
, NULL
);
4524 /* Just return all the architectures that BFD knows. Assume that
4525 the legacy architecture framework supports them. */
4526 return bfd_arch_list ();
4531 gdbarch_register (enum bfd_architecture bfd_architecture
,
4532 gdbarch_init_ftype
*init
,
4533 gdbarch_dump_tdep_ftype
*dump_tdep
)
4535 struct gdbarch_registration
**curr
;
4536 const struct bfd_arch_info
*bfd_arch_info
;
4537 /* Check that BFD recognizes this architecture */
4538 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4539 if (bfd_arch_info
== NULL
)
4541 internal_error (__FILE__
, __LINE__
,
4542 "gdbarch: Attempt to register unknown architecture (%d)",
4545 /* Check that we haven't seen this architecture before */
4546 for (curr
= &gdbarch_registry
;
4548 curr
= &(*curr
)->next
)
4550 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4551 internal_error (__FILE__
, __LINE__
,
4552 "gdbarch: Duplicate registraration of architecture (%s)",
4553 bfd_arch_info
->printable_name
);
4557 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4558 bfd_arch_info
->printable_name
,
4561 (*curr
) = XMALLOC (struct gdbarch_registration
);
4562 (*curr
)->bfd_architecture
= bfd_architecture
;
4563 (*curr
)->init
= init
;
4564 (*curr
)->dump_tdep
= dump_tdep
;
4565 (*curr
)->arches
= NULL
;
4566 (*curr
)->next
= NULL
;
4567 /* When non- multi-arch, install whatever target dump routine we've
4568 been provided - hopefully that routine has been written correctly
4569 and works regardless of multi-arch. */
4570 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4571 && startup_gdbarch
.dump_tdep
== NULL
)
4572 startup_gdbarch
.dump_tdep
= dump_tdep
;
4576 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4577 gdbarch_init_ftype
*init
)
4579 gdbarch_register (bfd_architecture
, init
, NULL
);
4583 /* Look for an architecture using gdbarch_info. Base search on only
4584 BFD_ARCH_INFO and BYTE_ORDER. */
4586 struct gdbarch_list
*
4587 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4588 const struct gdbarch_info
*info
)
4590 for (; arches
!= NULL
; arches
= arches
->next
)
4592 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4594 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4602 /* Update the current architecture. Return ZERO if the update request
4606 gdbarch_update_p (struct gdbarch_info info
)
4608 struct gdbarch
*new_gdbarch
;
4609 struct gdbarch_list
**list
;
4610 struct gdbarch_registration
*rego
;
4612 /* Fill in any missing bits. Most important is the bfd_architecture
4613 which is used to select the target architecture. */
4614 if (info
.bfd_architecture
== bfd_arch_unknown
)
4616 if (info
.bfd_arch_info
!= NULL
)
4617 info
.bfd_architecture
= info
.bfd_arch_info
->arch
;
4618 else if (info
.abfd
!= NULL
)
4619 info
.bfd_architecture
= bfd_get_arch (info
.abfd
);
4620 /* FIXME - should query BFD for its default architecture. */
4622 info
.bfd_architecture
= current_gdbarch
->bfd_arch_info
->arch
;
4624 if (info
.bfd_arch_info
== NULL
)
4626 if (target_architecture_auto
&& info
.abfd
!= NULL
)
4627 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4629 info
.bfd_arch_info
= current_gdbarch
->bfd_arch_info
;
4631 if (info
.byte_order
== 0)
4633 if (target_byte_order_auto
&& info
.abfd
!= NULL
)
4634 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4635 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4638 info
.byte_order
= current_gdbarch
->byte_order
;
4639 /* FIXME - should query BFD for its default byte-order. */
4641 /* A default for abfd? */
4643 /* Find the target that knows about this architecture. */
4644 for (rego
= gdbarch_registry
;
4647 if (rego
->bfd_architecture
== info
.bfd_architecture
)
4652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4658 fprintf_unfiltered (gdb_stdlog
,
4659 "gdbarch_update: info.bfd_architecture %d (%s)\n",
4660 info
.bfd_architecture
,
4661 bfd_lookup_arch (info
.bfd_architecture
, 0)->printable_name
);
4662 fprintf_unfiltered (gdb_stdlog
,
4663 "gdbarch_update: info.bfd_arch_info %s\n",
4664 (info
.bfd_arch_info
!= NULL
4665 ? info
.bfd_arch_info
->printable_name
4667 fprintf_unfiltered (gdb_stdlog
,
4668 "gdbarch_update: info.byte_order %d (%s)\n",
4670 (info
.byte_order
== BIG_ENDIAN
? "big"
4671 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4673 fprintf_unfiltered (gdb_stdlog
,
4674 "gdbarch_update: info.abfd 0x%lx\n",
4676 fprintf_unfiltered (gdb_stdlog
,
4677 "gdbarch_update: info.tdep_info 0x%lx\n",
4678 (long) info
.tdep_info
);
4681 /* Ask the target for a replacement architecture. */
4682 new_gdbarch
= rego
->init (info
, rego
->arches
);
4684 /* Did the target like it? No. Reject the change. */
4685 if (new_gdbarch
== NULL
)
4688 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4692 /* Did the architecture change? No. Do nothing. */
4693 if (current_gdbarch
== new_gdbarch
)
4696 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4698 new_gdbarch
->bfd_arch_info
->printable_name
);
4702 /* Swap all data belonging to the old target out */
4703 swapout_gdbarch_swap (current_gdbarch
);
4705 /* Is this a pre-existing architecture? Yes. Swap it in. */
4706 for (list
= ®o
->arches
;
4708 list
= &(*list
)->next
)
4710 if ((*list
)->gdbarch
== new_gdbarch
)
4713 fprintf_unfiltered (gdb_stdlog
,
4714 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4716 new_gdbarch
->bfd_arch_info
->printable_name
);
4717 current_gdbarch
= new_gdbarch
;
4718 swapin_gdbarch_swap (new_gdbarch
);
4723 /* Append this new architecture to this targets list. */
4724 (*list
) = XMALLOC (struct gdbarch_list
);
4725 (*list
)->next
= NULL
;
4726 (*list
)->gdbarch
= new_gdbarch
;
4728 /* Switch to this new architecture. Dump it out. */
4729 current_gdbarch
= new_gdbarch
;
4732 fprintf_unfiltered (gdb_stdlog
,
4733 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4735 new_gdbarch
->bfd_arch_info
->printable_name
);
4738 /* Check that the newly installed architecture is valid. Plug in
4739 any post init values. */
4740 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4741 verify_gdbarch (new_gdbarch
);
4743 /* Initialize the per-architecture memory (swap) areas.
4744 CURRENT_GDBARCH must be update before these modules are
4746 init_gdbarch_swap (new_gdbarch
);
4748 /* Initialize the per-architecture data-pointer of all parties that
4749 registered an interest in this architecture. CURRENT_GDBARCH
4750 must be updated before these modules are called. */
4751 init_gdbarch_data (new_gdbarch
);
4754 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4762 /* Pointer to the target-dependent disassembly function. */
4763 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4764 disassemble_info tm_print_insn_info
;
4767 extern void _initialize_gdbarch (void);
4770 _initialize_gdbarch (void)
4772 struct cmd_list_element
*c
;
4774 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4775 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4776 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4777 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4778 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4780 add_show_from_set (add_set_cmd ("arch",
4783 (char *)&gdbarch_debug
,
4784 "Set architecture debugging.\n\
4785 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4787 c
= add_set_cmd ("archdebug",
4790 (char *)&gdbarch_debug
,
4791 "Set architecture debugging.\n\
4792 When non-zero, architecture debugging is enabled.", &setlist
);
4794 deprecate_cmd (c
, "set debug arch");
4795 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");