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 bourn 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 makeing 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 to 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).
141 gdbarch_read_pc_ftype *read_pc;
142 gdbarch_write_pc_ftype *write_pc;
143 gdbarch_read_fp_ftype *read_fp;
144 gdbarch_write_fp_ftype *write_fp;
145 gdbarch_read_sp_ftype *read_sp;
146 gdbarch_write_sp_ftype *write_sp;
155 gdbarch_register_name_ftype *register_name;
158 gdbarch_register_byte_ftype *register_byte;
159 gdbarch_register_raw_size_ftype *register_raw_size;
160 int max_register_raw_size;
161 gdbarch_register_virtual_size_ftype *register_virtual_size;
162 int max_register_virtual_size;
163 gdbarch_register_virtual_type_ftype *register_virtual_type;
164 gdbarch_do_registers_info_ftype *do_registers_info;
165 int use_generic_dummy_frames;
166 int call_dummy_location;
167 gdbarch_call_dummy_address_ftype *call_dummy_address;
168 CORE_ADDR call_dummy_start_offset;
169 CORE_ADDR call_dummy_breakpoint_offset;
170 int call_dummy_breakpoint_offset_p;
171 int call_dummy_length;
172 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
174 LONGEST * call_dummy_words;
175 int sizeof_call_dummy_words;
176 int call_dummy_stack_adjust_p;
177 int call_dummy_stack_adjust;
178 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
179 int believe_pcc_promotion;
180 int believe_pcc_promotion_type;
181 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
182 gdbarch_get_saved_register_ftype *get_saved_register;
183 gdbarch_register_convertible_ftype *register_convertible;
184 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
185 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
186 gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
187 gdbarch_store_pseudo_register_ftype *store_pseudo_register;
188 gdbarch_pointer_to_address_ftype *pointer_to_address;
189 gdbarch_address_to_pointer_ftype *address_to_pointer;
190 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
191 gdbarch_extract_return_value_ftype *extract_return_value;
192 gdbarch_push_arguments_ftype *push_arguments;
193 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
194 gdbarch_push_return_address_ftype *push_return_address;
195 gdbarch_pop_frame_ftype *pop_frame;
196 gdbarch_d10v_make_daddr_ftype *d10v_make_daddr;
197 gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr;
198 gdbarch_d10v_daddr_p_ftype *d10v_daddr_p;
199 gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p;
200 gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw;
201 gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw;
202 gdbarch_store_struct_return_ftype *store_struct_return;
203 gdbarch_store_return_value_ftype *store_return_value;
204 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
205 gdbarch_use_struct_convention_ftype *use_struct_convention;
206 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
207 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
208 gdbarch_skip_prologue_ftype *skip_prologue;
209 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
210 gdbarch_inner_than_ftype *inner_than;
211 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
212 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
213 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
214 CORE_ADDR decr_pc_after_break;
215 CORE_ADDR function_start_offset;
216 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
217 CORE_ADDR frame_args_skip;
218 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
219 gdbarch_frame_chain_ftype *frame_chain;
220 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
221 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
222 gdbarch_frame_args_address_ftype *frame_args_address;
223 gdbarch_frame_locals_address_ftype *frame_locals_address;
224 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
225 gdbarch_frame_num_args_ftype *frame_num_args;
226 gdbarch_stack_align_ftype *stack_align;
227 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
228 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
229 const struct floatformat * float_format;
230 const struct floatformat * double_format;
231 const struct floatformat * long_double_format;
235 /* The default architecture uses host values (for want of a better
238 extern const struct bfd_arch_info bfd_default_arch_struct;
240 struct gdbarch startup_gdbarch =
242 /* basic architecture information */
243 &bfd_default_arch_struct,
245 /* target specific vector and its dump routine */
247 /*per-architecture data-pointers and swap regions */
249 /* Multi-arch values */
255 8 * sizeof (LONGEST),
258 8 * sizeof (long double),
301 generic_get_saved_register,
351 /* startup_gdbarch() */
354 struct gdbarch *current_gdbarch = &startup_gdbarch;
357 /* Create a new ``struct gdbarch'' based in information provided by
358 ``struct gdbarch_info''. */
361 gdbarch_alloc (const struct gdbarch_info *info,
362 struct gdbarch_tdep *tdep)
364 struct gdbarch *gdbarch = XMALLOC (struct gdbarch);
365 memset (gdbarch, 0, sizeof (*gdbarch));
367 gdbarch->tdep = tdep;
369 gdbarch->bfd_arch_info = info->bfd_arch_info;
370 gdbarch->byte_order = info->byte_order;
372 /* Force the explicit initialization of these. */
373 gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
374 gdbarch->num_regs = -1;
375 gdbarch->sp_regnum = -1;
376 gdbarch->fp_regnum = -1;
377 gdbarch->pc_regnum = -1;
378 gdbarch->fp0_regnum = -1;
379 gdbarch->npc_regnum = -1;
380 gdbarch->nnpc_regnum = -1;
381 gdbarch->register_name = legacy_register_name;
382 gdbarch->register_size = -1;
383 gdbarch->register_bytes = -1;
384 gdbarch->max_register_raw_size = -1;
385 gdbarch->max_register_virtual_size = -1;
386 gdbarch->do_registers_info = do_registers_info;
387 gdbarch->use_generic_dummy_frames = -1;
388 gdbarch->call_dummy_start_offset = -1;
389 gdbarch->call_dummy_breakpoint_offset = -1;
390 gdbarch->call_dummy_breakpoint_offset_p = -1;
391 gdbarch->call_dummy_length = -1;
392 gdbarch->call_dummy_p = -1;
393 gdbarch->call_dummy_words = legacy_call_dummy_words;
394 gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
395 gdbarch->call_dummy_stack_adjust_p = -1;
396 gdbarch->coerce_float_to_double = default_coerce_float_to_double;
397 gdbarch->register_convertible = generic_register_convertible_not;
398 gdbarch->pointer_to_address = unsigned_pointer_to_address;
399 gdbarch->address_to_pointer = unsigned_address_to_pointer;
400 gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
401 gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
402 gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
403 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
404 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
405 gdbarch->decr_pc_after_break = -1;
406 gdbarch->function_start_offset = -1;
407 gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
408 gdbarch->frame_args_skip = -1;
409 gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
410 /* gdbarch_alloc() */
416 /* Free a gdbarch struct. This should never happen in normal
417 operation --- once you've created a gdbarch, you keep it around.
418 However, if an architecture's init function encounters an error
419 building the structure, it may need to clean up a partially
420 constructed gdbarch. */
423 gdbarch_free (struct gdbarch *arch)
425 /* At the moment, this is trivial. */
430 /* Ensure that all values in a GDBARCH are reasonable. */
433 verify_gdbarch (struct gdbarch *gdbarch)
435 /* Only perform sanity checks on a multi-arch target. */
439 if (gdbarch->byte_order == 0)
440 internal_error ("verify_gdbarch: byte-order unset");
441 if (gdbarch->bfd_arch_info == NULL)
442 internal_error ("verify_gdbarch: bfd_arch_info unset");
443 /* Check those that need to be defined for the given multi-arch level. */
444 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
445 if ((GDB_MULTI_ARCH >= 1)
446 && (gdbarch->ptr_bit == 0))
447 internal_error ("gdbarch: verify_gdbarch: ptr_bit invalid");
448 if ((GDB_MULTI_ARCH >= 1)
449 && (gdbarch->short_bit == 0))
450 internal_error ("gdbarch: verify_gdbarch: short_bit invalid");
451 if ((GDB_MULTI_ARCH >= 1)
452 && (gdbarch->int_bit == 0))
453 internal_error ("gdbarch: verify_gdbarch: int_bit invalid");
454 if ((GDB_MULTI_ARCH >= 1)
455 && (gdbarch->long_bit == 0))
456 internal_error ("gdbarch: verify_gdbarch: long_bit invalid");
457 if ((GDB_MULTI_ARCH >= 1)
458 && (gdbarch->long_long_bit == 0))
459 internal_error ("gdbarch: verify_gdbarch: long_long_bit invalid");
460 if ((GDB_MULTI_ARCH >= 1)
461 && (gdbarch->float_bit == 0))
462 internal_error ("gdbarch: verify_gdbarch: float_bit invalid");
463 if ((GDB_MULTI_ARCH >= 1)
464 && (gdbarch->double_bit == 0))
465 internal_error ("gdbarch: verify_gdbarch: double_bit invalid");
466 if ((GDB_MULTI_ARCH >= 1)
467 && (gdbarch->long_double_bit == 0))
468 internal_error ("gdbarch: verify_gdbarch: long_double_bit invalid");
469 /* Skip verify of ieee_float, invalid_p == 0 */
470 if ((GDB_MULTI_ARCH >= 1)
471 && (gdbarch->read_pc == 0))
472 internal_error ("gdbarch: verify_gdbarch: read_pc invalid");
473 if ((GDB_MULTI_ARCH >= 1)
474 && (gdbarch->write_pc == 0))
475 internal_error ("gdbarch: verify_gdbarch: write_pc invalid");
476 if ((GDB_MULTI_ARCH >= 1)
477 && (gdbarch->read_fp == 0))
478 internal_error ("gdbarch: verify_gdbarch: read_fp invalid");
479 if ((GDB_MULTI_ARCH >= 1)
480 && (gdbarch->write_fp == 0))
481 internal_error ("gdbarch: verify_gdbarch: write_fp invalid");
482 if ((GDB_MULTI_ARCH >= 1)
483 && (gdbarch->read_sp == 0))
484 internal_error ("gdbarch: verify_gdbarch: read_sp invalid");
485 if ((GDB_MULTI_ARCH >= 1)
486 && (gdbarch->write_sp == 0))
487 internal_error ("gdbarch: verify_gdbarch: write_sp invalid");
488 if ((GDB_MULTI_ARCH >= 2)
489 && (gdbarch->num_regs == -1))
490 internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
491 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
492 if ((GDB_MULTI_ARCH >= 2)
493 && (gdbarch->sp_regnum == -1))
494 internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
495 if ((GDB_MULTI_ARCH >= 2)
496 && (gdbarch->fp_regnum == -1))
497 internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
498 if ((GDB_MULTI_ARCH >= 2)
499 && (gdbarch->pc_regnum == -1))
500 internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
501 /* Skip verify of fp0_regnum, invalid_p == 0 */
502 /* Skip verify of npc_regnum, invalid_p == 0 */
503 /* Skip verify of nnpc_regnum, invalid_p == 0 */
504 /* Skip verify of register_name, invalid_p == 0 */
505 if ((GDB_MULTI_ARCH >= 2)
506 && (gdbarch->register_size == -1))
507 internal_error ("gdbarch: verify_gdbarch: register_size invalid");
508 if ((GDB_MULTI_ARCH >= 2)
509 && (gdbarch->register_bytes == -1))
510 internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
511 if ((GDB_MULTI_ARCH >= 2)
512 && (gdbarch->register_byte == 0))
513 internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
514 if ((GDB_MULTI_ARCH >= 2)
515 && (gdbarch->register_raw_size == 0))
516 internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
517 if ((GDB_MULTI_ARCH >= 2)
518 && (gdbarch->max_register_raw_size == -1))
519 internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
520 if ((GDB_MULTI_ARCH >= 2)
521 && (gdbarch->register_virtual_size == 0))
522 internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
523 if ((GDB_MULTI_ARCH >= 2)
524 && (gdbarch->max_register_virtual_size == -1))
525 internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
526 if ((GDB_MULTI_ARCH >= 2)
527 && (gdbarch->register_virtual_type == 0))
528 internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
529 /* Skip verify of do_registers_info, invalid_p == 0 */
530 if ((GDB_MULTI_ARCH >= 1)
531 && (gdbarch->use_generic_dummy_frames == -1))
532 internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
533 if ((GDB_MULTI_ARCH >= 2)
534 && (gdbarch->call_dummy_location == 0))
535 internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
536 if ((GDB_MULTI_ARCH >= 2)
537 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
538 internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
539 if ((GDB_MULTI_ARCH >= 2)
540 && (gdbarch->call_dummy_start_offset == -1))
541 internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
542 if ((GDB_MULTI_ARCH >= 2)
543 && (gdbarch->call_dummy_breakpoint_offset == -1))
544 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
545 if ((GDB_MULTI_ARCH >= 1)
546 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
547 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
548 if ((GDB_MULTI_ARCH >= 2)
549 && (gdbarch->call_dummy_length == -1))
550 internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
551 if ((GDB_MULTI_ARCH >= 2)
552 && (gdbarch->pc_in_call_dummy == 0))
553 internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
554 if ((GDB_MULTI_ARCH >= 1)
555 && (gdbarch->call_dummy_p == -1))
556 internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
557 /* Skip verify of call_dummy_words, invalid_p == 0 */
558 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
559 if ((GDB_MULTI_ARCH >= 1)
560 && (gdbarch->call_dummy_stack_adjust_p == -1))
561 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
562 if ((GDB_MULTI_ARCH >= 2)
563 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
564 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
565 if ((GDB_MULTI_ARCH >= 2)
566 && (gdbarch->fix_call_dummy == 0))
567 internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
568 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
569 if ((GDB_MULTI_ARCH >= 1)
570 && (gdbarch->get_saved_register == 0))
571 internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
572 /* Skip verify of register_convertible, invalid_p == 0 */
573 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
574 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
575 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
576 /* Skip verify of store_pseudo_register, invalid_p == 0 */
577 /* Skip verify of pointer_to_address, invalid_p == 0 */
578 /* Skip verify of address_to_pointer, invalid_p == 0 */
579 /* Skip verify of return_value_on_stack, invalid_p == 0 */
580 if ((GDB_MULTI_ARCH >= 2)
581 && (gdbarch->extract_return_value == 0))
582 internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
583 if ((GDB_MULTI_ARCH >= 1)
584 && (gdbarch->push_arguments == 0))
585 internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
586 if ((GDB_MULTI_ARCH >= 2)
587 && (gdbarch->push_dummy_frame == 0))
588 internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
589 if ((GDB_MULTI_ARCH >= 1)
590 && (gdbarch->push_return_address == 0))
591 internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
592 if ((GDB_MULTI_ARCH >= 2)
593 && (gdbarch->pop_frame == 0))
594 internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
595 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
596 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
597 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
598 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
599 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
600 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
601 if ((GDB_MULTI_ARCH >= 2)
602 && (gdbarch->store_struct_return == 0))
603 internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
604 if ((GDB_MULTI_ARCH >= 2)
605 && (gdbarch->store_return_value == 0))
606 internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
607 if ((GDB_MULTI_ARCH >= 2)
608 && (gdbarch->extract_struct_value_address == 0))
609 internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
610 if ((GDB_MULTI_ARCH >= 2)
611 && (gdbarch->use_struct_convention == 0))
612 internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
613 if ((GDB_MULTI_ARCH >= 2)
614 && (gdbarch->frame_init_saved_regs == 0))
615 internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
616 if ((GDB_MULTI_ARCH >= 2)
617 && (gdbarch->init_extra_frame_info == 0))
618 internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
619 if ((GDB_MULTI_ARCH >= 2)
620 && (gdbarch->skip_prologue == 0))
621 internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
622 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
623 if ((GDB_MULTI_ARCH >= 2)
624 && (gdbarch->inner_than == 0))
625 internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
626 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
627 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
628 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
629 if ((GDB_MULTI_ARCH >= 2)
630 && (gdbarch->decr_pc_after_break == -1))
631 internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
632 if ((GDB_MULTI_ARCH >= 2)
633 && (gdbarch->function_start_offset == -1))
634 internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
635 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
636 if ((GDB_MULTI_ARCH >= 2)
637 && (gdbarch->frame_args_skip == -1))
638 internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
639 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
640 if ((GDB_MULTI_ARCH >= 2)
641 && (gdbarch->frame_chain == 0))
642 internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
643 if ((GDB_MULTI_ARCH >= 1)
644 && (gdbarch->frame_chain_valid == 0))
645 internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
646 if ((GDB_MULTI_ARCH >= 2)
647 && (gdbarch->frame_saved_pc == 0))
648 internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
649 if ((GDB_MULTI_ARCH >= 2)
650 && (gdbarch->frame_args_address == 0))
651 internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
652 if ((GDB_MULTI_ARCH >= 2)
653 && (gdbarch->frame_locals_address == 0))
654 internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
655 if ((GDB_MULTI_ARCH >= 2)
656 && (gdbarch->saved_pc_after_call == 0))
657 internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
658 if ((GDB_MULTI_ARCH >= 2)
659 && (gdbarch->frame_num_args == 0))
660 internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
661 /* Skip verify of stack_align, has predicate */
662 /* Skip verify of reg_struct_has_addr, has predicate */
663 /* Skip verify of save_dummy_frame_tos, has predicate */
664 if (gdbarch->float_format == 0)
665 gdbarch->float_format = default_float_format (gdbarch);
666 if (gdbarch->double_format == 0)
667 gdbarch->double_format = default_double_format (gdbarch);
668 if (gdbarch->long_double_format == 0)
669 gdbarch->long_double_format = &floatformat_unknown;
673 /* Print out the details of the current architecture. */
675 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
676 just happens to match the global variable ``current_gdbarch''. That
677 way macros refering to that variable get the local and not the global
678 version - ulgh. Once everything is parameterised with gdbarch, this
682 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
684 fprintf_unfiltered (file,
685 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
687 #ifdef TARGET_ARCHITECTURE
688 fprintf_unfiltered (file,
689 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
690 XSTRING (TARGET_ARCHITECTURE));
692 #ifdef TARGET_BYTE_ORDER
693 fprintf_unfiltered (file,
694 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
695 XSTRING (TARGET_BYTE_ORDER));
697 #ifdef TARGET_BFD_VMA_BIT
698 fprintf_unfiltered (file,
699 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
700 XSTRING (TARGET_BFD_VMA_BIT));
702 #ifdef TARGET_PTR_BIT
703 fprintf_unfiltered (file,
704 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
705 XSTRING (TARGET_PTR_BIT));
707 #ifdef TARGET_SHORT_BIT
708 fprintf_unfiltered (file,
709 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
710 XSTRING (TARGET_SHORT_BIT));
712 #ifdef TARGET_INT_BIT
713 fprintf_unfiltered (file,
714 "gdbarch_dump: TARGET_INT_BIT # %s\n",
715 XSTRING (TARGET_INT_BIT));
717 #ifdef TARGET_LONG_BIT
718 fprintf_unfiltered (file,
719 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
720 XSTRING (TARGET_LONG_BIT));
722 #ifdef TARGET_LONG_LONG_BIT
723 fprintf_unfiltered (file,
724 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
725 XSTRING (TARGET_LONG_LONG_BIT));
727 #ifdef TARGET_FLOAT_BIT
728 fprintf_unfiltered (file,
729 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
730 XSTRING (TARGET_FLOAT_BIT));
732 #ifdef TARGET_DOUBLE_BIT
733 fprintf_unfiltered (file,
734 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
735 XSTRING (TARGET_DOUBLE_BIT));
737 #ifdef TARGET_LONG_DOUBLE_BIT
738 fprintf_unfiltered (file,
739 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
740 XSTRING (TARGET_LONG_DOUBLE_BIT));
743 fprintf_unfiltered (file,
744 "gdbarch_dump: IEEE_FLOAT # %s\n",
745 XSTRING (IEEE_FLOAT));
747 #ifdef TARGET_READ_PC
748 fprintf_unfiltered (file,
749 "gdbarch_dump: %s # %s\n",
750 "TARGET_READ_PC(pid)",
751 XSTRING (TARGET_READ_PC (pid)));
753 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
754 /* Macro might contain `[{}]' when not multi-arch */
755 fprintf_unfiltered (file,
756 "gdbarch_dump: %s # %s\n",
757 "TARGET_WRITE_PC(val, pid)",
758 XSTRING (TARGET_WRITE_PC (val, pid)));
760 #ifdef TARGET_READ_FP
761 fprintf_unfiltered (file,
762 "gdbarch_dump: %s # %s\n",
764 XSTRING (TARGET_READ_FP ()));
766 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
767 /* Macro might contain `[{}]' when not multi-arch */
768 fprintf_unfiltered (file,
769 "gdbarch_dump: %s # %s\n",
770 "TARGET_WRITE_FP(val)",
771 XSTRING (TARGET_WRITE_FP (val)));
773 #ifdef TARGET_READ_SP
774 fprintf_unfiltered (file,
775 "gdbarch_dump: %s # %s\n",
777 XSTRING (TARGET_READ_SP ()));
779 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
780 /* Macro might contain `[{}]' when not multi-arch */
781 fprintf_unfiltered (file,
782 "gdbarch_dump: %s # %s\n",
783 "TARGET_WRITE_SP(val)",
784 XSTRING (TARGET_WRITE_SP (val)));
787 fprintf_unfiltered (file,
788 "gdbarch_dump: NUM_REGS # %s\n",
791 #ifdef NUM_PSEUDO_REGS
792 fprintf_unfiltered (file,
793 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
794 XSTRING (NUM_PSEUDO_REGS));
797 fprintf_unfiltered (file,
798 "gdbarch_dump: SP_REGNUM # %s\n",
799 XSTRING (SP_REGNUM));
802 fprintf_unfiltered (file,
803 "gdbarch_dump: FP_REGNUM # %s\n",
804 XSTRING (FP_REGNUM));
807 fprintf_unfiltered (file,
808 "gdbarch_dump: PC_REGNUM # %s\n",
809 XSTRING (PC_REGNUM));
812 fprintf_unfiltered (file,
813 "gdbarch_dump: FP0_REGNUM # %s\n",
814 XSTRING (FP0_REGNUM));
817 fprintf_unfiltered (file,
818 "gdbarch_dump: NPC_REGNUM # %s\n",
819 XSTRING (NPC_REGNUM));
822 fprintf_unfiltered (file,
823 "gdbarch_dump: NNPC_REGNUM # %s\n",
824 XSTRING (NNPC_REGNUM));
827 fprintf_unfiltered (file,
828 "gdbarch_dump: %s # %s\n",
829 "REGISTER_NAME(regnr)",
830 XSTRING (REGISTER_NAME (regnr)));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: REGISTER_SIZE # %s\n",
835 XSTRING (REGISTER_SIZE));
837 #ifdef REGISTER_BYTES
838 fprintf_unfiltered (file,
839 "gdbarch_dump: REGISTER_BYTES # %s\n",
840 XSTRING (REGISTER_BYTES));
843 fprintf_unfiltered (file,
844 "gdbarch_dump: %s # %s\n",
845 "REGISTER_BYTE(reg_nr)",
846 XSTRING (REGISTER_BYTE (reg_nr)));
848 #ifdef REGISTER_RAW_SIZE
849 fprintf_unfiltered (file,
850 "gdbarch_dump: %s # %s\n",
851 "REGISTER_RAW_SIZE(reg_nr)",
852 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
854 #ifdef MAX_REGISTER_RAW_SIZE
855 fprintf_unfiltered (file,
856 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
857 XSTRING (MAX_REGISTER_RAW_SIZE));
859 #ifdef REGISTER_VIRTUAL_SIZE
860 fprintf_unfiltered (file,
861 "gdbarch_dump: %s # %s\n",
862 "REGISTER_VIRTUAL_SIZE(reg_nr)",
863 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
865 #ifdef MAX_REGISTER_VIRTUAL_SIZE
866 fprintf_unfiltered (file,
867 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
868 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
870 #ifdef REGISTER_VIRTUAL_TYPE
871 fprintf_unfiltered (file,
872 "gdbarch_dump: %s # %s\n",
873 "REGISTER_VIRTUAL_TYPE(reg_nr)",
874 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
876 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
877 /* Macro might contain `[{}]' when not multi-arch */
878 fprintf_unfiltered (file,
879 "gdbarch_dump: %s # %s\n",
880 "DO_REGISTERS_INFO(reg_nr, fpregs)",
881 XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
883 #ifdef USE_GENERIC_DUMMY_FRAMES
884 fprintf_unfiltered (file,
885 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
886 XSTRING (USE_GENERIC_DUMMY_FRAMES));
888 #ifdef CALL_DUMMY_LOCATION
889 fprintf_unfiltered (file,
890 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
891 XSTRING (CALL_DUMMY_LOCATION));
893 #ifdef CALL_DUMMY_ADDRESS
894 fprintf_unfiltered (file,
895 "gdbarch_dump: %s # %s\n",
896 "CALL_DUMMY_ADDRESS()",
897 XSTRING (CALL_DUMMY_ADDRESS ()));
899 #ifdef CALL_DUMMY_START_OFFSET
900 fprintf_unfiltered (file,
901 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
902 XSTRING (CALL_DUMMY_START_OFFSET));
904 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
905 fprintf_unfiltered (file,
906 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
907 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
909 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
910 fprintf_unfiltered (file,
911 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
912 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
914 #ifdef CALL_DUMMY_LENGTH
915 fprintf_unfiltered (file,
916 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
917 XSTRING (CALL_DUMMY_LENGTH));
919 #ifdef PC_IN_CALL_DUMMY
920 fprintf_unfiltered (file,
921 "gdbarch_dump: %s # %s\n",
922 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
923 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: CALL_DUMMY_P # %s\n",
928 XSTRING (CALL_DUMMY_P));
930 #ifdef CALL_DUMMY_WORDS
931 fprintf_unfiltered (file,
932 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
933 XSTRING (CALL_DUMMY_WORDS));
935 #ifdef SIZEOF_CALL_DUMMY_WORDS
936 fprintf_unfiltered (file,
937 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
938 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
940 #ifdef CALL_DUMMY_STACK_ADJUST_P
941 fprintf_unfiltered (file,
942 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
943 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
945 #ifdef CALL_DUMMY_STACK_ADJUST
946 fprintf_unfiltered (file,
947 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
948 XSTRING (CALL_DUMMY_STACK_ADJUST));
950 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
951 /* Macro might contain `[{}]' when not multi-arch */
952 fprintf_unfiltered (file,
953 "gdbarch_dump: %s # %s\n",
954 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
955 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
957 #ifdef BELIEVE_PCC_PROMOTION
958 fprintf_unfiltered (file,
959 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
960 XSTRING (BELIEVE_PCC_PROMOTION));
962 #ifdef BELIEVE_PCC_PROMOTION_TYPE
963 fprintf_unfiltered (file,
964 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
965 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
967 #ifdef COERCE_FLOAT_TO_DOUBLE
968 fprintf_unfiltered (file,
969 "gdbarch_dump: %s # %s\n",
970 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
971 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
973 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
974 /* Macro might contain `[{}]' when not multi-arch */
975 fprintf_unfiltered (file,
976 "gdbarch_dump: %s # %s\n",
977 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
978 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
980 #ifdef REGISTER_CONVERTIBLE
981 fprintf_unfiltered (file,
982 "gdbarch_dump: %s # %s\n",
983 "REGISTER_CONVERTIBLE(nr)",
984 XSTRING (REGISTER_CONVERTIBLE (nr)));
986 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
987 /* Macro might contain `[{}]' when not multi-arch */
988 fprintf_unfiltered (file,
989 "gdbarch_dump: %s # %s\n",
990 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
991 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
993 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
994 /* Macro might contain `[{}]' when not multi-arch */
995 fprintf_unfiltered (file,
996 "gdbarch_dump: %s # %s\n",
997 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
998 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1000 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1001 /* Macro might contain `[{}]' when not multi-arch */
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: %s # %s\n",
1004 "FETCH_PSEUDO_REGISTER(regnum)",
1005 XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
1007 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1008 /* Macro might contain `[{}]' when not multi-arch */
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: %s # %s\n",
1011 "STORE_PSEUDO_REGISTER(regnum)",
1012 XSTRING (STORE_PSEUDO_REGISTER (regnum)));
1014 #ifdef POINTER_TO_ADDRESS
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: %s # %s\n",
1017 "POINTER_TO_ADDRESS(type, buf)",
1018 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1020 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1021 /* Macro might contain `[{}]' when not multi-arch */
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: %s # %s\n",
1024 "ADDRESS_TO_POINTER(type, buf, addr)",
1025 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
1027 #ifdef RETURN_VALUE_ON_STACK
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: %s # %s\n",
1030 "RETURN_VALUE_ON_STACK(type)",
1031 XSTRING (RETURN_VALUE_ON_STACK (type)));
1033 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1034 /* Macro might contain `[{}]' when not multi-arch */
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: %s # %s\n",
1037 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1038 XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1040 #ifdef PUSH_ARGUMENTS
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: %s # %s\n",
1043 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1044 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1046 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1047 /* Macro might contain `[{}]' when not multi-arch */
1048 fprintf_unfiltered (file,
1049 "gdbarch_dump: %s # %s\n",
1050 "PUSH_DUMMY_FRAME(-)",
1051 XSTRING (PUSH_DUMMY_FRAME (-)));
1053 #ifdef PUSH_RETURN_ADDRESS
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: %s # %s\n",
1056 "PUSH_RETURN_ADDRESS(pc, sp)",
1057 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1059 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1060 /* Macro might contain `[{}]' when not multi-arch */
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: %s # %s\n",
1064 XSTRING (POP_FRAME (-)));
1066 #ifdef D10V_MAKE_DADDR
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: %s # %s\n",
1069 "D10V_MAKE_DADDR(x)",
1070 XSTRING (D10V_MAKE_DADDR (x)));
1072 #ifdef D10V_MAKE_IADDR
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: %s # %s\n",
1075 "D10V_MAKE_IADDR(x)",
1076 XSTRING (D10V_MAKE_IADDR (x)));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: %s # %s\n",
1082 XSTRING (D10V_DADDR_P (x)));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: %s # %s\n",
1088 XSTRING (D10V_IADDR_P (x)));
1090 #ifdef D10V_CONVERT_DADDR_TO_RAW
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: %s # %s\n",
1093 "D10V_CONVERT_DADDR_TO_RAW(x)",
1094 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x)));
1096 #ifdef D10V_CONVERT_IADDR_TO_RAW
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: %s # %s\n",
1099 "D10V_CONVERT_IADDR_TO_RAW(x)",
1100 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x)));
1102 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1103 /* Macro might contain `[{}]' when not multi-arch */
1104 fprintf_unfiltered (file,
1105 "gdbarch_dump: %s # %s\n",
1106 "STORE_STRUCT_RETURN(addr, sp)",
1107 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
1109 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1110 /* Macro might contain `[{}]' when not multi-arch */
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: %s # %s\n",
1113 "STORE_RETURN_VALUE(type, valbuf)",
1114 XSTRING (STORE_RETURN_VALUE (type, valbuf)));
1116 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: %s # %s\n",
1119 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1120 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1122 #ifdef USE_STRUCT_CONVENTION
1123 fprintf_unfiltered (file,
1124 "gdbarch_dump: %s # %s\n",
1125 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1126 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
1128 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1129 /* Macro might contain `[{}]' when not multi-arch */
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: %s # %s\n",
1132 "FRAME_INIT_SAVED_REGS(frame)",
1133 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1135 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1136 /* Macro might contain `[{}]' when not multi-arch */
1137 fprintf_unfiltered (file,
1138 "gdbarch_dump: %s # %s\n",
1139 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1140 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1142 #ifdef SKIP_PROLOGUE
1143 fprintf_unfiltered (file,
1144 "gdbarch_dump: %s # %s\n",
1145 "SKIP_PROLOGUE(ip)",
1146 XSTRING (SKIP_PROLOGUE (ip)));
1148 #ifdef PROLOGUE_FRAMELESS_P
1149 fprintf_unfiltered (file,
1150 "gdbarch_dump: %s # %s\n",
1151 "PROLOGUE_FRAMELESS_P(ip)",
1152 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: %s # %s\n",
1157 "INNER_THAN(lhs, rhs)",
1158 XSTRING (INNER_THAN (lhs, rhs)));
1160 #ifdef BREAKPOINT_FROM_PC
1161 fprintf_unfiltered (file,
1162 "gdbarch_dump: %s # %s\n",
1163 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1164 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
1166 #ifdef MEMORY_INSERT_BREAKPOINT
1167 fprintf_unfiltered (file,
1168 "gdbarch_dump: %s # %s\n",
1169 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1170 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1172 #ifdef MEMORY_REMOVE_BREAKPOINT
1173 fprintf_unfiltered (file,
1174 "gdbarch_dump: %s # %s\n",
1175 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1176 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1178 #ifdef DECR_PC_AFTER_BREAK
1179 fprintf_unfiltered (file,
1180 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1181 XSTRING (DECR_PC_AFTER_BREAK));
1183 #ifdef FUNCTION_START_OFFSET
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1186 XSTRING (FUNCTION_START_OFFSET));
1188 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1189 /* Macro might contain `[{}]' when not multi-arch */
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: %s # %s\n",
1192 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1193 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1195 #ifdef FRAME_ARGS_SKIP
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1198 XSTRING (FRAME_ARGS_SKIP));
1200 #ifdef FRAMELESS_FUNCTION_INVOCATION
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: %s # %s\n",
1203 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1204 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1207 fprintf_unfiltered (file,
1208 "gdbarch_dump: %s # %s\n",
1209 "FRAME_CHAIN(frame)",
1210 XSTRING (FRAME_CHAIN (frame)));
1212 #ifdef FRAME_CHAIN_VALID
1213 fprintf_unfiltered (file,
1214 "gdbarch_dump: %s # %s\n",
1215 "FRAME_CHAIN_VALID(chain, thisframe)",
1216 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1218 #ifdef FRAME_SAVED_PC
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: %s # %s\n",
1221 "FRAME_SAVED_PC(fi)",
1222 XSTRING (FRAME_SAVED_PC (fi)));
1224 #ifdef FRAME_ARGS_ADDRESS
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: %s # %s\n",
1227 "FRAME_ARGS_ADDRESS(fi)",
1228 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1230 #ifdef FRAME_LOCALS_ADDRESS
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: %s # %s\n",
1233 "FRAME_LOCALS_ADDRESS(fi)",
1234 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1236 #ifdef SAVED_PC_AFTER_CALL
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: %s # %s\n",
1239 "SAVED_PC_AFTER_CALL(frame)",
1240 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1242 #ifdef FRAME_NUM_ARGS
1243 fprintf_unfiltered (file,
1244 "gdbarch_dump: %s # %s\n",
1245 "FRAME_NUM_ARGS(frame)",
1246 XSTRING (FRAME_NUM_ARGS (frame)));
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: %s # %s\n",
1252 XSTRING (STACK_ALIGN (sp)));
1254 #ifdef REG_STRUCT_HAS_ADDR
1255 fprintf_unfiltered (file,
1256 "gdbarch_dump: %s # %s\n",
1257 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1258 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1260 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1261 /* Macro might contain `[{}]' when not multi-arch */
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: %s # %s\n",
1264 "SAVE_DUMMY_FRAME_TOS(sp)",
1265 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1267 #ifdef TARGET_FLOAT_FORMAT
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1270 XSTRING (TARGET_FLOAT_FORMAT));
1272 #ifdef TARGET_DOUBLE_FORMAT
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1275 XSTRING (TARGET_DOUBLE_FORMAT));
1277 #ifdef TARGET_LONG_DOUBLE_FORMAT
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1280 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1282 #ifdef TARGET_ARCHITECTURE
1283 if (TARGET_ARCHITECTURE != NULL)
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1286 TARGET_ARCHITECTURE->printable_name);
1288 #ifdef TARGET_BYTE_ORDER
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1291 (long) TARGET_BYTE_ORDER);
1293 #ifdef TARGET_BFD_VMA_BIT
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1296 (long) TARGET_BFD_VMA_BIT);
1298 #ifdef TARGET_PTR_BIT
1299 fprintf_unfiltered (file,
1300 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1301 (long) TARGET_PTR_BIT);
1303 #ifdef TARGET_SHORT_BIT
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1306 (long) TARGET_SHORT_BIT);
1308 #ifdef TARGET_INT_BIT
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1311 (long) TARGET_INT_BIT);
1313 #ifdef TARGET_LONG_BIT
1314 fprintf_unfiltered (file,
1315 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1316 (long) TARGET_LONG_BIT);
1318 #ifdef TARGET_LONG_LONG_BIT
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1321 (long) TARGET_LONG_LONG_BIT);
1323 #ifdef TARGET_FLOAT_BIT
1324 fprintf_unfiltered (file,
1325 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1326 (long) TARGET_FLOAT_BIT);
1328 #ifdef TARGET_DOUBLE_BIT
1329 fprintf_unfiltered (file,
1330 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1331 (long) TARGET_DOUBLE_BIT);
1333 #ifdef TARGET_LONG_DOUBLE_BIT
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1336 (long) TARGET_LONG_DOUBLE_BIT);
1339 fprintf_unfiltered (file,
1340 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1343 #ifdef TARGET_READ_PC
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1347 (long) current_gdbarch->read_pc
1348 /*TARGET_READ_PC ()*/);
1350 #ifdef TARGET_WRITE_PC
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1354 (long) current_gdbarch->write_pc
1355 /*TARGET_WRITE_PC ()*/);
1357 #ifdef TARGET_READ_FP
1359 fprintf_unfiltered (file,
1360 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1361 (long) current_gdbarch->read_fp
1362 /*TARGET_READ_FP ()*/);
1364 #ifdef TARGET_WRITE_FP
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1368 (long) current_gdbarch->write_fp
1369 /*TARGET_WRITE_FP ()*/);
1371 #ifdef TARGET_READ_SP
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1375 (long) current_gdbarch->read_sp
1376 /*TARGET_READ_SP ()*/);
1378 #ifdef TARGET_WRITE_SP
1380 fprintf_unfiltered (file,
1381 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1382 (long) current_gdbarch->write_sp
1383 /*TARGET_WRITE_SP ()*/);
1386 fprintf_unfiltered (file,
1387 "gdbarch_dump: NUM_REGS = %ld\n",
1390 #ifdef NUM_PSEUDO_REGS
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1393 (long) NUM_PSEUDO_REGS);
1396 fprintf_unfiltered (file,
1397 "gdbarch_dump: SP_REGNUM = %ld\n",
1401 fprintf_unfiltered (file,
1402 "gdbarch_dump: FP_REGNUM = %ld\n",
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: PC_REGNUM = %ld\n",
1411 fprintf_unfiltered (file,
1412 "gdbarch_dump: FP0_REGNUM = %ld\n",
1416 fprintf_unfiltered (file,
1417 "gdbarch_dump: NPC_REGNUM = %ld\n",
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1423 (long) NNPC_REGNUM);
1425 #ifdef REGISTER_NAME
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1429 (long) current_gdbarch->register_name
1430 /*REGISTER_NAME ()*/);
1432 #ifdef REGISTER_SIZE
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1435 (long) REGISTER_SIZE);
1437 #ifdef REGISTER_BYTES
1438 fprintf_unfiltered (file,
1439 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1440 (long) REGISTER_BYTES);
1442 #ifdef REGISTER_BYTE
1444 fprintf_unfiltered (file,
1445 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1446 (long) current_gdbarch->register_byte
1447 /*REGISTER_BYTE ()*/);
1449 #ifdef REGISTER_RAW_SIZE
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1453 (long) current_gdbarch->register_raw_size
1454 /*REGISTER_RAW_SIZE ()*/);
1456 #ifdef MAX_REGISTER_RAW_SIZE
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1459 (long) MAX_REGISTER_RAW_SIZE);
1461 #ifdef REGISTER_VIRTUAL_SIZE
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1465 (long) current_gdbarch->register_virtual_size
1466 /*REGISTER_VIRTUAL_SIZE ()*/);
1468 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1469 fprintf_unfiltered (file,
1470 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1471 (long) MAX_REGISTER_VIRTUAL_SIZE);
1473 #ifdef REGISTER_VIRTUAL_TYPE
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1477 (long) current_gdbarch->register_virtual_type
1478 /*REGISTER_VIRTUAL_TYPE ()*/);
1480 #ifdef DO_REGISTERS_INFO
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1484 (long) current_gdbarch->do_registers_info
1485 /*DO_REGISTERS_INFO ()*/);
1487 #ifdef USE_GENERIC_DUMMY_FRAMES
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1490 (long) USE_GENERIC_DUMMY_FRAMES);
1492 #ifdef CALL_DUMMY_LOCATION
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1495 (long) CALL_DUMMY_LOCATION);
1497 #ifdef CALL_DUMMY_ADDRESS
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1501 (long) current_gdbarch->call_dummy_address
1502 /*CALL_DUMMY_ADDRESS ()*/);
1504 #ifdef CALL_DUMMY_START_OFFSET
1505 fprintf_unfiltered (file,
1506 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1507 (long) CALL_DUMMY_START_OFFSET);
1509 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1510 fprintf_unfiltered (file,
1511 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1512 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
1514 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1517 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
1519 #ifdef CALL_DUMMY_LENGTH
1520 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
1521 fprintf_unfiltered (file,
1522 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1523 (long) CALL_DUMMY_LENGTH);
1525 #ifdef PC_IN_CALL_DUMMY
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1529 (long) current_gdbarch->pc_in_call_dummy
1530 /*PC_IN_CALL_DUMMY ()*/);
1533 fprintf_unfiltered (file,
1534 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1535 (long) CALL_DUMMY_P);
1537 #ifdef CALL_DUMMY_WORDS
1538 fprintf_unfiltered (file,
1539 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1540 (long) CALL_DUMMY_WORDS);
1542 #ifdef SIZEOF_CALL_DUMMY_WORDS
1543 fprintf_unfiltered (file,
1544 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1545 (long) SIZEOF_CALL_DUMMY_WORDS);
1547 #ifdef CALL_DUMMY_STACK_ADJUST_P
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1550 (long) CALL_DUMMY_STACK_ADJUST_P);
1552 #ifdef CALL_DUMMY_STACK_ADJUST
1553 if (CALL_DUMMY_STACK_ADJUST_P)
1554 fprintf_unfiltered (file,
1555 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1556 (long) CALL_DUMMY_STACK_ADJUST);
1558 #ifdef FIX_CALL_DUMMY
1560 fprintf_unfiltered (file,
1561 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1562 (long) current_gdbarch->fix_call_dummy
1563 /*FIX_CALL_DUMMY ()*/);
1565 #ifdef BELIEVE_PCC_PROMOTION
1566 fprintf_unfiltered (file,
1567 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1568 (long) BELIEVE_PCC_PROMOTION);
1570 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1571 fprintf_unfiltered (file,
1572 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1573 (long) BELIEVE_PCC_PROMOTION_TYPE);
1575 #ifdef COERCE_FLOAT_TO_DOUBLE
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1579 (long) current_gdbarch->coerce_float_to_double
1580 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1582 #ifdef GET_SAVED_REGISTER
1584 fprintf_unfiltered (file,
1585 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1586 (long) current_gdbarch->get_saved_register
1587 /*GET_SAVED_REGISTER ()*/);
1589 #ifdef REGISTER_CONVERTIBLE
1591 fprintf_unfiltered (file,
1592 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1593 (long) current_gdbarch->register_convertible
1594 /*REGISTER_CONVERTIBLE ()*/);
1596 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1598 fprintf_unfiltered (file,
1599 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1600 (long) current_gdbarch->register_convert_to_virtual
1601 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1603 #ifdef REGISTER_CONVERT_TO_RAW
1605 fprintf_unfiltered (file,
1606 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1607 (long) current_gdbarch->register_convert_to_raw
1608 /*REGISTER_CONVERT_TO_RAW ()*/);
1610 #ifdef FETCH_PSEUDO_REGISTER
1612 fprintf_unfiltered (file,
1613 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1614 (long) current_gdbarch->fetch_pseudo_register
1615 /*FETCH_PSEUDO_REGISTER ()*/);
1617 #ifdef STORE_PSEUDO_REGISTER
1619 fprintf_unfiltered (file,
1620 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1621 (long) current_gdbarch->store_pseudo_register
1622 /*STORE_PSEUDO_REGISTER ()*/);
1624 #ifdef POINTER_TO_ADDRESS
1626 fprintf_unfiltered (file,
1627 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1628 (long) current_gdbarch->pointer_to_address
1629 /*POINTER_TO_ADDRESS ()*/);
1631 #ifdef ADDRESS_TO_POINTER
1633 fprintf_unfiltered (file,
1634 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1635 (long) current_gdbarch->address_to_pointer
1636 /*ADDRESS_TO_POINTER ()*/);
1638 #ifdef RETURN_VALUE_ON_STACK
1640 fprintf_unfiltered (file,
1641 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1642 (long) current_gdbarch->return_value_on_stack
1643 /*RETURN_VALUE_ON_STACK ()*/);
1645 #ifdef EXTRACT_RETURN_VALUE
1647 fprintf_unfiltered (file,
1648 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1649 (long) current_gdbarch->extract_return_value
1650 /*EXTRACT_RETURN_VALUE ()*/);
1652 #ifdef PUSH_ARGUMENTS
1654 fprintf_unfiltered (file,
1655 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1656 (long) current_gdbarch->push_arguments
1657 /*PUSH_ARGUMENTS ()*/);
1659 #ifdef PUSH_DUMMY_FRAME
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1663 (long) current_gdbarch->push_dummy_frame
1664 /*PUSH_DUMMY_FRAME ()*/);
1666 #ifdef PUSH_RETURN_ADDRESS
1668 fprintf_unfiltered (file,
1669 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1670 (long) current_gdbarch->push_return_address
1671 /*PUSH_RETURN_ADDRESS ()*/);
1675 fprintf_unfiltered (file,
1676 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1677 (long) current_gdbarch->pop_frame
1680 #ifdef D10V_MAKE_DADDR
1682 fprintf_unfiltered (file,
1683 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1684 (long) current_gdbarch->d10v_make_daddr
1685 /*D10V_MAKE_DADDR ()*/);
1687 #ifdef D10V_MAKE_IADDR
1689 fprintf_unfiltered (file,
1690 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1691 (long) current_gdbarch->d10v_make_iaddr
1692 /*D10V_MAKE_IADDR ()*/);
1696 fprintf_unfiltered (file,
1697 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1698 (long) current_gdbarch->d10v_daddr_p
1699 /*D10V_DADDR_P ()*/);
1703 fprintf_unfiltered (file,
1704 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1705 (long) current_gdbarch->d10v_iaddr_p
1706 /*D10V_IADDR_P ()*/);
1708 #ifdef D10V_CONVERT_DADDR_TO_RAW
1710 fprintf_unfiltered (file,
1711 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1712 (long) current_gdbarch->d10v_convert_daddr_to_raw
1713 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1715 #ifdef D10V_CONVERT_IADDR_TO_RAW
1717 fprintf_unfiltered (file,
1718 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1719 (long) current_gdbarch->d10v_convert_iaddr_to_raw
1720 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1722 #ifdef STORE_STRUCT_RETURN
1724 fprintf_unfiltered (file,
1725 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1726 (long) current_gdbarch->store_struct_return
1727 /*STORE_STRUCT_RETURN ()*/);
1729 #ifdef STORE_RETURN_VALUE
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1733 (long) current_gdbarch->store_return_value
1734 /*STORE_RETURN_VALUE ()*/);
1736 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1738 fprintf_unfiltered (file,
1739 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1740 (long) current_gdbarch->extract_struct_value_address
1741 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1743 #ifdef USE_STRUCT_CONVENTION
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1747 (long) current_gdbarch->use_struct_convention
1748 /*USE_STRUCT_CONVENTION ()*/);
1750 #ifdef FRAME_INIT_SAVED_REGS
1752 fprintf_unfiltered (file,
1753 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1754 (long) current_gdbarch->frame_init_saved_regs
1755 /*FRAME_INIT_SAVED_REGS ()*/);
1757 #ifdef INIT_EXTRA_FRAME_INFO
1759 fprintf_unfiltered (file,
1760 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1761 (long) current_gdbarch->init_extra_frame_info
1762 /*INIT_EXTRA_FRAME_INFO ()*/);
1764 #ifdef SKIP_PROLOGUE
1766 fprintf_unfiltered (file,
1767 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1768 (long) current_gdbarch->skip_prologue
1769 /*SKIP_PROLOGUE ()*/);
1771 #ifdef PROLOGUE_FRAMELESS_P
1773 fprintf_unfiltered (file,
1774 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1775 (long) current_gdbarch->prologue_frameless_p
1776 /*PROLOGUE_FRAMELESS_P ()*/);
1780 fprintf_unfiltered (file,
1781 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1782 (long) current_gdbarch->inner_than
1785 #ifdef BREAKPOINT_FROM_PC
1787 fprintf_unfiltered (file,
1788 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
1789 (long) current_gdbarch->breakpoint_from_pc
1790 /*BREAKPOINT_FROM_PC ()*/);
1792 #ifdef MEMORY_INSERT_BREAKPOINT
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1796 (long) current_gdbarch->memory_insert_breakpoint
1797 /*MEMORY_INSERT_BREAKPOINT ()*/);
1799 #ifdef MEMORY_REMOVE_BREAKPOINT
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1803 (long) current_gdbarch->memory_remove_breakpoint
1804 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1806 #ifdef DECR_PC_AFTER_BREAK
1807 fprintf_unfiltered (file,
1808 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1809 (long) DECR_PC_AFTER_BREAK);
1811 #ifdef FUNCTION_START_OFFSET
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1814 (long) FUNCTION_START_OFFSET);
1816 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1818 fprintf_unfiltered (file,
1819 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1820 (long) current_gdbarch->remote_translate_xfer_address
1821 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1823 #ifdef FRAME_ARGS_SKIP
1824 fprintf_unfiltered (file,
1825 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1826 (long) FRAME_ARGS_SKIP);
1828 #ifdef FRAMELESS_FUNCTION_INVOCATION
1830 fprintf_unfiltered (file,
1831 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1832 (long) current_gdbarch->frameless_function_invocation
1833 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1839 (long) current_gdbarch->frame_chain
1840 /*FRAME_CHAIN ()*/);
1842 #ifdef FRAME_CHAIN_VALID
1844 fprintf_unfiltered (file,
1845 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1846 (long) current_gdbarch->frame_chain_valid
1847 /*FRAME_CHAIN_VALID ()*/);
1849 #ifdef FRAME_SAVED_PC
1851 fprintf_unfiltered (file,
1852 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1853 (long) current_gdbarch->frame_saved_pc
1854 /*FRAME_SAVED_PC ()*/);
1856 #ifdef FRAME_ARGS_ADDRESS
1858 fprintf_unfiltered (file,
1859 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1860 (long) current_gdbarch->frame_args_address
1861 /*FRAME_ARGS_ADDRESS ()*/);
1863 #ifdef FRAME_LOCALS_ADDRESS
1865 fprintf_unfiltered (file,
1866 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1867 (long) current_gdbarch->frame_locals_address
1868 /*FRAME_LOCALS_ADDRESS ()*/);
1870 #ifdef SAVED_PC_AFTER_CALL
1872 fprintf_unfiltered (file,
1873 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1874 (long) current_gdbarch->saved_pc_after_call
1875 /*SAVED_PC_AFTER_CALL ()*/);
1877 #ifdef FRAME_NUM_ARGS
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1881 (long) current_gdbarch->frame_num_args
1882 /*FRAME_NUM_ARGS ()*/);
1886 fprintf_unfiltered (file,
1887 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1888 (long) current_gdbarch->stack_align
1889 /*STACK_ALIGN ()*/);
1891 #ifdef REG_STRUCT_HAS_ADDR
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1895 (long) current_gdbarch->reg_struct_has_addr
1896 /*REG_STRUCT_HAS_ADDR ()*/);
1898 #ifdef SAVE_DUMMY_FRAME_TOS
1900 fprintf_unfiltered (file,
1901 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1902 (long) current_gdbarch->save_dummy_frame_tos
1903 /*SAVE_DUMMY_FRAME_TOS ()*/);
1905 #ifdef TARGET_FLOAT_FORMAT
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1908 (long) TARGET_FLOAT_FORMAT);
1910 #ifdef TARGET_DOUBLE_FORMAT
1911 fprintf_unfiltered (file,
1912 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1913 (long) TARGET_DOUBLE_FORMAT);
1915 #ifdef TARGET_LONG_DOUBLE_FORMAT
1916 fprintf_unfiltered (file,
1917 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1918 (long) TARGET_LONG_DOUBLE_FORMAT);
1920 if (current_gdbarch->dump_tdep != NULL)
1921 current_gdbarch->dump_tdep (current_gdbarch, file);
1924 struct gdbarch_tdep *
1925 gdbarch_tdep (struct gdbarch *gdbarch)
1927 if (gdbarch_debug >= 2)
1928 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1929 return gdbarch->tdep;
1933 const struct bfd_arch_info *
1934 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1936 if (gdbarch_debug >= 2)
1937 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1938 return gdbarch->bfd_arch_info;
1942 gdbarch_byte_order (struct gdbarch *gdbarch)
1944 if (gdbarch_debug >= 2)
1945 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1946 return gdbarch->byte_order;
1950 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
1952 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
1953 if (gdbarch_debug >= 2)
1954 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
1955 return gdbarch->bfd_vma_bit;
1959 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
1962 gdbarch->bfd_vma_bit = bfd_vma_bit;
1966 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1968 if (gdbarch->ptr_bit == 0)
1969 internal_error ("gdbarch: gdbarch_ptr_bit invalid");
1970 if (gdbarch_debug >= 2)
1971 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1972 return gdbarch->ptr_bit;
1976 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1979 gdbarch->ptr_bit = ptr_bit;
1983 gdbarch_short_bit (struct gdbarch *gdbarch)
1985 if (gdbarch->short_bit == 0)
1986 internal_error ("gdbarch: gdbarch_short_bit invalid");
1987 if (gdbarch_debug >= 2)
1988 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1989 return gdbarch->short_bit;
1993 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1996 gdbarch->short_bit = short_bit;
2000 gdbarch_int_bit (struct gdbarch *gdbarch)
2002 if (gdbarch->int_bit == 0)
2003 internal_error ("gdbarch: gdbarch_int_bit invalid");
2004 if (gdbarch_debug >= 2)
2005 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2006 return gdbarch->int_bit;
2010 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2013 gdbarch->int_bit = int_bit;
2017 gdbarch_long_bit (struct gdbarch *gdbarch)
2019 if (gdbarch->long_bit == 0)
2020 internal_error ("gdbarch: gdbarch_long_bit invalid");
2021 if (gdbarch_debug >= 2)
2022 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2023 return gdbarch->long_bit;
2027 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2030 gdbarch->long_bit = long_bit;
2034 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2036 if (gdbarch->long_long_bit == 0)
2037 internal_error ("gdbarch: gdbarch_long_long_bit invalid");
2038 if (gdbarch_debug >= 2)
2039 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2040 return gdbarch->long_long_bit;
2044 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2047 gdbarch->long_long_bit = long_long_bit;
2051 gdbarch_float_bit (struct gdbarch *gdbarch)
2053 if (gdbarch->float_bit == 0)
2054 internal_error ("gdbarch: gdbarch_float_bit invalid");
2055 if (gdbarch_debug >= 2)
2056 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2057 return gdbarch->float_bit;
2061 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2064 gdbarch->float_bit = float_bit;
2068 gdbarch_double_bit (struct gdbarch *gdbarch)
2070 if (gdbarch->double_bit == 0)
2071 internal_error ("gdbarch: gdbarch_double_bit invalid");
2072 if (gdbarch_debug >= 2)
2073 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2074 return gdbarch->double_bit;
2078 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2081 gdbarch->double_bit = double_bit;
2085 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2087 if (gdbarch->long_double_bit == 0)
2088 internal_error ("gdbarch: gdbarch_long_double_bit invalid");
2089 if (gdbarch_debug >= 2)
2090 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2091 return gdbarch->long_double_bit;
2095 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2096 int long_double_bit)
2098 gdbarch->long_double_bit = long_double_bit;
2102 gdbarch_ieee_float (struct gdbarch *gdbarch)
2104 /* Skip verify of ieee_float, invalid_p == 0 */
2105 if (gdbarch_debug >= 2)
2106 fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n");
2107 return gdbarch->ieee_float;
2111 set_gdbarch_ieee_float (struct gdbarch *gdbarch,
2114 gdbarch->ieee_float = ieee_float;
2118 gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
2120 if (gdbarch->read_pc == 0)
2121 internal_error ("gdbarch: gdbarch_read_pc invalid");
2122 if (gdbarch_debug >= 2)
2123 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2124 return gdbarch->read_pc (pid);
2128 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2129 gdbarch_read_pc_ftype read_pc)
2131 gdbarch->read_pc = read_pc;
2135 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
2137 if (gdbarch->write_pc == 0)
2138 internal_error ("gdbarch: gdbarch_write_pc invalid");
2139 if (gdbarch_debug >= 2)
2140 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2141 gdbarch->write_pc (val, pid);
2145 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2146 gdbarch_write_pc_ftype write_pc)
2148 gdbarch->write_pc = write_pc;
2152 gdbarch_read_fp (struct gdbarch *gdbarch)
2154 if (gdbarch->read_fp == 0)
2155 internal_error ("gdbarch: gdbarch_read_fp invalid");
2156 if (gdbarch_debug >= 2)
2157 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2158 return gdbarch->read_fp ();
2162 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2163 gdbarch_read_fp_ftype read_fp)
2165 gdbarch->read_fp = read_fp;
2169 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
2171 if (gdbarch->write_fp == 0)
2172 internal_error ("gdbarch: gdbarch_write_fp invalid");
2173 if (gdbarch_debug >= 2)
2174 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
2175 gdbarch->write_fp (val);
2179 set_gdbarch_write_fp (struct gdbarch *gdbarch,
2180 gdbarch_write_fp_ftype write_fp)
2182 gdbarch->write_fp = write_fp;
2186 gdbarch_read_sp (struct gdbarch *gdbarch)
2188 if (gdbarch->read_sp == 0)
2189 internal_error ("gdbarch: gdbarch_read_sp invalid");
2190 if (gdbarch_debug >= 2)
2191 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2192 return gdbarch->read_sp ();
2196 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2197 gdbarch_read_sp_ftype read_sp)
2199 gdbarch->read_sp = read_sp;
2203 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2205 if (gdbarch->write_sp == 0)
2206 internal_error ("gdbarch: gdbarch_write_sp invalid");
2207 if (gdbarch_debug >= 2)
2208 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2209 gdbarch->write_sp (val);
2213 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2214 gdbarch_write_sp_ftype write_sp)
2216 gdbarch->write_sp = write_sp;
2220 gdbarch_num_regs (struct gdbarch *gdbarch)
2222 if (gdbarch->num_regs == -1)
2223 internal_error ("gdbarch: gdbarch_num_regs invalid");
2224 if (gdbarch_debug >= 2)
2225 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2226 return gdbarch->num_regs;
2230 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2233 gdbarch->num_regs = num_regs;
2237 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2239 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2240 if (gdbarch_debug >= 2)
2241 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2242 return gdbarch->num_pseudo_regs;
2246 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2247 int num_pseudo_regs)
2249 gdbarch->num_pseudo_regs = num_pseudo_regs;
2253 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2255 if (gdbarch->sp_regnum == -1)
2256 internal_error ("gdbarch: gdbarch_sp_regnum invalid");
2257 if (gdbarch_debug >= 2)
2258 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2259 return gdbarch->sp_regnum;
2263 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2266 gdbarch->sp_regnum = sp_regnum;
2270 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2272 if (gdbarch->fp_regnum == -1)
2273 internal_error ("gdbarch: gdbarch_fp_regnum invalid");
2274 if (gdbarch_debug >= 2)
2275 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2276 return gdbarch->fp_regnum;
2280 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2283 gdbarch->fp_regnum = fp_regnum;
2287 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2289 if (gdbarch->pc_regnum == -1)
2290 internal_error ("gdbarch: gdbarch_pc_regnum invalid");
2291 if (gdbarch_debug >= 2)
2292 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2293 return gdbarch->pc_regnum;
2297 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2300 gdbarch->pc_regnum = pc_regnum;
2304 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2306 /* Skip verify of fp0_regnum, invalid_p == 0 */
2307 if (gdbarch_debug >= 2)
2308 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2309 return gdbarch->fp0_regnum;
2313 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2316 gdbarch->fp0_regnum = fp0_regnum;
2320 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2322 /* Skip verify of npc_regnum, invalid_p == 0 */
2323 if (gdbarch_debug >= 2)
2324 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2325 return gdbarch->npc_regnum;
2329 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2332 gdbarch->npc_regnum = npc_regnum;
2336 gdbarch_nnpc_regnum (struct gdbarch *gdbarch)
2338 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2339 if (gdbarch_debug >= 2)
2340 fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n");
2341 return gdbarch->nnpc_regnum;
2345 set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch,
2348 gdbarch->nnpc_regnum = nnpc_regnum;
2352 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2354 if (gdbarch->register_name == 0)
2355 internal_error ("gdbarch: gdbarch_register_name invalid");
2356 if (gdbarch_debug >= 2)
2357 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2358 return gdbarch->register_name (regnr);
2362 set_gdbarch_register_name (struct gdbarch *gdbarch,
2363 gdbarch_register_name_ftype register_name)
2365 gdbarch->register_name = register_name;
2369 gdbarch_register_size (struct gdbarch *gdbarch)
2371 if (gdbarch->register_size == -1)
2372 internal_error ("gdbarch: gdbarch_register_size invalid");
2373 if (gdbarch_debug >= 2)
2374 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2375 return gdbarch->register_size;
2379 set_gdbarch_register_size (struct gdbarch *gdbarch,
2382 gdbarch->register_size = register_size;
2386 gdbarch_register_bytes (struct gdbarch *gdbarch)
2388 if (gdbarch->register_bytes == -1)
2389 internal_error ("gdbarch: gdbarch_register_bytes invalid");
2390 if (gdbarch_debug >= 2)
2391 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2392 return gdbarch->register_bytes;
2396 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2399 gdbarch->register_bytes = register_bytes;
2403 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2405 if (gdbarch->register_byte == 0)
2406 internal_error ("gdbarch: gdbarch_register_byte invalid");
2407 if (gdbarch_debug >= 2)
2408 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2409 return gdbarch->register_byte (reg_nr);
2413 set_gdbarch_register_byte (struct gdbarch *gdbarch,
2414 gdbarch_register_byte_ftype register_byte)
2416 gdbarch->register_byte = register_byte;
2420 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2422 if (gdbarch->register_raw_size == 0)
2423 internal_error ("gdbarch: gdbarch_register_raw_size invalid");
2424 if (gdbarch_debug >= 2)
2425 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
2426 return gdbarch->register_raw_size (reg_nr);
2430 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
2431 gdbarch_register_raw_size_ftype register_raw_size)
2433 gdbarch->register_raw_size = register_raw_size;
2437 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
2439 if (gdbarch->max_register_raw_size == -1)
2440 internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
2441 if (gdbarch_debug >= 2)
2442 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
2443 return gdbarch->max_register_raw_size;
2447 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
2448 int max_register_raw_size)
2450 gdbarch->max_register_raw_size = max_register_raw_size;
2454 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2456 if (gdbarch->register_virtual_size == 0)
2457 internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
2458 if (gdbarch_debug >= 2)
2459 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
2460 return gdbarch->register_virtual_size (reg_nr);
2464 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
2465 gdbarch_register_virtual_size_ftype register_virtual_size)
2467 gdbarch->register_virtual_size = register_virtual_size;
2471 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
2473 if (gdbarch->max_register_virtual_size == -1)
2474 internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
2475 if (gdbarch_debug >= 2)
2476 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
2477 return gdbarch->max_register_virtual_size;
2481 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
2482 int max_register_virtual_size)
2484 gdbarch->max_register_virtual_size = max_register_virtual_size;
2488 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2490 if (gdbarch->register_virtual_type == 0)
2491 internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
2492 if (gdbarch_debug >= 2)
2493 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
2494 return gdbarch->register_virtual_type (reg_nr);
2498 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
2499 gdbarch_register_virtual_type_ftype register_virtual_type)
2501 gdbarch->register_virtual_type = register_virtual_type;
2505 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2507 if (gdbarch->do_registers_info == 0)
2508 internal_error ("gdbarch: gdbarch_do_registers_info invalid");
2509 if (gdbarch_debug >= 2)
2510 fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
2511 gdbarch->do_registers_info (reg_nr, fpregs);
2515 set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
2516 gdbarch_do_registers_info_ftype do_registers_info)
2518 gdbarch->do_registers_info = do_registers_info;
2522 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
2524 if (gdbarch->use_generic_dummy_frames == -1)
2525 internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
2526 if (gdbarch_debug >= 2)
2527 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
2528 return gdbarch->use_generic_dummy_frames;
2532 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
2533 int use_generic_dummy_frames)
2535 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
2539 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2541 if (gdbarch->call_dummy_location == 0)
2542 internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
2543 if (gdbarch_debug >= 2)
2544 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2545 return gdbarch->call_dummy_location;
2549 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2550 int call_dummy_location)
2552 gdbarch->call_dummy_location = call_dummy_location;
2556 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
2558 if (gdbarch->call_dummy_address == 0)
2559 internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
2560 if (gdbarch_debug >= 2)
2561 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
2562 return gdbarch->call_dummy_address ();
2566 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
2567 gdbarch_call_dummy_address_ftype call_dummy_address)
2569 gdbarch->call_dummy_address = call_dummy_address;
2573 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
2575 if (gdbarch->call_dummy_start_offset == -1)
2576 internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
2577 if (gdbarch_debug >= 2)
2578 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
2579 return gdbarch->call_dummy_start_offset;
2583 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
2584 CORE_ADDR call_dummy_start_offset)
2586 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
2590 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
2592 if (gdbarch->call_dummy_breakpoint_offset == -1)
2593 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2594 if (gdbarch_debug >= 2)
2595 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
2596 return gdbarch->call_dummy_breakpoint_offset;
2600 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
2601 CORE_ADDR call_dummy_breakpoint_offset)
2603 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
2607 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
2609 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
2610 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
2611 if (gdbarch_debug >= 2)
2612 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
2613 return gdbarch->call_dummy_breakpoint_offset_p;
2617 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
2618 int call_dummy_breakpoint_offset_p)
2620 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
2624 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
2626 if (gdbarch->call_dummy_length == -1)
2627 internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
2628 if (gdbarch_debug >= 2)
2629 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
2630 return gdbarch->call_dummy_length;
2634 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
2635 int call_dummy_length)
2637 gdbarch->call_dummy_length = call_dummy_length;
2641 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
2643 if (gdbarch->pc_in_call_dummy == 0)
2644 internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
2645 if (gdbarch_debug >= 2)
2646 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
2647 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
2651 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
2652 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
2654 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
2658 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
2660 if (gdbarch->call_dummy_p == -1)
2661 internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
2662 if (gdbarch_debug >= 2)
2663 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
2664 return gdbarch->call_dummy_p;
2668 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
2671 gdbarch->call_dummy_p = call_dummy_p;
2675 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
2677 /* Skip verify of call_dummy_words, invalid_p == 0 */
2678 if (gdbarch_debug >= 2)
2679 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
2680 return gdbarch->call_dummy_words;
2684 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
2685 LONGEST * call_dummy_words)
2687 gdbarch->call_dummy_words = call_dummy_words;
2691 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
2693 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
2694 if (gdbarch_debug >= 2)
2695 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
2696 return gdbarch->sizeof_call_dummy_words;
2700 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
2701 int sizeof_call_dummy_words)
2703 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
2707 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
2709 if (gdbarch->call_dummy_stack_adjust_p == -1)
2710 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
2711 if (gdbarch_debug >= 2)
2712 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
2713 return gdbarch->call_dummy_stack_adjust_p;
2717 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
2718 int call_dummy_stack_adjust_p)
2720 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
2724 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
2726 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
2727 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
2728 if (gdbarch_debug >= 2)
2729 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
2730 return gdbarch->call_dummy_stack_adjust;
2734 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
2735 int call_dummy_stack_adjust)
2737 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
2741 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)
2743 if (gdbarch->fix_call_dummy == 0)
2744 internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
2745 if (gdbarch_debug >= 2)
2746 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
2747 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
2751 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
2752 gdbarch_fix_call_dummy_ftype fix_call_dummy)
2754 gdbarch->fix_call_dummy = fix_call_dummy;
2758 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2760 if (gdbarch_debug >= 2)
2761 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2762 return gdbarch->believe_pcc_promotion;
2766 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2767 int believe_pcc_promotion)
2769 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2773 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
2775 if (gdbarch_debug >= 2)
2776 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
2777 return gdbarch->believe_pcc_promotion_type;
2781 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
2782 int believe_pcc_promotion_type)
2784 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
2788 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
2790 if (gdbarch->coerce_float_to_double == 0)
2791 internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
2792 if (gdbarch_debug >= 2)
2793 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
2794 return gdbarch->coerce_float_to_double (formal, actual);
2798 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
2799 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
2801 gdbarch->coerce_float_to_double = coerce_float_to_double;
2805 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)
2807 if (gdbarch->get_saved_register == 0)
2808 internal_error ("gdbarch: gdbarch_get_saved_register invalid");
2809 if (gdbarch_debug >= 2)
2810 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
2811 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
2815 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
2816 gdbarch_get_saved_register_ftype get_saved_register)
2818 gdbarch->get_saved_register = get_saved_register;
2822 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
2824 if (gdbarch->register_convertible == 0)
2825 internal_error ("gdbarch: gdbarch_register_convertible invalid");
2826 if (gdbarch_debug >= 2)
2827 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
2828 return gdbarch->register_convertible (nr);
2832 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
2833 gdbarch_register_convertible_ftype register_convertible)
2835 gdbarch->register_convertible = register_convertible;
2839 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
2841 if (gdbarch->register_convert_to_virtual == 0)
2842 internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
2843 if (gdbarch_debug >= 2)
2844 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
2845 gdbarch->register_convert_to_virtual (regnum, type, from, to);
2849 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
2850 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
2852 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
2856 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
2858 if (gdbarch->register_convert_to_raw == 0)
2859 internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
2860 if (gdbarch_debug >= 2)
2861 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
2862 gdbarch->register_convert_to_raw (type, regnum, from, to);
2866 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
2867 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
2869 gdbarch->register_convert_to_raw = register_convert_to_raw;
2873 gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
2875 if (gdbarch->fetch_pseudo_register == 0)
2876 internal_error ("gdbarch: gdbarch_fetch_pseudo_register invalid");
2877 if (gdbarch_debug >= 2)
2878 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
2879 gdbarch->fetch_pseudo_register (regnum);
2883 set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
2884 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
2886 gdbarch->fetch_pseudo_register = fetch_pseudo_register;
2890 gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
2892 if (gdbarch->store_pseudo_register == 0)
2893 internal_error ("gdbarch: gdbarch_store_pseudo_register invalid");
2894 if (gdbarch_debug >= 2)
2895 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
2896 gdbarch->store_pseudo_register (regnum);
2900 set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
2901 gdbarch_store_pseudo_register_ftype store_pseudo_register)
2903 gdbarch->store_pseudo_register = store_pseudo_register;
2907 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
2909 if (gdbarch->pointer_to_address == 0)
2910 internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
2911 if (gdbarch_debug >= 2)
2912 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2913 return gdbarch->pointer_to_address (type, buf);
2917 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2918 gdbarch_pointer_to_address_ftype pointer_to_address)
2920 gdbarch->pointer_to_address = pointer_to_address;
2924 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
2926 if (gdbarch->address_to_pointer == 0)
2927 internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
2928 if (gdbarch_debug >= 2)
2929 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2930 gdbarch->address_to_pointer (type, buf, addr);
2934 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2935 gdbarch_address_to_pointer_ftype address_to_pointer)
2937 gdbarch->address_to_pointer = address_to_pointer;
2941 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
2943 if (gdbarch->return_value_on_stack == 0)
2944 internal_error ("gdbarch: gdbarch_return_value_on_stack invalid");
2945 if (gdbarch_debug >= 2)
2946 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
2947 return gdbarch->return_value_on_stack (type);
2951 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
2952 gdbarch_return_value_on_stack_ftype return_value_on_stack)
2954 gdbarch->return_value_on_stack = return_value_on_stack;
2958 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
2960 if (gdbarch->extract_return_value == 0)
2961 internal_error ("gdbarch: gdbarch_extract_return_value invalid");
2962 if (gdbarch_debug >= 2)
2963 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
2964 gdbarch->extract_return_value (type, regbuf, valbuf);
2968 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
2969 gdbarch_extract_return_value_ftype extract_return_value)
2971 gdbarch->extract_return_value = extract_return_value;
2975 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2977 if (gdbarch->push_arguments == 0)
2978 internal_error ("gdbarch: gdbarch_push_arguments invalid");
2979 if (gdbarch_debug >= 2)
2980 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
2981 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
2985 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
2986 gdbarch_push_arguments_ftype push_arguments)
2988 gdbarch->push_arguments = push_arguments;
2992 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
2994 if (gdbarch->push_dummy_frame == 0)
2995 internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
2996 if (gdbarch_debug >= 2)
2997 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
2998 gdbarch->push_dummy_frame ();
3002 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3003 gdbarch_push_dummy_frame_ftype push_dummy_frame)
3005 gdbarch->push_dummy_frame = push_dummy_frame;
3009 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3011 if (gdbarch->push_return_address == 0)
3012 internal_error ("gdbarch: gdbarch_push_return_address invalid");
3013 if (gdbarch_debug >= 2)
3014 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3015 return gdbarch->push_return_address (pc, sp);
3019 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3020 gdbarch_push_return_address_ftype push_return_address)
3022 gdbarch->push_return_address = push_return_address;
3026 gdbarch_pop_frame (struct gdbarch *gdbarch)
3028 if (gdbarch->pop_frame == 0)
3029 internal_error ("gdbarch: gdbarch_pop_frame invalid");
3030 if (gdbarch_debug >= 2)
3031 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3032 gdbarch->pop_frame ();
3036 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3037 gdbarch_pop_frame_ftype pop_frame)
3039 gdbarch->pop_frame = pop_frame;
3043 gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
3045 if (gdbarch->d10v_make_daddr == 0)
3046 internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
3047 if (gdbarch_debug >= 2)
3048 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
3049 return gdbarch->d10v_make_daddr (x);
3053 set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch,
3054 gdbarch_d10v_make_daddr_ftype d10v_make_daddr)
3056 gdbarch->d10v_make_daddr = d10v_make_daddr;
3060 gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
3062 if (gdbarch->d10v_make_iaddr == 0)
3063 internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
3064 if (gdbarch_debug >= 2)
3065 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
3066 return gdbarch->d10v_make_iaddr (x);
3070 set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch,
3071 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr)
3073 gdbarch->d10v_make_iaddr = d10v_make_iaddr;
3077 gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3079 if (gdbarch->d10v_daddr_p == 0)
3080 internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
3081 if (gdbarch_debug >= 2)
3082 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
3083 return gdbarch->d10v_daddr_p (x);
3087 set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch,
3088 gdbarch_d10v_daddr_p_ftype d10v_daddr_p)
3090 gdbarch->d10v_daddr_p = d10v_daddr_p;
3094 gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3096 if (gdbarch->d10v_iaddr_p == 0)
3097 internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
3098 if (gdbarch_debug >= 2)
3099 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
3100 return gdbarch->d10v_iaddr_p (x);
3104 set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch,
3105 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p)
3107 gdbarch->d10v_iaddr_p = d10v_iaddr_p;
3111 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3113 if (gdbarch->d10v_convert_daddr_to_raw == 0)
3114 internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3115 if (gdbarch_debug >= 2)
3116 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
3117 return gdbarch->d10v_convert_daddr_to_raw (x);
3121 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch,
3122 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw)
3124 gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw;
3128 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3130 if (gdbarch->d10v_convert_iaddr_to_raw == 0)
3131 internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3132 if (gdbarch_debug >= 2)
3133 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3134 return gdbarch->d10v_convert_iaddr_to_raw (x);
3138 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch,
3139 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw)
3141 gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw;
3145 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3147 if (gdbarch->store_struct_return == 0)
3148 internal_error ("gdbarch: gdbarch_store_struct_return invalid");
3149 if (gdbarch_debug >= 2)
3150 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3151 gdbarch->store_struct_return (addr, sp);
3155 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3156 gdbarch_store_struct_return_ftype store_struct_return)
3158 gdbarch->store_struct_return = store_struct_return;
3162 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3164 if (gdbarch->store_return_value == 0)
3165 internal_error ("gdbarch: gdbarch_store_return_value invalid");
3166 if (gdbarch_debug >= 2)
3167 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3168 gdbarch->store_return_value (type, valbuf);
3172 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3173 gdbarch_store_return_value_ftype store_return_value)
3175 gdbarch->store_return_value = store_return_value;
3179 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
3181 if (gdbarch->extract_struct_value_address == 0)
3182 internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
3183 if (gdbarch_debug >= 2)
3184 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
3185 return gdbarch->extract_struct_value_address (regbuf);
3189 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
3190 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
3192 gdbarch->extract_struct_value_address = extract_struct_value_address;
3196 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3198 if (gdbarch->use_struct_convention == 0)
3199 internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
3200 if (gdbarch_debug >= 2)
3201 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3202 return gdbarch->use_struct_convention (gcc_p, value_type);
3206 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3207 gdbarch_use_struct_convention_ftype use_struct_convention)
3209 gdbarch->use_struct_convention = use_struct_convention;
3213 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3215 if (gdbarch->frame_init_saved_regs == 0)
3216 internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
3217 if (gdbarch_debug >= 2)
3218 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
3219 gdbarch->frame_init_saved_regs (frame);
3223 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
3224 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
3226 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
3230 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3232 if (gdbarch->init_extra_frame_info == 0)
3233 internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
3234 if (gdbarch_debug >= 2)
3235 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
3236 gdbarch->init_extra_frame_info (fromleaf, frame);
3240 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
3241 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
3243 gdbarch->init_extra_frame_info = init_extra_frame_info;
3247 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3249 if (gdbarch->skip_prologue == 0)
3250 internal_error ("gdbarch: gdbarch_skip_prologue invalid");
3251 if (gdbarch_debug >= 2)
3252 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3253 return gdbarch->skip_prologue (ip);
3257 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3258 gdbarch_skip_prologue_ftype skip_prologue)
3260 gdbarch->skip_prologue = skip_prologue;
3264 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
3266 if (gdbarch->prologue_frameless_p == 0)
3267 internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
3268 if (gdbarch_debug >= 2)
3269 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
3270 return gdbarch->prologue_frameless_p (ip);
3274 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
3275 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
3277 gdbarch->prologue_frameless_p = prologue_frameless_p;
3281 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3283 if (gdbarch->inner_than == 0)
3284 internal_error ("gdbarch: gdbarch_inner_than invalid");
3285 if (gdbarch_debug >= 2)
3286 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3287 return gdbarch->inner_than (lhs, rhs);
3291 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3292 gdbarch_inner_than_ftype inner_than)
3294 gdbarch->inner_than = inner_than;
3298 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3300 if (gdbarch->breakpoint_from_pc == 0)
3301 internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
3302 if (gdbarch_debug >= 2)
3303 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3304 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3308 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3309 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3311 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3315 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3317 if (gdbarch->memory_insert_breakpoint == 0)
3318 internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
3319 if (gdbarch_debug >= 2)
3320 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3321 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3325 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3326 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3328 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3332 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3334 if (gdbarch->memory_remove_breakpoint == 0)
3335 internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
3336 if (gdbarch_debug >= 2)
3337 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3338 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3342 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3343 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3345 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3349 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3351 if (gdbarch->decr_pc_after_break == -1)
3352 internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
3353 if (gdbarch_debug >= 2)
3354 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3355 return gdbarch->decr_pc_after_break;
3359 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3360 CORE_ADDR decr_pc_after_break)
3362 gdbarch->decr_pc_after_break = decr_pc_after_break;
3366 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3368 if (gdbarch->function_start_offset == -1)
3369 internal_error ("gdbarch: gdbarch_function_start_offset invalid");
3370 if (gdbarch_debug >= 2)
3371 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3372 return gdbarch->function_start_offset;
3376 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3377 CORE_ADDR function_start_offset)
3379 gdbarch->function_start_offset = function_start_offset;
3383 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
3385 if (gdbarch->remote_translate_xfer_address == 0)
3386 internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
3387 if (gdbarch_debug >= 2)
3388 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3389 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
3393 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3394 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3396 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3400 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3402 if (gdbarch->frame_args_skip == -1)
3403 internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
3404 if (gdbarch_debug >= 2)
3405 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3406 return gdbarch->frame_args_skip;
3410 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3411 CORE_ADDR frame_args_skip)
3413 gdbarch->frame_args_skip = frame_args_skip;
3417 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3419 if (gdbarch->frameless_function_invocation == 0)
3420 internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
3421 if (gdbarch_debug >= 2)
3422 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
3423 return gdbarch->frameless_function_invocation (fi);
3427 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
3428 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
3430 gdbarch->frameless_function_invocation = frameless_function_invocation;
3434 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3436 if (gdbarch->frame_chain == 0)
3437 internal_error ("gdbarch: gdbarch_frame_chain invalid");
3438 if (gdbarch_debug >= 2)
3439 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
3440 return gdbarch->frame_chain (frame);
3444 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
3445 gdbarch_frame_chain_ftype frame_chain)
3447 gdbarch->frame_chain = frame_chain;
3451 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3453 if (gdbarch->frame_chain_valid == 0)
3454 internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
3455 if (gdbarch_debug >= 2)
3456 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
3457 return gdbarch->frame_chain_valid (chain, thisframe);
3461 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
3462 gdbarch_frame_chain_valid_ftype frame_chain_valid)
3464 gdbarch->frame_chain_valid = frame_chain_valid;
3468 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3470 if (gdbarch->frame_saved_pc == 0)
3471 internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
3472 if (gdbarch_debug >= 2)
3473 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
3474 return gdbarch->frame_saved_pc (fi);
3478 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
3479 gdbarch_frame_saved_pc_ftype frame_saved_pc)
3481 gdbarch->frame_saved_pc = frame_saved_pc;
3485 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3487 if (gdbarch->frame_args_address == 0)
3488 internal_error ("gdbarch: gdbarch_frame_args_address invalid");
3489 if (gdbarch_debug >= 2)
3490 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
3491 return gdbarch->frame_args_address (fi);
3495 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
3496 gdbarch_frame_args_address_ftype frame_args_address)
3498 gdbarch->frame_args_address = frame_args_address;
3502 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3504 if (gdbarch->frame_locals_address == 0)
3505 internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
3506 if (gdbarch_debug >= 2)
3507 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
3508 return gdbarch->frame_locals_address (fi);
3512 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
3513 gdbarch_frame_locals_address_ftype frame_locals_address)
3515 gdbarch->frame_locals_address = frame_locals_address;
3519 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
3521 if (gdbarch->saved_pc_after_call == 0)
3522 internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
3523 if (gdbarch_debug >= 2)
3524 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
3525 return gdbarch->saved_pc_after_call (frame);
3529 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
3530 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
3532 gdbarch->saved_pc_after_call = saved_pc_after_call;
3536 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3538 if (gdbarch->frame_num_args == 0)
3539 internal_error ("gdbarch: gdbarch_frame_num_args invalid");
3540 if (gdbarch_debug >= 2)
3541 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3542 return gdbarch->frame_num_args (frame);
3546 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3547 gdbarch_frame_num_args_ftype frame_num_args)
3549 gdbarch->frame_num_args = frame_num_args;
3553 gdbarch_stack_align_p (struct gdbarch *gdbarch)
3555 return gdbarch->stack_align != 0;
3559 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3561 if (gdbarch->stack_align == 0)
3562 internal_error ("gdbarch: gdbarch_stack_align invalid");
3563 if (gdbarch_debug >= 2)
3564 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
3565 return gdbarch->stack_align (sp);
3569 set_gdbarch_stack_align (struct gdbarch *gdbarch,
3570 gdbarch_stack_align_ftype stack_align)
3572 gdbarch->stack_align = stack_align;
3576 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3578 return gdbarch->reg_struct_has_addr != 0;
3582 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3584 if (gdbarch->reg_struct_has_addr == 0)
3585 internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
3586 if (gdbarch_debug >= 2)
3587 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
3588 return gdbarch->reg_struct_has_addr (gcc_p, type);
3592 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
3593 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
3595 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
3599 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3601 return gdbarch->save_dummy_frame_tos != 0;
3605 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
3607 if (gdbarch->save_dummy_frame_tos == 0)
3608 internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid");
3609 if (gdbarch_debug >= 2)
3610 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
3611 gdbarch->save_dummy_frame_tos (sp);
3615 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
3616 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
3618 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
3621 const struct floatformat *
3622 gdbarch_float_format (struct gdbarch *gdbarch)
3624 if (gdbarch_debug >= 2)
3625 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
3626 return gdbarch->float_format;
3630 set_gdbarch_float_format (struct gdbarch *gdbarch,
3631 const struct floatformat * float_format)
3633 gdbarch->float_format = float_format;
3636 const struct floatformat *
3637 gdbarch_double_format (struct gdbarch *gdbarch)
3639 if (gdbarch_debug >= 2)
3640 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
3641 return gdbarch->double_format;
3645 set_gdbarch_double_format (struct gdbarch *gdbarch,
3646 const struct floatformat * double_format)
3648 gdbarch->double_format = double_format;
3651 const struct floatformat *
3652 gdbarch_long_double_format (struct gdbarch *gdbarch)
3654 if (gdbarch_debug >= 2)
3655 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
3656 return gdbarch->long_double_format;
3660 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
3661 const struct floatformat * long_double_format)
3663 gdbarch->long_double_format = long_double_format;
3667 /* Keep a registrary of per-architecture data-pointers required by GDB
3675 struct gdbarch_data_registration
3677 gdbarch_data_ftype *init;
3678 struct gdbarch_data *data;
3679 struct gdbarch_data_registration *next;
3682 struct gdbarch_data_registrary
3685 struct gdbarch_data_registration *registrations;
3688 struct gdbarch_data_registrary gdbarch_data_registrary =
3693 struct gdbarch_data *
3694 register_gdbarch_data (gdbarch_data_ftype *init)
3696 struct gdbarch_data_registration **curr;
3697 for (curr = &gdbarch_data_registrary.registrations;
3699 curr = &(*curr)->next);
3700 (*curr) = XMALLOC (struct gdbarch_data_registration);
3701 (*curr)->next = NULL;
3702 (*curr)->init = init;
3703 (*curr)->data = XMALLOC (struct gdbarch_data);
3704 (*curr)->data->index = gdbarch_data_registrary.nr++;
3705 return (*curr)->data;
3709 /* Walk through all the registered users initializing each in turn. */
3712 init_gdbarch_data (struct gdbarch *gdbarch)
3714 struct gdbarch_data_registration *rego;
3715 gdbarch->nr_data = gdbarch_data_registrary.nr + 1;
3716 gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data);
3717 for (rego = gdbarch_data_registrary.registrations;
3721 if (rego->data->index < gdbarch->nr_data)
3722 gdbarch->data[rego->data->index] = rego->init ();
3727 /* Return the current value of the specified per-architecture
3732 struct gdbarch_data *data;
3734 if (data->index >= current_gdbarch->nr_data)
3735 internal_error ("gdbarch_data: request for non-existant data.");
3736 return current_gdbarch->data[data->index];
3741 /* Keep a registrary of swaped data required by GDB modules. */
3746 struct gdbarch_swap_registration *source;
3747 struct gdbarch_swap *next;
3750 struct gdbarch_swap_registration
3753 unsigned long sizeof_data;
3754 gdbarch_swap_ftype *init;
3755 struct gdbarch_swap_registration *next;
3758 struct gdbarch_swap_registrary
3761 struct gdbarch_swap_registration *registrations;
3764 struct gdbarch_swap_registrary gdbarch_swap_registrary =
3770 register_gdbarch_swap (void *data,
3771 unsigned long sizeof_data,
3772 gdbarch_swap_ftype *init)
3774 struct gdbarch_swap_registration **rego;
3775 for (rego = &gdbarch_swap_registrary.registrations;
3777 rego = &(*rego)->next);
3778 (*rego) = XMALLOC (struct gdbarch_swap_registration);
3779 (*rego)->next = NULL;
3780 (*rego)->init = init;
3781 (*rego)->data = data;
3782 (*rego)->sizeof_data = sizeof_data;
3787 init_gdbarch_swap (struct gdbarch *gdbarch)
3789 struct gdbarch_swap_registration *rego;
3790 struct gdbarch_swap **curr = &gdbarch->swap;
3791 for (rego = gdbarch_swap_registrary.registrations;
3795 if (rego->data != NULL)
3797 (*curr) = XMALLOC (struct gdbarch_swap);
3798 (*curr)->source = rego;
3799 (*curr)->swap = xmalloc (rego->sizeof_data);
3800 (*curr)->next = NULL;
3801 memset (rego->data, 0, rego->sizeof_data);
3802 curr = &(*curr)->next;
3804 if (rego->init != NULL)
3810 swapout_gdbarch_swap (struct gdbarch *gdbarch)
3812 struct gdbarch_swap *curr;
3813 for (curr = gdbarch->swap;
3816 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
3820 swapin_gdbarch_swap (struct gdbarch *gdbarch)
3822 struct gdbarch_swap *curr;
3823 for (curr = gdbarch->swap;
3826 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
3830 /* Keep a registrary of the architectures known by GDB. */
3832 struct gdbarch_registration
3834 enum bfd_architecture bfd_architecture;
3835 gdbarch_init_ftype *init;
3836 gdbarch_dump_tdep_ftype *dump_tdep;
3837 struct gdbarch_list *arches;
3838 struct gdbarch_registration *next;
3841 static struct gdbarch_registration *gdbarch_registrary = NULL;
3844 append_name (const char ***buf, int *nr, const char *name)
3846 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3852 gdbarch_printable_names (void)
3856 /* Accumulate a list of names based on the registed list of
3858 enum bfd_architecture a;
3860 const char **arches = NULL;
3861 struct gdbarch_registration *rego;
3862 for (rego = gdbarch_registrary;
3866 const struct bfd_arch_info *ap;
3867 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3869 internal_error ("gdbarch_architecture_names: multi-arch unknown");
3872 append_name (&arches, &nr_arches, ap->printable_name);
3877 append_name (&arches, &nr_arches, NULL);
3881 /* Just return all the architectures that BFD knows. Assume that
3882 the legacy architecture framework supports them. */
3883 return bfd_arch_list ();
3888 gdbarch_register (enum bfd_architecture bfd_architecture,
3889 gdbarch_init_ftype *init,
3890 gdbarch_dump_tdep_ftype *dump_tdep)
3892 struct gdbarch_registration **curr;
3893 const struct bfd_arch_info *bfd_arch_info;
3894 /* Check that BFD reconizes this architecture */
3895 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3896 if (bfd_arch_info == NULL)
3898 internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
3900 /* Check that we haven't seen this architecture before */
3901 for (curr = &gdbarch_registrary;
3903 curr = &(*curr)->next)
3905 if (bfd_architecture == (*curr)->bfd_architecture)
3906 internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
3907 bfd_arch_info->printable_name);
3911 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3912 bfd_arch_info->printable_name,
3915 (*curr) = XMALLOC (struct gdbarch_registration);
3916 (*curr)->bfd_architecture = bfd_architecture;
3917 (*curr)->init = init;
3918 (*curr)->dump_tdep = dump_tdep;
3919 (*curr)->arches = NULL;
3920 (*curr)->next = NULL;
3921 /* When non- multi-arch, install what ever target dump routine we've
3922 been provided - hopefully that routine has been writen correct
3923 and works regardless of multi-arch. */
3924 if (!GDB_MULTI_ARCH && dump_tdep != NULL
3925 && startup_gdbarch.dump_tdep == NULL)
3926 startup_gdbarch.dump_tdep = dump_tdep;
3930 register_gdbarch_init (enum bfd_architecture bfd_architecture,
3931 gdbarch_init_ftype *init)
3933 gdbarch_register (bfd_architecture, init, NULL);
3937 /* Look for an architecture using gdbarch_info. Base search on only
3938 BFD_ARCH_INFO and BYTE_ORDER. */
3940 struct gdbarch_list *
3941 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
3942 const struct gdbarch_info *info)
3944 for (; arches != NULL; arches = arches->next)
3946 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
3948 if (info->byte_order != arches->gdbarch->byte_order)
3956 /* Update the current architecture. Return ZERO if the update request
3960 gdbarch_update (struct gdbarch_info info)
3962 struct gdbarch *new_gdbarch;
3963 struct gdbarch_list **list;
3964 struct gdbarch_registration *rego;
3966 /* Fill in any missing bits. Most important is the bfd_architecture
3967 which is used to select the target architecture. */
3968 if (info.bfd_architecture == bfd_arch_unknown)
3970 if (info.bfd_arch_info != NULL)
3971 info.bfd_architecture = info.bfd_arch_info->arch;
3972 else if (info.abfd != NULL)
3973 info.bfd_architecture = bfd_get_arch (info.abfd);
3974 /* FIXME - should query BFD for its default architecture. */
3976 info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
3978 if (info.bfd_arch_info == NULL)
3980 if (target_architecture_auto && info.abfd != NULL)
3981 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
3983 info.bfd_arch_info = current_gdbarch->bfd_arch_info;
3985 if (info.byte_order == 0)
3987 if (target_byte_order_auto && info.abfd != NULL)
3988 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
3989 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
3992 info.byte_order = current_gdbarch->byte_order;
3993 /* FIXME - should query BFD for its default byte-order. */
3995 /* A default for abfd? */
3997 /* Find the target that knows about this architecture. */
3998 for (rego = gdbarch_registrary;
4001 if (rego->bfd_architecture == info.bfd_architecture)
4006 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
4012 fprintf_unfiltered (gdb_stdlog,
4013 "gdbarch_update: info.bfd_architecture %d (%s)\n",
4014 info.bfd_architecture,
4015 bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
4016 fprintf_unfiltered (gdb_stdlog,
4017 "gdbarch_update: info.bfd_arch_info %s\n",
4018 (info.bfd_arch_info != NULL
4019 ? info.bfd_arch_info->printable_name
4021 fprintf_unfiltered (gdb_stdlog,
4022 "gdbarch_update: info.byte_order %d (%s)\n",
4024 (info.byte_order == BIG_ENDIAN ? "big"
4025 : info.byte_order == LITTLE_ENDIAN ? "little"
4027 fprintf_unfiltered (gdb_stdlog,
4028 "gdbarch_update: info.abfd 0x%lx\n",
4030 fprintf_unfiltered (gdb_stdlog,
4031 "gdbarch_update: info.tdep_info 0x%lx\n",
4032 (long) info.tdep_info);
4035 /* Ask the target for a replacement architecture. */
4036 new_gdbarch = rego->init (info, rego->arches);
4038 /* Did the target like it? No. Reject the change. */
4039 if (new_gdbarch == NULL)
4042 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
4046 /* Did the architecture change? No. Do nothing. */
4047 if (current_gdbarch == new_gdbarch)
4050 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4052 new_gdbarch->bfd_arch_info->printable_name);
4056 /* Swap all data belonging to the old target out */
4057 swapout_gdbarch_swap (current_gdbarch);
4059 /* Is this a pre-existing architecture? Yes. Swap it in. */
4060 for (list = ®o->arches;
4062 list = &(*list)->next)
4064 if ((*list)->gdbarch == new_gdbarch)
4067 fprintf_unfiltered (gdb_stdlog,
4068 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4070 new_gdbarch->bfd_arch_info->printable_name);
4071 current_gdbarch = new_gdbarch;
4072 swapin_gdbarch_swap (new_gdbarch);
4077 /* Append this new architecture to this targets list. */
4078 (*list) = XMALLOC (struct gdbarch_list);
4079 (*list)->next = NULL;
4080 (*list)->gdbarch = new_gdbarch;
4082 /* Switch to this new architecture. Dump it out. */
4083 current_gdbarch = new_gdbarch;
4086 fprintf_unfiltered (gdb_stdlog,
4087 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4089 new_gdbarch->bfd_arch_info->printable_name);
4092 /* Check that the newly installed architecture is valid. Plug in
4093 any post init values. */
4094 new_gdbarch->dump_tdep = rego->dump_tdep;
4095 verify_gdbarch (new_gdbarch);
4097 /* Initialize the per-architecture memory (swap) areas.
4098 CURRENT_GDBARCH must be update before these modules are
4100 init_gdbarch_swap (new_gdbarch);
4102 /* Initialize the per-architecture data-pointer of all parties that
4103 registered an interest in this architecture. CURRENT_GDBARCH
4104 must be updated before these modules are called. */
4105 init_gdbarch_data (new_gdbarch);
4108 gdbarch_dump (current_gdbarch, gdb_stdlog);
4116 /* Pointer to the target-dependent disassembly function. */
4117 int (*tm_print_insn) (bfd_vma, disassemble_info *);
4118 disassemble_info tm_print_insn_info;
4121 extern void _initialize_gdbarch (void);
4124 _initialize_gdbarch ()
4126 struct cmd_list_element *c;
4128 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
4129 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
4130 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
4131 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
4132 tm_print_insn_info.print_address_func = dis_asm_print_address;
4134 add_show_from_set (add_set_cmd ("arch",
4137 (char *)&gdbarch_debug,
4138 "Set architecture debugging.\n\
4139 When non-zero, architecture debugging is enabled.", &setdebuglist),
4141 c = add_set_cmd ("archdebug",
4144 (char *)&gdbarch_debug,
4145 "Set architecture debugging.\n\
4146 When non-zero, architecture debugging is enabled.", &setlist);
4148 deprecate_cmd (c, "set debug arch");
4149 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");