1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998-1999, Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
61 #include "floatformat.h"
63 /* Static function declarations */
65 static void verify_gdbarch (struct gdbarch
*gdbarch
);
66 static void init_gdbarch_data (struct gdbarch
*);
67 static void init_gdbarch_swap (struct gdbarch
*);
68 static void swapout_gdbarch_swap (struct gdbarch
*);
69 static void swapin_gdbarch_swap (struct gdbarch
*);
71 /* Convenience macro for allocting typesafe memory. */
74 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
78 /* Non-zero if we want to trace architecture code. */
81 #define GDBARCH_DEBUG 0
83 int gdbarch_debug
= GDBARCH_DEBUG
;
86 /* Maintain the struct gdbarch object */
90 /* basic architectural information */
91 const struct bfd_arch_info
* bfd_arch_info
;
94 /* target specific vector. */
95 struct gdbarch_tdep
*tdep
;
96 gdbarch_dump_tdep_ftype
*dump_tdep
;
98 /* per-architecture data-pointers */
102 /* per-architecture swap-regions */
103 struct gdbarch_swap
*swap
;
105 /* Multi-arch values.
107 When extending this structure you must:
111 Declare set/get functions and define the corresponding
114 gdbarch_alloc(): If zero/NULL is not a suitable default,
115 initialize the new field.
117 verify_gdbarch(): Confirm that the target updated the field
120 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
123 ``startup_gdbarch()'': Append an initial value to the static
124 variable (base values on the host's c-type system).
126 get_gdbarch(): Implement the set/get functions (probably using
127 the macro's as shortcuts).
142 gdbarch_read_pc_ftype
*read_pc
;
143 gdbarch_write_pc_ftype
*write_pc
;
144 gdbarch_read_fp_ftype
*read_fp
;
145 gdbarch_write_fp_ftype
*write_fp
;
146 gdbarch_read_sp_ftype
*read_sp
;
147 gdbarch_write_sp_ftype
*write_sp
;
156 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
157 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
158 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
159 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
160 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
161 gdbarch_register_name_ftype
*register_name
;
164 gdbarch_register_byte_ftype
*register_byte
;
165 gdbarch_register_raw_size_ftype
*register_raw_size
;
166 int max_register_raw_size
;
167 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
168 int max_register_virtual_size
;
169 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
170 gdbarch_do_registers_info_ftype
*do_registers_info
;
171 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
172 int use_generic_dummy_frames
;
173 int call_dummy_location
;
174 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
175 CORE_ADDR call_dummy_start_offset
;
176 CORE_ADDR call_dummy_breakpoint_offset
;
177 int call_dummy_breakpoint_offset_p
;
178 int call_dummy_length
;
179 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
181 LONGEST
* call_dummy_words
;
182 int sizeof_call_dummy_words
;
183 int call_dummy_stack_adjust_p
;
184 int call_dummy_stack_adjust
;
185 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
186 int believe_pcc_promotion
;
187 int believe_pcc_promotion_type
;
188 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
189 gdbarch_get_saved_register_ftype
*get_saved_register
;
190 gdbarch_register_convertible_ftype
*register_convertible
;
191 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
192 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
193 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
194 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
195 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
196 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
197 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
198 gdbarch_extract_return_value_ftype
*extract_return_value
;
199 gdbarch_push_arguments_ftype
*push_arguments
;
200 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
201 gdbarch_push_return_address_ftype
*push_return_address
;
202 gdbarch_pop_frame_ftype
*pop_frame
;
203 gdbarch_d10v_make_daddr_ftype
*d10v_make_daddr
;
204 gdbarch_d10v_make_iaddr_ftype
*d10v_make_iaddr
;
205 gdbarch_d10v_daddr_p_ftype
*d10v_daddr_p
;
206 gdbarch_d10v_iaddr_p_ftype
*d10v_iaddr_p
;
207 gdbarch_d10v_convert_daddr_to_raw_ftype
*d10v_convert_daddr_to_raw
;
208 gdbarch_d10v_convert_iaddr_to_raw_ftype
*d10v_convert_iaddr_to_raw
;
209 gdbarch_store_struct_return_ftype
*store_struct_return
;
210 gdbarch_store_return_value_ftype
*store_return_value
;
211 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
212 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
213 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
214 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
215 gdbarch_skip_prologue_ftype
*skip_prologue
;
216 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
217 gdbarch_inner_than_ftype
*inner_than
;
218 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
219 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
220 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
221 CORE_ADDR decr_pc_after_break
;
222 CORE_ADDR function_start_offset
;
223 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
224 CORE_ADDR frame_args_skip
;
225 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
226 gdbarch_frame_chain_ftype
*frame_chain
;
227 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
228 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
229 gdbarch_frame_args_address_ftype
*frame_args_address
;
230 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
231 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
232 gdbarch_frame_num_args_ftype
*frame_num_args
;
233 gdbarch_stack_align_ftype
*stack_align
;
234 int extra_stack_alignment_needed
;
235 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
236 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
237 const struct floatformat
* float_format
;
238 const struct floatformat
* double_format
;
239 const struct floatformat
* long_double_format
;
240 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
244 /* The default architecture uses host values (for want of a better
247 extern const struct bfd_arch_info bfd_default_arch_struct
;
249 struct gdbarch startup_gdbarch
=
251 /* basic architecture information */
252 &bfd_default_arch_struct
,
254 /* target specific vector and its dump routine */
256 /*per-architecture data-pointers and swap regions */
258 /* Multi-arch values */
262 8 * sizeof (LONGEST
),
265 8 * sizeof (long double),
317 generic_get_saved_register
,
369 /* startup_gdbarch() */
372 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
375 /* Create a new ``struct gdbarch'' based on information provided by
376 ``struct gdbarch_info''. */
379 gdbarch_alloc (const struct gdbarch_info
*info
,
380 struct gdbarch_tdep
*tdep
)
382 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
383 memset (gdbarch
, 0, sizeof (*gdbarch
));
385 gdbarch
->tdep
= tdep
;
387 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
388 gdbarch
->byte_order
= info
->byte_order
;
390 /* Force the explicit initialization of these. */
391 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
392 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
393 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
394 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
395 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
396 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
397 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
398 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
399 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
400 gdbarch
->read_pc
= generic_target_read_pc
;
401 gdbarch
->write_pc
= generic_target_write_pc
;
402 gdbarch
->read_fp
= generic_target_read_fp
;
403 gdbarch
->write_fp
= generic_target_write_fp
;
404 gdbarch
->read_sp
= generic_target_read_sp
;
405 gdbarch
->write_sp
= generic_target_write_sp
;
406 gdbarch
->num_regs
= -1;
407 gdbarch
->sp_regnum
= -1;
408 gdbarch
->fp_regnum
= -1;
409 gdbarch
->pc_regnum
= -1;
410 gdbarch
->fp0_regnum
= -1;
411 gdbarch
->npc_regnum
= -1;
412 gdbarch
->nnpc_regnum
= -1;
413 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
414 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
415 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
416 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
417 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
418 gdbarch
->register_name
= legacy_register_name
;
419 gdbarch
->register_size
= -1;
420 gdbarch
->register_bytes
= -1;
421 gdbarch
->max_register_raw_size
= -1;
422 gdbarch
->max_register_virtual_size
= -1;
423 gdbarch
->do_registers_info
= do_registers_info
;
424 gdbarch
->register_sim_regno
= default_register_sim_regno
;
425 gdbarch
->use_generic_dummy_frames
= -1;
426 gdbarch
->call_dummy_start_offset
= -1;
427 gdbarch
->call_dummy_breakpoint_offset
= -1;
428 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
429 gdbarch
->call_dummy_length
= -1;
430 gdbarch
->call_dummy_p
= -1;
431 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
432 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
433 gdbarch
->call_dummy_stack_adjust_p
= -1;
434 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
435 gdbarch
->register_convertible
= generic_register_convertible_not
;
436 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
437 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
438 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
439 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
440 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
441 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
442 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
443 gdbarch
->decr_pc_after_break
= -1;
444 gdbarch
->function_start_offset
= -1;
445 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
446 gdbarch
->frame_args_skip
= -1;
447 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
448 gdbarch
->extra_stack_alignment_needed
= 1;
449 gdbarch
->convert_from_func_ptr_addr
= default_convert_from_func_ptr_addr
;
450 /* gdbarch_alloc() */
456 /* Free a gdbarch struct. This should never happen in normal
457 operation --- once you've created a gdbarch, you keep it around.
458 However, if an architecture's init function encounters an error
459 building the structure, it may need to clean up a partially
460 constructed gdbarch. */
463 gdbarch_free (struct gdbarch
*arch
)
465 /* At the moment, this is trivial. */
470 /* Ensure that all values in a GDBARCH are reasonable. */
473 verify_gdbarch (struct gdbarch
*gdbarch
)
475 /* Only perform sanity checks on a multi-arch target. */
479 if (gdbarch
->byte_order
== 0)
480 internal_error ("verify_gdbarch: byte-order unset");
481 if (gdbarch
->bfd_arch_info
== NULL
)
482 internal_error ("verify_gdbarch: bfd_arch_info unset");
483 /* Check those that need to be defined for the given multi-arch level. */
484 /* Skip verify of short_bit, invalid_p == 0 */
485 /* Skip verify of int_bit, invalid_p == 0 */
486 /* Skip verify of long_bit, invalid_p == 0 */
487 /* Skip verify of long_long_bit, invalid_p == 0 */
488 /* Skip verify of float_bit, invalid_p == 0 */
489 /* Skip verify of double_bit, invalid_p == 0 */
490 /* Skip verify of long_double_bit, invalid_p == 0 */
491 /* Skip verify of ptr_bit, invalid_p == 0 */
492 if (gdbarch
->addr_bit
== 0)
493 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
494 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
495 /* Skip verify of ieee_float, invalid_p == 0 */
496 /* Skip verify of read_pc, invalid_p == 0 */
497 /* Skip verify of write_pc, invalid_p == 0 */
498 /* Skip verify of read_fp, invalid_p == 0 */
499 /* Skip verify of write_fp, invalid_p == 0 */
500 /* Skip verify of read_sp, invalid_p == 0 */
501 /* Skip verify of write_sp, invalid_p == 0 */
502 if ((GDB_MULTI_ARCH
>= 2)
503 && (gdbarch
->num_regs
== -1))
504 internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
505 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
506 if ((GDB_MULTI_ARCH
>= 2)
507 && (gdbarch
->sp_regnum
== -1))
508 internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
509 if ((GDB_MULTI_ARCH
>= 2)
510 && (gdbarch
->fp_regnum
== -1))
511 internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
512 if ((GDB_MULTI_ARCH
>= 2)
513 && (gdbarch
->pc_regnum
== -1))
514 internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
515 /* Skip verify of fp0_regnum, invalid_p == 0 */
516 /* Skip verify of npc_regnum, invalid_p == 0 */
517 /* Skip verify of nnpc_regnum, invalid_p == 0 */
518 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
519 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
520 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
521 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
522 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
523 /* Skip verify of register_name, invalid_p == 0 */
524 if ((GDB_MULTI_ARCH
>= 2)
525 && (gdbarch
->register_size
== -1))
526 internal_error ("gdbarch: verify_gdbarch: register_size invalid");
527 if ((GDB_MULTI_ARCH
>= 2)
528 && (gdbarch
->register_bytes
== -1))
529 internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
530 if ((GDB_MULTI_ARCH
>= 2)
531 && (gdbarch
->register_byte
== 0))
532 internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
533 if ((GDB_MULTI_ARCH
>= 2)
534 && (gdbarch
->register_raw_size
== 0))
535 internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
536 if ((GDB_MULTI_ARCH
>= 2)
537 && (gdbarch
->max_register_raw_size
== -1))
538 internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
539 if ((GDB_MULTI_ARCH
>= 2)
540 && (gdbarch
->register_virtual_size
== 0))
541 internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
542 if ((GDB_MULTI_ARCH
>= 2)
543 && (gdbarch
->max_register_virtual_size
== -1))
544 internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
545 if ((GDB_MULTI_ARCH
>= 2)
546 && (gdbarch
->register_virtual_type
== 0))
547 internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
548 /* Skip verify of do_registers_info, invalid_p == 0 */
549 /* Skip verify of register_sim_regno, invalid_p == 0 */
550 if ((GDB_MULTI_ARCH
>= 1)
551 && (gdbarch
->use_generic_dummy_frames
== -1))
552 internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
553 if ((GDB_MULTI_ARCH
>= 2)
554 && (gdbarch
->call_dummy_location
== 0))
555 internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
556 if ((GDB_MULTI_ARCH
>= 2)
557 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
558 internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
559 if ((GDB_MULTI_ARCH
>= 2)
560 && (gdbarch
->call_dummy_start_offset
== -1))
561 internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
562 if ((GDB_MULTI_ARCH
>= 2)
563 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
564 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
565 if ((GDB_MULTI_ARCH
>= 1)
566 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
567 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
568 if ((GDB_MULTI_ARCH
>= 2)
569 && (gdbarch
->call_dummy_length
== -1))
570 internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
571 if ((GDB_MULTI_ARCH
>= 2)
572 && (gdbarch
->pc_in_call_dummy
== 0))
573 internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
574 if ((GDB_MULTI_ARCH
>= 1)
575 && (gdbarch
->call_dummy_p
== -1))
576 internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
577 /* Skip verify of call_dummy_words, invalid_p == 0 */
578 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
579 if ((GDB_MULTI_ARCH
>= 1)
580 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
581 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
582 if ((GDB_MULTI_ARCH
>= 2)
583 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
584 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
585 if ((GDB_MULTI_ARCH
>= 2)
586 && (gdbarch
->fix_call_dummy
== 0))
587 internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
588 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
589 if ((GDB_MULTI_ARCH
>= 1)
590 && (gdbarch
->get_saved_register
== 0))
591 internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
592 /* Skip verify of register_convertible, invalid_p == 0 */
593 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
594 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
595 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
596 /* Skip verify of store_pseudo_register, invalid_p == 0 */
597 /* Skip verify of pointer_to_address, invalid_p == 0 */
598 /* Skip verify of address_to_pointer, invalid_p == 0 */
599 /* Skip verify of return_value_on_stack, invalid_p == 0 */
600 if ((GDB_MULTI_ARCH
>= 2)
601 && (gdbarch
->extract_return_value
== 0))
602 internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
603 if ((GDB_MULTI_ARCH
>= 1)
604 && (gdbarch
->push_arguments
== 0))
605 internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
606 if ((GDB_MULTI_ARCH
>= 2)
607 && (gdbarch
->push_dummy_frame
== 0))
608 internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
609 if ((GDB_MULTI_ARCH
>= 1)
610 && (gdbarch
->push_return_address
== 0))
611 internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
612 if ((GDB_MULTI_ARCH
>= 2)
613 && (gdbarch
->pop_frame
== 0))
614 internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
615 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
616 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
617 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
618 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
619 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
620 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
621 if ((GDB_MULTI_ARCH
>= 2)
622 && (gdbarch
->store_struct_return
== 0))
623 internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
624 if ((GDB_MULTI_ARCH
>= 2)
625 && (gdbarch
->store_return_value
== 0))
626 internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
627 if ((GDB_MULTI_ARCH
>= 2)
628 && (gdbarch
->extract_struct_value_address
== 0))
629 internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
630 if ((GDB_MULTI_ARCH
>= 2)
631 && (gdbarch
->use_struct_convention
== 0))
632 internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
633 if ((GDB_MULTI_ARCH
>= 2)
634 && (gdbarch
->frame_init_saved_regs
== 0))
635 internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
636 if ((GDB_MULTI_ARCH
>= 2)
637 && (gdbarch
->init_extra_frame_info
== 0))
638 internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
639 if ((GDB_MULTI_ARCH
>= 2)
640 && (gdbarch
->skip_prologue
== 0))
641 internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
642 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
643 if ((GDB_MULTI_ARCH
>= 2)
644 && (gdbarch
->inner_than
== 0))
645 internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
646 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
647 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
648 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
649 if ((GDB_MULTI_ARCH
>= 2)
650 && (gdbarch
->decr_pc_after_break
== -1))
651 internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
652 if ((GDB_MULTI_ARCH
>= 2)
653 && (gdbarch
->function_start_offset
== -1))
654 internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
655 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
656 if ((GDB_MULTI_ARCH
>= 2)
657 && (gdbarch
->frame_args_skip
== -1))
658 internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
659 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
660 if ((GDB_MULTI_ARCH
>= 2)
661 && (gdbarch
->frame_chain
== 0))
662 internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
663 if ((GDB_MULTI_ARCH
>= 1)
664 && (gdbarch
->frame_chain_valid
== 0))
665 internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
666 if ((GDB_MULTI_ARCH
>= 2)
667 && (gdbarch
->frame_saved_pc
== 0))
668 internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
669 if ((GDB_MULTI_ARCH
>= 2)
670 && (gdbarch
->frame_args_address
== 0))
671 internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
672 if ((GDB_MULTI_ARCH
>= 2)
673 && (gdbarch
->frame_locals_address
== 0))
674 internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
675 if ((GDB_MULTI_ARCH
>= 2)
676 && (gdbarch
->saved_pc_after_call
== 0))
677 internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
678 if ((GDB_MULTI_ARCH
>= 2)
679 && (gdbarch
->frame_num_args
== 0))
680 internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
681 /* Skip verify of stack_align, has predicate */
682 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
683 /* Skip verify of reg_struct_has_addr, has predicate */
684 /* Skip verify of save_dummy_frame_tos, has predicate */
685 if (gdbarch
->float_format
== 0)
686 gdbarch
->float_format
= default_float_format (gdbarch
);
687 if (gdbarch
->double_format
== 0)
688 gdbarch
->double_format
= default_double_format (gdbarch
);
689 if (gdbarch
->long_double_format
== 0)
690 gdbarch
->long_double_format
= &floatformat_unknown
;
691 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
695 /* Print out the details of the current architecture. */
697 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
698 just happens to match the global variable ``current_gdbarch''. That
699 way macros refering to that variable get the local and not the global
700 version - ulgh. Once everything is parameterised with gdbarch, this
704 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
706 fprintf_unfiltered (file
,
707 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
709 #ifdef TARGET_ARCHITECTURE
710 fprintf_unfiltered (file
,
711 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
712 XSTRING (TARGET_ARCHITECTURE
));
714 #ifdef TARGET_BYTE_ORDER
715 fprintf_unfiltered (file
,
716 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
717 XSTRING (TARGET_BYTE_ORDER
));
719 #ifdef TARGET_SHORT_BIT
720 fprintf_unfiltered (file
,
721 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
722 XSTRING (TARGET_SHORT_BIT
));
724 #ifdef TARGET_INT_BIT
725 fprintf_unfiltered (file
,
726 "gdbarch_dump: TARGET_INT_BIT # %s\n",
727 XSTRING (TARGET_INT_BIT
));
729 #ifdef TARGET_LONG_BIT
730 fprintf_unfiltered (file
,
731 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
732 XSTRING (TARGET_LONG_BIT
));
734 #ifdef TARGET_LONG_LONG_BIT
735 fprintf_unfiltered (file
,
736 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
737 XSTRING (TARGET_LONG_LONG_BIT
));
739 #ifdef TARGET_FLOAT_BIT
740 fprintf_unfiltered (file
,
741 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
742 XSTRING (TARGET_FLOAT_BIT
));
744 #ifdef TARGET_DOUBLE_BIT
745 fprintf_unfiltered (file
,
746 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
747 XSTRING (TARGET_DOUBLE_BIT
));
749 #ifdef TARGET_LONG_DOUBLE_BIT
750 fprintf_unfiltered (file
,
751 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
752 XSTRING (TARGET_LONG_DOUBLE_BIT
));
754 #ifdef TARGET_PTR_BIT
755 fprintf_unfiltered (file
,
756 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
757 XSTRING (TARGET_PTR_BIT
));
759 #ifdef TARGET_ADDR_BIT
760 fprintf_unfiltered (file
,
761 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
762 XSTRING (TARGET_ADDR_BIT
));
764 #ifdef TARGET_BFD_VMA_BIT
765 fprintf_unfiltered (file
,
766 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
767 XSTRING (TARGET_BFD_VMA_BIT
));
770 fprintf_unfiltered (file
,
771 "gdbarch_dump: IEEE_FLOAT # %s\n",
772 XSTRING (IEEE_FLOAT
));
774 #ifdef TARGET_READ_PC
775 fprintf_unfiltered (file
,
776 "gdbarch_dump: %s # %s\n",
777 "TARGET_READ_PC(pid)",
778 XSTRING (TARGET_READ_PC (pid
)));
780 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
781 /* Macro might contain `[{}]' when not multi-arch */
782 fprintf_unfiltered (file
,
783 "gdbarch_dump: %s # %s\n",
784 "TARGET_WRITE_PC(val, pid)",
785 XSTRING (TARGET_WRITE_PC (val
, pid
)));
787 #ifdef TARGET_READ_FP
788 fprintf_unfiltered (file
,
789 "gdbarch_dump: %s # %s\n",
791 XSTRING (TARGET_READ_FP ()));
793 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
794 /* Macro might contain `[{}]' when not multi-arch */
795 fprintf_unfiltered (file
,
796 "gdbarch_dump: %s # %s\n",
797 "TARGET_WRITE_FP(val)",
798 XSTRING (TARGET_WRITE_FP (val
)));
800 #ifdef TARGET_READ_SP
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: %s # %s\n",
804 XSTRING (TARGET_READ_SP ()));
806 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
807 /* Macro might contain `[{}]' when not multi-arch */
808 fprintf_unfiltered (file
,
809 "gdbarch_dump: %s # %s\n",
810 "TARGET_WRITE_SP(val)",
811 XSTRING (TARGET_WRITE_SP (val
)));
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: NUM_REGS # %s\n",
818 #ifdef NUM_PSEUDO_REGS
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
821 XSTRING (NUM_PSEUDO_REGS
));
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: SP_REGNUM # %s\n",
826 XSTRING (SP_REGNUM
));
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: FP_REGNUM # %s\n",
831 XSTRING (FP_REGNUM
));
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: PC_REGNUM # %s\n",
836 XSTRING (PC_REGNUM
));
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: FP0_REGNUM # %s\n",
841 XSTRING (FP0_REGNUM
));
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: NPC_REGNUM # %s\n",
846 XSTRING (NPC_REGNUM
));
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: NNPC_REGNUM # %s\n",
851 XSTRING (NNPC_REGNUM
));
853 #ifdef STAB_REG_TO_REGNUM
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: %s # %s\n",
856 "STAB_REG_TO_REGNUM(stab_regnr)",
857 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
859 #ifdef ECOFF_REG_TO_REGNUM
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: %s # %s\n",
862 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
863 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
865 #ifdef DWARF_REG_TO_REGNUM
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: %s # %s\n",
868 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
869 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
871 #ifdef SDB_REG_TO_REGNUM
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: %s # %s\n",
874 "SDB_REG_TO_REGNUM(sdb_regnr)",
875 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
877 #ifdef DWARF2_REG_TO_REGNUM
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: %s # %s\n",
880 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
881 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: %s # %s\n",
886 "REGISTER_NAME(regnr)",
887 XSTRING (REGISTER_NAME (regnr
)));
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: REGISTER_SIZE # %s\n",
892 XSTRING (REGISTER_SIZE
));
894 #ifdef REGISTER_BYTES
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: REGISTER_BYTES # %s\n",
897 XSTRING (REGISTER_BYTES
));
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: %s # %s\n",
902 "REGISTER_BYTE(reg_nr)",
903 XSTRING (REGISTER_BYTE (reg_nr
)));
905 #ifdef REGISTER_RAW_SIZE
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: %s # %s\n",
908 "REGISTER_RAW_SIZE(reg_nr)",
909 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
911 #ifdef MAX_REGISTER_RAW_SIZE
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
914 XSTRING (MAX_REGISTER_RAW_SIZE
));
916 #ifdef REGISTER_VIRTUAL_SIZE
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: %s # %s\n",
919 "REGISTER_VIRTUAL_SIZE(reg_nr)",
920 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
922 #ifdef MAX_REGISTER_VIRTUAL_SIZE
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
925 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
927 #ifdef REGISTER_VIRTUAL_TYPE
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: %s # %s\n",
930 "REGISTER_VIRTUAL_TYPE(reg_nr)",
931 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
933 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
934 /* Macro might contain `[{}]' when not multi-arch */
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: %s # %s\n",
937 "DO_REGISTERS_INFO(reg_nr, fpregs)",
938 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
940 #ifdef REGISTER_SIM_REGNO
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: %s # %s\n",
943 "REGISTER_SIM_REGNO(reg_nr)",
944 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
946 #ifdef USE_GENERIC_DUMMY_FRAMES
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
949 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
951 #ifdef CALL_DUMMY_LOCATION
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
954 XSTRING (CALL_DUMMY_LOCATION
));
956 #ifdef CALL_DUMMY_ADDRESS
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: %s # %s\n",
959 "CALL_DUMMY_ADDRESS()",
960 XSTRING (CALL_DUMMY_ADDRESS ()));
962 #ifdef CALL_DUMMY_START_OFFSET
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
965 XSTRING (CALL_DUMMY_START_OFFSET
));
967 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
970 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
972 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
975 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
977 #ifdef CALL_DUMMY_LENGTH
978 fprintf_unfiltered (file
,
979 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
980 XSTRING (CALL_DUMMY_LENGTH
));
982 #ifdef PC_IN_CALL_DUMMY
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: %s # %s\n",
985 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
986 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: CALL_DUMMY_P # %s\n",
991 XSTRING (CALL_DUMMY_P
));
993 #ifdef CALL_DUMMY_WORDS
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
996 XSTRING (CALL_DUMMY_WORDS
));
998 #ifdef SIZEOF_CALL_DUMMY_WORDS
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1001 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1003 #ifdef CALL_DUMMY_STACK_ADJUST_P
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1006 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1008 #ifdef CALL_DUMMY_STACK_ADJUST
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1011 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1013 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1014 /* Macro might contain `[{}]' when not multi-arch */
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: %s # %s\n",
1017 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1018 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1020 #ifdef BELIEVE_PCC_PROMOTION
1021 fprintf_unfiltered (file
,
1022 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1023 XSTRING (BELIEVE_PCC_PROMOTION
));
1025 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1028 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1030 #ifdef COERCE_FLOAT_TO_DOUBLE
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: %s # %s\n",
1033 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1034 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1036 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1037 /* Macro might contain `[{}]' when not multi-arch */
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: %s # %s\n",
1040 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1041 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1043 #ifdef REGISTER_CONVERTIBLE
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: %s # %s\n",
1046 "REGISTER_CONVERTIBLE(nr)",
1047 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1049 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1050 /* Macro might contain `[{}]' when not multi-arch */
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: %s # %s\n",
1053 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1054 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1056 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1057 /* Macro might contain `[{}]' when not multi-arch */
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: %s # %s\n",
1060 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1061 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1063 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1064 /* Macro might contain `[{}]' when not multi-arch */
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: %s # %s\n",
1067 "FETCH_PSEUDO_REGISTER(regnum)",
1068 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1070 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1071 /* Macro might contain `[{}]' when not multi-arch */
1072 fprintf_unfiltered (file
,
1073 "gdbarch_dump: %s # %s\n",
1074 "STORE_PSEUDO_REGISTER(regnum)",
1075 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1077 #ifdef POINTER_TO_ADDRESS
1078 fprintf_unfiltered (file
,
1079 "gdbarch_dump: %s # %s\n",
1080 "POINTER_TO_ADDRESS(type, buf)",
1081 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1083 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1084 /* Macro might contain `[{}]' when not multi-arch */
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: %s # %s\n",
1087 "ADDRESS_TO_POINTER(type, buf, addr)",
1088 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1090 #ifdef RETURN_VALUE_ON_STACK
1091 fprintf_unfiltered (file
,
1092 "gdbarch_dump: %s # %s\n",
1093 "RETURN_VALUE_ON_STACK(type)",
1094 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1096 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1097 /* Macro might contain `[{}]' when not multi-arch */
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: %s # %s\n",
1100 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1101 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1103 #ifdef PUSH_ARGUMENTS
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: %s # %s\n",
1106 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1107 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1109 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1110 /* Macro might contain `[{}]' when not multi-arch */
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: %s # %s\n",
1113 "PUSH_DUMMY_FRAME(-)",
1114 XSTRING (PUSH_DUMMY_FRAME (-)));
1116 #ifdef PUSH_RETURN_ADDRESS
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: %s # %s\n",
1119 "PUSH_RETURN_ADDRESS(pc, sp)",
1120 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1122 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1123 /* Macro might contain `[{}]' when not multi-arch */
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: %s # %s\n",
1127 XSTRING (POP_FRAME (-)));
1129 #ifdef D10V_MAKE_DADDR
1130 fprintf_unfiltered (file
,
1131 "gdbarch_dump: %s # %s\n",
1132 "D10V_MAKE_DADDR(x)",
1133 XSTRING (D10V_MAKE_DADDR (x
)));
1135 #ifdef D10V_MAKE_IADDR
1136 fprintf_unfiltered (file
,
1137 "gdbarch_dump: %s # %s\n",
1138 "D10V_MAKE_IADDR(x)",
1139 XSTRING (D10V_MAKE_IADDR (x
)));
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: %s # %s\n",
1145 XSTRING (D10V_DADDR_P (x
)));
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: %s # %s\n",
1151 XSTRING (D10V_IADDR_P (x
)));
1153 #ifdef D10V_CONVERT_DADDR_TO_RAW
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: %s # %s\n",
1156 "D10V_CONVERT_DADDR_TO_RAW(x)",
1157 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1159 #ifdef D10V_CONVERT_IADDR_TO_RAW
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: %s # %s\n",
1162 "D10V_CONVERT_IADDR_TO_RAW(x)",
1163 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1165 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1166 /* Macro might contain `[{}]' when not multi-arch */
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: %s # %s\n",
1169 "STORE_STRUCT_RETURN(addr, sp)",
1170 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1172 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1173 /* Macro might contain `[{}]' when not multi-arch */
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: %s # %s\n",
1176 "STORE_RETURN_VALUE(type, valbuf)",
1177 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1179 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: %s # %s\n",
1182 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1183 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1185 #ifdef USE_STRUCT_CONVENTION
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: %s # %s\n",
1188 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1189 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1191 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1192 /* Macro might contain `[{}]' when not multi-arch */
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: %s # %s\n",
1195 "FRAME_INIT_SAVED_REGS(frame)",
1196 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1198 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1199 /* Macro might contain `[{}]' when not multi-arch */
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: %s # %s\n",
1202 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1203 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1205 #ifdef SKIP_PROLOGUE
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: %s # %s\n",
1208 "SKIP_PROLOGUE(ip)",
1209 XSTRING (SKIP_PROLOGUE (ip
)));
1211 #ifdef PROLOGUE_FRAMELESS_P
1212 fprintf_unfiltered (file
,
1213 "gdbarch_dump: %s # %s\n",
1214 "PROLOGUE_FRAMELESS_P(ip)",
1215 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: %s # %s\n",
1220 "INNER_THAN(lhs, rhs)",
1221 XSTRING (INNER_THAN (lhs
, rhs
)));
1223 #ifdef BREAKPOINT_FROM_PC
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: %s # %s\n",
1226 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1227 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1229 #ifdef MEMORY_INSERT_BREAKPOINT
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: %s # %s\n",
1232 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1233 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1235 #ifdef MEMORY_REMOVE_BREAKPOINT
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: %s # %s\n",
1238 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1239 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1241 #ifdef DECR_PC_AFTER_BREAK
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1244 XSTRING (DECR_PC_AFTER_BREAK
));
1246 #ifdef FUNCTION_START_OFFSET
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1249 XSTRING (FUNCTION_START_OFFSET
));
1251 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1252 /* Macro might contain `[{}]' when not multi-arch */
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: %s # %s\n",
1255 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1256 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1258 #ifdef FRAME_ARGS_SKIP
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1261 XSTRING (FRAME_ARGS_SKIP
));
1263 #ifdef FRAMELESS_FUNCTION_INVOCATION
1264 fprintf_unfiltered (file
,
1265 "gdbarch_dump: %s # %s\n",
1266 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1267 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: %s # %s\n",
1272 "FRAME_CHAIN(frame)",
1273 XSTRING (FRAME_CHAIN (frame
)));
1275 #ifdef FRAME_CHAIN_VALID
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: %s # %s\n",
1278 "FRAME_CHAIN_VALID(chain, thisframe)",
1279 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1281 #ifdef FRAME_SAVED_PC
1282 fprintf_unfiltered (file
,
1283 "gdbarch_dump: %s # %s\n",
1284 "FRAME_SAVED_PC(fi)",
1285 XSTRING (FRAME_SAVED_PC (fi
)));
1287 #ifdef FRAME_ARGS_ADDRESS
1288 fprintf_unfiltered (file
,
1289 "gdbarch_dump: %s # %s\n",
1290 "FRAME_ARGS_ADDRESS(fi)",
1291 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1293 #ifdef FRAME_LOCALS_ADDRESS
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: %s # %s\n",
1296 "FRAME_LOCALS_ADDRESS(fi)",
1297 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1299 #ifdef SAVED_PC_AFTER_CALL
1300 fprintf_unfiltered (file
,
1301 "gdbarch_dump: %s # %s\n",
1302 "SAVED_PC_AFTER_CALL(frame)",
1303 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1305 #ifdef FRAME_NUM_ARGS
1306 fprintf_unfiltered (file
,
1307 "gdbarch_dump: %s # %s\n",
1308 "FRAME_NUM_ARGS(frame)",
1309 XSTRING (FRAME_NUM_ARGS (frame
)));
1312 fprintf_unfiltered (file
,
1313 "gdbarch_dump: %s # %s\n",
1315 XSTRING (STACK_ALIGN (sp
)));
1317 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1318 fprintf_unfiltered (file
,
1319 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1320 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1322 #ifdef REG_STRUCT_HAS_ADDR
1323 fprintf_unfiltered (file
,
1324 "gdbarch_dump: %s # %s\n",
1325 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1326 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1328 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1329 /* Macro might contain `[{}]' when not multi-arch */
1330 fprintf_unfiltered (file
,
1331 "gdbarch_dump: %s # %s\n",
1332 "SAVE_DUMMY_FRAME_TOS(sp)",
1333 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1335 #ifdef TARGET_FLOAT_FORMAT
1336 fprintf_unfiltered (file
,
1337 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1338 XSTRING (TARGET_FLOAT_FORMAT
));
1340 #ifdef TARGET_DOUBLE_FORMAT
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1343 XSTRING (TARGET_DOUBLE_FORMAT
));
1345 #ifdef TARGET_LONG_DOUBLE_FORMAT
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1348 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1350 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: %s # %s\n",
1353 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1354 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1356 #ifdef TARGET_ARCHITECTURE
1357 if (TARGET_ARCHITECTURE
!= NULL
)
1358 fprintf_unfiltered (file
,
1359 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1360 TARGET_ARCHITECTURE
->printable_name
);
1362 #ifdef TARGET_BYTE_ORDER
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1365 (long) TARGET_BYTE_ORDER
);
1367 #ifdef TARGET_SHORT_BIT
1368 fprintf_unfiltered (file
,
1369 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1370 (long) TARGET_SHORT_BIT
);
1372 #ifdef TARGET_INT_BIT
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1375 (long) TARGET_INT_BIT
);
1377 #ifdef TARGET_LONG_BIT
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1380 (long) TARGET_LONG_BIT
);
1382 #ifdef TARGET_LONG_LONG_BIT
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1385 (long) TARGET_LONG_LONG_BIT
);
1387 #ifdef TARGET_FLOAT_BIT
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1390 (long) TARGET_FLOAT_BIT
);
1392 #ifdef TARGET_DOUBLE_BIT
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1395 (long) TARGET_DOUBLE_BIT
);
1397 #ifdef TARGET_LONG_DOUBLE_BIT
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1400 (long) TARGET_LONG_DOUBLE_BIT
);
1402 #ifdef TARGET_PTR_BIT
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1405 (long) TARGET_PTR_BIT
);
1407 #ifdef TARGET_ADDR_BIT
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1410 (long) TARGET_ADDR_BIT
);
1412 #ifdef TARGET_BFD_VMA_BIT
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1415 (long) TARGET_BFD_VMA_BIT
);
1418 fprintf_unfiltered (file
,
1419 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1422 #ifdef TARGET_READ_PC
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1426 (long) current_gdbarch
->read_pc
1427 /*TARGET_READ_PC ()*/);
1429 #ifdef TARGET_WRITE_PC
1431 fprintf_unfiltered (file
,
1432 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1433 (long) current_gdbarch
->write_pc
1434 /*TARGET_WRITE_PC ()*/);
1436 #ifdef TARGET_READ_FP
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1440 (long) current_gdbarch
->read_fp
1441 /*TARGET_READ_FP ()*/);
1443 #ifdef TARGET_WRITE_FP
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1447 (long) current_gdbarch
->write_fp
1448 /*TARGET_WRITE_FP ()*/);
1450 #ifdef TARGET_READ_SP
1452 fprintf_unfiltered (file
,
1453 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1454 (long) current_gdbarch
->read_sp
1455 /*TARGET_READ_SP ()*/);
1457 #ifdef TARGET_WRITE_SP
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1461 (long) current_gdbarch
->write_sp
1462 /*TARGET_WRITE_SP ()*/);
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: NUM_REGS = %ld\n",
1469 #ifdef NUM_PSEUDO_REGS
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1472 (long) NUM_PSEUDO_REGS
);
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: SP_REGNUM = %ld\n",
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: FP_REGNUM = %ld\n",
1485 fprintf_unfiltered (file
,
1486 "gdbarch_dump: PC_REGNUM = %ld\n",
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: FP0_REGNUM = %ld\n",
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: NPC_REGNUM = %ld\n",
1500 fprintf_unfiltered (file
,
1501 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1502 (long) NNPC_REGNUM
);
1504 #ifdef STAB_REG_TO_REGNUM
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1508 (long) current_gdbarch
->stab_reg_to_regnum
1509 /*STAB_REG_TO_REGNUM ()*/);
1511 #ifdef ECOFF_REG_TO_REGNUM
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1515 (long) current_gdbarch
->ecoff_reg_to_regnum
1516 /*ECOFF_REG_TO_REGNUM ()*/);
1518 #ifdef DWARF_REG_TO_REGNUM
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1522 (long) current_gdbarch
->dwarf_reg_to_regnum
1523 /*DWARF_REG_TO_REGNUM ()*/);
1525 #ifdef SDB_REG_TO_REGNUM
1527 fprintf_unfiltered (file
,
1528 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1529 (long) current_gdbarch
->sdb_reg_to_regnum
1530 /*SDB_REG_TO_REGNUM ()*/);
1532 #ifdef DWARF2_REG_TO_REGNUM
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1536 (long) current_gdbarch
->dwarf2_reg_to_regnum
1537 /*DWARF2_REG_TO_REGNUM ()*/);
1539 #ifdef REGISTER_NAME
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1543 (long) current_gdbarch
->register_name
1544 /*REGISTER_NAME ()*/);
1546 #ifdef REGISTER_SIZE
1547 fprintf_unfiltered (file
,
1548 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1549 (long) REGISTER_SIZE
);
1551 #ifdef REGISTER_BYTES
1552 fprintf_unfiltered (file
,
1553 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1554 (long) REGISTER_BYTES
);
1556 #ifdef REGISTER_BYTE
1558 fprintf_unfiltered (file
,
1559 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1560 (long) current_gdbarch
->register_byte
1561 /*REGISTER_BYTE ()*/);
1563 #ifdef REGISTER_RAW_SIZE
1565 fprintf_unfiltered (file
,
1566 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1567 (long) current_gdbarch
->register_raw_size
1568 /*REGISTER_RAW_SIZE ()*/);
1570 #ifdef MAX_REGISTER_RAW_SIZE
1571 fprintf_unfiltered (file
,
1572 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1573 (long) MAX_REGISTER_RAW_SIZE
);
1575 #ifdef REGISTER_VIRTUAL_SIZE
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1579 (long) current_gdbarch
->register_virtual_size
1580 /*REGISTER_VIRTUAL_SIZE ()*/);
1582 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1585 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1587 #ifdef REGISTER_VIRTUAL_TYPE
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1591 (long) current_gdbarch
->register_virtual_type
1592 /*REGISTER_VIRTUAL_TYPE ()*/);
1594 #ifdef DO_REGISTERS_INFO
1596 fprintf_unfiltered (file
,
1597 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1598 (long) current_gdbarch
->do_registers_info
1599 /*DO_REGISTERS_INFO ()*/);
1601 #ifdef REGISTER_SIM_REGNO
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1605 (long) current_gdbarch
->register_sim_regno
1606 /*REGISTER_SIM_REGNO ()*/);
1608 #ifdef USE_GENERIC_DUMMY_FRAMES
1609 fprintf_unfiltered (file
,
1610 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1611 (long) USE_GENERIC_DUMMY_FRAMES
);
1613 #ifdef CALL_DUMMY_LOCATION
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1616 (long) CALL_DUMMY_LOCATION
);
1618 #ifdef CALL_DUMMY_ADDRESS
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1622 (long) current_gdbarch
->call_dummy_address
1623 /*CALL_DUMMY_ADDRESS ()*/);
1625 #ifdef CALL_DUMMY_START_OFFSET
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1628 (long) CALL_DUMMY_START_OFFSET
);
1630 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1631 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1632 fprintf_unfiltered (file
,
1633 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1634 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1636 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1637 fprintf_unfiltered (file
,
1638 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1639 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1641 #ifdef CALL_DUMMY_LENGTH
1642 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1645 (long) CALL_DUMMY_LENGTH
);
1647 #ifdef PC_IN_CALL_DUMMY
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1651 (long) current_gdbarch
->pc_in_call_dummy
1652 /*PC_IN_CALL_DUMMY ()*/);
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1657 (long) CALL_DUMMY_P
);
1659 #ifdef CALL_DUMMY_WORDS
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1662 (long) CALL_DUMMY_WORDS
);
1664 #ifdef SIZEOF_CALL_DUMMY_WORDS
1665 fprintf_unfiltered (file
,
1666 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1667 (long) SIZEOF_CALL_DUMMY_WORDS
);
1669 #ifdef CALL_DUMMY_STACK_ADJUST_P
1670 fprintf_unfiltered (file
,
1671 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1672 (long) CALL_DUMMY_STACK_ADJUST_P
);
1674 #ifdef CALL_DUMMY_STACK_ADJUST
1675 if (CALL_DUMMY_STACK_ADJUST_P
)
1676 fprintf_unfiltered (file
,
1677 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1678 (long) CALL_DUMMY_STACK_ADJUST
);
1680 #ifdef FIX_CALL_DUMMY
1682 fprintf_unfiltered (file
,
1683 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1684 (long) current_gdbarch
->fix_call_dummy
1685 /*FIX_CALL_DUMMY ()*/);
1687 #ifdef BELIEVE_PCC_PROMOTION
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1690 (long) BELIEVE_PCC_PROMOTION
);
1692 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1695 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1697 #ifdef COERCE_FLOAT_TO_DOUBLE
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1701 (long) current_gdbarch
->coerce_float_to_double
1702 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1704 #ifdef GET_SAVED_REGISTER
1706 fprintf_unfiltered (file
,
1707 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1708 (long) current_gdbarch
->get_saved_register
1709 /*GET_SAVED_REGISTER ()*/);
1711 #ifdef REGISTER_CONVERTIBLE
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1715 (long) current_gdbarch
->register_convertible
1716 /*REGISTER_CONVERTIBLE ()*/);
1718 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1720 fprintf_unfiltered (file
,
1721 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1722 (long) current_gdbarch
->register_convert_to_virtual
1723 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1725 #ifdef REGISTER_CONVERT_TO_RAW
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1729 (long) current_gdbarch
->register_convert_to_raw
1730 /*REGISTER_CONVERT_TO_RAW ()*/);
1732 #ifdef FETCH_PSEUDO_REGISTER
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1736 (long) current_gdbarch
->fetch_pseudo_register
1737 /*FETCH_PSEUDO_REGISTER ()*/);
1739 #ifdef STORE_PSEUDO_REGISTER
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1743 (long) current_gdbarch
->store_pseudo_register
1744 /*STORE_PSEUDO_REGISTER ()*/);
1746 #ifdef POINTER_TO_ADDRESS
1748 fprintf_unfiltered (file
,
1749 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1750 (long) current_gdbarch
->pointer_to_address
1751 /*POINTER_TO_ADDRESS ()*/);
1753 #ifdef ADDRESS_TO_POINTER
1755 fprintf_unfiltered (file
,
1756 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1757 (long) current_gdbarch
->address_to_pointer
1758 /*ADDRESS_TO_POINTER ()*/);
1760 #ifdef RETURN_VALUE_ON_STACK
1762 fprintf_unfiltered (file
,
1763 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1764 (long) current_gdbarch
->return_value_on_stack
1765 /*RETURN_VALUE_ON_STACK ()*/);
1767 #ifdef EXTRACT_RETURN_VALUE
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1771 (long) current_gdbarch
->extract_return_value
1772 /*EXTRACT_RETURN_VALUE ()*/);
1774 #ifdef PUSH_ARGUMENTS
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1778 (long) current_gdbarch
->push_arguments
1779 /*PUSH_ARGUMENTS ()*/);
1781 #ifdef PUSH_DUMMY_FRAME
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1785 (long) current_gdbarch
->push_dummy_frame
1786 /*PUSH_DUMMY_FRAME ()*/);
1788 #ifdef PUSH_RETURN_ADDRESS
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1792 (long) current_gdbarch
->push_return_address
1793 /*PUSH_RETURN_ADDRESS ()*/);
1797 fprintf_unfiltered (file
,
1798 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1799 (long) current_gdbarch
->pop_frame
1802 #ifdef D10V_MAKE_DADDR
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1806 (long) current_gdbarch
->d10v_make_daddr
1807 /*D10V_MAKE_DADDR ()*/);
1809 #ifdef D10V_MAKE_IADDR
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1813 (long) current_gdbarch
->d10v_make_iaddr
1814 /*D10V_MAKE_IADDR ()*/);
1818 fprintf_unfiltered (file
,
1819 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1820 (long) current_gdbarch
->d10v_daddr_p
1821 /*D10V_DADDR_P ()*/);
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1827 (long) current_gdbarch
->d10v_iaddr_p
1828 /*D10V_IADDR_P ()*/);
1830 #ifdef D10V_CONVERT_DADDR_TO_RAW
1832 fprintf_unfiltered (file
,
1833 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1834 (long) current_gdbarch
->d10v_convert_daddr_to_raw
1835 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1837 #ifdef D10V_CONVERT_IADDR_TO_RAW
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1841 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
1842 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1844 #ifdef STORE_STRUCT_RETURN
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1848 (long) current_gdbarch
->store_struct_return
1849 /*STORE_STRUCT_RETURN ()*/);
1851 #ifdef STORE_RETURN_VALUE
1853 fprintf_unfiltered (file
,
1854 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1855 (long) current_gdbarch
->store_return_value
1856 /*STORE_RETURN_VALUE ()*/);
1858 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1862 (long) current_gdbarch
->extract_struct_value_address
1863 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1865 #ifdef USE_STRUCT_CONVENTION
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1869 (long) current_gdbarch
->use_struct_convention
1870 /*USE_STRUCT_CONVENTION ()*/);
1872 #ifdef FRAME_INIT_SAVED_REGS
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1876 (long) current_gdbarch
->frame_init_saved_regs
1877 /*FRAME_INIT_SAVED_REGS ()*/);
1879 #ifdef INIT_EXTRA_FRAME_INFO
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1883 (long) current_gdbarch
->init_extra_frame_info
1884 /*INIT_EXTRA_FRAME_INFO ()*/);
1886 #ifdef SKIP_PROLOGUE
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1890 (long) current_gdbarch
->skip_prologue
1891 /*SKIP_PROLOGUE ()*/);
1893 #ifdef PROLOGUE_FRAMELESS_P
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1897 (long) current_gdbarch
->prologue_frameless_p
1898 /*PROLOGUE_FRAMELESS_P ()*/);
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1904 (long) current_gdbarch
->inner_than
1907 #ifdef BREAKPOINT_FROM_PC
1909 fprintf_unfiltered (file
,
1910 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
1911 (long) current_gdbarch
->breakpoint_from_pc
1912 /*BREAKPOINT_FROM_PC ()*/);
1914 #ifdef MEMORY_INSERT_BREAKPOINT
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1918 (long) current_gdbarch
->memory_insert_breakpoint
1919 /*MEMORY_INSERT_BREAKPOINT ()*/);
1921 #ifdef MEMORY_REMOVE_BREAKPOINT
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1925 (long) current_gdbarch
->memory_remove_breakpoint
1926 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1928 #ifdef DECR_PC_AFTER_BREAK
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1931 (long) DECR_PC_AFTER_BREAK
);
1933 #ifdef FUNCTION_START_OFFSET
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1936 (long) FUNCTION_START_OFFSET
);
1938 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1942 (long) current_gdbarch
->remote_translate_xfer_address
1943 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1945 #ifdef FRAME_ARGS_SKIP
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1948 (long) FRAME_ARGS_SKIP
);
1950 #ifdef FRAMELESS_FUNCTION_INVOCATION
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1954 (long) current_gdbarch
->frameless_function_invocation
1955 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1961 (long) current_gdbarch
->frame_chain
1962 /*FRAME_CHAIN ()*/);
1964 #ifdef FRAME_CHAIN_VALID
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1968 (long) current_gdbarch
->frame_chain_valid
1969 /*FRAME_CHAIN_VALID ()*/);
1971 #ifdef FRAME_SAVED_PC
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1975 (long) current_gdbarch
->frame_saved_pc
1976 /*FRAME_SAVED_PC ()*/);
1978 #ifdef FRAME_ARGS_ADDRESS
1980 fprintf_unfiltered (file
,
1981 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1982 (long) current_gdbarch
->frame_args_address
1983 /*FRAME_ARGS_ADDRESS ()*/);
1985 #ifdef FRAME_LOCALS_ADDRESS
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1989 (long) current_gdbarch
->frame_locals_address
1990 /*FRAME_LOCALS_ADDRESS ()*/);
1992 #ifdef SAVED_PC_AFTER_CALL
1994 fprintf_unfiltered (file
,
1995 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1996 (long) current_gdbarch
->saved_pc_after_call
1997 /*SAVED_PC_AFTER_CALL ()*/);
1999 #ifdef FRAME_NUM_ARGS
2001 fprintf_unfiltered (file
,
2002 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2003 (long) current_gdbarch
->frame_num_args
2004 /*FRAME_NUM_ARGS ()*/);
2008 fprintf_unfiltered (file
,
2009 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2010 (long) current_gdbarch
->stack_align
2011 /*STACK_ALIGN ()*/);
2013 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2016 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2018 #ifdef REG_STRUCT_HAS_ADDR
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2022 (long) current_gdbarch
->reg_struct_has_addr
2023 /*REG_STRUCT_HAS_ADDR ()*/);
2025 #ifdef SAVE_DUMMY_FRAME_TOS
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2029 (long) current_gdbarch
->save_dummy_frame_tos
2030 /*SAVE_DUMMY_FRAME_TOS ()*/);
2032 #ifdef TARGET_FLOAT_FORMAT
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2035 (long) TARGET_FLOAT_FORMAT
);
2037 #ifdef TARGET_DOUBLE_FORMAT
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2040 (long) TARGET_DOUBLE_FORMAT
);
2042 #ifdef TARGET_LONG_DOUBLE_FORMAT
2043 fprintf_unfiltered (file
,
2044 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2045 (long) TARGET_LONG_DOUBLE_FORMAT
);
2047 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2049 fprintf_unfiltered (file
,
2050 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2051 (long) current_gdbarch
->convert_from_func_ptr_addr
2052 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2054 if (current_gdbarch
->dump_tdep
!= NULL
)
2055 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2058 struct gdbarch_tdep
*
2059 gdbarch_tdep (struct gdbarch
*gdbarch
)
2061 if (gdbarch_debug
>= 2)
2062 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2063 return gdbarch
->tdep
;
2067 const struct bfd_arch_info
*
2068 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2070 if (gdbarch_debug
>= 2)
2071 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2072 return gdbarch
->bfd_arch_info
;
2076 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2078 if (gdbarch_debug
>= 2)
2079 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2080 return gdbarch
->byte_order
;
2084 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2086 /* Skip verify of short_bit, invalid_p == 0 */
2087 if (gdbarch_debug
>= 2)
2088 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2089 return gdbarch
->short_bit
;
2093 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2096 gdbarch
->short_bit
= short_bit
;
2100 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2102 /* Skip verify of int_bit, invalid_p == 0 */
2103 if (gdbarch_debug
>= 2)
2104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2105 return gdbarch
->int_bit
;
2109 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2112 gdbarch
->int_bit
= int_bit
;
2116 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2118 /* Skip verify of long_bit, invalid_p == 0 */
2119 if (gdbarch_debug
>= 2)
2120 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2121 return gdbarch
->long_bit
;
2125 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2128 gdbarch
->long_bit
= long_bit
;
2132 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2134 /* Skip verify of long_long_bit, invalid_p == 0 */
2135 if (gdbarch_debug
>= 2)
2136 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2137 return gdbarch
->long_long_bit
;
2141 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2144 gdbarch
->long_long_bit
= long_long_bit
;
2148 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2150 /* Skip verify of float_bit, invalid_p == 0 */
2151 if (gdbarch_debug
>= 2)
2152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2153 return gdbarch
->float_bit
;
2157 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2160 gdbarch
->float_bit
= float_bit
;
2164 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2166 /* Skip verify of double_bit, invalid_p == 0 */
2167 if (gdbarch_debug
>= 2)
2168 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2169 return gdbarch
->double_bit
;
2173 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2176 gdbarch
->double_bit
= double_bit
;
2180 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2182 /* Skip verify of long_double_bit, invalid_p == 0 */
2183 if (gdbarch_debug
>= 2)
2184 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2185 return gdbarch
->long_double_bit
;
2189 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2190 int long_double_bit
)
2192 gdbarch
->long_double_bit
= long_double_bit
;
2196 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2198 /* Skip verify of ptr_bit, invalid_p == 0 */
2199 if (gdbarch_debug
>= 2)
2200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2201 return gdbarch
->ptr_bit
;
2205 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2208 gdbarch
->ptr_bit
= ptr_bit
;
2212 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2214 if (gdbarch
->addr_bit
== 0)
2215 internal_error ("gdbarch: gdbarch_addr_bit invalid");
2216 if (gdbarch_debug
>= 2)
2217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2218 return gdbarch
->addr_bit
;
2222 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2225 gdbarch
->addr_bit
= addr_bit
;
2229 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2231 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2232 if (gdbarch_debug
>= 2)
2233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2234 return gdbarch
->bfd_vma_bit
;
2238 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2241 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2245 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2247 /* Skip verify of ieee_float, invalid_p == 0 */
2248 if (gdbarch_debug
>= 2)
2249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2250 return gdbarch
->ieee_float
;
2254 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2257 gdbarch
->ieee_float
= ieee_float
;
2261 gdbarch_read_pc (struct gdbarch
*gdbarch
, int pid
)
2263 if (gdbarch
->read_pc
== 0)
2264 internal_error ("gdbarch: gdbarch_read_pc invalid");
2265 if (gdbarch_debug
>= 2)
2266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2267 return gdbarch
->read_pc (pid
);
2271 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2272 gdbarch_read_pc_ftype read_pc
)
2274 gdbarch
->read_pc
= read_pc
;
2278 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, int pid
)
2280 if (gdbarch
->write_pc
== 0)
2281 internal_error ("gdbarch: gdbarch_write_pc invalid");
2282 if (gdbarch_debug
>= 2)
2283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2284 gdbarch
->write_pc (val
, pid
);
2288 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2289 gdbarch_write_pc_ftype write_pc
)
2291 gdbarch
->write_pc
= write_pc
;
2295 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2297 if (gdbarch
->read_fp
== 0)
2298 internal_error ("gdbarch: gdbarch_read_fp invalid");
2299 if (gdbarch_debug
>= 2)
2300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2301 return gdbarch
->read_fp ();
2305 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2306 gdbarch_read_fp_ftype read_fp
)
2308 gdbarch
->read_fp
= read_fp
;
2312 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2314 if (gdbarch
->write_fp
== 0)
2315 internal_error ("gdbarch: gdbarch_write_fp invalid");
2316 if (gdbarch_debug
>= 2)
2317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2318 gdbarch
->write_fp (val
);
2322 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2323 gdbarch_write_fp_ftype write_fp
)
2325 gdbarch
->write_fp
= write_fp
;
2329 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2331 if (gdbarch
->read_sp
== 0)
2332 internal_error ("gdbarch: gdbarch_read_sp invalid");
2333 if (gdbarch_debug
>= 2)
2334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2335 return gdbarch
->read_sp ();
2339 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2340 gdbarch_read_sp_ftype read_sp
)
2342 gdbarch
->read_sp
= read_sp
;
2346 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2348 if (gdbarch
->write_sp
== 0)
2349 internal_error ("gdbarch: gdbarch_write_sp invalid");
2350 if (gdbarch_debug
>= 2)
2351 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2352 gdbarch
->write_sp (val
);
2356 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2357 gdbarch_write_sp_ftype write_sp
)
2359 gdbarch
->write_sp
= write_sp
;
2363 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2365 if (gdbarch
->num_regs
== -1)
2366 internal_error ("gdbarch: gdbarch_num_regs invalid");
2367 if (gdbarch_debug
>= 2)
2368 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2369 return gdbarch
->num_regs
;
2373 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2376 gdbarch
->num_regs
= num_regs
;
2380 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2382 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2383 if (gdbarch_debug
>= 2)
2384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2385 return gdbarch
->num_pseudo_regs
;
2389 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2390 int num_pseudo_regs
)
2392 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2396 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2398 if (gdbarch
->sp_regnum
== -1)
2399 internal_error ("gdbarch: gdbarch_sp_regnum invalid");
2400 if (gdbarch_debug
>= 2)
2401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2402 return gdbarch
->sp_regnum
;
2406 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2409 gdbarch
->sp_regnum
= sp_regnum
;
2413 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2415 if (gdbarch
->fp_regnum
== -1)
2416 internal_error ("gdbarch: gdbarch_fp_regnum invalid");
2417 if (gdbarch_debug
>= 2)
2418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2419 return gdbarch
->fp_regnum
;
2423 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2426 gdbarch
->fp_regnum
= fp_regnum
;
2430 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2432 if (gdbarch
->pc_regnum
== -1)
2433 internal_error ("gdbarch: gdbarch_pc_regnum invalid");
2434 if (gdbarch_debug
>= 2)
2435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2436 return gdbarch
->pc_regnum
;
2440 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2443 gdbarch
->pc_regnum
= pc_regnum
;
2447 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2449 /* Skip verify of fp0_regnum, invalid_p == 0 */
2450 if (gdbarch_debug
>= 2)
2451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2452 return gdbarch
->fp0_regnum
;
2456 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2459 gdbarch
->fp0_regnum
= fp0_regnum
;
2463 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2465 /* Skip verify of npc_regnum, invalid_p == 0 */
2466 if (gdbarch_debug
>= 2)
2467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2468 return gdbarch
->npc_regnum
;
2472 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2475 gdbarch
->npc_regnum
= npc_regnum
;
2479 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2481 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2482 if (gdbarch_debug
>= 2)
2483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2484 return gdbarch
->nnpc_regnum
;
2488 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2491 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2495 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2497 if (gdbarch
->stab_reg_to_regnum
== 0)
2498 internal_error ("gdbarch: gdbarch_stab_reg_to_regnum invalid");
2499 if (gdbarch_debug
>= 2)
2500 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2501 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2505 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2506 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2508 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2512 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2514 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2515 internal_error ("gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2516 if (gdbarch_debug
>= 2)
2517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2518 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2522 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2523 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2525 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2529 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2531 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2532 internal_error ("gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2533 if (gdbarch_debug
>= 2)
2534 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2535 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2539 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2540 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2542 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2546 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2548 if (gdbarch
->sdb_reg_to_regnum
== 0)
2549 internal_error ("gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2550 if (gdbarch_debug
>= 2)
2551 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2552 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2556 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2557 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2559 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2563 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2565 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2566 internal_error ("gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2567 if (gdbarch_debug
>= 2)
2568 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2569 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2573 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2574 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2576 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2580 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2582 if (gdbarch
->register_name
== 0)
2583 internal_error ("gdbarch: gdbarch_register_name invalid");
2584 if (gdbarch_debug
>= 2)
2585 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2586 return gdbarch
->register_name (regnr
);
2590 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2591 gdbarch_register_name_ftype register_name
)
2593 gdbarch
->register_name
= register_name
;
2597 gdbarch_register_size (struct gdbarch
*gdbarch
)
2599 if (gdbarch
->register_size
== -1)
2600 internal_error ("gdbarch: gdbarch_register_size invalid");
2601 if (gdbarch_debug
>= 2)
2602 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2603 return gdbarch
->register_size
;
2607 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2610 gdbarch
->register_size
= register_size
;
2614 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2616 if (gdbarch
->register_bytes
== -1)
2617 internal_error ("gdbarch: gdbarch_register_bytes invalid");
2618 if (gdbarch_debug
>= 2)
2619 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2620 return gdbarch
->register_bytes
;
2624 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2627 gdbarch
->register_bytes
= register_bytes
;
2631 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2633 if (gdbarch
->register_byte
== 0)
2634 internal_error ("gdbarch: gdbarch_register_byte invalid");
2635 if (gdbarch_debug
>= 2)
2636 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2637 return gdbarch
->register_byte (reg_nr
);
2641 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2642 gdbarch_register_byte_ftype register_byte
)
2644 gdbarch
->register_byte
= register_byte
;
2648 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2650 if (gdbarch
->register_raw_size
== 0)
2651 internal_error ("gdbarch: gdbarch_register_raw_size invalid");
2652 if (gdbarch_debug
>= 2)
2653 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2654 return gdbarch
->register_raw_size (reg_nr
);
2658 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2659 gdbarch_register_raw_size_ftype register_raw_size
)
2661 gdbarch
->register_raw_size
= register_raw_size
;
2665 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2667 if (gdbarch
->max_register_raw_size
== -1)
2668 internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
2669 if (gdbarch_debug
>= 2)
2670 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2671 return gdbarch
->max_register_raw_size
;
2675 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2676 int max_register_raw_size
)
2678 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2682 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2684 if (gdbarch
->register_virtual_size
== 0)
2685 internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
2686 if (gdbarch_debug
>= 2)
2687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2688 return gdbarch
->register_virtual_size (reg_nr
);
2692 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2693 gdbarch_register_virtual_size_ftype register_virtual_size
)
2695 gdbarch
->register_virtual_size
= register_virtual_size
;
2699 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2701 if (gdbarch
->max_register_virtual_size
== -1)
2702 internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
2703 if (gdbarch_debug
>= 2)
2704 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2705 return gdbarch
->max_register_virtual_size
;
2709 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2710 int max_register_virtual_size
)
2712 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2716 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2718 if (gdbarch
->register_virtual_type
== 0)
2719 internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
2720 if (gdbarch_debug
>= 2)
2721 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2722 return gdbarch
->register_virtual_type (reg_nr
);
2726 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2727 gdbarch_register_virtual_type_ftype register_virtual_type
)
2729 gdbarch
->register_virtual_type
= register_virtual_type
;
2733 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2735 if (gdbarch
->do_registers_info
== 0)
2736 internal_error ("gdbarch: gdbarch_do_registers_info invalid");
2737 if (gdbarch_debug
>= 2)
2738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2739 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2743 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2744 gdbarch_do_registers_info_ftype do_registers_info
)
2746 gdbarch
->do_registers_info
= do_registers_info
;
2750 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2752 if (gdbarch
->register_sim_regno
== 0)
2753 internal_error ("gdbarch: gdbarch_register_sim_regno invalid");
2754 if (gdbarch_debug
>= 2)
2755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2756 return gdbarch
->register_sim_regno (reg_nr
);
2760 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2761 gdbarch_register_sim_regno_ftype register_sim_regno
)
2763 gdbarch
->register_sim_regno
= register_sim_regno
;
2767 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2769 if (gdbarch
->use_generic_dummy_frames
== -1)
2770 internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
2771 if (gdbarch_debug
>= 2)
2772 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2773 return gdbarch
->use_generic_dummy_frames
;
2777 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2778 int use_generic_dummy_frames
)
2780 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2784 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2786 if (gdbarch
->call_dummy_location
== 0)
2787 internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
2788 if (gdbarch_debug
>= 2)
2789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2790 return gdbarch
->call_dummy_location
;
2794 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2795 int call_dummy_location
)
2797 gdbarch
->call_dummy_location
= call_dummy_location
;
2801 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2803 if (gdbarch
->call_dummy_address
== 0)
2804 internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
2805 if (gdbarch_debug
>= 2)
2806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2807 return gdbarch
->call_dummy_address ();
2811 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2812 gdbarch_call_dummy_address_ftype call_dummy_address
)
2814 gdbarch
->call_dummy_address
= call_dummy_address
;
2818 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2820 if (gdbarch
->call_dummy_start_offset
== -1)
2821 internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
2822 if (gdbarch_debug
>= 2)
2823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2824 return gdbarch
->call_dummy_start_offset
;
2828 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
2829 CORE_ADDR call_dummy_start_offset
)
2831 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
2835 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
2837 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
2838 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2839 if (gdbarch_debug
>= 2)
2840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
2841 return gdbarch
->call_dummy_breakpoint_offset
;
2845 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
2846 CORE_ADDR call_dummy_breakpoint_offset
)
2848 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
2852 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
2854 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
2855 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
2856 if (gdbarch_debug
>= 2)
2857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
2858 return gdbarch
->call_dummy_breakpoint_offset_p
;
2862 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
2863 int call_dummy_breakpoint_offset_p
)
2865 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
2869 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
2871 if (gdbarch
->call_dummy_length
== -1)
2872 internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
2873 if (gdbarch_debug
>= 2)
2874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
2875 return gdbarch
->call_dummy_length
;
2879 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
2880 int call_dummy_length
)
2882 gdbarch
->call_dummy_length
= call_dummy_length
;
2886 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
2888 if (gdbarch
->pc_in_call_dummy
== 0)
2889 internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
2890 if (gdbarch_debug
>= 2)
2891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
2892 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
2896 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
2897 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
2899 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
2903 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
2905 if (gdbarch
->call_dummy_p
== -1)
2906 internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
2907 if (gdbarch_debug
>= 2)
2908 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
2909 return gdbarch
->call_dummy_p
;
2913 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
2916 gdbarch
->call_dummy_p
= call_dummy_p
;
2920 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
2922 /* Skip verify of call_dummy_words, invalid_p == 0 */
2923 if (gdbarch_debug
>= 2)
2924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
2925 return gdbarch
->call_dummy_words
;
2929 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
2930 LONGEST
* call_dummy_words
)
2932 gdbarch
->call_dummy_words
= call_dummy_words
;
2936 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
2938 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
2939 if (gdbarch_debug
>= 2)
2940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
2941 return gdbarch
->sizeof_call_dummy_words
;
2945 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
2946 int sizeof_call_dummy_words
)
2948 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
2952 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
2954 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
2955 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
2956 if (gdbarch_debug
>= 2)
2957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
2958 return gdbarch
->call_dummy_stack_adjust_p
;
2962 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
2963 int call_dummy_stack_adjust_p
)
2965 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
2969 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
2971 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
2972 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
2973 if (gdbarch_debug
>= 2)
2974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
2975 return gdbarch
->call_dummy_stack_adjust
;
2979 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
2980 int call_dummy_stack_adjust
)
2982 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
2986 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
)
2988 if (gdbarch
->fix_call_dummy
== 0)
2989 internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
2990 if (gdbarch_debug
>= 2)
2991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
2992 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
2996 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
2997 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
2999 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3003 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3005 if (gdbarch_debug
>= 2)
3006 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3007 return gdbarch
->believe_pcc_promotion
;
3011 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3012 int believe_pcc_promotion
)
3014 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3018 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3020 if (gdbarch_debug
>= 2)
3021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3022 return gdbarch
->believe_pcc_promotion_type
;
3026 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3027 int believe_pcc_promotion_type
)
3029 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3033 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3035 if (gdbarch
->coerce_float_to_double
== 0)
3036 internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
3037 if (gdbarch_debug
>= 2)
3038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3039 return gdbarch
->coerce_float_to_double (formal
, actual
);
3043 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3044 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3046 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3050 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
)
3052 if (gdbarch
->get_saved_register
== 0)
3053 internal_error ("gdbarch: gdbarch_get_saved_register invalid");
3054 if (gdbarch_debug
>= 2)
3055 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3056 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3060 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3061 gdbarch_get_saved_register_ftype get_saved_register
)
3063 gdbarch
->get_saved_register
= get_saved_register
;
3067 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3069 if (gdbarch
->register_convertible
== 0)
3070 internal_error ("gdbarch: gdbarch_register_convertible invalid");
3071 if (gdbarch_debug
>= 2)
3072 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3073 return gdbarch
->register_convertible (nr
);
3077 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3078 gdbarch_register_convertible_ftype register_convertible
)
3080 gdbarch
->register_convertible
= register_convertible
;
3084 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3086 if (gdbarch
->register_convert_to_virtual
== 0)
3087 internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
3088 if (gdbarch_debug
>= 2)
3089 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3090 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3094 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3095 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3097 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3101 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3103 if (gdbarch
->register_convert_to_raw
== 0)
3104 internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
3105 if (gdbarch_debug
>= 2)
3106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3107 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3111 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3112 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3114 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3118 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3120 if (gdbarch
->fetch_pseudo_register
== 0)
3121 internal_error ("gdbarch: gdbarch_fetch_pseudo_register invalid");
3122 if (gdbarch_debug
>= 2)
3123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3124 gdbarch
->fetch_pseudo_register (regnum
);
3128 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3129 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3131 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3135 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3137 if (gdbarch
->store_pseudo_register
== 0)
3138 internal_error ("gdbarch: gdbarch_store_pseudo_register invalid");
3139 if (gdbarch_debug
>= 2)
3140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3141 gdbarch
->store_pseudo_register (regnum
);
3145 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3146 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3148 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3152 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3154 if (gdbarch
->pointer_to_address
== 0)
3155 internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
3156 if (gdbarch_debug
>= 2)
3157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3158 return gdbarch
->pointer_to_address (type
, buf
);
3162 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3163 gdbarch_pointer_to_address_ftype pointer_to_address
)
3165 gdbarch
->pointer_to_address
= pointer_to_address
;
3169 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3171 if (gdbarch
->address_to_pointer
== 0)
3172 internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
3173 if (gdbarch_debug
>= 2)
3174 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3175 gdbarch
->address_to_pointer (type
, buf
, addr
);
3179 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3180 gdbarch_address_to_pointer_ftype address_to_pointer
)
3182 gdbarch
->address_to_pointer
= address_to_pointer
;
3186 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3188 if (gdbarch
->return_value_on_stack
== 0)
3189 internal_error ("gdbarch: gdbarch_return_value_on_stack invalid");
3190 if (gdbarch_debug
>= 2)
3191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3192 return gdbarch
->return_value_on_stack (type
);
3196 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3197 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3199 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3203 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3205 if (gdbarch
->extract_return_value
== 0)
3206 internal_error ("gdbarch: gdbarch_extract_return_value invalid");
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3209 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3213 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3214 gdbarch_extract_return_value_ftype extract_return_value
)
3216 gdbarch
->extract_return_value
= extract_return_value
;
3220 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3222 if (gdbarch
->push_arguments
== 0)
3223 internal_error ("gdbarch: gdbarch_push_arguments invalid");
3224 if (gdbarch_debug
>= 2)
3225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3226 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3230 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3231 gdbarch_push_arguments_ftype push_arguments
)
3233 gdbarch
->push_arguments
= push_arguments
;
3237 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3239 if (gdbarch
->push_dummy_frame
== 0)
3240 internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
3241 if (gdbarch_debug
>= 2)
3242 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3243 gdbarch
->push_dummy_frame ();
3247 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3248 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3250 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3254 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3256 if (gdbarch
->push_return_address
== 0)
3257 internal_error ("gdbarch: gdbarch_push_return_address invalid");
3258 if (gdbarch_debug
>= 2)
3259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3260 return gdbarch
->push_return_address (pc
, sp
);
3264 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3265 gdbarch_push_return_address_ftype push_return_address
)
3267 gdbarch
->push_return_address
= push_return_address
;
3271 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3273 if (gdbarch
->pop_frame
== 0)
3274 internal_error ("gdbarch: gdbarch_pop_frame invalid");
3275 if (gdbarch_debug
>= 2)
3276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3277 gdbarch
->pop_frame ();
3281 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3282 gdbarch_pop_frame_ftype pop_frame
)
3284 gdbarch
->pop_frame
= pop_frame
;
3288 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3290 if (gdbarch
->d10v_make_daddr
== 0)
3291 internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
3292 if (gdbarch_debug
>= 2)
3293 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3294 return gdbarch
->d10v_make_daddr (x
);
3298 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3299 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3301 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3305 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3307 if (gdbarch
->d10v_make_iaddr
== 0)
3308 internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
3309 if (gdbarch_debug
>= 2)
3310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3311 return gdbarch
->d10v_make_iaddr (x
);
3315 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3316 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3318 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3322 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3324 if (gdbarch
->d10v_daddr_p
== 0)
3325 internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
3326 if (gdbarch_debug
>= 2)
3327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3328 return gdbarch
->d10v_daddr_p (x
);
3332 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3333 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3335 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3339 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3341 if (gdbarch
->d10v_iaddr_p
== 0)
3342 internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
3343 if (gdbarch_debug
>= 2)
3344 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3345 return gdbarch
->d10v_iaddr_p (x
);
3349 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3350 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3352 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3356 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3358 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3359 internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3360 if (gdbarch_debug
>= 2)
3361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3362 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3366 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3367 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3369 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3373 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3375 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3376 internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3377 if (gdbarch_debug
>= 2)
3378 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3379 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3383 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3384 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3386 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3390 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3392 if (gdbarch
->store_struct_return
== 0)
3393 internal_error ("gdbarch: gdbarch_store_struct_return invalid");
3394 if (gdbarch_debug
>= 2)
3395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3396 gdbarch
->store_struct_return (addr
, sp
);
3400 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3401 gdbarch_store_struct_return_ftype store_struct_return
)
3403 gdbarch
->store_struct_return
= store_struct_return
;
3407 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3409 if (gdbarch
->store_return_value
== 0)
3410 internal_error ("gdbarch: gdbarch_store_return_value invalid");
3411 if (gdbarch_debug
>= 2)
3412 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3413 gdbarch
->store_return_value (type
, valbuf
);
3417 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3418 gdbarch_store_return_value_ftype store_return_value
)
3420 gdbarch
->store_return_value
= store_return_value
;
3424 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3426 if (gdbarch
->extract_struct_value_address
== 0)
3427 internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
3428 if (gdbarch_debug
>= 2)
3429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3430 return gdbarch
->extract_struct_value_address (regbuf
);
3434 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3435 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3437 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3441 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3443 if (gdbarch
->use_struct_convention
== 0)
3444 internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
3445 if (gdbarch_debug
>= 2)
3446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3447 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3451 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3452 gdbarch_use_struct_convention_ftype use_struct_convention
)
3454 gdbarch
->use_struct_convention
= use_struct_convention
;
3458 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3460 if (gdbarch
->frame_init_saved_regs
== 0)
3461 internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
3462 if (gdbarch_debug
>= 2)
3463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3464 gdbarch
->frame_init_saved_regs (frame
);
3468 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3469 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3471 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3475 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3477 if (gdbarch
->init_extra_frame_info
== 0)
3478 internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
3479 if (gdbarch_debug
>= 2)
3480 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3481 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3485 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3486 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3488 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3492 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3494 if (gdbarch
->skip_prologue
== 0)
3495 internal_error ("gdbarch: gdbarch_skip_prologue invalid");
3496 if (gdbarch_debug
>= 2)
3497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3498 return gdbarch
->skip_prologue (ip
);
3502 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3503 gdbarch_skip_prologue_ftype skip_prologue
)
3505 gdbarch
->skip_prologue
= skip_prologue
;
3509 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3511 if (gdbarch
->prologue_frameless_p
== 0)
3512 internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
3513 if (gdbarch_debug
>= 2)
3514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3515 return gdbarch
->prologue_frameless_p (ip
);
3519 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3520 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3522 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3526 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3528 if (gdbarch
->inner_than
== 0)
3529 internal_error ("gdbarch: gdbarch_inner_than invalid");
3530 if (gdbarch_debug
>= 2)
3531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3532 return gdbarch
->inner_than (lhs
, rhs
);
3536 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3537 gdbarch_inner_than_ftype inner_than
)
3539 gdbarch
->inner_than
= inner_than
;
3543 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3545 if (gdbarch
->breakpoint_from_pc
== 0)
3546 internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
3547 if (gdbarch_debug
>= 2)
3548 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3549 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3553 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3554 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3556 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3560 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3562 if (gdbarch
->memory_insert_breakpoint
== 0)
3563 internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
3564 if (gdbarch_debug
>= 2)
3565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3566 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3570 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3571 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3573 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3577 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3579 if (gdbarch
->memory_remove_breakpoint
== 0)
3580 internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
3581 if (gdbarch_debug
>= 2)
3582 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3583 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3587 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3588 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3590 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3594 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3596 if (gdbarch
->decr_pc_after_break
== -1)
3597 internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
3598 if (gdbarch_debug
>= 2)
3599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3600 return gdbarch
->decr_pc_after_break
;
3604 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3605 CORE_ADDR decr_pc_after_break
)
3607 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3611 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3613 if (gdbarch
->function_start_offset
== -1)
3614 internal_error ("gdbarch: gdbarch_function_start_offset invalid");
3615 if (gdbarch_debug
>= 2)
3616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3617 return gdbarch
->function_start_offset
;
3621 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3622 CORE_ADDR function_start_offset
)
3624 gdbarch
->function_start_offset
= function_start_offset
;
3628 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3630 if (gdbarch
->remote_translate_xfer_address
== 0)
3631 internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
3632 if (gdbarch_debug
>= 2)
3633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3634 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3638 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3639 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3641 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3645 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3647 if (gdbarch
->frame_args_skip
== -1)
3648 internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
3649 if (gdbarch_debug
>= 2)
3650 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3651 return gdbarch
->frame_args_skip
;
3655 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3656 CORE_ADDR frame_args_skip
)
3658 gdbarch
->frame_args_skip
= frame_args_skip
;
3662 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3664 if (gdbarch
->frameless_function_invocation
== 0)
3665 internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
3666 if (gdbarch_debug
>= 2)
3667 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3668 return gdbarch
->frameless_function_invocation (fi
);
3672 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3673 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3675 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3679 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3681 if (gdbarch
->frame_chain
== 0)
3682 internal_error ("gdbarch: gdbarch_frame_chain invalid");
3683 if (gdbarch_debug
>= 2)
3684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3685 return gdbarch
->frame_chain (frame
);
3689 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3690 gdbarch_frame_chain_ftype frame_chain
)
3692 gdbarch
->frame_chain
= frame_chain
;
3696 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3698 if (gdbarch
->frame_chain_valid
== 0)
3699 internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
3700 if (gdbarch_debug
>= 2)
3701 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3702 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3706 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3707 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3709 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3713 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3715 if (gdbarch
->frame_saved_pc
== 0)
3716 internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
3717 if (gdbarch_debug
>= 2)
3718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3719 return gdbarch
->frame_saved_pc (fi
);
3723 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3724 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3726 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3730 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3732 if (gdbarch
->frame_args_address
== 0)
3733 internal_error ("gdbarch: gdbarch_frame_args_address invalid");
3734 if (gdbarch_debug
>= 2)
3735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3736 return gdbarch
->frame_args_address (fi
);
3740 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3741 gdbarch_frame_args_address_ftype frame_args_address
)
3743 gdbarch
->frame_args_address
= frame_args_address
;
3747 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3749 if (gdbarch
->frame_locals_address
== 0)
3750 internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
3751 if (gdbarch_debug
>= 2)
3752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3753 return gdbarch
->frame_locals_address (fi
);
3757 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3758 gdbarch_frame_locals_address_ftype frame_locals_address
)
3760 gdbarch
->frame_locals_address
= frame_locals_address
;
3764 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3766 if (gdbarch
->saved_pc_after_call
== 0)
3767 internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
3768 if (gdbarch_debug
>= 2)
3769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3770 return gdbarch
->saved_pc_after_call (frame
);
3774 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3775 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3777 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3781 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3783 if (gdbarch
->frame_num_args
== 0)
3784 internal_error ("gdbarch: gdbarch_frame_num_args invalid");
3785 if (gdbarch_debug
>= 2)
3786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3787 return gdbarch
->frame_num_args (frame
);
3791 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3792 gdbarch_frame_num_args_ftype frame_num_args
)
3794 gdbarch
->frame_num_args
= frame_num_args
;
3798 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
3800 return gdbarch
->stack_align
!= 0;
3804 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3806 if (gdbarch
->stack_align
== 0)
3807 internal_error ("gdbarch: gdbarch_stack_align invalid");
3808 if (gdbarch_debug
>= 2)
3809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
3810 return gdbarch
->stack_align (sp
);
3814 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
3815 gdbarch_stack_align_ftype stack_align
)
3817 gdbarch
->stack_align
= stack_align
;
3821 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
3823 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
3824 if (gdbarch_debug
>= 2)
3825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
3826 return gdbarch
->extra_stack_alignment_needed
;
3830 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
3831 int extra_stack_alignment_needed
)
3833 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
3837 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
3839 return gdbarch
->reg_struct_has_addr
!= 0;
3843 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
3845 if (gdbarch
->reg_struct_has_addr
== 0)
3846 internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
3847 if (gdbarch_debug
>= 2)
3848 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
3849 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
3853 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
3854 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
3856 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
3860 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
3862 return gdbarch
->save_dummy_frame_tos
!= 0;
3866 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3868 if (gdbarch
->save_dummy_frame_tos
== 0)
3869 internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid");
3870 if (gdbarch_debug
>= 2)
3871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
3872 gdbarch
->save_dummy_frame_tos (sp
);
3876 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
3877 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
3879 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
3882 const struct floatformat
*
3883 gdbarch_float_format (struct gdbarch
*gdbarch
)
3885 if (gdbarch_debug
>= 2)
3886 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
3887 return gdbarch
->float_format
;
3891 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
3892 const struct floatformat
* float_format
)
3894 gdbarch
->float_format
= float_format
;
3897 const struct floatformat
*
3898 gdbarch_double_format (struct gdbarch
*gdbarch
)
3900 if (gdbarch_debug
>= 2)
3901 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
3902 return gdbarch
->double_format
;
3906 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
3907 const struct floatformat
* double_format
)
3909 gdbarch
->double_format
= double_format
;
3912 const struct floatformat
*
3913 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
3915 if (gdbarch_debug
>= 2)
3916 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
3917 return gdbarch
->long_double_format
;
3921 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
3922 const struct floatformat
* long_double_format
)
3924 gdbarch
->long_double_format
= long_double_format
;
3928 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3930 if (gdbarch
->convert_from_func_ptr_addr
== 0)
3931 internal_error ("gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
3932 if (gdbarch_debug
>= 2)
3933 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
3934 return gdbarch
->convert_from_func_ptr_addr (addr
);
3938 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
3939 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
3941 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
3945 /* Keep a registry of per-architecture data-pointers required by GDB
3953 struct gdbarch_data_registration
3955 gdbarch_data_ftype
*init
;
3956 struct gdbarch_data
*data
;
3957 struct gdbarch_data_registration
*next
;
3960 struct gdbarch_data_registry
3963 struct gdbarch_data_registration
*registrations
;
3966 struct gdbarch_data_registry gdbarch_data_registry
=
3971 struct gdbarch_data
*
3972 register_gdbarch_data (gdbarch_data_ftype
*init
)
3974 struct gdbarch_data_registration
**curr
;
3975 for (curr
= &gdbarch_data_registry
.registrations
;
3977 curr
= &(*curr
)->next
);
3978 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
3979 (*curr
)->next
= NULL
;
3980 (*curr
)->init
= init
;
3981 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
3982 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
3983 return (*curr
)->data
;
3987 /* Walk through all the registered users initializing each in turn. */
3990 init_gdbarch_data (struct gdbarch
*gdbarch
)
3992 struct gdbarch_data_registration
*rego
;
3993 gdbarch
->nr_data
= gdbarch_data_registry
.nr
+ 1;
3994 gdbarch
->data
= xmalloc (sizeof (void*) * gdbarch
->nr_data
);
3995 for (rego
= gdbarch_data_registry
.registrations
;
3999 if (rego
->data
->index
< gdbarch
->nr_data
)
4000 gdbarch
->data
[rego
->data
->index
] = rego
->init ();
4005 /* Return the current value of the specified per-architecture
4009 gdbarch_data (struct gdbarch_data
*data
)
4011 if (data
->index
>= current_gdbarch
->nr_data
)
4012 internal_error ("gdbarch_data: request for non-existant data.");
4013 return current_gdbarch
->data
[data
->index
];
4018 /* Keep a registry of swapped data required by GDB modules. */
4023 struct gdbarch_swap_registration
*source
;
4024 struct gdbarch_swap
*next
;
4027 struct gdbarch_swap_registration
4030 unsigned long sizeof_data
;
4031 gdbarch_swap_ftype
*init
;
4032 struct gdbarch_swap_registration
*next
;
4035 struct gdbarch_swap_registry
4038 struct gdbarch_swap_registration
*registrations
;
4041 struct gdbarch_swap_registry gdbarch_swap_registry
=
4047 register_gdbarch_swap (void *data
,
4048 unsigned long sizeof_data
,
4049 gdbarch_swap_ftype
*init
)
4051 struct gdbarch_swap_registration
**rego
;
4052 for (rego
= &gdbarch_swap_registry
.registrations
;
4054 rego
= &(*rego
)->next
);
4055 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4056 (*rego
)->next
= NULL
;
4057 (*rego
)->init
= init
;
4058 (*rego
)->data
= data
;
4059 (*rego
)->sizeof_data
= sizeof_data
;
4064 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4066 struct gdbarch_swap_registration
*rego
;
4067 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4068 for (rego
= gdbarch_swap_registry
.registrations
;
4072 if (rego
->data
!= NULL
)
4074 (*curr
) = XMALLOC (struct gdbarch_swap
);
4075 (*curr
)->source
= rego
;
4076 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4077 (*curr
)->next
= NULL
;
4078 memset (rego
->data
, 0, rego
->sizeof_data
);
4079 curr
= &(*curr
)->next
;
4081 if (rego
->init
!= NULL
)
4087 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4089 struct gdbarch_swap
*curr
;
4090 for (curr
= gdbarch
->swap
;
4093 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4097 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4099 struct gdbarch_swap
*curr
;
4100 for (curr
= gdbarch
->swap
;
4103 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4107 /* Keep a registry of the architectures known by GDB. */
4109 struct gdbarch_registration
4111 enum bfd_architecture bfd_architecture
;
4112 gdbarch_init_ftype
*init
;
4113 gdbarch_dump_tdep_ftype
*dump_tdep
;
4114 struct gdbarch_list
*arches
;
4115 struct gdbarch_registration
*next
;
4118 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4121 append_name (const char ***buf
, int *nr
, const char *name
)
4123 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4129 gdbarch_printable_names (void)
4133 /* Accumulate a list of names based on the registed list of
4135 enum bfd_architecture a
;
4137 const char **arches
= NULL
;
4138 struct gdbarch_registration
*rego
;
4139 for (rego
= gdbarch_registry
;
4143 const struct bfd_arch_info
*ap
;
4144 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4146 internal_error ("gdbarch_architecture_names: multi-arch unknown");
4149 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4154 append_name (&arches
, &nr_arches
, NULL
);
4158 /* Just return all the architectures that BFD knows. Assume that
4159 the legacy architecture framework supports them. */
4160 return bfd_arch_list ();
4165 gdbarch_register (enum bfd_architecture bfd_architecture
,
4166 gdbarch_init_ftype
*init
,
4167 gdbarch_dump_tdep_ftype
*dump_tdep
)
4169 struct gdbarch_registration
**curr
;
4170 const struct bfd_arch_info
*bfd_arch_info
;
4171 /* Check that BFD recognizes this architecture */
4172 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4173 if (bfd_arch_info
== NULL
)
4175 internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture
);
4177 /* Check that we haven't seen this architecture before */
4178 for (curr
= &gdbarch_registry
;
4180 curr
= &(*curr
)->next
)
4182 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4183 internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
4184 bfd_arch_info
->printable_name
);
4188 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4189 bfd_arch_info
->printable_name
,
4192 (*curr
) = XMALLOC (struct gdbarch_registration
);
4193 (*curr
)->bfd_architecture
= bfd_architecture
;
4194 (*curr
)->init
= init
;
4195 (*curr
)->dump_tdep
= dump_tdep
;
4196 (*curr
)->arches
= NULL
;
4197 (*curr
)->next
= NULL
;
4198 /* When non- multi-arch, install whatever target dump routine we've
4199 been provided - hopefully that routine has been written correctly
4200 and works regardless of multi-arch. */
4201 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4202 && startup_gdbarch
.dump_tdep
== NULL
)
4203 startup_gdbarch
.dump_tdep
= dump_tdep
;
4207 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4208 gdbarch_init_ftype
*init
)
4210 gdbarch_register (bfd_architecture
, init
, NULL
);
4214 /* Look for an architecture using gdbarch_info. Base search on only
4215 BFD_ARCH_INFO and BYTE_ORDER. */
4217 struct gdbarch_list
*
4218 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4219 const struct gdbarch_info
*info
)
4221 for (; arches
!= NULL
; arches
= arches
->next
)
4223 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4225 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4233 /* Update the current architecture. Return ZERO if the update request
4237 gdbarch_update_p (struct gdbarch_info info
)
4239 struct gdbarch
*new_gdbarch
;
4240 struct gdbarch_list
**list
;
4241 struct gdbarch_registration
*rego
;
4243 /* Fill in any missing bits. Most important is the bfd_architecture
4244 which is used to select the target architecture. */
4245 if (info
.bfd_architecture
== bfd_arch_unknown
)
4247 if (info
.bfd_arch_info
!= NULL
)
4248 info
.bfd_architecture
= info
.bfd_arch_info
->arch
;
4249 else if (info
.abfd
!= NULL
)
4250 info
.bfd_architecture
= bfd_get_arch (info
.abfd
);
4251 /* FIXME - should query BFD for its default architecture. */
4253 info
.bfd_architecture
= current_gdbarch
->bfd_arch_info
->arch
;
4255 if (info
.bfd_arch_info
== NULL
)
4257 if (target_architecture_auto
&& info
.abfd
!= NULL
)
4258 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4260 info
.bfd_arch_info
= current_gdbarch
->bfd_arch_info
;
4262 if (info
.byte_order
== 0)
4264 if (target_byte_order_auto
&& info
.abfd
!= NULL
)
4265 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4266 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4269 info
.byte_order
= current_gdbarch
->byte_order
;
4270 /* FIXME - should query BFD for its default byte-order. */
4272 /* A default for abfd? */
4274 /* Find the target that knows about this architecture. */
4275 for (rego
= gdbarch_registry
;
4278 if (rego
->bfd_architecture
== info
.bfd_architecture
)
4283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4289 fprintf_unfiltered (gdb_stdlog
,
4290 "gdbarch_update: info.bfd_architecture %d (%s)\n",
4291 info
.bfd_architecture
,
4292 bfd_lookup_arch (info
.bfd_architecture
, 0)->printable_name
);
4293 fprintf_unfiltered (gdb_stdlog
,
4294 "gdbarch_update: info.bfd_arch_info %s\n",
4295 (info
.bfd_arch_info
!= NULL
4296 ? info
.bfd_arch_info
->printable_name
4298 fprintf_unfiltered (gdb_stdlog
,
4299 "gdbarch_update: info.byte_order %d (%s)\n",
4301 (info
.byte_order
== BIG_ENDIAN
? "big"
4302 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4304 fprintf_unfiltered (gdb_stdlog
,
4305 "gdbarch_update: info.abfd 0x%lx\n",
4307 fprintf_unfiltered (gdb_stdlog
,
4308 "gdbarch_update: info.tdep_info 0x%lx\n",
4309 (long) info
.tdep_info
);
4312 /* Ask the target for a replacement architecture. */
4313 new_gdbarch
= rego
->init (info
, rego
->arches
);
4315 /* Did the target like it? No. Reject the change. */
4316 if (new_gdbarch
== NULL
)
4319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4323 /* Did the architecture change? No. Do nothing. */
4324 if (current_gdbarch
== new_gdbarch
)
4327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4329 new_gdbarch
->bfd_arch_info
->printable_name
);
4333 /* Swap all data belonging to the old target out */
4334 swapout_gdbarch_swap (current_gdbarch
);
4336 /* Is this a pre-existing architecture? Yes. Swap it in. */
4337 for (list
= ®o
->arches
;
4339 list
= &(*list
)->next
)
4341 if ((*list
)->gdbarch
== new_gdbarch
)
4344 fprintf_unfiltered (gdb_stdlog
,
4345 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4347 new_gdbarch
->bfd_arch_info
->printable_name
);
4348 current_gdbarch
= new_gdbarch
;
4349 swapin_gdbarch_swap (new_gdbarch
);
4354 /* Append this new architecture to this targets list. */
4355 (*list
) = XMALLOC (struct gdbarch_list
);
4356 (*list
)->next
= NULL
;
4357 (*list
)->gdbarch
= new_gdbarch
;
4359 /* Switch to this new architecture. Dump it out. */
4360 current_gdbarch
= new_gdbarch
;
4363 fprintf_unfiltered (gdb_stdlog
,
4364 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4366 new_gdbarch
->bfd_arch_info
->printable_name
);
4369 /* Check that the newly installed architecture is valid. Plug in
4370 any post init values. */
4371 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4372 verify_gdbarch (new_gdbarch
);
4374 /* Initialize the per-architecture memory (swap) areas.
4375 CURRENT_GDBARCH must be update before these modules are
4377 init_gdbarch_swap (new_gdbarch
);
4379 /* Initialize the per-architecture data-pointer of all parties that
4380 registered an interest in this architecture. CURRENT_GDBARCH
4381 must be updated before these modules are called. */
4382 init_gdbarch_data (new_gdbarch
);
4385 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4393 /* Pointer to the target-dependent disassembly function. */
4394 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4395 disassemble_info tm_print_insn_info
;
4398 extern void _initialize_gdbarch (void);
4401 _initialize_gdbarch (void)
4403 struct cmd_list_element
*c
;
4405 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4406 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4407 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4408 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4409 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4411 add_show_from_set (add_set_cmd ("arch",
4414 (char *)&gdbarch_debug
,
4415 "Set architecture debugging.\n\
4416 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4418 c
= add_set_cmd ("archdebug",
4421 (char *)&gdbarch_debug
,
4422 "Set architecture debugging.\n\
4423 When non-zero, architecture debugging is enabled.", &setlist
);
4425 deprecate_cmd (c
, "set debug arch");
4426 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");