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 int use_generic_dummy_frames;
165 int call_dummy_location;
166 gdbarch_call_dummy_address_ftype *call_dummy_address;
167 CORE_ADDR call_dummy_start_offset;
168 CORE_ADDR call_dummy_breakpoint_offset;
169 int call_dummy_breakpoint_offset_p;
170 int call_dummy_length;
171 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
173 LONGEST * call_dummy_words;
174 int sizeof_call_dummy_words;
175 int call_dummy_stack_adjust_p;
176 int call_dummy_stack_adjust;
177 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
178 int believe_pcc_promotion;
179 int believe_pcc_promotion_type;
180 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
181 gdbarch_get_saved_register_ftype *get_saved_register;
182 gdbarch_register_convertible_ftype *register_convertible;
183 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
184 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
185 gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
186 gdbarch_store_pseudo_register_ftype *store_pseudo_register;
187 gdbarch_pointer_to_address_ftype *pointer_to_address;
188 gdbarch_address_to_pointer_ftype *address_to_pointer;
189 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
190 gdbarch_extract_return_value_ftype *extract_return_value;
191 gdbarch_push_arguments_ftype *push_arguments;
192 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
193 gdbarch_push_return_address_ftype *push_return_address;
194 gdbarch_pop_frame_ftype *pop_frame;
195 gdbarch_d10v_make_daddr_ftype *d10v_make_daddr;
196 gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr;
197 gdbarch_d10v_daddr_p_ftype *d10v_daddr_p;
198 gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p;
199 gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw;
200 gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw;
201 gdbarch_store_struct_return_ftype *store_struct_return;
202 gdbarch_store_return_value_ftype *store_return_value;
203 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
204 gdbarch_use_struct_convention_ftype *use_struct_convention;
205 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
206 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
207 gdbarch_skip_prologue_ftype *skip_prologue;
208 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
209 gdbarch_inner_than_ftype *inner_than;
210 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
211 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
212 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
213 CORE_ADDR decr_pc_after_break;
214 CORE_ADDR function_start_offset;
215 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
216 CORE_ADDR frame_args_skip;
217 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
218 gdbarch_frame_chain_ftype *frame_chain;
219 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
220 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
221 gdbarch_frame_args_address_ftype *frame_args_address;
222 gdbarch_frame_locals_address_ftype *frame_locals_address;
223 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
224 gdbarch_frame_num_args_ftype *frame_num_args;
225 gdbarch_stack_align_ftype *stack_align;
226 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
227 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
228 const struct floatformat * float_format;
229 const struct floatformat * double_format;
230 const struct floatformat * long_double_format;
234 /* The default architecture uses host values (for want of a better
237 extern const struct bfd_arch_info bfd_default_arch_struct;
239 struct gdbarch startup_gdbarch =
241 /* basic architecture information */
242 &bfd_default_arch_struct,
244 /* target specific vector and its dump routine */
246 /*per-architecture data-pointers and swap regions */
248 /* Multi-arch values */
254 8 * sizeof (LONGEST),
257 8 * sizeof (long double),
299 generic_get_saved_register,
349 /* startup_gdbarch() */
352 struct gdbarch *current_gdbarch = &startup_gdbarch;
355 /* Create a new ``struct gdbarch'' based in information provided by
356 ``struct gdbarch_info''. */
359 gdbarch_alloc (const struct gdbarch_info *info,
360 struct gdbarch_tdep *tdep)
362 struct gdbarch *gdbarch = XMALLOC (struct gdbarch);
363 memset (gdbarch, 0, sizeof (*gdbarch));
365 gdbarch->tdep = tdep;
367 gdbarch->bfd_arch_info = info->bfd_arch_info;
368 gdbarch->byte_order = info->byte_order;
370 /* Force the explicit initialization of these. */
371 gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
372 gdbarch->num_regs = -1;
373 gdbarch->sp_regnum = -1;
374 gdbarch->fp_regnum = -1;
375 gdbarch->pc_regnum = -1;
376 gdbarch->fp0_regnum = -1;
377 gdbarch->npc_regnum = -1;
378 gdbarch->nnpc_regnum = -1;
379 gdbarch->register_name = legacy_register_name;
380 gdbarch->register_size = -1;
381 gdbarch->register_bytes = -1;
382 gdbarch->max_register_raw_size = -1;
383 gdbarch->max_register_virtual_size = -1;
384 gdbarch->use_generic_dummy_frames = -1;
385 gdbarch->call_dummy_start_offset = -1;
386 gdbarch->call_dummy_breakpoint_offset = -1;
387 gdbarch->call_dummy_breakpoint_offset_p = -1;
388 gdbarch->call_dummy_length = -1;
389 gdbarch->call_dummy_p = -1;
390 gdbarch->call_dummy_words = legacy_call_dummy_words;
391 gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
392 gdbarch->call_dummy_stack_adjust_p = -1;
393 gdbarch->coerce_float_to_double = default_coerce_float_to_double;
394 gdbarch->register_convertible = generic_register_convertible_not;
395 gdbarch->pointer_to_address = unsigned_pointer_to_address;
396 gdbarch->address_to_pointer = unsigned_address_to_pointer;
397 gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
398 gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
399 gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
400 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
401 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
402 gdbarch->decr_pc_after_break = -1;
403 gdbarch->function_start_offset = -1;
404 gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
405 gdbarch->frame_args_skip = -1;
406 gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
407 /* gdbarch_alloc() */
413 /* Free a gdbarch struct. This should never happen in normal
414 operation --- once you've created a gdbarch, you keep it around.
415 However, if an architecture's init function encounters an error
416 building the structure, it may need to clean up a partially
417 constructed gdbarch. */
420 gdbarch_free (struct gdbarch *arch)
422 /* At the moment, this is trivial. */
427 /* Ensure that all values in a GDBARCH are reasonable. */
430 verify_gdbarch (struct gdbarch *gdbarch)
432 /* Only perform sanity checks on a multi-arch target. */
436 if (gdbarch->byte_order == 0)
437 internal_error ("verify_gdbarch: byte-order unset");
438 if (gdbarch->bfd_arch_info == NULL)
439 internal_error ("verify_gdbarch: bfd_arch_info unset");
440 /* Check those that need to be defined for the given multi-arch level. */
441 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
442 if ((GDB_MULTI_ARCH >= 1)
443 && (gdbarch->ptr_bit == 0))
444 internal_error ("gdbarch: verify_gdbarch: ptr_bit invalid");
445 if ((GDB_MULTI_ARCH >= 1)
446 && (gdbarch->short_bit == 0))
447 internal_error ("gdbarch: verify_gdbarch: short_bit invalid");
448 if ((GDB_MULTI_ARCH >= 1)
449 && (gdbarch->int_bit == 0))
450 internal_error ("gdbarch: verify_gdbarch: int_bit invalid");
451 if ((GDB_MULTI_ARCH >= 1)
452 && (gdbarch->long_bit == 0))
453 internal_error ("gdbarch: verify_gdbarch: long_bit invalid");
454 if ((GDB_MULTI_ARCH >= 1)
455 && (gdbarch->long_long_bit == 0))
456 internal_error ("gdbarch: verify_gdbarch: long_long_bit invalid");
457 if ((GDB_MULTI_ARCH >= 1)
458 && (gdbarch->float_bit == 0))
459 internal_error ("gdbarch: verify_gdbarch: float_bit invalid");
460 if ((GDB_MULTI_ARCH >= 1)
461 && (gdbarch->double_bit == 0))
462 internal_error ("gdbarch: verify_gdbarch: double_bit invalid");
463 if ((GDB_MULTI_ARCH >= 1)
464 && (gdbarch->long_double_bit == 0))
465 internal_error ("gdbarch: verify_gdbarch: long_double_bit invalid");
466 /* Skip verify of ieee_float, invalid_p == 0 */
467 if ((GDB_MULTI_ARCH >= 1)
468 && (gdbarch->read_pc == 0))
469 internal_error ("gdbarch: verify_gdbarch: read_pc invalid");
470 if ((GDB_MULTI_ARCH >= 1)
471 && (gdbarch->write_pc == 0))
472 internal_error ("gdbarch: verify_gdbarch: write_pc invalid");
473 if ((GDB_MULTI_ARCH >= 1)
474 && (gdbarch->read_fp == 0))
475 internal_error ("gdbarch: verify_gdbarch: read_fp invalid");
476 if ((GDB_MULTI_ARCH >= 1)
477 && (gdbarch->write_fp == 0))
478 internal_error ("gdbarch: verify_gdbarch: write_fp invalid");
479 if ((GDB_MULTI_ARCH >= 1)
480 && (gdbarch->read_sp == 0))
481 internal_error ("gdbarch: verify_gdbarch: read_sp invalid");
482 if ((GDB_MULTI_ARCH >= 1)
483 && (gdbarch->write_sp == 0))
484 internal_error ("gdbarch: verify_gdbarch: write_sp invalid");
485 if ((GDB_MULTI_ARCH >= 2)
486 && (gdbarch->num_regs == -1))
487 internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
488 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
489 if ((GDB_MULTI_ARCH >= 2)
490 && (gdbarch->sp_regnum == -1))
491 internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
492 if ((GDB_MULTI_ARCH >= 2)
493 && (gdbarch->fp_regnum == -1))
494 internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
495 if ((GDB_MULTI_ARCH >= 2)
496 && (gdbarch->pc_regnum == -1))
497 internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
498 /* Skip verify of fp0_regnum, invalid_p == 0 */
499 /* Skip verify of npc_regnum, invalid_p == 0 */
500 /* Skip verify of nnpc_regnum, invalid_p == 0 */
501 /* Skip verify of register_name, invalid_p == 0 */
502 if ((GDB_MULTI_ARCH >= 2)
503 && (gdbarch->register_size == -1))
504 internal_error ("gdbarch: verify_gdbarch: register_size invalid");
505 if ((GDB_MULTI_ARCH >= 2)
506 && (gdbarch->register_bytes == -1))
507 internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
508 if ((GDB_MULTI_ARCH >= 2)
509 && (gdbarch->register_byte == 0))
510 internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
511 if ((GDB_MULTI_ARCH >= 2)
512 && (gdbarch->register_raw_size == 0))
513 internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
514 if ((GDB_MULTI_ARCH >= 2)
515 && (gdbarch->max_register_raw_size == -1))
516 internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
517 if ((GDB_MULTI_ARCH >= 2)
518 && (gdbarch->register_virtual_size == 0))
519 internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
520 if ((GDB_MULTI_ARCH >= 2)
521 && (gdbarch->max_register_virtual_size == -1))
522 internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
523 if ((GDB_MULTI_ARCH >= 2)
524 && (gdbarch->register_virtual_type == 0))
525 internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
526 if ((GDB_MULTI_ARCH >= 1)
527 && (gdbarch->use_generic_dummy_frames == -1))
528 internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
529 if ((GDB_MULTI_ARCH >= 2)
530 && (gdbarch->call_dummy_location == 0))
531 internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
532 if ((GDB_MULTI_ARCH >= 2)
533 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
534 internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
535 if ((GDB_MULTI_ARCH >= 2)
536 && (gdbarch->call_dummy_start_offset == -1))
537 internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
538 if ((GDB_MULTI_ARCH >= 2)
539 && (gdbarch->call_dummy_breakpoint_offset == -1))
540 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
541 if ((GDB_MULTI_ARCH >= 1)
542 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
543 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
544 if ((GDB_MULTI_ARCH >= 2)
545 && (gdbarch->call_dummy_length == -1))
546 internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
547 if ((GDB_MULTI_ARCH >= 2)
548 && (gdbarch->pc_in_call_dummy == 0))
549 internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
550 if ((GDB_MULTI_ARCH >= 1)
551 && (gdbarch->call_dummy_p == -1))
552 internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
553 /* Skip verify of call_dummy_words, invalid_p == 0 */
554 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
555 if ((GDB_MULTI_ARCH >= 1)
556 && (gdbarch->call_dummy_stack_adjust_p == -1))
557 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
558 if ((GDB_MULTI_ARCH >= 2)
559 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
560 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
561 if ((GDB_MULTI_ARCH >= 2)
562 && (gdbarch->fix_call_dummy == 0))
563 internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
564 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
565 if ((GDB_MULTI_ARCH >= 1)
566 && (gdbarch->get_saved_register == 0))
567 internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
568 /* Skip verify of register_convertible, invalid_p == 0 */
569 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
570 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
571 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
572 /* Skip verify of store_pseudo_register, invalid_p == 0 */
573 /* Skip verify of pointer_to_address, invalid_p == 0 */
574 /* Skip verify of address_to_pointer, invalid_p == 0 */
575 /* Skip verify of return_value_on_stack, invalid_p == 0 */
576 if ((GDB_MULTI_ARCH >= 2)
577 && (gdbarch->extract_return_value == 0))
578 internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
579 if ((GDB_MULTI_ARCH >= 1)
580 && (gdbarch->push_arguments == 0))
581 internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
582 if ((GDB_MULTI_ARCH >= 2)
583 && (gdbarch->push_dummy_frame == 0))
584 internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
585 if ((GDB_MULTI_ARCH >= 1)
586 && (gdbarch->push_return_address == 0))
587 internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
588 if ((GDB_MULTI_ARCH >= 2)
589 && (gdbarch->pop_frame == 0))
590 internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
591 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
592 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
593 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
594 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
595 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
596 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
597 if ((GDB_MULTI_ARCH >= 2)
598 && (gdbarch->store_struct_return == 0))
599 internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
600 if ((GDB_MULTI_ARCH >= 2)
601 && (gdbarch->store_return_value == 0))
602 internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
603 if ((GDB_MULTI_ARCH >= 2)
604 && (gdbarch->extract_struct_value_address == 0))
605 internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
606 if ((GDB_MULTI_ARCH >= 2)
607 && (gdbarch->use_struct_convention == 0))
608 internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
609 if ((GDB_MULTI_ARCH >= 2)
610 && (gdbarch->frame_init_saved_regs == 0))
611 internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
612 if ((GDB_MULTI_ARCH >= 2)
613 && (gdbarch->init_extra_frame_info == 0))
614 internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
615 if ((GDB_MULTI_ARCH >= 2)
616 && (gdbarch->skip_prologue == 0))
617 internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
618 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
619 if ((GDB_MULTI_ARCH >= 2)
620 && (gdbarch->inner_than == 0))
621 internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
622 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
623 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
624 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
625 if ((GDB_MULTI_ARCH >= 2)
626 && (gdbarch->decr_pc_after_break == -1))
627 internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
628 if ((GDB_MULTI_ARCH >= 2)
629 && (gdbarch->function_start_offset == -1))
630 internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
631 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
632 if ((GDB_MULTI_ARCH >= 2)
633 && (gdbarch->frame_args_skip == -1))
634 internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
635 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
636 if ((GDB_MULTI_ARCH >= 2)
637 && (gdbarch->frame_chain == 0))
638 internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
639 if ((GDB_MULTI_ARCH >= 1)
640 && (gdbarch->frame_chain_valid == 0))
641 internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
642 if ((GDB_MULTI_ARCH >= 2)
643 && (gdbarch->frame_saved_pc == 0))
644 internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
645 if ((GDB_MULTI_ARCH >= 2)
646 && (gdbarch->frame_args_address == 0))
647 internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
648 if ((GDB_MULTI_ARCH >= 2)
649 && (gdbarch->frame_locals_address == 0))
650 internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
651 if ((GDB_MULTI_ARCH >= 2)
652 && (gdbarch->saved_pc_after_call == 0))
653 internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
654 if ((GDB_MULTI_ARCH >= 2)
655 && (gdbarch->frame_num_args == 0))
656 internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
657 /* Skip verify of stack_align, has predicate */
658 /* Skip verify of reg_struct_has_addr, has predicate */
659 /* Skip verify of save_dummy_frame_tos, has predicate */
660 if (gdbarch->float_format == 0)
661 gdbarch->float_format = default_float_format (gdbarch);
662 if (gdbarch->double_format == 0)
663 gdbarch->double_format = default_double_format (gdbarch);
664 if (gdbarch->long_double_format == 0)
665 gdbarch->long_double_format = &floatformat_unknown;
669 /* Print out the details of the current architecture. */
671 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
672 just happens to match the global variable ``current_gdbarch''. That
673 way macros refering to that variable get the local and not the global
674 version - ulgh. Once everything is parameterised with gdbarch, this
678 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
680 fprintf_unfiltered (file,
681 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
683 #ifdef TARGET_ARCHITECTURE
684 fprintf_unfiltered (file,
685 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
686 XSTRING (TARGET_ARCHITECTURE));
688 #ifdef TARGET_BYTE_ORDER
689 fprintf_unfiltered (file,
690 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
691 XSTRING (TARGET_BYTE_ORDER));
693 #ifdef TARGET_BFD_VMA_BIT
694 fprintf_unfiltered (file,
695 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
696 XSTRING (TARGET_BFD_VMA_BIT));
698 #ifdef TARGET_PTR_BIT
699 fprintf_unfiltered (file,
700 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
701 XSTRING (TARGET_PTR_BIT));
703 #ifdef TARGET_SHORT_BIT
704 fprintf_unfiltered (file,
705 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
706 XSTRING (TARGET_SHORT_BIT));
708 #ifdef TARGET_INT_BIT
709 fprintf_unfiltered (file,
710 "gdbarch_dump: TARGET_INT_BIT # %s\n",
711 XSTRING (TARGET_INT_BIT));
713 #ifdef TARGET_LONG_BIT
714 fprintf_unfiltered (file,
715 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
716 XSTRING (TARGET_LONG_BIT));
718 #ifdef TARGET_LONG_LONG_BIT
719 fprintf_unfiltered (file,
720 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
721 XSTRING (TARGET_LONG_LONG_BIT));
723 #ifdef TARGET_FLOAT_BIT
724 fprintf_unfiltered (file,
725 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
726 XSTRING (TARGET_FLOAT_BIT));
728 #ifdef TARGET_DOUBLE_BIT
729 fprintf_unfiltered (file,
730 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
731 XSTRING (TARGET_DOUBLE_BIT));
733 #ifdef TARGET_LONG_DOUBLE_BIT
734 fprintf_unfiltered (file,
735 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
736 XSTRING (TARGET_LONG_DOUBLE_BIT));
739 fprintf_unfiltered (file,
740 "gdbarch_dump: IEEE_FLOAT # %s\n",
741 XSTRING (IEEE_FLOAT));
743 #ifdef TARGET_READ_PC
744 fprintf_unfiltered (file,
745 "gdbarch_dump: %s # %s\n",
746 "TARGET_READ_PC(pid)",
747 XSTRING (TARGET_READ_PC (pid)));
749 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
750 /* Macro might contain `[{}]' when not multi-arch */
751 fprintf_unfiltered (file,
752 "gdbarch_dump: %s # %s\n",
753 "TARGET_WRITE_PC(val, pid)",
754 XSTRING (TARGET_WRITE_PC (val, pid)));
756 #ifdef TARGET_READ_FP
757 fprintf_unfiltered (file,
758 "gdbarch_dump: %s # %s\n",
760 XSTRING (TARGET_READ_FP ()));
762 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
763 /* Macro might contain `[{}]' when not multi-arch */
764 fprintf_unfiltered (file,
765 "gdbarch_dump: %s # %s\n",
766 "TARGET_WRITE_FP(val)",
767 XSTRING (TARGET_WRITE_FP (val)));
769 #ifdef TARGET_READ_SP
770 fprintf_unfiltered (file,
771 "gdbarch_dump: %s # %s\n",
773 XSTRING (TARGET_READ_SP ()));
775 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
776 /* Macro might contain `[{}]' when not multi-arch */
777 fprintf_unfiltered (file,
778 "gdbarch_dump: %s # %s\n",
779 "TARGET_WRITE_SP(val)",
780 XSTRING (TARGET_WRITE_SP (val)));
783 fprintf_unfiltered (file,
784 "gdbarch_dump: NUM_REGS # %s\n",
787 #ifdef NUM_PSEUDO_REGS
788 fprintf_unfiltered (file,
789 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
790 XSTRING (NUM_PSEUDO_REGS));
793 fprintf_unfiltered (file,
794 "gdbarch_dump: SP_REGNUM # %s\n",
795 XSTRING (SP_REGNUM));
798 fprintf_unfiltered (file,
799 "gdbarch_dump: FP_REGNUM # %s\n",
800 XSTRING (FP_REGNUM));
803 fprintf_unfiltered (file,
804 "gdbarch_dump: PC_REGNUM # %s\n",
805 XSTRING (PC_REGNUM));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: FP0_REGNUM # %s\n",
810 XSTRING (FP0_REGNUM));
813 fprintf_unfiltered (file,
814 "gdbarch_dump: NPC_REGNUM # %s\n",
815 XSTRING (NPC_REGNUM));
818 fprintf_unfiltered (file,
819 "gdbarch_dump: NNPC_REGNUM # %s\n",
820 XSTRING (NNPC_REGNUM));
823 fprintf_unfiltered (file,
824 "gdbarch_dump: %s # %s\n",
825 "REGISTER_NAME(regnr)",
826 XSTRING (REGISTER_NAME (regnr)));
829 fprintf_unfiltered (file,
830 "gdbarch_dump: REGISTER_SIZE # %s\n",
831 XSTRING (REGISTER_SIZE));
833 #ifdef REGISTER_BYTES
834 fprintf_unfiltered (file,
835 "gdbarch_dump: REGISTER_BYTES # %s\n",
836 XSTRING (REGISTER_BYTES));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: %s # %s\n",
841 "REGISTER_BYTE(reg_nr)",
842 XSTRING (REGISTER_BYTE (reg_nr)));
844 #ifdef REGISTER_RAW_SIZE
845 fprintf_unfiltered (file,
846 "gdbarch_dump: %s # %s\n",
847 "REGISTER_RAW_SIZE(reg_nr)",
848 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
850 #ifdef MAX_REGISTER_RAW_SIZE
851 fprintf_unfiltered (file,
852 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
853 XSTRING (MAX_REGISTER_RAW_SIZE));
855 #ifdef REGISTER_VIRTUAL_SIZE
856 fprintf_unfiltered (file,
857 "gdbarch_dump: %s # %s\n",
858 "REGISTER_VIRTUAL_SIZE(reg_nr)",
859 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
861 #ifdef MAX_REGISTER_VIRTUAL_SIZE
862 fprintf_unfiltered (file,
863 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
864 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
866 #ifdef REGISTER_VIRTUAL_TYPE
867 fprintf_unfiltered (file,
868 "gdbarch_dump: %s # %s\n",
869 "REGISTER_VIRTUAL_TYPE(reg_nr)",
870 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
872 #ifdef USE_GENERIC_DUMMY_FRAMES
873 fprintf_unfiltered (file,
874 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
875 XSTRING (USE_GENERIC_DUMMY_FRAMES));
877 #ifdef CALL_DUMMY_LOCATION
878 fprintf_unfiltered (file,
879 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
880 XSTRING (CALL_DUMMY_LOCATION));
882 #ifdef CALL_DUMMY_ADDRESS
883 fprintf_unfiltered (file,
884 "gdbarch_dump: %s # %s\n",
885 "CALL_DUMMY_ADDRESS()",
886 XSTRING (CALL_DUMMY_ADDRESS ()));
888 #ifdef CALL_DUMMY_START_OFFSET
889 fprintf_unfiltered (file,
890 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
891 XSTRING (CALL_DUMMY_START_OFFSET));
893 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
894 fprintf_unfiltered (file,
895 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
896 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
898 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
899 fprintf_unfiltered (file,
900 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
901 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
903 #ifdef CALL_DUMMY_LENGTH
904 fprintf_unfiltered (file,
905 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
906 XSTRING (CALL_DUMMY_LENGTH));
908 #ifdef PC_IN_CALL_DUMMY
909 fprintf_unfiltered (file,
910 "gdbarch_dump: %s # %s\n",
911 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
912 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: CALL_DUMMY_P # %s\n",
917 XSTRING (CALL_DUMMY_P));
919 #ifdef CALL_DUMMY_WORDS
920 fprintf_unfiltered (file,
921 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
922 XSTRING (CALL_DUMMY_WORDS));
924 #ifdef SIZEOF_CALL_DUMMY_WORDS
925 fprintf_unfiltered (file,
926 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
927 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
929 #ifdef CALL_DUMMY_STACK_ADJUST_P
930 fprintf_unfiltered (file,
931 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
932 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
934 #ifdef CALL_DUMMY_STACK_ADJUST
935 fprintf_unfiltered (file,
936 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
937 XSTRING (CALL_DUMMY_STACK_ADJUST));
939 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
940 /* Macro might contain `[{}]' when not multi-arch */
941 fprintf_unfiltered (file,
942 "gdbarch_dump: %s # %s\n",
943 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
944 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
946 #ifdef BELIEVE_PCC_PROMOTION
947 fprintf_unfiltered (file,
948 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
949 XSTRING (BELIEVE_PCC_PROMOTION));
951 #ifdef BELIEVE_PCC_PROMOTION_TYPE
952 fprintf_unfiltered (file,
953 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
954 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
956 #ifdef COERCE_FLOAT_TO_DOUBLE
957 fprintf_unfiltered (file,
958 "gdbarch_dump: %s # %s\n",
959 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
960 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
962 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
963 /* Macro might contain `[{}]' when not multi-arch */
964 fprintf_unfiltered (file,
965 "gdbarch_dump: %s # %s\n",
966 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
967 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
969 #ifdef REGISTER_CONVERTIBLE
970 fprintf_unfiltered (file,
971 "gdbarch_dump: %s # %s\n",
972 "REGISTER_CONVERTIBLE(nr)",
973 XSTRING (REGISTER_CONVERTIBLE (nr)));
975 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
976 /* Macro might contain `[{}]' when not multi-arch */
977 fprintf_unfiltered (file,
978 "gdbarch_dump: %s # %s\n",
979 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
980 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
982 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
983 /* Macro might contain `[{}]' when not multi-arch */
984 fprintf_unfiltered (file,
985 "gdbarch_dump: %s # %s\n",
986 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
987 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
989 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
990 /* Macro might contain `[{}]' when not multi-arch */
991 fprintf_unfiltered (file,
992 "gdbarch_dump: %s # %s\n",
993 "FETCH_PSEUDO_REGISTER(regnum)",
994 XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
996 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
997 /* Macro might contain `[{}]' when not multi-arch */
998 fprintf_unfiltered (file,
999 "gdbarch_dump: %s # %s\n",
1000 "STORE_PSEUDO_REGISTER(regnum)",
1001 XSTRING (STORE_PSEUDO_REGISTER (regnum)));
1003 #ifdef POINTER_TO_ADDRESS
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: %s # %s\n",
1006 "POINTER_TO_ADDRESS(type, buf)",
1007 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1009 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1010 /* Macro might contain `[{}]' when not multi-arch */
1011 fprintf_unfiltered (file,
1012 "gdbarch_dump: %s # %s\n",
1013 "ADDRESS_TO_POINTER(type, buf, addr)",
1014 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
1016 #ifdef RETURN_VALUE_ON_STACK
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: %s # %s\n",
1019 "RETURN_VALUE_ON_STACK(type)",
1020 XSTRING (RETURN_VALUE_ON_STACK (type)));
1022 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1023 /* Macro might contain `[{}]' when not multi-arch */
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: %s # %s\n",
1026 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1027 XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1029 #ifdef PUSH_ARGUMENTS
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: %s # %s\n",
1032 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1033 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1035 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1036 /* Macro might contain `[{}]' when not multi-arch */
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: %s # %s\n",
1039 "PUSH_DUMMY_FRAME(-)",
1040 XSTRING (PUSH_DUMMY_FRAME (-)));
1042 #ifdef PUSH_RETURN_ADDRESS
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: %s # %s\n",
1045 "PUSH_RETURN_ADDRESS(pc, sp)",
1046 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1048 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1049 /* Macro might contain `[{}]' when not multi-arch */
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: %s # %s\n",
1053 XSTRING (POP_FRAME (-)));
1055 #ifdef D10V_MAKE_DADDR
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: %s # %s\n",
1058 "D10V_MAKE_DADDR(x)",
1059 XSTRING (D10V_MAKE_DADDR (x)));
1061 #ifdef D10V_MAKE_IADDR
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: %s # %s\n",
1064 "D10V_MAKE_IADDR(x)",
1065 XSTRING (D10V_MAKE_IADDR (x)));
1068 fprintf_unfiltered (file,
1069 "gdbarch_dump: %s # %s\n",
1071 XSTRING (D10V_DADDR_P (x)));
1074 fprintf_unfiltered (file,
1075 "gdbarch_dump: %s # %s\n",
1077 XSTRING (D10V_IADDR_P (x)));
1079 #ifdef D10V_CONVERT_DADDR_TO_RAW
1080 fprintf_unfiltered (file,
1081 "gdbarch_dump: %s # %s\n",
1082 "D10V_CONVERT_DADDR_TO_RAW(x)",
1083 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x)));
1085 #ifdef D10V_CONVERT_IADDR_TO_RAW
1086 fprintf_unfiltered (file,
1087 "gdbarch_dump: %s # %s\n",
1088 "D10V_CONVERT_IADDR_TO_RAW(x)",
1089 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x)));
1091 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1092 /* Macro might contain `[{}]' when not multi-arch */
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: %s # %s\n",
1095 "STORE_STRUCT_RETURN(addr, sp)",
1096 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
1098 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1099 /* Macro might contain `[{}]' when not multi-arch */
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: %s # %s\n",
1102 "STORE_RETURN_VALUE(type, valbuf)",
1103 XSTRING (STORE_RETURN_VALUE (type, valbuf)));
1105 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: %s # %s\n",
1108 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1109 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1111 #ifdef USE_STRUCT_CONVENTION
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: %s # %s\n",
1114 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1115 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
1117 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1118 /* Macro might contain `[{}]' when not multi-arch */
1119 fprintf_unfiltered (file,
1120 "gdbarch_dump: %s # %s\n",
1121 "FRAME_INIT_SAVED_REGS(frame)",
1122 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1124 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1125 /* Macro might contain `[{}]' when not multi-arch */
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: %s # %s\n",
1128 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1129 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1131 #ifdef SKIP_PROLOGUE
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: %s # %s\n",
1134 "SKIP_PROLOGUE(ip)",
1135 XSTRING (SKIP_PROLOGUE (ip)));
1137 #ifdef PROLOGUE_FRAMELESS_P
1138 fprintf_unfiltered (file,
1139 "gdbarch_dump: %s # %s\n",
1140 "PROLOGUE_FRAMELESS_P(ip)",
1141 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: %s # %s\n",
1146 "INNER_THAN(lhs, rhs)",
1147 XSTRING (INNER_THAN (lhs, rhs)));
1149 #ifdef BREAKPOINT_FROM_PC
1150 fprintf_unfiltered (file,
1151 "gdbarch_dump: %s # %s\n",
1152 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1153 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
1155 #ifdef MEMORY_INSERT_BREAKPOINT
1156 fprintf_unfiltered (file,
1157 "gdbarch_dump: %s # %s\n",
1158 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1159 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1161 #ifdef MEMORY_REMOVE_BREAKPOINT
1162 fprintf_unfiltered (file,
1163 "gdbarch_dump: %s # %s\n",
1164 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1165 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1167 #ifdef DECR_PC_AFTER_BREAK
1168 fprintf_unfiltered (file,
1169 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1170 XSTRING (DECR_PC_AFTER_BREAK));
1172 #ifdef FUNCTION_START_OFFSET
1173 fprintf_unfiltered (file,
1174 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1175 XSTRING (FUNCTION_START_OFFSET));
1177 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1178 /* Macro might contain `[{}]' when not multi-arch */
1179 fprintf_unfiltered (file,
1180 "gdbarch_dump: %s # %s\n",
1181 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1182 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1184 #ifdef FRAME_ARGS_SKIP
1185 fprintf_unfiltered (file,
1186 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1187 XSTRING (FRAME_ARGS_SKIP));
1189 #ifdef FRAMELESS_FUNCTION_INVOCATION
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: %s # %s\n",
1192 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1193 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: %s # %s\n",
1198 "FRAME_CHAIN(frame)",
1199 XSTRING (FRAME_CHAIN (frame)));
1201 #ifdef FRAME_CHAIN_VALID
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: %s # %s\n",
1204 "FRAME_CHAIN_VALID(chain, thisframe)",
1205 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1207 #ifdef FRAME_SAVED_PC
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: %s # %s\n",
1210 "FRAME_SAVED_PC(fi)",
1211 XSTRING (FRAME_SAVED_PC (fi)));
1213 #ifdef FRAME_ARGS_ADDRESS
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: %s # %s\n",
1216 "FRAME_ARGS_ADDRESS(fi)",
1217 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1219 #ifdef FRAME_LOCALS_ADDRESS
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: %s # %s\n",
1222 "FRAME_LOCALS_ADDRESS(fi)",
1223 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1225 #ifdef SAVED_PC_AFTER_CALL
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: %s # %s\n",
1228 "SAVED_PC_AFTER_CALL(frame)",
1229 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1231 #ifdef FRAME_NUM_ARGS
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: %s # %s\n",
1234 "FRAME_NUM_ARGS(frame)",
1235 XSTRING (FRAME_NUM_ARGS (frame)));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: %s # %s\n",
1241 XSTRING (STACK_ALIGN (sp)));
1243 #ifdef REG_STRUCT_HAS_ADDR
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: %s # %s\n",
1246 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1247 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1249 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1250 /* Macro might contain `[{}]' when not multi-arch */
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: %s # %s\n",
1253 "SAVE_DUMMY_FRAME_TOS(sp)",
1254 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1256 #ifdef TARGET_FLOAT_FORMAT
1257 fprintf_unfiltered (file,
1258 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1259 XSTRING (TARGET_FLOAT_FORMAT));
1261 #ifdef TARGET_DOUBLE_FORMAT
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1264 XSTRING (TARGET_DOUBLE_FORMAT));
1266 #ifdef TARGET_LONG_DOUBLE_FORMAT
1267 fprintf_unfiltered (file,
1268 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1269 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1271 #ifdef TARGET_ARCHITECTURE
1272 if (TARGET_ARCHITECTURE != NULL)
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1275 TARGET_ARCHITECTURE->printable_name);
1277 #ifdef TARGET_BYTE_ORDER
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1280 (long) TARGET_BYTE_ORDER);
1282 #ifdef TARGET_BFD_VMA_BIT
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1285 (long) TARGET_BFD_VMA_BIT);
1287 #ifdef TARGET_PTR_BIT
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1290 (long) TARGET_PTR_BIT);
1292 #ifdef TARGET_SHORT_BIT
1293 fprintf_unfiltered (file,
1294 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1295 (long) TARGET_SHORT_BIT);
1297 #ifdef TARGET_INT_BIT
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1300 (long) TARGET_INT_BIT);
1302 #ifdef TARGET_LONG_BIT
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1305 (long) TARGET_LONG_BIT);
1307 #ifdef TARGET_LONG_LONG_BIT
1308 fprintf_unfiltered (file,
1309 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1310 (long) TARGET_LONG_LONG_BIT);
1312 #ifdef TARGET_FLOAT_BIT
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1315 (long) TARGET_FLOAT_BIT);
1317 #ifdef TARGET_DOUBLE_BIT
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1320 (long) TARGET_DOUBLE_BIT);
1322 #ifdef TARGET_LONG_DOUBLE_BIT
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1325 (long) TARGET_LONG_DOUBLE_BIT);
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1332 #ifdef TARGET_READ_PC
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1336 (long) current_gdbarch->read_pc
1337 /*TARGET_READ_PC ()*/);
1339 #ifdef TARGET_WRITE_PC
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1343 (long) current_gdbarch->write_pc
1344 /*TARGET_WRITE_PC ()*/);
1346 #ifdef TARGET_READ_FP
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1350 (long) current_gdbarch->read_fp
1351 /*TARGET_READ_FP ()*/);
1353 #ifdef TARGET_WRITE_FP
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1357 (long) current_gdbarch->write_fp
1358 /*TARGET_WRITE_FP ()*/);
1360 #ifdef TARGET_READ_SP
1362 fprintf_unfiltered (file,
1363 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1364 (long) current_gdbarch->read_sp
1365 /*TARGET_READ_SP ()*/);
1367 #ifdef TARGET_WRITE_SP
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1371 (long) current_gdbarch->write_sp
1372 /*TARGET_WRITE_SP ()*/);
1375 fprintf_unfiltered (file,
1376 "gdbarch_dump: NUM_REGS = %ld\n",
1379 #ifdef NUM_PSEUDO_REGS
1380 fprintf_unfiltered (file,
1381 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1382 (long) NUM_PSEUDO_REGS);
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: SP_REGNUM = %ld\n",
1390 fprintf_unfiltered (file,
1391 "gdbarch_dump: FP_REGNUM = %ld\n",
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: PC_REGNUM = %ld\n",
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: FP0_REGNUM = %ld\n",
1405 fprintf_unfiltered (file,
1406 "gdbarch_dump: NPC_REGNUM = %ld\n",
1410 fprintf_unfiltered (file,
1411 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1412 (long) NNPC_REGNUM);
1414 #ifdef REGISTER_NAME
1416 fprintf_unfiltered (file,
1417 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1418 (long) current_gdbarch->register_name
1419 /*REGISTER_NAME ()*/);
1421 #ifdef REGISTER_SIZE
1422 fprintf_unfiltered (file,
1423 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1424 (long) REGISTER_SIZE);
1426 #ifdef REGISTER_BYTES
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1429 (long) REGISTER_BYTES);
1431 #ifdef REGISTER_BYTE
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1435 (long) current_gdbarch->register_byte
1436 /*REGISTER_BYTE ()*/);
1438 #ifdef REGISTER_RAW_SIZE
1440 fprintf_unfiltered (file,
1441 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1442 (long) current_gdbarch->register_raw_size
1443 /*REGISTER_RAW_SIZE ()*/);
1445 #ifdef MAX_REGISTER_RAW_SIZE
1446 fprintf_unfiltered (file,
1447 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1448 (long) MAX_REGISTER_RAW_SIZE);
1450 #ifdef REGISTER_VIRTUAL_SIZE
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1454 (long) current_gdbarch->register_virtual_size
1455 /*REGISTER_VIRTUAL_SIZE ()*/);
1457 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1460 (long) MAX_REGISTER_VIRTUAL_SIZE);
1462 #ifdef REGISTER_VIRTUAL_TYPE
1464 fprintf_unfiltered (file,
1465 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1466 (long) current_gdbarch->register_virtual_type
1467 /*REGISTER_VIRTUAL_TYPE ()*/);
1469 #ifdef USE_GENERIC_DUMMY_FRAMES
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1472 (long) USE_GENERIC_DUMMY_FRAMES);
1474 #ifdef CALL_DUMMY_LOCATION
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1477 (long) CALL_DUMMY_LOCATION);
1479 #ifdef CALL_DUMMY_ADDRESS
1481 fprintf_unfiltered (file,
1482 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1483 (long) current_gdbarch->call_dummy_address
1484 /*CALL_DUMMY_ADDRESS ()*/);
1486 #ifdef CALL_DUMMY_START_OFFSET
1487 fprintf_unfiltered (file,
1488 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1489 (long) CALL_DUMMY_START_OFFSET);
1491 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1494 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
1496 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1497 fprintf_unfiltered (file,
1498 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1499 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
1501 #ifdef CALL_DUMMY_LENGTH
1502 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
1503 fprintf_unfiltered (file,
1504 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1505 (long) CALL_DUMMY_LENGTH);
1507 #ifdef PC_IN_CALL_DUMMY
1509 fprintf_unfiltered (file,
1510 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1511 (long) current_gdbarch->pc_in_call_dummy
1512 /*PC_IN_CALL_DUMMY ()*/);
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1517 (long) CALL_DUMMY_P);
1519 #ifdef CALL_DUMMY_WORDS
1520 fprintf_unfiltered (file,
1521 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1522 (long) CALL_DUMMY_WORDS);
1524 #ifdef SIZEOF_CALL_DUMMY_WORDS
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1527 (long) SIZEOF_CALL_DUMMY_WORDS);
1529 #ifdef CALL_DUMMY_STACK_ADJUST_P
1530 fprintf_unfiltered (file,
1531 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1532 (long) CALL_DUMMY_STACK_ADJUST_P);
1534 #ifdef CALL_DUMMY_STACK_ADJUST
1535 if (CALL_DUMMY_STACK_ADJUST_P)
1536 fprintf_unfiltered (file,
1537 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1538 (long) CALL_DUMMY_STACK_ADJUST);
1540 #ifdef FIX_CALL_DUMMY
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1544 (long) current_gdbarch->fix_call_dummy
1545 /*FIX_CALL_DUMMY ()*/);
1547 #ifdef BELIEVE_PCC_PROMOTION
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1550 (long) BELIEVE_PCC_PROMOTION);
1552 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1555 (long) BELIEVE_PCC_PROMOTION_TYPE);
1557 #ifdef COERCE_FLOAT_TO_DOUBLE
1559 fprintf_unfiltered (file,
1560 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1561 (long) current_gdbarch->coerce_float_to_double
1562 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1564 #ifdef GET_SAVED_REGISTER
1566 fprintf_unfiltered (file,
1567 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1568 (long) current_gdbarch->get_saved_register
1569 /*GET_SAVED_REGISTER ()*/);
1571 #ifdef REGISTER_CONVERTIBLE
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1575 (long) current_gdbarch->register_convertible
1576 /*REGISTER_CONVERTIBLE ()*/);
1578 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1580 fprintf_unfiltered (file,
1581 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1582 (long) current_gdbarch->register_convert_to_virtual
1583 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1585 #ifdef REGISTER_CONVERT_TO_RAW
1587 fprintf_unfiltered (file,
1588 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1589 (long) current_gdbarch->register_convert_to_raw
1590 /*REGISTER_CONVERT_TO_RAW ()*/);
1592 #ifdef FETCH_PSEUDO_REGISTER
1594 fprintf_unfiltered (file,
1595 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1596 (long) current_gdbarch->fetch_pseudo_register
1597 /*FETCH_PSEUDO_REGISTER ()*/);
1599 #ifdef STORE_PSEUDO_REGISTER
1601 fprintf_unfiltered (file,
1602 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1603 (long) current_gdbarch->store_pseudo_register
1604 /*STORE_PSEUDO_REGISTER ()*/);
1606 #ifdef POINTER_TO_ADDRESS
1608 fprintf_unfiltered (file,
1609 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1610 (long) current_gdbarch->pointer_to_address
1611 /*POINTER_TO_ADDRESS ()*/);
1613 #ifdef ADDRESS_TO_POINTER
1615 fprintf_unfiltered (file,
1616 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1617 (long) current_gdbarch->address_to_pointer
1618 /*ADDRESS_TO_POINTER ()*/);
1620 #ifdef RETURN_VALUE_ON_STACK
1622 fprintf_unfiltered (file,
1623 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1624 (long) current_gdbarch->return_value_on_stack
1625 /*RETURN_VALUE_ON_STACK ()*/);
1627 #ifdef EXTRACT_RETURN_VALUE
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1631 (long) current_gdbarch->extract_return_value
1632 /*EXTRACT_RETURN_VALUE ()*/);
1634 #ifdef PUSH_ARGUMENTS
1636 fprintf_unfiltered (file,
1637 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1638 (long) current_gdbarch->push_arguments
1639 /*PUSH_ARGUMENTS ()*/);
1641 #ifdef PUSH_DUMMY_FRAME
1643 fprintf_unfiltered (file,
1644 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1645 (long) current_gdbarch->push_dummy_frame
1646 /*PUSH_DUMMY_FRAME ()*/);
1648 #ifdef PUSH_RETURN_ADDRESS
1650 fprintf_unfiltered (file,
1651 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1652 (long) current_gdbarch->push_return_address
1653 /*PUSH_RETURN_ADDRESS ()*/);
1657 fprintf_unfiltered (file,
1658 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1659 (long) current_gdbarch->pop_frame
1662 #ifdef D10V_MAKE_DADDR
1664 fprintf_unfiltered (file,
1665 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1666 (long) current_gdbarch->d10v_make_daddr
1667 /*D10V_MAKE_DADDR ()*/);
1669 #ifdef D10V_MAKE_IADDR
1671 fprintf_unfiltered (file,
1672 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1673 (long) current_gdbarch->d10v_make_iaddr
1674 /*D10V_MAKE_IADDR ()*/);
1678 fprintf_unfiltered (file,
1679 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1680 (long) current_gdbarch->d10v_daddr_p
1681 /*D10V_DADDR_P ()*/);
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1687 (long) current_gdbarch->d10v_iaddr_p
1688 /*D10V_IADDR_P ()*/);
1690 #ifdef D10V_CONVERT_DADDR_TO_RAW
1692 fprintf_unfiltered (file,
1693 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1694 (long) current_gdbarch->d10v_convert_daddr_to_raw
1695 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1697 #ifdef D10V_CONVERT_IADDR_TO_RAW
1699 fprintf_unfiltered (file,
1700 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1701 (long) current_gdbarch->d10v_convert_iaddr_to_raw
1702 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1704 #ifdef STORE_STRUCT_RETURN
1706 fprintf_unfiltered (file,
1707 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1708 (long) current_gdbarch->store_struct_return
1709 /*STORE_STRUCT_RETURN ()*/);
1711 #ifdef STORE_RETURN_VALUE
1713 fprintf_unfiltered (file,
1714 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1715 (long) current_gdbarch->store_return_value
1716 /*STORE_RETURN_VALUE ()*/);
1718 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1720 fprintf_unfiltered (file,
1721 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1722 (long) current_gdbarch->extract_struct_value_address
1723 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1725 #ifdef USE_STRUCT_CONVENTION
1727 fprintf_unfiltered (file,
1728 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1729 (long) current_gdbarch->use_struct_convention
1730 /*USE_STRUCT_CONVENTION ()*/);
1732 #ifdef FRAME_INIT_SAVED_REGS
1734 fprintf_unfiltered (file,
1735 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1736 (long) current_gdbarch->frame_init_saved_regs
1737 /*FRAME_INIT_SAVED_REGS ()*/);
1739 #ifdef INIT_EXTRA_FRAME_INFO
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1743 (long) current_gdbarch->init_extra_frame_info
1744 /*INIT_EXTRA_FRAME_INFO ()*/);
1746 #ifdef SKIP_PROLOGUE
1748 fprintf_unfiltered (file,
1749 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1750 (long) current_gdbarch->skip_prologue
1751 /*SKIP_PROLOGUE ()*/);
1753 #ifdef PROLOGUE_FRAMELESS_P
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1757 (long) current_gdbarch->prologue_frameless_p
1758 /*PROLOGUE_FRAMELESS_P ()*/);
1762 fprintf_unfiltered (file,
1763 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1764 (long) current_gdbarch->inner_than
1767 #ifdef BREAKPOINT_FROM_PC
1769 fprintf_unfiltered (file,
1770 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
1771 (long) current_gdbarch->breakpoint_from_pc
1772 /*BREAKPOINT_FROM_PC ()*/);
1774 #ifdef MEMORY_INSERT_BREAKPOINT
1776 fprintf_unfiltered (file,
1777 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1778 (long) current_gdbarch->memory_insert_breakpoint
1779 /*MEMORY_INSERT_BREAKPOINT ()*/);
1781 #ifdef MEMORY_REMOVE_BREAKPOINT
1783 fprintf_unfiltered (file,
1784 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1785 (long) current_gdbarch->memory_remove_breakpoint
1786 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1788 #ifdef DECR_PC_AFTER_BREAK
1789 fprintf_unfiltered (file,
1790 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1791 (long) DECR_PC_AFTER_BREAK);
1793 #ifdef FUNCTION_START_OFFSET
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1796 (long) FUNCTION_START_OFFSET);
1798 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1800 fprintf_unfiltered (file,
1801 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1802 (long) current_gdbarch->remote_translate_xfer_address
1803 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1805 #ifdef FRAME_ARGS_SKIP
1806 fprintf_unfiltered (file,
1807 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1808 (long) FRAME_ARGS_SKIP);
1810 #ifdef FRAMELESS_FUNCTION_INVOCATION
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1814 (long) current_gdbarch->frameless_function_invocation
1815 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1819 fprintf_unfiltered (file,
1820 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1821 (long) current_gdbarch->frame_chain
1822 /*FRAME_CHAIN ()*/);
1824 #ifdef FRAME_CHAIN_VALID
1826 fprintf_unfiltered (file,
1827 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1828 (long) current_gdbarch->frame_chain_valid
1829 /*FRAME_CHAIN_VALID ()*/);
1831 #ifdef FRAME_SAVED_PC
1833 fprintf_unfiltered (file,
1834 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1835 (long) current_gdbarch->frame_saved_pc
1836 /*FRAME_SAVED_PC ()*/);
1838 #ifdef FRAME_ARGS_ADDRESS
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1842 (long) current_gdbarch->frame_args_address
1843 /*FRAME_ARGS_ADDRESS ()*/);
1845 #ifdef FRAME_LOCALS_ADDRESS
1847 fprintf_unfiltered (file,
1848 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1849 (long) current_gdbarch->frame_locals_address
1850 /*FRAME_LOCALS_ADDRESS ()*/);
1852 #ifdef SAVED_PC_AFTER_CALL
1854 fprintf_unfiltered (file,
1855 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1856 (long) current_gdbarch->saved_pc_after_call
1857 /*SAVED_PC_AFTER_CALL ()*/);
1859 #ifdef FRAME_NUM_ARGS
1861 fprintf_unfiltered (file,
1862 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1863 (long) current_gdbarch->frame_num_args
1864 /*FRAME_NUM_ARGS ()*/);
1868 fprintf_unfiltered (file,
1869 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1870 (long) current_gdbarch->stack_align
1871 /*STACK_ALIGN ()*/);
1873 #ifdef REG_STRUCT_HAS_ADDR
1875 fprintf_unfiltered (file,
1876 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1877 (long) current_gdbarch->reg_struct_has_addr
1878 /*REG_STRUCT_HAS_ADDR ()*/);
1880 #ifdef SAVE_DUMMY_FRAME_TOS
1882 fprintf_unfiltered (file,
1883 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1884 (long) current_gdbarch->save_dummy_frame_tos
1885 /*SAVE_DUMMY_FRAME_TOS ()*/);
1887 #ifdef TARGET_FLOAT_FORMAT
1888 fprintf_unfiltered (file,
1889 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1890 (long) TARGET_FLOAT_FORMAT);
1892 #ifdef TARGET_DOUBLE_FORMAT
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1895 (long) TARGET_DOUBLE_FORMAT);
1897 #ifdef TARGET_LONG_DOUBLE_FORMAT
1898 fprintf_unfiltered (file,
1899 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1900 (long) TARGET_LONG_DOUBLE_FORMAT);
1902 if (current_gdbarch->dump_tdep != NULL)
1903 current_gdbarch->dump_tdep (current_gdbarch, file);
1906 struct gdbarch_tdep *
1907 gdbarch_tdep (struct gdbarch *gdbarch)
1909 if (gdbarch_debug >= 2)
1910 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1911 return gdbarch->tdep;
1915 const struct bfd_arch_info *
1916 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1918 if (gdbarch_debug >= 2)
1919 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1920 return gdbarch->bfd_arch_info;
1924 gdbarch_byte_order (struct gdbarch *gdbarch)
1926 if (gdbarch_debug >= 2)
1927 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1928 return gdbarch->byte_order;
1932 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
1934 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
1935 if (gdbarch_debug >= 2)
1936 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
1937 return gdbarch->bfd_vma_bit;
1941 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
1944 gdbarch->bfd_vma_bit = bfd_vma_bit;
1948 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1950 if (gdbarch->ptr_bit == 0)
1951 internal_error ("gdbarch: gdbarch_ptr_bit invalid");
1952 if (gdbarch_debug >= 2)
1953 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1954 return gdbarch->ptr_bit;
1958 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1961 gdbarch->ptr_bit = ptr_bit;
1965 gdbarch_short_bit (struct gdbarch *gdbarch)
1967 if (gdbarch->short_bit == 0)
1968 internal_error ("gdbarch: gdbarch_short_bit invalid");
1969 if (gdbarch_debug >= 2)
1970 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1971 return gdbarch->short_bit;
1975 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1978 gdbarch->short_bit = short_bit;
1982 gdbarch_int_bit (struct gdbarch *gdbarch)
1984 if (gdbarch->int_bit == 0)
1985 internal_error ("gdbarch: gdbarch_int_bit invalid");
1986 if (gdbarch_debug >= 2)
1987 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1988 return gdbarch->int_bit;
1992 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1995 gdbarch->int_bit = int_bit;
1999 gdbarch_long_bit (struct gdbarch *gdbarch)
2001 if (gdbarch->long_bit == 0)
2002 internal_error ("gdbarch: gdbarch_long_bit invalid");
2003 if (gdbarch_debug >= 2)
2004 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2005 return gdbarch->long_bit;
2009 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2012 gdbarch->long_bit = long_bit;
2016 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2018 if (gdbarch->long_long_bit == 0)
2019 internal_error ("gdbarch: gdbarch_long_long_bit invalid");
2020 if (gdbarch_debug >= 2)
2021 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2022 return gdbarch->long_long_bit;
2026 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2029 gdbarch->long_long_bit = long_long_bit;
2033 gdbarch_float_bit (struct gdbarch *gdbarch)
2035 if (gdbarch->float_bit == 0)
2036 internal_error ("gdbarch: gdbarch_float_bit invalid");
2037 if (gdbarch_debug >= 2)
2038 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2039 return gdbarch->float_bit;
2043 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2046 gdbarch->float_bit = float_bit;
2050 gdbarch_double_bit (struct gdbarch *gdbarch)
2052 if (gdbarch->double_bit == 0)
2053 internal_error ("gdbarch: gdbarch_double_bit invalid");
2054 if (gdbarch_debug >= 2)
2055 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2056 return gdbarch->double_bit;
2060 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2063 gdbarch->double_bit = double_bit;
2067 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2069 if (gdbarch->long_double_bit == 0)
2070 internal_error ("gdbarch: gdbarch_long_double_bit invalid");
2071 if (gdbarch_debug >= 2)
2072 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2073 return gdbarch->long_double_bit;
2077 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2078 int long_double_bit)
2080 gdbarch->long_double_bit = long_double_bit;
2084 gdbarch_ieee_float (struct gdbarch *gdbarch)
2086 /* Skip verify of ieee_float, invalid_p == 0 */
2087 if (gdbarch_debug >= 2)
2088 fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n");
2089 return gdbarch->ieee_float;
2093 set_gdbarch_ieee_float (struct gdbarch *gdbarch,
2096 gdbarch->ieee_float = ieee_float;
2100 gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
2102 if (gdbarch->read_pc == 0)
2103 internal_error ("gdbarch: gdbarch_read_pc invalid");
2104 if (gdbarch_debug >= 2)
2105 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2106 return gdbarch->read_pc (pid);
2110 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2111 gdbarch_read_pc_ftype read_pc)
2113 gdbarch->read_pc = read_pc;
2117 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
2119 if (gdbarch->write_pc == 0)
2120 internal_error ("gdbarch: gdbarch_write_pc invalid");
2121 if (gdbarch_debug >= 2)
2122 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2123 gdbarch->write_pc (val, pid);
2127 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2128 gdbarch_write_pc_ftype write_pc)
2130 gdbarch->write_pc = write_pc;
2134 gdbarch_read_fp (struct gdbarch *gdbarch)
2136 if (gdbarch->read_fp == 0)
2137 internal_error ("gdbarch: gdbarch_read_fp invalid");
2138 if (gdbarch_debug >= 2)
2139 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2140 return gdbarch->read_fp ();
2144 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2145 gdbarch_read_fp_ftype read_fp)
2147 gdbarch->read_fp = read_fp;
2151 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
2153 if (gdbarch->write_fp == 0)
2154 internal_error ("gdbarch: gdbarch_write_fp invalid");
2155 if (gdbarch_debug >= 2)
2156 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
2157 gdbarch->write_fp (val);
2161 set_gdbarch_write_fp (struct gdbarch *gdbarch,
2162 gdbarch_write_fp_ftype write_fp)
2164 gdbarch->write_fp = write_fp;
2168 gdbarch_read_sp (struct gdbarch *gdbarch)
2170 if (gdbarch->read_sp == 0)
2171 internal_error ("gdbarch: gdbarch_read_sp invalid");
2172 if (gdbarch_debug >= 2)
2173 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2174 return gdbarch->read_sp ();
2178 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2179 gdbarch_read_sp_ftype read_sp)
2181 gdbarch->read_sp = read_sp;
2185 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2187 if (gdbarch->write_sp == 0)
2188 internal_error ("gdbarch: gdbarch_write_sp invalid");
2189 if (gdbarch_debug >= 2)
2190 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2191 gdbarch->write_sp (val);
2195 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2196 gdbarch_write_sp_ftype write_sp)
2198 gdbarch->write_sp = write_sp;
2202 gdbarch_num_regs (struct gdbarch *gdbarch)
2204 if (gdbarch->num_regs == -1)
2205 internal_error ("gdbarch: gdbarch_num_regs invalid");
2206 if (gdbarch_debug >= 2)
2207 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2208 return gdbarch->num_regs;
2212 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2215 gdbarch->num_regs = num_regs;
2219 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2221 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2222 if (gdbarch_debug >= 2)
2223 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2224 return gdbarch->num_pseudo_regs;
2228 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2229 int num_pseudo_regs)
2231 gdbarch->num_pseudo_regs = num_pseudo_regs;
2235 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2237 if (gdbarch->sp_regnum == -1)
2238 internal_error ("gdbarch: gdbarch_sp_regnum invalid");
2239 if (gdbarch_debug >= 2)
2240 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2241 return gdbarch->sp_regnum;
2245 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2248 gdbarch->sp_regnum = sp_regnum;
2252 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2254 if (gdbarch->fp_regnum == -1)
2255 internal_error ("gdbarch: gdbarch_fp_regnum invalid");
2256 if (gdbarch_debug >= 2)
2257 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2258 return gdbarch->fp_regnum;
2262 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2265 gdbarch->fp_regnum = fp_regnum;
2269 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2271 if (gdbarch->pc_regnum == -1)
2272 internal_error ("gdbarch: gdbarch_pc_regnum invalid");
2273 if (gdbarch_debug >= 2)
2274 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2275 return gdbarch->pc_regnum;
2279 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2282 gdbarch->pc_regnum = pc_regnum;
2286 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2288 /* Skip verify of fp0_regnum, invalid_p == 0 */
2289 if (gdbarch_debug >= 2)
2290 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2291 return gdbarch->fp0_regnum;
2295 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2298 gdbarch->fp0_regnum = fp0_regnum;
2302 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2304 /* Skip verify of npc_regnum, invalid_p == 0 */
2305 if (gdbarch_debug >= 2)
2306 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2307 return gdbarch->npc_regnum;
2311 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2314 gdbarch->npc_regnum = npc_regnum;
2318 gdbarch_nnpc_regnum (struct gdbarch *gdbarch)
2320 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2321 if (gdbarch_debug >= 2)
2322 fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n");
2323 return gdbarch->nnpc_regnum;
2327 set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch,
2330 gdbarch->nnpc_regnum = nnpc_regnum;
2334 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2336 if (gdbarch->register_name == 0)
2337 internal_error ("gdbarch: gdbarch_register_name invalid");
2338 if (gdbarch_debug >= 2)
2339 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2340 return gdbarch->register_name (regnr);
2344 set_gdbarch_register_name (struct gdbarch *gdbarch,
2345 gdbarch_register_name_ftype register_name)
2347 gdbarch->register_name = register_name;
2351 gdbarch_register_size (struct gdbarch *gdbarch)
2353 if (gdbarch->register_size == -1)
2354 internal_error ("gdbarch: gdbarch_register_size invalid");
2355 if (gdbarch_debug >= 2)
2356 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2357 return gdbarch->register_size;
2361 set_gdbarch_register_size (struct gdbarch *gdbarch,
2364 gdbarch->register_size = register_size;
2368 gdbarch_register_bytes (struct gdbarch *gdbarch)
2370 if (gdbarch->register_bytes == -1)
2371 internal_error ("gdbarch: gdbarch_register_bytes invalid");
2372 if (gdbarch_debug >= 2)
2373 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2374 return gdbarch->register_bytes;
2378 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2381 gdbarch->register_bytes = register_bytes;
2385 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2387 if (gdbarch->register_byte == 0)
2388 internal_error ("gdbarch: gdbarch_register_byte invalid");
2389 if (gdbarch_debug >= 2)
2390 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2391 return gdbarch->register_byte (reg_nr);
2395 set_gdbarch_register_byte (struct gdbarch *gdbarch,
2396 gdbarch_register_byte_ftype register_byte)
2398 gdbarch->register_byte = register_byte;
2402 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2404 if (gdbarch->register_raw_size == 0)
2405 internal_error ("gdbarch: gdbarch_register_raw_size invalid");
2406 if (gdbarch_debug >= 2)
2407 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
2408 return gdbarch->register_raw_size (reg_nr);
2412 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
2413 gdbarch_register_raw_size_ftype register_raw_size)
2415 gdbarch->register_raw_size = register_raw_size;
2419 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
2421 if (gdbarch->max_register_raw_size == -1)
2422 internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
2423 if (gdbarch_debug >= 2)
2424 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
2425 return gdbarch->max_register_raw_size;
2429 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
2430 int max_register_raw_size)
2432 gdbarch->max_register_raw_size = max_register_raw_size;
2436 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2438 if (gdbarch->register_virtual_size == 0)
2439 internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
2440 if (gdbarch_debug >= 2)
2441 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
2442 return gdbarch->register_virtual_size (reg_nr);
2446 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
2447 gdbarch_register_virtual_size_ftype register_virtual_size)
2449 gdbarch->register_virtual_size = register_virtual_size;
2453 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
2455 if (gdbarch->max_register_virtual_size == -1)
2456 internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
2457 if (gdbarch_debug >= 2)
2458 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
2459 return gdbarch->max_register_virtual_size;
2463 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
2464 int max_register_virtual_size)
2466 gdbarch->max_register_virtual_size = max_register_virtual_size;
2470 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2472 if (gdbarch->register_virtual_type == 0)
2473 internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
2474 if (gdbarch_debug >= 2)
2475 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
2476 return gdbarch->register_virtual_type (reg_nr);
2480 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
2481 gdbarch_register_virtual_type_ftype register_virtual_type)
2483 gdbarch->register_virtual_type = register_virtual_type;
2487 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
2489 if (gdbarch->use_generic_dummy_frames == -1)
2490 internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
2491 if (gdbarch_debug >= 2)
2492 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
2493 return gdbarch->use_generic_dummy_frames;
2497 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
2498 int use_generic_dummy_frames)
2500 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
2504 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2506 if (gdbarch->call_dummy_location == 0)
2507 internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
2508 if (gdbarch_debug >= 2)
2509 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2510 return gdbarch->call_dummy_location;
2514 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2515 int call_dummy_location)
2517 gdbarch->call_dummy_location = call_dummy_location;
2521 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
2523 if (gdbarch->call_dummy_address == 0)
2524 internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
2525 if (gdbarch_debug >= 2)
2526 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
2527 return gdbarch->call_dummy_address ();
2531 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
2532 gdbarch_call_dummy_address_ftype call_dummy_address)
2534 gdbarch->call_dummy_address = call_dummy_address;
2538 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
2540 if (gdbarch->call_dummy_start_offset == -1)
2541 internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
2542 if (gdbarch_debug >= 2)
2543 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
2544 return gdbarch->call_dummy_start_offset;
2548 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
2549 CORE_ADDR call_dummy_start_offset)
2551 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
2555 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
2557 if (gdbarch->call_dummy_breakpoint_offset == -1)
2558 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2559 if (gdbarch_debug >= 2)
2560 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
2561 return gdbarch->call_dummy_breakpoint_offset;
2565 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
2566 CORE_ADDR call_dummy_breakpoint_offset)
2568 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
2572 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
2574 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
2575 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
2576 if (gdbarch_debug >= 2)
2577 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
2578 return gdbarch->call_dummy_breakpoint_offset_p;
2582 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
2583 int call_dummy_breakpoint_offset_p)
2585 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
2589 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
2591 if (gdbarch->call_dummy_length == -1)
2592 internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
2593 if (gdbarch_debug >= 2)
2594 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
2595 return gdbarch->call_dummy_length;
2599 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
2600 int call_dummy_length)
2602 gdbarch->call_dummy_length = call_dummy_length;
2606 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
2608 if (gdbarch->pc_in_call_dummy == 0)
2609 internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
2610 if (gdbarch_debug >= 2)
2611 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
2612 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
2616 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
2617 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
2619 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
2623 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
2625 if (gdbarch->call_dummy_p == -1)
2626 internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
2627 if (gdbarch_debug >= 2)
2628 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
2629 return gdbarch->call_dummy_p;
2633 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
2636 gdbarch->call_dummy_p = call_dummy_p;
2640 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
2642 /* Skip verify of call_dummy_words, invalid_p == 0 */
2643 if (gdbarch_debug >= 2)
2644 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
2645 return gdbarch->call_dummy_words;
2649 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
2650 LONGEST * call_dummy_words)
2652 gdbarch->call_dummy_words = call_dummy_words;
2656 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
2658 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
2659 if (gdbarch_debug >= 2)
2660 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
2661 return gdbarch->sizeof_call_dummy_words;
2665 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
2666 int sizeof_call_dummy_words)
2668 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
2672 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
2674 if (gdbarch->call_dummy_stack_adjust_p == -1)
2675 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
2676 if (gdbarch_debug >= 2)
2677 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
2678 return gdbarch->call_dummy_stack_adjust_p;
2682 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
2683 int call_dummy_stack_adjust_p)
2685 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
2689 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
2691 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
2692 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
2693 if (gdbarch_debug >= 2)
2694 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
2695 return gdbarch->call_dummy_stack_adjust;
2699 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
2700 int call_dummy_stack_adjust)
2702 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
2706 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)
2708 if (gdbarch->fix_call_dummy == 0)
2709 internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
2710 if (gdbarch_debug >= 2)
2711 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
2712 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
2716 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
2717 gdbarch_fix_call_dummy_ftype fix_call_dummy)
2719 gdbarch->fix_call_dummy = fix_call_dummy;
2723 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2725 if (gdbarch_debug >= 2)
2726 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2727 return gdbarch->believe_pcc_promotion;
2731 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2732 int believe_pcc_promotion)
2734 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2738 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
2740 if (gdbarch_debug >= 2)
2741 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
2742 return gdbarch->believe_pcc_promotion_type;
2746 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
2747 int believe_pcc_promotion_type)
2749 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
2753 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
2755 if (gdbarch->coerce_float_to_double == 0)
2756 internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
2757 if (gdbarch_debug >= 2)
2758 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
2759 return gdbarch->coerce_float_to_double (formal, actual);
2763 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
2764 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
2766 gdbarch->coerce_float_to_double = coerce_float_to_double;
2770 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)
2772 if (gdbarch->get_saved_register == 0)
2773 internal_error ("gdbarch: gdbarch_get_saved_register invalid");
2774 if (gdbarch_debug >= 2)
2775 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
2776 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
2780 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
2781 gdbarch_get_saved_register_ftype get_saved_register)
2783 gdbarch->get_saved_register = get_saved_register;
2787 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
2789 if (gdbarch->register_convertible == 0)
2790 internal_error ("gdbarch: gdbarch_register_convertible invalid");
2791 if (gdbarch_debug >= 2)
2792 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
2793 return gdbarch->register_convertible (nr);
2797 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
2798 gdbarch_register_convertible_ftype register_convertible)
2800 gdbarch->register_convertible = register_convertible;
2804 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
2806 if (gdbarch->register_convert_to_virtual == 0)
2807 internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
2808 if (gdbarch_debug >= 2)
2809 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
2810 gdbarch->register_convert_to_virtual (regnum, type, from, to);
2814 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
2815 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
2817 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
2821 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
2823 if (gdbarch->register_convert_to_raw == 0)
2824 internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
2825 if (gdbarch_debug >= 2)
2826 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
2827 gdbarch->register_convert_to_raw (type, regnum, from, to);
2831 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
2832 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
2834 gdbarch->register_convert_to_raw = register_convert_to_raw;
2838 gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
2840 if (gdbarch->fetch_pseudo_register == 0)
2841 internal_error ("gdbarch: gdbarch_fetch_pseudo_register invalid");
2842 if (gdbarch_debug >= 2)
2843 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
2844 gdbarch->fetch_pseudo_register (regnum);
2848 set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
2849 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
2851 gdbarch->fetch_pseudo_register = fetch_pseudo_register;
2855 gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
2857 if (gdbarch->store_pseudo_register == 0)
2858 internal_error ("gdbarch: gdbarch_store_pseudo_register invalid");
2859 if (gdbarch_debug >= 2)
2860 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
2861 gdbarch->store_pseudo_register (regnum);
2865 set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
2866 gdbarch_store_pseudo_register_ftype store_pseudo_register)
2868 gdbarch->store_pseudo_register = store_pseudo_register;
2872 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
2874 if (gdbarch->pointer_to_address == 0)
2875 internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
2876 if (gdbarch_debug >= 2)
2877 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2878 return gdbarch->pointer_to_address (type, buf);
2882 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2883 gdbarch_pointer_to_address_ftype pointer_to_address)
2885 gdbarch->pointer_to_address = pointer_to_address;
2889 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
2891 if (gdbarch->address_to_pointer == 0)
2892 internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
2893 if (gdbarch_debug >= 2)
2894 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2895 gdbarch->address_to_pointer (type, buf, addr);
2899 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2900 gdbarch_address_to_pointer_ftype address_to_pointer)
2902 gdbarch->address_to_pointer = address_to_pointer;
2906 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
2908 if (gdbarch->return_value_on_stack == 0)
2909 internal_error ("gdbarch: gdbarch_return_value_on_stack invalid");
2910 if (gdbarch_debug >= 2)
2911 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
2912 return gdbarch->return_value_on_stack (type);
2916 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
2917 gdbarch_return_value_on_stack_ftype return_value_on_stack)
2919 gdbarch->return_value_on_stack = return_value_on_stack;
2923 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
2925 if (gdbarch->extract_return_value == 0)
2926 internal_error ("gdbarch: gdbarch_extract_return_value invalid");
2927 if (gdbarch_debug >= 2)
2928 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
2929 gdbarch->extract_return_value (type, regbuf, valbuf);
2933 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
2934 gdbarch_extract_return_value_ftype extract_return_value)
2936 gdbarch->extract_return_value = extract_return_value;
2940 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2942 if (gdbarch->push_arguments == 0)
2943 internal_error ("gdbarch: gdbarch_push_arguments invalid");
2944 if (gdbarch_debug >= 2)
2945 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
2946 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
2950 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
2951 gdbarch_push_arguments_ftype push_arguments)
2953 gdbarch->push_arguments = push_arguments;
2957 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
2959 if (gdbarch->push_dummy_frame == 0)
2960 internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
2961 if (gdbarch_debug >= 2)
2962 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
2963 gdbarch->push_dummy_frame ();
2967 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
2968 gdbarch_push_dummy_frame_ftype push_dummy_frame)
2970 gdbarch->push_dummy_frame = push_dummy_frame;
2974 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
2976 if (gdbarch->push_return_address == 0)
2977 internal_error ("gdbarch: gdbarch_push_return_address invalid");
2978 if (gdbarch_debug >= 2)
2979 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
2980 return gdbarch->push_return_address (pc, sp);
2984 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
2985 gdbarch_push_return_address_ftype push_return_address)
2987 gdbarch->push_return_address = push_return_address;
2991 gdbarch_pop_frame (struct gdbarch *gdbarch)
2993 if (gdbarch->pop_frame == 0)
2994 internal_error ("gdbarch: gdbarch_pop_frame invalid");
2995 if (gdbarch_debug >= 2)
2996 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
2997 gdbarch->pop_frame ();
3001 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3002 gdbarch_pop_frame_ftype pop_frame)
3004 gdbarch->pop_frame = pop_frame;
3008 gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
3010 if (gdbarch->d10v_make_daddr == 0)
3011 internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
3012 if (gdbarch_debug >= 2)
3013 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
3014 return gdbarch->d10v_make_daddr (x);
3018 set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch,
3019 gdbarch_d10v_make_daddr_ftype d10v_make_daddr)
3021 gdbarch->d10v_make_daddr = d10v_make_daddr;
3025 gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
3027 if (gdbarch->d10v_make_iaddr == 0)
3028 internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
3029 if (gdbarch_debug >= 2)
3030 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
3031 return gdbarch->d10v_make_iaddr (x);
3035 set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch,
3036 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr)
3038 gdbarch->d10v_make_iaddr = d10v_make_iaddr;
3042 gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3044 if (gdbarch->d10v_daddr_p == 0)
3045 internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
3046 if (gdbarch_debug >= 2)
3047 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
3048 return gdbarch->d10v_daddr_p (x);
3052 set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch,
3053 gdbarch_d10v_daddr_p_ftype d10v_daddr_p)
3055 gdbarch->d10v_daddr_p = d10v_daddr_p;
3059 gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3061 if (gdbarch->d10v_iaddr_p == 0)
3062 internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
3063 if (gdbarch_debug >= 2)
3064 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
3065 return gdbarch->d10v_iaddr_p (x);
3069 set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch,
3070 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p)
3072 gdbarch->d10v_iaddr_p = d10v_iaddr_p;
3076 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3078 if (gdbarch->d10v_convert_daddr_to_raw == 0)
3079 internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3080 if (gdbarch_debug >= 2)
3081 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
3082 return gdbarch->d10v_convert_daddr_to_raw (x);
3086 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch,
3087 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw)
3089 gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw;
3093 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3095 if (gdbarch->d10v_convert_iaddr_to_raw == 0)
3096 internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3097 if (gdbarch_debug >= 2)
3098 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3099 return gdbarch->d10v_convert_iaddr_to_raw (x);
3103 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch,
3104 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw)
3106 gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw;
3110 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3112 if (gdbarch->store_struct_return == 0)
3113 internal_error ("gdbarch: gdbarch_store_struct_return invalid");
3114 if (gdbarch_debug >= 2)
3115 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3116 gdbarch->store_struct_return (addr, sp);
3120 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3121 gdbarch_store_struct_return_ftype store_struct_return)
3123 gdbarch->store_struct_return = store_struct_return;
3127 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3129 if (gdbarch->store_return_value == 0)
3130 internal_error ("gdbarch: gdbarch_store_return_value invalid");
3131 if (gdbarch_debug >= 2)
3132 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3133 gdbarch->store_return_value (type, valbuf);
3137 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3138 gdbarch_store_return_value_ftype store_return_value)
3140 gdbarch->store_return_value = store_return_value;
3144 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
3146 if (gdbarch->extract_struct_value_address == 0)
3147 internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
3148 if (gdbarch_debug >= 2)
3149 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
3150 return gdbarch->extract_struct_value_address (regbuf);
3154 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
3155 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
3157 gdbarch->extract_struct_value_address = extract_struct_value_address;
3161 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3163 if (gdbarch->use_struct_convention == 0)
3164 internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
3165 if (gdbarch_debug >= 2)
3166 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3167 return gdbarch->use_struct_convention (gcc_p, value_type);
3171 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3172 gdbarch_use_struct_convention_ftype use_struct_convention)
3174 gdbarch->use_struct_convention = use_struct_convention;
3178 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3180 if (gdbarch->frame_init_saved_regs == 0)
3181 internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
3182 if (gdbarch_debug >= 2)
3183 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
3184 gdbarch->frame_init_saved_regs (frame);
3188 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
3189 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
3191 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
3195 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3197 if (gdbarch->init_extra_frame_info == 0)
3198 internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
3199 if (gdbarch_debug >= 2)
3200 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
3201 gdbarch->init_extra_frame_info (fromleaf, frame);
3205 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
3206 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
3208 gdbarch->init_extra_frame_info = init_extra_frame_info;
3212 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3214 if (gdbarch->skip_prologue == 0)
3215 internal_error ("gdbarch: gdbarch_skip_prologue invalid");
3216 if (gdbarch_debug >= 2)
3217 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3218 return gdbarch->skip_prologue (ip);
3222 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3223 gdbarch_skip_prologue_ftype skip_prologue)
3225 gdbarch->skip_prologue = skip_prologue;
3229 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
3231 if (gdbarch->prologue_frameless_p == 0)
3232 internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
3233 if (gdbarch_debug >= 2)
3234 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
3235 return gdbarch->prologue_frameless_p (ip);
3239 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
3240 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
3242 gdbarch->prologue_frameless_p = prologue_frameless_p;
3246 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3248 if (gdbarch->inner_than == 0)
3249 internal_error ("gdbarch: gdbarch_inner_than invalid");
3250 if (gdbarch_debug >= 2)
3251 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3252 return gdbarch->inner_than (lhs, rhs);
3256 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3257 gdbarch_inner_than_ftype inner_than)
3259 gdbarch->inner_than = inner_than;
3263 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3265 if (gdbarch->breakpoint_from_pc == 0)
3266 internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
3267 if (gdbarch_debug >= 2)
3268 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3269 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3273 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3274 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3276 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3280 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3282 if (gdbarch->memory_insert_breakpoint == 0)
3283 internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
3284 if (gdbarch_debug >= 2)
3285 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3286 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3290 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3291 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3293 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3297 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3299 if (gdbarch->memory_remove_breakpoint == 0)
3300 internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
3301 if (gdbarch_debug >= 2)
3302 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3303 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3307 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3308 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3310 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3314 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3316 if (gdbarch->decr_pc_after_break == -1)
3317 internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
3318 if (gdbarch_debug >= 2)
3319 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3320 return gdbarch->decr_pc_after_break;
3324 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3325 CORE_ADDR decr_pc_after_break)
3327 gdbarch->decr_pc_after_break = decr_pc_after_break;
3331 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3333 if (gdbarch->function_start_offset == -1)
3334 internal_error ("gdbarch: gdbarch_function_start_offset invalid");
3335 if (gdbarch_debug >= 2)
3336 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3337 return gdbarch->function_start_offset;
3341 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3342 CORE_ADDR function_start_offset)
3344 gdbarch->function_start_offset = function_start_offset;
3348 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
3350 if (gdbarch->remote_translate_xfer_address == 0)
3351 internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
3352 if (gdbarch_debug >= 2)
3353 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3354 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
3358 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3359 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3361 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3365 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3367 if (gdbarch->frame_args_skip == -1)
3368 internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
3369 if (gdbarch_debug >= 2)
3370 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3371 return gdbarch->frame_args_skip;
3375 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3376 CORE_ADDR frame_args_skip)
3378 gdbarch->frame_args_skip = frame_args_skip;
3382 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3384 if (gdbarch->frameless_function_invocation == 0)
3385 internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
3386 if (gdbarch_debug >= 2)
3387 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
3388 return gdbarch->frameless_function_invocation (fi);
3392 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
3393 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
3395 gdbarch->frameless_function_invocation = frameless_function_invocation;
3399 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3401 if (gdbarch->frame_chain == 0)
3402 internal_error ("gdbarch: gdbarch_frame_chain invalid");
3403 if (gdbarch_debug >= 2)
3404 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
3405 return gdbarch->frame_chain (frame);
3409 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
3410 gdbarch_frame_chain_ftype frame_chain)
3412 gdbarch->frame_chain = frame_chain;
3416 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3418 if (gdbarch->frame_chain_valid == 0)
3419 internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
3420 if (gdbarch_debug >= 2)
3421 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
3422 return gdbarch->frame_chain_valid (chain, thisframe);
3426 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
3427 gdbarch_frame_chain_valid_ftype frame_chain_valid)
3429 gdbarch->frame_chain_valid = frame_chain_valid;
3433 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3435 if (gdbarch->frame_saved_pc == 0)
3436 internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
3437 if (gdbarch_debug >= 2)
3438 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
3439 return gdbarch->frame_saved_pc (fi);
3443 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
3444 gdbarch_frame_saved_pc_ftype frame_saved_pc)
3446 gdbarch->frame_saved_pc = frame_saved_pc;
3450 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3452 if (gdbarch->frame_args_address == 0)
3453 internal_error ("gdbarch: gdbarch_frame_args_address invalid");
3454 if (gdbarch_debug >= 2)
3455 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
3456 return gdbarch->frame_args_address (fi);
3460 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
3461 gdbarch_frame_args_address_ftype frame_args_address)
3463 gdbarch->frame_args_address = frame_args_address;
3467 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3469 if (gdbarch->frame_locals_address == 0)
3470 internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
3471 if (gdbarch_debug >= 2)
3472 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
3473 return gdbarch->frame_locals_address (fi);
3477 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
3478 gdbarch_frame_locals_address_ftype frame_locals_address)
3480 gdbarch->frame_locals_address = frame_locals_address;
3484 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
3486 if (gdbarch->saved_pc_after_call == 0)
3487 internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
3488 if (gdbarch_debug >= 2)
3489 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
3490 return gdbarch->saved_pc_after_call (frame);
3494 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
3495 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
3497 gdbarch->saved_pc_after_call = saved_pc_after_call;
3501 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3503 if (gdbarch->frame_num_args == 0)
3504 internal_error ("gdbarch: gdbarch_frame_num_args invalid");
3505 if (gdbarch_debug >= 2)
3506 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3507 return gdbarch->frame_num_args (frame);
3511 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3512 gdbarch_frame_num_args_ftype frame_num_args)
3514 gdbarch->frame_num_args = frame_num_args;
3518 gdbarch_stack_align_p (struct gdbarch *gdbarch)
3520 return gdbarch->stack_align != 0;
3524 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3526 if (gdbarch->stack_align == 0)
3527 internal_error ("gdbarch: gdbarch_stack_align invalid");
3528 if (gdbarch_debug >= 2)
3529 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
3530 return gdbarch->stack_align (sp);
3534 set_gdbarch_stack_align (struct gdbarch *gdbarch,
3535 gdbarch_stack_align_ftype stack_align)
3537 gdbarch->stack_align = stack_align;
3541 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3543 return gdbarch->reg_struct_has_addr != 0;
3547 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3549 if (gdbarch->reg_struct_has_addr == 0)
3550 internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
3551 if (gdbarch_debug >= 2)
3552 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
3553 return gdbarch->reg_struct_has_addr (gcc_p, type);
3557 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
3558 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
3560 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
3564 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3566 return gdbarch->save_dummy_frame_tos != 0;
3570 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
3572 if (gdbarch->save_dummy_frame_tos == 0)
3573 internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid");
3574 if (gdbarch_debug >= 2)
3575 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
3576 gdbarch->save_dummy_frame_tos (sp);
3580 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
3581 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
3583 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
3586 const struct floatformat *
3587 gdbarch_float_format (struct gdbarch *gdbarch)
3589 if (gdbarch_debug >= 2)
3590 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
3591 return gdbarch->float_format;
3595 set_gdbarch_float_format (struct gdbarch *gdbarch,
3596 const struct floatformat * float_format)
3598 gdbarch->float_format = float_format;
3601 const struct floatformat *
3602 gdbarch_double_format (struct gdbarch *gdbarch)
3604 if (gdbarch_debug >= 2)
3605 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
3606 return gdbarch->double_format;
3610 set_gdbarch_double_format (struct gdbarch *gdbarch,
3611 const struct floatformat * double_format)
3613 gdbarch->double_format = double_format;
3616 const struct floatformat *
3617 gdbarch_long_double_format (struct gdbarch *gdbarch)
3619 if (gdbarch_debug >= 2)
3620 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
3621 return gdbarch->long_double_format;
3625 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
3626 const struct floatformat * long_double_format)
3628 gdbarch->long_double_format = long_double_format;
3632 /* Keep a registrary of per-architecture data-pointers required by GDB
3640 struct gdbarch_data_registration
3642 gdbarch_data_ftype *init;
3643 struct gdbarch_data *data;
3644 struct gdbarch_data_registration *next;
3647 struct gdbarch_data_registrary
3650 struct gdbarch_data_registration *registrations;
3653 struct gdbarch_data_registrary gdbarch_data_registrary =
3658 struct gdbarch_data *
3659 register_gdbarch_data (gdbarch_data_ftype *init)
3661 struct gdbarch_data_registration **curr;
3662 for (curr = &gdbarch_data_registrary.registrations;
3664 curr = &(*curr)->next);
3665 (*curr) = XMALLOC (struct gdbarch_data_registration);
3666 (*curr)->next = NULL;
3667 (*curr)->init = init;
3668 (*curr)->data = XMALLOC (struct gdbarch_data);
3669 (*curr)->data->index = gdbarch_data_registrary.nr++;
3670 return (*curr)->data;
3674 /* Walk through all the registered users initializing each in turn. */
3677 init_gdbarch_data (struct gdbarch *gdbarch)
3679 struct gdbarch_data_registration *rego;
3680 gdbarch->nr_data = gdbarch_data_registrary.nr + 1;
3681 gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data);
3682 for (rego = gdbarch_data_registrary.registrations;
3686 if (rego->data->index < gdbarch->nr_data)
3687 gdbarch->data[rego->data->index] = rego->init ();
3692 /* Return the current value of the specified per-architecture
3697 struct gdbarch_data *data;
3699 if (data->index >= current_gdbarch->nr_data)
3700 internal_error ("gdbarch_data: request for non-existant data.");
3701 return current_gdbarch->data[data->index];
3706 /* Keep a registrary of swaped data required by GDB modules. */
3711 struct gdbarch_swap_registration *source;
3712 struct gdbarch_swap *next;
3715 struct gdbarch_swap_registration
3718 unsigned long sizeof_data;
3719 gdbarch_swap_ftype *init;
3720 struct gdbarch_swap_registration *next;
3723 struct gdbarch_swap_registrary
3726 struct gdbarch_swap_registration *registrations;
3729 struct gdbarch_swap_registrary gdbarch_swap_registrary =
3735 register_gdbarch_swap (void *data,
3736 unsigned long sizeof_data,
3737 gdbarch_swap_ftype *init)
3739 struct gdbarch_swap_registration **rego;
3740 for (rego = &gdbarch_swap_registrary.registrations;
3742 rego = &(*rego)->next);
3743 (*rego) = XMALLOC (struct gdbarch_swap_registration);
3744 (*rego)->next = NULL;
3745 (*rego)->init = init;
3746 (*rego)->data = data;
3747 (*rego)->sizeof_data = sizeof_data;
3752 init_gdbarch_swap (struct gdbarch *gdbarch)
3754 struct gdbarch_swap_registration *rego;
3755 struct gdbarch_swap **curr = &gdbarch->swap;
3756 for (rego = gdbarch_swap_registrary.registrations;
3760 if (rego->data != NULL)
3762 (*curr) = XMALLOC (struct gdbarch_swap);
3763 (*curr)->source = rego;
3764 (*curr)->swap = xmalloc (rego->sizeof_data);
3765 (*curr)->next = NULL;
3766 memset (rego->data, 0, rego->sizeof_data);
3767 curr = &(*curr)->next;
3769 if (rego->init != NULL)
3775 swapout_gdbarch_swap (struct gdbarch *gdbarch)
3777 struct gdbarch_swap *curr;
3778 for (curr = gdbarch->swap;
3781 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
3785 swapin_gdbarch_swap (struct gdbarch *gdbarch)
3787 struct gdbarch_swap *curr;
3788 for (curr = gdbarch->swap;
3791 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
3795 /* Keep a registrary of the architectures known by GDB. */
3797 struct gdbarch_registration
3799 enum bfd_architecture bfd_architecture;
3800 gdbarch_init_ftype *init;
3801 gdbarch_dump_tdep_ftype *dump_tdep;
3802 struct gdbarch_list *arches;
3803 struct gdbarch_registration *next;
3806 static struct gdbarch_registration *gdbarch_registrary = NULL;
3809 append_name (const char ***buf, int *nr, const char *name)
3811 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3817 gdbarch_printable_names (void)
3821 /* Accumulate a list of names based on the registed list of
3823 enum bfd_architecture a;
3825 const char **arches = NULL;
3826 struct gdbarch_registration *rego;
3827 for (rego = gdbarch_registrary;
3831 const struct bfd_arch_info *ap;
3832 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3834 internal_error ("gdbarch_architecture_names: multi-arch unknown");
3837 append_name (&arches, &nr_arches, ap->printable_name);
3842 append_name (&arches, &nr_arches, NULL);
3846 /* Just return all the architectures that BFD knows. Assume that
3847 the legacy architecture framework supports them. */
3848 return bfd_arch_list ();
3853 gdbarch_register (enum bfd_architecture bfd_architecture,
3854 gdbarch_init_ftype *init,
3855 gdbarch_dump_tdep_ftype *dump_tdep)
3857 struct gdbarch_registration **curr;
3858 const struct bfd_arch_info *bfd_arch_info;
3859 /* Check that BFD reconizes this architecture */
3860 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3861 if (bfd_arch_info == NULL)
3863 internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
3865 /* Check that we haven't seen this architecture before */
3866 for (curr = &gdbarch_registrary;
3868 curr = &(*curr)->next)
3870 if (bfd_architecture == (*curr)->bfd_architecture)
3871 internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
3872 bfd_arch_info->printable_name);
3876 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3877 bfd_arch_info->printable_name,
3880 (*curr) = XMALLOC (struct gdbarch_registration);
3881 (*curr)->bfd_architecture = bfd_architecture;
3882 (*curr)->init = init;
3883 (*curr)->dump_tdep = dump_tdep;
3884 (*curr)->arches = NULL;
3885 (*curr)->next = NULL;
3886 /* When non- multi-arch, install what ever target dump routine we've
3887 been provided - hopefully that routine has been writen correct
3888 and works regardless of multi-arch. */
3889 if (!GDB_MULTI_ARCH && dump_tdep != NULL
3890 && startup_gdbarch.dump_tdep == NULL)
3891 startup_gdbarch.dump_tdep = dump_tdep;
3895 register_gdbarch_init (enum bfd_architecture bfd_architecture,
3896 gdbarch_init_ftype *init)
3898 gdbarch_register (bfd_architecture, init, NULL);
3902 /* Look for an architecture using gdbarch_info. Base search on only
3903 BFD_ARCH_INFO and BYTE_ORDER. */
3905 struct gdbarch_list *
3906 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
3907 const struct gdbarch_info *info)
3909 for (; arches != NULL; arches = arches->next)
3911 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
3913 if (info->byte_order != arches->gdbarch->byte_order)
3921 /* Update the current architecture. Return ZERO if the update request
3925 gdbarch_update (struct gdbarch_info info)
3927 struct gdbarch *new_gdbarch;
3928 struct gdbarch_list **list;
3929 struct gdbarch_registration *rego;
3931 /* Fill in any missing bits. Most important is the bfd_architecture
3932 which is used to select the target architecture. */
3933 if (info.bfd_architecture == bfd_arch_unknown)
3935 if (info.bfd_arch_info != NULL)
3936 info.bfd_architecture = info.bfd_arch_info->arch;
3937 else if (info.abfd != NULL)
3938 info.bfd_architecture = bfd_get_arch (info.abfd);
3939 /* FIXME - should query BFD for its default architecture. */
3941 info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
3943 if (info.bfd_arch_info == NULL)
3945 if (target_architecture_auto && info.abfd != NULL)
3946 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
3948 info.bfd_arch_info = current_gdbarch->bfd_arch_info;
3950 if (info.byte_order == 0)
3952 if (target_byte_order_auto && info.abfd != NULL)
3953 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
3954 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
3957 info.byte_order = current_gdbarch->byte_order;
3958 /* FIXME - should query BFD for its default byte-order. */
3960 /* A default for abfd? */
3962 /* Find the target that knows about this architecture. */
3963 for (rego = gdbarch_registrary;
3966 if (rego->bfd_architecture == info.bfd_architecture)
3971 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
3977 fprintf_unfiltered (gdb_stdlog,
3978 "gdbarch_update: info.bfd_architecture %d (%s)\n",
3979 info.bfd_architecture,
3980 bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
3981 fprintf_unfiltered (gdb_stdlog,
3982 "gdbarch_update: info.bfd_arch_info %s\n",
3983 (info.bfd_arch_info != NULL
3984 ? info.bfd_arch_info->printable_name
3986 fprintf_unfiltered (gdb_stdlog,
3987 "gdbarch_update: info.byte_order %d (%s)\n",
3989 (info.byte_order == BIG_ENDIAN ? "big"
3990 : info.byte_order == LITTLE_ENDIAN ? "little"
3992 fprintf_unfiltered (gdb_stdlog,
3993 "gdbarch_update: info.abfd 0x%lx\n",
3995 fprintf_unfiltered (gdb_stdlog,
3996 "gdbarch_update: info.tdep_info 0x%lx\n",
3997 (long) info.tdep_info);
4000 /* Ask the target for a replacement architecture. */
4001 new_gdbarch = rego->init (info, rego->arches);
4003 /* Did the target like it? No. Reject the change. */
4004 if (new_gdbarch == NULL)
4007 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
4011 /* Did the architecture change? No. Do nothing. */
4012 if (current_gdbarch == new_gdbarch)
4015 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4017 new_gdbarch->bfd_arch_info->printable_name);
4021 /* Swap all data belonging to the old target out */
4022 swapout_gdbarch_swap (current_gdbarch);
4024 /* Is this a pre-existing architecture? Yes. Swap it in. */
4025 for (list = ®o->arches;
4027 list = &(*list)->next)
4029 if ((*list)->gdbarch == new_gdbarch)
4032 fprintf_unfiltered (gdb_stdlog,
4033 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4035 new_gdbarch->bfd_arch_info->printable_name);
4036 current_gdbarch = new_gdbarch;
4037 swapin_gdbarch_swap (new_gdbarch);
4042 /* Append this new architecture to this targets list. */
4043 (*list) = XMALLOC (struct gdbarch_list);
4044 (*list)->next = NULL;
4045 (*list)->gdbarch = new_gdbarch;
4047 /* Switch to this new architecture. Dump it out. */
4048 current_gdbarch = new_gdbarch;
4051 fprintf_unfiltered (gdb_stdlog,
4052 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4054 new_gdbarch->bfd_arch_info->printable_name);
4057 /* Check that the newly installed architecture is valid. Plug in
4058 any post init values. */
4059 new_gdbarch->dump_tdep = rego->dump_tdep;
4060 verify_gdbarch (new_gdbarch);
4062 /* Initialize the per-architecture memory (swap) areas.
4063 CURRENT_GDBARCH must be update before these modules are
4065 init_gdbarch_swap (new_gdbarch);
4067 /* Initialize the per-architecture data-pointer of all parties that
4068 registered an interest in this architecture. CURRENT_GDBARCH
4069 must be updated before these modules are called. */
4070 init_gdbarch_data (new_gdbarch);
4073 gdbarch_dump (current_gdbarch, gdb_stdlog);
4081 /* Pointer to the target-dependent disassembly function. */
4082 int (*tm_print_insn) (bfd_vma, disassemble_info *);
4083 disassemble_info tm_print_insn_info;
4086 extern void _initialize_gdbarch (void);
4089 _initialize_gdbarch ()
4091 struct cmd_list_element *c;
4093 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
4094 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
4095 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
4096 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
4097 tm_print_insn_info.print_address_func = dis_asm_print_address;
4099 add_show_from_set (add_set_cmd ("arch",
4102 (char *)&gdbarch_debug,
4103 "Set architecture debugging.\n\
4104 When non-zero, architecture debugging is enabled.", &setdebuglist),
4106 c = add_set_cmd ("archdebug",
4109 (char *)&gdbarch_debug,
4110 "Set architecture debugging.\n\
4111 When non-zero, architecture debugging is enabled.", &setlist);
4113 deprecate_cmd (c, "set debug arch");
4114 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");