1 /* Dynamic architecture support for GDB, the GNU debugger.
2 Copyright 1998-1999, Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* *INDENT-OFF* */ /* ``typedef (f)();'' confuses indent */
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
40 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
42 /* Just include everything in sight so that the every old definition
43 of macro is visible. */
44 #include "gdb_string.h"
49 #include "breakpoint.h"
54 #include "gdbthread.h"
56 #include "symfile.h" /* for overlay functions */
61 /* Static function declarations */
63 static void verify_gdbarch (struct gdbarch *gdbarch);
64 static void init_gdbarch_data (struct gdbarch *);
65 static void init_gdbarch_swap (struct gdbarch *);
66 static void swapout_gdbarch_swap (struct gdbarch *);
67 static void swapin_gdbarch_swap (struct gdbarch *);
69 /* Convenience macro for allocting typesafe memory. */
72 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
76 /* Non-zero if we want to trace architecture code. */
79 #define GDBARCH_DEBUG 0
81 int gdbarch_debug = GDBARCH_DEBUG;
84 /* Maintain the struct gdbarch object */
88 /* basic architectural information */
89 const struct bfd_arch_info * bfd_arch_info;
92 /* target specific vector. */
93 struct gdbarch_tdep *tdep;
95 /* per-architecture data-pointers */
99 /* per-architecture swap-regions */
100 struct gdbarch_swap *swap;
102 /* Multi-arch values.
104 When extending this structure you must:
108 Declare set/get functions and define the corresponding
111 gdbarch_alloc(): If zero/NULL is not a suitable default,
112 initialize the new field.
114 verify_gdbarch(): Confirm that the target updated the field
117 gdbarch_dump(): Add a fprintf_unfiltered call to so that the new
120 ``default_gdbarch()'': Append an initial value to the static
121 variable (base values on the host's c-type system).
123 get_gdbarch(): Implement the set/get functions (probably using
124 the macro's as shortcuts).
136 gdbarch_read_pc_ftype *read_pc;
137 gdbarch_write_pc_ftype *write_pc;
138 gdbarch_read_fp_ftype *read_fp;
139 gdbarch_write_fp_ftype *write_fp;
140 gdbarch_read_sp_ftype *read_sp;
141 gdbarch_write_sp_ftype *write_sp;
146 gdbarch_register_name_ftype *register_name;
149 gdbarch_register_byte_ftype *register_byte;
150 gdbarch_register_raw_size_ftype *register_raw_size;
151 int max_register_raw_size;
152 gdbarch_register_virtual_size_ftype *register_virtual_size;
153 int max_register_virtual_size;
154 gdbarch_register_virtual_type_ftype *register_virtual_type;
155 int use_generic_dummy_frames;
156 int call_dummy_location;
157 gdbarch_call_dummy_address_ftype *call_dummy_address;
158 CORE_ADDR call_dummy_start_offset;
159 CORE_ADDR call_dummy_breakpoint_offset;
160 int call_dummy_breakpoint_offset_p;
161 int call_dummy_length;
162 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
164 LONGEST * call_dummy_words;
165 int sizeof_call_dummy_words;
166 int call_dummy_stack_adjust_p;
167 int call_dummy_stack_adjust;
168 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
169 int believe_pcc_promotion;
170 int believe_pcc_promotion_type;
171 gdbarch_get_saved_register_ftype *get_saved_register;
172 gdbarch_register_convertible_ftype *register_convertible;
173 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
174 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
175 gdbarch_extract_return_value_ftype *extract_return_value;
176 gdbarch_push_arguments_ftype *push_arguments;
177 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
178 gdbarch_push_return_address_ftype *push_return_address;
179 gdbarch_pop_frame_ftype *pop_frame;
180 gdbarch_d10v_make_daddr_ftype *d10v_make_daddr;
181 gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr;
182 gdbarch_d10v_daddr_p_ftype *d10v_daddr_p;
183 gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p;
184 gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw;
185 gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw;
186 gdbarch_store_struct_return_ftype *store_struct_return;
187 gdbarch_store_return_value_ftype *store_return_value;
188 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
189 gdbarch_use_struct_convention_ftype *use_struct_convention;
190 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
191 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
192 gdbarch_skip_prologue_ftype *skip_prologue;
193 gdbarch_inner_than_ftype *inner_than;
194 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
195 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
196 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
197 CORE_ADDR decr_pc_after_break;
198 CORE_ADDR function_start_offset;
199 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
200 CORE_ADDR frame_args_skip;
201 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
202 gdbarch_frame_chain_ftype *frame_chain;
203 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
204 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
205 gdbarch_frame_args_address_ftype *frame_args_address;
206 gdbarch_frame_locals_address_ftype *frame_locals_address;
207 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
208 gdbarch_frame_num_args_ftype *frame_num_args;
212 /* The default architecture uses host values (for want of a better
215 extern const struct bfd_arch_info bfd_default_arch_struct;
217 struct gdbarch default_gdbarch = {
218 /* basic architecture information */
219 &bfd_default_arch_struct,
221 /* target specific vector */
223 /*per-architecture data-pointers and swap regions */
225 /* Multi-arch values */
230 8 * sizeof (LONGEST),
233 8 * sizeof (long double),
269 generic_get_saved_register,
307 /* default_gdbarch() */
309 struct gdbarch *current_gdbarch = &default_gdbarch;
312 /* Create a new ``struct gdbarch'' based in information provided by
313 ``struct gdbarch_info''. */
316 gdbarch_alloc (const struct gdbarch_info *info,
317 struct gdbarch_tdep *tdep)
319 struct gdbarch *gdbarch = XMALLOC (struct gdbarch);
320 memset (gdbarch, 0, sizeof (*gdbarch));
322 gdbarch->tdep = tdep;
324 gdbarch->bfd_arch_info = info->bfd_arch_info;
325 gdbarch->byte_order = info->byte_order;
327 /* Force the explicit initialization of these. */
328 gdbarch->num_regs = -1;
329 gdbarch->sp_regnum = -1;
330 gdbarch->fp_regnum = -1;
331 gdbarch->pc_regnum = -1;
332 gdbarch->register_size = -1;
333 gdbarch->register_bytes = -1;
334 gdbarch->max_register_raw_size = -1;
335 gdbarch->max_register_virtual_size = -1;
336 gdbarch->use_generic_dummy_frames = -1;
337 gdbarch->call_dummy_start_offset = -1;
338 gdbarch->call_dummy_breakpoint_offset = -1;
339 gdbarch->call_dummy_breakpoint_offset_p = -1;
340 gdbarch->call_dummy_length = -1;
341 gdbarch->call_dummy_p = -1;
342 gdbarch->call_dummy_stack_adjust_p = -1;
343 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
344 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
345 gdbarch->decr_pc_after_break = -1;
346 gdbarch->function_start_offset = -1;
347 gdbarch->frame_args_skip = -1;
348 /* gdbarch_alloc() */
354 /* Ensure that all values in a GDBARCH are reasonable. */
357 verify_gdbarch (struct gdbarch *gdbarch)
359 /* Only perform sanity checks on a multi-arch target. */
360 if (GDB_MULTI_ARCH <= 0)
363 if (gdbarch->byte_order == 0)
364 internal_error ("verify_gdbarch: byte-order unset");
365 if (gdbarch->bfd_arch_info == NULL)
366 internal_error ("verify_gdbarch: bfd_arch_info unset");
367 /* Check those that need to be defined for the given multi-arch level. */
368 if ((GDB_MULTI_ARCH >= 1)
369 && (gdbarch->ptr_bit == 0))
370 internal_error ("gdbarch: verify_gdbarch: ptr_bit invalid");
371 if ((GDB_MULTI_ARCH >= 1)
372 && (gdbarch->short_bit == 0))
373 internal_error ("gdbarch: verify_gdbarch: short_bit invalid");
374 if ((GDB_MULTI_ARCH >= 1)
375 && (gdbarch->int_bit == 0))
376 internal_error ("gdbarch: verify_gdbarch: int_bit invalid");
377 if ((GDB_MULTI_ARCH >= 1)
378 && (gdbarch->long_bit == 0))
379 internal_error ("gdbarch: verify_gdbarch: long_bit invalid");
380 if ((GDB_MULTI_ARCH >= 1)
381 && (gdbarch->long_long_bit == 0))
382 internal_error ("gdbarch: verify_gdbarch: long_long_bit invalid");
383 if ((GDB_MULTI_ARCH >= 1)
384 && (gdbarch->float_bit == 0))
385 internal_error ("gdbarch: verify_gdbarch: float_bit invalid");
386 if ((GDB_MULTI_ARCH >= 1)
387 && (gdbarch->double_bit == 0))
388 internal_error ("gdbarch: verify_gdbarch: double_bit invalid");
389 if ((GDB_MULTI_ARCH >= 1)
390 && (gdbarch->long_double_bit == 0))
391 internal_error ("gdbarch: verify_gdbarch: long_double_bit invalid");
392 if ((GDB_MULTI_ARCH >= 1)
393 && (gdbarch->read_pc == 0))
394 internal_error ("gdbarch: verify_gdbarch: read_pc invalid");
395 if ((GDB_MULTI_ARCH >= 1)
396 && (gdbarch->write_pc == 0))
397 internal_error ("gdbarch: verify_gdbarch: write_pc invalid");
398 if ((GDB_MULTI_ARCH >= 1)
399 && (gdbarch->read_fp == 0))
400 internal_error ("gdbarch: verify_gdbarch: read_fp invalid");
401 if ((GDB_MULTI_ARCH >= 1)
402 && (gdbarch->write_fp == 0))
403 internal_error ("gdbarch: verify_gdbarch: write_fp invalid");
404 if ((GDB_MULTI_ARCH >= 1)
405 && (gdbarch->read_sp == 0))
406 internal_error ("gdbarch: verify_gdbarch: read_sp invalid");
407 if ((GDB_MULTI_ARCH >= 1)
408 && (gdbarch->write_sp == 0))
409 internal_error ("gdbarch: verify_gdbarch: write_sp invalid");
410 if ((GDB_MULTI_ARCH >= 2)
411 && (gdbarch->num_regs == -1))
412 internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
413 if ((GDB_MULTI_ARCH >= 2)
414 && (gdbarch->sp_regnum == -1))
415 internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
416 if ((GDB_MULTI_ARCH >= 2)
417 && (gdbarch->fp_regnum == -1))
418 internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
419 if ((GDB_MULTI_ARCH >= 2)
420 && (gdbarch->pc_regnum == -1))
421 internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
422 if ((GDB_MULTI_ARCH >= 2)
423 && (gdbarch->register_name == 0))
424 internal_error ("gdbarch: verify_gdbarch: register_name invalid");
425 if ((GDB_MULTI_ARCH >= 2)
426 && (gdbarch->register_size == -1))
427 internal_error ("gdbarch: verify_gdbarch: register_size invalid");
428 if ((GDB_MULTI_ARCH >= 2)
429 && (gdbarch->register_bytes == -1))
430 internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
431 if ((GDB_MULTI_ARCH >= 2)
432 && (gdbarch->register_byte == 0))
433 internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
434 if ((GDB_MULTI_ARCH >= 2)
435 && (gdbarch->register_raw_size == 0))
436 internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
437 if ((GDB_MULTI_ARCH >= 2)
438 && (gdbarch->max_register_raw_size == -1))
439 internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
440 if ((GDB_MULTI_ARCH >= 2)
441 && (gdbarch->register_virtual_size == 0))
442 internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
443 if ((GDB_MULTI_ARCH >= 2)
444 && (gdbarch->max_register_virtual_size == -1))
445 internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
446 if ((GDB_MULTI_ARCH >= 2)
447 && (gdbarch->register_virtual_type == 0))
448 internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
449 if ((GDB_MULTI_ARCH >= 1)
450 && (gdbarch->use_generic_dummy_frames == -1))
451 internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
452 if ((GDB_MULTI_ARCH >= 2)
453 && (gdbarch->call_dummy_location == 0))
454 internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
455 if ((GDB_MULTI_ARCH >= 2)
456 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
457 internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
458 if ((GDB_MULTI_ARCH >= 2)
459 && (gdbarch->call_dummy_start_offset == -1))
460 internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
461 if ((GDB_MULTI_ARCH >= 2)
462 && (gdbarch->call_dummy_breakpoint_offset == -1))
463 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
464 if ((GDB_MULTI_ARCH >= 1)
465 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
466 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
467 if ((GDB_MULTI_ARCH >= 2)
468 && (gdbarch->call_dummy_length == -1))
469 internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
470 if ((GDB_MULTI_ARCH >= 2)
471 && (gdbarch->pc_in_call_dummy == 0))
472 internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
473 if ((GDB_MULTI_ARCH >= 1)
474 && (gdbarch->call_dummy_p == -1))
475 internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
476 if ((GDB_MULTI_ARCH >= 1)
477 && (gdbarch->call_dummy_stack_adjust_p == -1))
478 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
479 if ((GDB_MULTI_ARCH >= 2)
480 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
481 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
482 if ((GDB_MULTI_ARCH >= 2)
483 && (gdbarch->fix_call_dummy == 0))
484 internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
485 if ((GDB_MULTI_ARCH >= 1)
486 && (gdbarch->get_saved_register == 0))
487 internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
488 if ((GDB_MULTI_ARCH >= 1)
489 && (gdbarch->register_convertible == 0))
490 internal_error ("gdbarch: verify_gdbarch: register_convertible invalid");
491 if ((GDB_MULTI_ARCH >= 2)
492 && (gdbarch->register_convert_to_virtual == 0))
493 internal_error ("gdbarch: verify_gdbarch: register_convert_to_virtual invalid");
494 if ((GDB_MULTI_ARCH >= 2)
495 && (gdbarch->register_convert_to_raw == 0))
496 internal_error ("gdbarch: verify_gdbarch: register_convert_to_raw invalid");
497 if ((GDB_MULTI_ARCH >= 2)
498 && (gdbarch->extract_return_value == 0))
499 internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
500 if ((GDB_MULTI_ARCH >= 1)
501 && (gdbarch->push_arguments == 0))
502 internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
503 if ((GDB_MULTI_ARCH >= 2)
504 && (gdbarch->push_dummy_frame == 0))
505 internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
506 if ((GDB_MULTI_ARCH >= 1)
507 && (gdbarch->push_return_address == 0))
508 internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
509 if ((GDB_MULTI_ARCH >= 2)
510 && (gdbarch->pop_frame == 0))
511 internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
512 if ((GDB_MULTI_ARCH >= 2)
513 && (gdbarch->d10v_make_daddr == 0))
514 internal_error ("gdbarch: verify_gdbarch: d10v_make_daddr invalid");
515 if ((GDB_MULTI_ARCH >= 2)
516 && (gdbarch->d10v_make_iaddr == 0))
517 internal_error ("gdbarch: verify_gdbarch: d10v_make_iaddr invalid");
518 if ((GDB_MULTI_ARCH >= 2)
519 && (gdbarch->d10v_daddr_p == 0))
520 internal_error ("gdbarch: verify_gdbarch: d10v_daddr_p invalid");
521 if ((GDB_MULTI_ARCH >= 2)
522 && (gdbarch->d10v_iaddr_p == 0))
523 internal_error ("gdbarch: verify_gdbarch: d10v_iaddr_p invalid");
524 if ((GDB_MULTI_ARCH >= 2)
525 && (gdbarch->d10v_convert_daddr_to_raw == 0))
526 internal_error ("gdbarch: verify_gdbarch: d10v_convert_daddr_to_raw invalid");
527 if ((GDB_MULTI_ARCH >= 2)
528 && (gdbarch->d10v_convert_iaddr_to_raw == 0))
529 internal_error ("gdbarch: verify_gdbarch: d10v_convert_iaddr_to_raw invalid");
530 if ((GDB_MULTI_ARCH >= 2)
531 && (gdbarch->store_struct_return == 0))
532 internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
533 if ((GDB_MULTI_ARCH >= 2)
534 && (gdbarch->store_return_value == 0))
535 internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
536 if ((GDB_MULTI_ARCH >= 2)
537 && (gdbarch->extract_struct_value_address == 0))
538 internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
539 if ((GDB_MULTI_ARCH >= 2)
540 && (gdbarch->use_struct_convention == 0))
541 internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
542 if ((GDB_MULTI_ARCH >= 2)
543 && (gdbarch->frame_init_saved_regs == 0))
544 internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
545 if ((GDB_MULTI_ARCH >= 2)
546 && (gdbarch->init_extra_frame_info == 0))
547 internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
548 if ((GDB_MULTI_ARCH >= 2)
549 && (gdbarch->skip_prologue == 0))
550 internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
551 if ((GDB_MULTI_ARCH >= 2)
552 && (gdbarch->inner_than == 0))
553 internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
554 if ((GDB_MULTI_ARCH >= 2)
555 && (gdbarch->breakpoint_from_pc == 0))
556 internal_error ("gdbarch: verify_gdbarch: breakpoint_from_pc invalid");
557 if ((GDB_MULTI_ARCH >= 2)
559 internal_error ("gdbarch: verify_gdbarch: memory_insert_breakpoint invalid");
560 if ((GDB_MULTI_ARCH >= 2)
562 internal_error ("gdbarch: verify_gdbarch: memory_remove_breakpoint invalid");
563 if ((GDB_MULTI_ARCH >= 2)
564 && (gdbarch->decr_pc_after_break == -1))
565 internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
566 if ((GDB_MULTI_ARCH >= 2)
567 && (gdbarch->function_start_offset == -1))
568 internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
569 if ((GDB_MULTI_ARCH >= 2)
570 && (gdbarch->remote_translate_xfer_address == 0))
571 internal_error ("gdbarch: verify_gdbarch: remote_translate_xfer_address invalid");
572 if ((GDB_MULTI_ARCH >= 2)
573 && (gdbarch->frame_args_skip == -1))
574 internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
575 if ((GDB_MULTI_ARCH >= 2)
576 && (gdbarch->frameless_function_invocation == 0))
577 internal_error ("gdbarch: verify_gdbarch: frameless_function_invocation invalid");
578 if ((GDB_MULTI_ARCH >= 2)
579 && (gdbarch->frame_chain == 0))
580 internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
581 if ((GDB_MULTI_ARCH >= 1)
582 && (gdbarch->frame_chain_valid == 0))
583 internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
584 if ((GDB_MULTI_ARCH >= 2)
585 && (gdbarch->frame_saved_pc == 0))
586 internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
587 if ((GDB_MULTI_ARCH >= 2)
588 && (gdbarch->frame_args_address == 0))
589 internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
590 if ((GDB_MULTI_ARCH >= 2)
591 && (gdbarch->frame_locals_address == 0))
592 internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
593 if ((GDB_MULTI_ARCH >= 2)
594 && (gdbarch->saved_pc_after_call == 0))
595 internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
596 if ((GDB_MULTI_ARCH >= 2)
597 && (gdbarch->frame_num_args == 0))
598 internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
602 /* Print out the details of the current architecture. */
607 if (TARGET_ARCHITECTURE != NULL)
608 fprintf_unfiltered (gdb_stdlog,
609 "gdbarch_update: TARGET_ARCHITECTURE = %s\n",
610 TARGET_ARCHITECTURE->printable_name);
611 fprintf_unfiltered (gdb_stdlog,
612 "gdbarch_update: TARGET_BYTE_ORDER = %ld\n",
613 (long) TARGET_BYTE_ORDER);
614 fprintf_unfiltered (gdb_stdlog,
615 "gdbarch_update: TARGET_PTR_BIT = %ld\n",
616 (long) TARGET_PTR_BIT);
617 fprintf_unfiltered (gdb_stdlog,
618 "gdbarch_update: TARGET_SHORT_BIT = %ld\n",
619 (long) TARGET_SHORT_BIT);
620 fprintf_unfiltered (gdb_stdlog,
621 "gdbarch_update: TARGET_INT_BIT = %ld\n",
622 (long) TARGET_INT_BIT);
623 fprintf_unfiltered (gdb_stdlog,
624 "gdbarch_update: TARGET_LONG_BIT = %ld\n",
625 (long) TARGET_LONG_BIT);
626 fprintf_unfiltered (gdb_stdlog,
627 "gdbarch_update: TARGET_LONG_LONG_BIT = %ld\n",
628 (long) TARGET_LONG_LONG_BIT);
629 fprintf_unfiltered (gdb_stdlog,
630 "gdbarch_update: TARGET_FLOAT_BIT = %ld\n",
631 (long) TARGET_FLOAT_BIT);
632 fprintf_unfiltered (gdb_stdlog,
633 "gdbarch_update: TARGET_DOUBLE_BIT = %ld\n",
634 (long) TARGET_DOUBLE_BIT);
635 fprintf_unfiltered (gdb_stdlog,
636 "gdbarch_update: TARGET_LONG_DOUBLE_BIT = %ld\n",
637 (long) TARGET_LONG_DOUBLE_BIT);
638 fprintf_unfiltered (gdb_stdlog,
639 "gdbarch_update: TARGET_READ_PC = 0x%08lx\n",
640 (long) current_gdbarch->read_pc
641 /*TARGET_READ_PC ()*/);
642 fprintf_unfiltered (gdb_stdlog,
643 "gdbarch_update: TARGET_WRITE_PC = 0x%08lx\n",
644 (long) current_gdbarch->write_pc
645 /*TARGET_WRITE_PC ()*/);
646 fprintf_unfiltered (gdb_stdlog,
647 "gdbarch_update: TARGET_READ_FP = 0x%08lx\n",
648 (long) current_gdbarch->read_fp
649 /*TARGET_READ_FP ()*/);
650 fprintf_unfiltered (gdb_stdlog,
651 "gdbarch_update: TARGET_WRITE_FP = 0x%08lx\n",
652 (long) current_gdbarch->write_fp
653 /*TARGET_WRITE_FP ()*/);
654 fprintf_unfiltered (gdb_stdlog,
655 "gdbarch_update: TARGET_READ_SP = 0x%08lx\n",
656 (long) current_gdbarch->read_sp
657 /*TARGET_READ_SP ()*/);
658 fprintf_unfiltered (gdb_stdlog,
659 "gdbarch_update: TARGET_WRITE_SP = 0x%08lx\n",
660 (long) current_gdbarch->write_sp
661 /*TARGET_WRITE_SP ()*/);
662 fprintf_unfiltered (gdb_stdlog,
663 "gdbarch_update: NUM_REGS = %ld\n",
665 fprintf_unfiltered (gdb_stdlog,
666 "gdbarch_update: SP_REGNUM = %ld\n",
668 fprintf_unfiltered (gdb_stdlog,
669 "gdbarch_update: FP_REGNUM = %ld\n",
671 fprintf_unfiltered (gdb_stdlog,
672 "gdbarch_update: PC_REGNUM = %ld\n",
674 fprintf_unfiltered (gdb_stdlog,
675 "gdbarch_update: REGISTER_NAME = 0x%08lx\n",
676 (long) current_gdbarch->register_name
677 /*REGISTER_NAME ()*/);
678 fprintf_unfiltered (gdb_stdlog,
679 "gdbarch_update: REGISTER_SIZE = %ld\n",
680 (long) REGISTER_SIZE);
681 fprintf_unfiltered (gdb_stdlog,
682 "gdbarch_update: REGISTER_BYTES = %ld\n",
683 (long) REGISTER_BYTES);
684 fprintf_unfiltered (gdb_stdlog,
685 "gdbarch_update: REGISTER_BYTE = 0x%08lx\n",
686 (long) current_gdbarch->register_byte
687 /*REGISTER_BYTE ()*/);
688 fprintf_unfiltered (gdb_stdlog,
689 "gdbarch_update: REGISTER_RAW_SIZE = 0x%08lx\n",
690 (long) current_gdbarch->register_raw_size
691 /*REGISTER_RAW_SIZE ()*/);
692 fprintf_unfiltered (gdb_stdlog,
693 "gdbarch_update: MAX_REGISTER_RAW_SIZE = %ld\n",
694 (long) MAX_REGISTER_RAW_SIZE);
695 fprintf_unfiltered (gdb_stdlog,
696 "gdbarch_update: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
697 (long) current_gdbarch->register_virtual_size
698 /*REGISTER_VIRTUAL_SIZE ()*/);
699 fprintf_unfiltered (gdb_stdlog,
700 "gdbarch_update: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
701 (long) MAX_REGISTER_VIRTUAL_SIZE);
702 fprintf_unfiltered (gdb_stdlog,
703 "gdbarch_update: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
704 (long) current_gdbarch->register_virtual_type
705 /*REGISTER_VIRTUAL_TYPE ()*/);
706 fprintf_unfiltered (gdb_stdlog,
707 "gdbarch_update: USE_GENERIC_DUMMY_FRAMES = %ld\n",
708 (long) USE_GENERIC_DUMMY_FRAMES);
709 fprintf_unfiltered (gdb_stdlog,
710 "gdbarch_update: CALL_DUMMY_LOCATION = %ld\n",
711 (long) CALL_DUMMY_LOCATION);
712 fprintf_unfiltered (gdb_stdlog,
713 "gdbarch_update: CALL_DUMMY_ADDRESS = 0x%08lx\n",
714 (long) current_gdbarch->call_dummy_address
715 /*CALL_DUMMY_ADDRESS ()*/);
716 fprintf_unfiltered (gdb_stdlog,
717 "gdbarch_update: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
718 (long) CALL_DUMMY_START_OFFSET);
719 fprintf_unfiltered (gdb_stdlog,
720 "gdbarch_update: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
721 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
722 fprintf_unfiltered (gdb_stdlog,
723 "gdbarch_update: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
724 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
725 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
726 fprintf_unfiltered (gdb_stdlog,
727 "gdbarch_update: CALL_DUMMY_LENGTH = %ld\n",
728 (long) CALL_DUMMY_LENGTH);
729 fprintf_unfiltered (gdb_stdlog,
730 "gdbarch_update: PC_IN_CALL_DUMMY = 0x%08lx\n",
731 (long) current_gdbarch->pc_in_call_dummy
732 /*PC_IN_CALL_DUMMY ()*/);
733 fprintf_unfiltered (gdb_stdlog,
734 "gdbarch_update: CALL_DUMMY_P = %ld\n",
735 (long) CALL_DUMMY_P);
736 fprintf_unfiltered (gdb_stdlog,
737 "gdbarch_update: CALL_DUMMY_WORDS = 0x%08lx\n",
738 (long) CALL_DUMMY_WORDS);
739 fprintf_unfiltered (gdb_stdlog,
740 "gdbarch_update: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
741 (long) SIZEOF_CALL_DUMMY_WORDS);
742 fprintf_unfiltered (gdb_stdlog,
743 "gdbarch_update: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
744 (long) CALL_DUMMY_STACK_ADJUST_P);
745 if (CALL_DUMMY_STACK_ADJUST_P)
746 fprintf_unfiltered (gdb_stdlog,
747 "gdbarch_update: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
748 (long) CALL_DUMMY_STACK_ADJUST);
749 fprintf_unfiltered (gdb_stdlog,
750 "gdbarch_update: FIX_CALL_DUMMY = 0x%08lx\n",
751 (long) current_gdbarch->fix_call_dummy
752 /*FIX_CALL_DUMMY ()*/);
753 #ifdef BELIEVE_PCC_PROMOTION
754 fprintf_unfiltered (gdb_stdlog,
755 "gdbarch_update: BELIEVE_PCC_PROMOTION = %ld\n",
756 (long) BELIEVE_PCC_PROMOTION);
758 #ifdef BELIEVE_PCC_PROMOTION_TYPE
759 fprintf_unfiltered (gdb_stdlog,
760 "gdbarch_update: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
761 (long) BELIEVE_PCC_PROMOTION_TYPE);
763 fprintf_unfiltered (gdb_stdlog,
764 "gdbarch_update: GET_SAVED_REGISTER = 0x%08lx\n",
765 (long) current_gdbarch->get_saved_register
766 /*GET_SAVED_REGISTER ()*/);
767 fprintf_unfiltered (gdb_stdlog,
768 "gdbarch_update: REGISTER_CONVERTIBLE = 0x%08lx\n",
769 (long) current_gdbarch->register_convertible
770 /*REGISTER_CONVERTIBLE ()*/);
771 fprintf_unfiltered (gdb_stdlog,
772 "gdbarch_update: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
773 (long) current_gdbarch->register_convert_to_virtual
774 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
775 fprintf_unfiltered (gdb_stdlog,
776 "gdbarch_update: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
777 (long) current_gdbarch->register_convert_to_raw
778 /*REGISTER_CONVERT_TO_RAW ()*/);
779 fprintf_unfiltered (gdb_stdlog,
780 "gdbarch_update: EXTRACT_RETURN_VALUE = 0x%08lx\n",
781 (long) current_gdbarch->extract_return_value
782 /*EXTRACT_RETURN_VALUE ()*/);
783 fprintf_unfiltered (gdb_stdlog,
784 "gdbarch_update: PUSH_ARGUMENTS = 0x%08lx\n",
785 (long) current_gdbarch->push_arguments
786 /*PUSH_ARGUMENTS ()*/);
787 fprintf_unfiltered (gdb_stdlog,
788 "gdbarch_update: PUSH_DUMMY_FRAME = 0x%08lx\n",
789 (long) current_gdbarch->push_dummy_frame
790 /*PUSH_DUMMY_FRAME ()*/);
791 fprintf_unfiltered (gdb_stdlog,
792 "gdbarch_update: PUSH_RETURN_ADDRESS = 0x%08lx\n",
793 (long) current_gdbarch->push_return_address
794 /*PUSH_RETURN_ADDRESS ()*/);
795 fprintf_unfiltered (gdb_stdlog,
796 "gdbarch_update: POP_FRAME = 0x%08lx\n",
797 (long) current_gdbarch->pop_frame
799 fprintf_unfiltered (gdb_stdlog,
800 "gdbarch_update: D10V_MAKE_DADDR = 0x%08lx\n",
801 (long) current_gdbarch->d10v_make_daddr
802 /*D10V_MAKE_DADDR ()*/);
803 fprintf_unfiltered (gdb_stdlog,
804 "gdbarch_update: D10V_MAKE_IADDR = 0x%08lx\n",
805 (long) current_gdbarch->d10v_make_iaddr
806 /*D10V_MAKE_IADDR ()*/);
807 fprintf_unfiltered (gdb_stdlog,
808 "gdbarch_update: D10V_DADDR_P = 0x%08lx\n",
809 (long) current_gdbarch->d10v_daddr_p
810 /*D10V_DADDR_P ()*/);
811 fprintf_unfiltered (gdb_stdlog,
812 "gdbarch_update: D10V_IADDR_P = 0x%08lx\n",
813 (long) current_gdbarch->d10v_iaddr_p
814 /*D10V_IADDR_P ()*/);
815 fprintf_unfiltered (gdb_stdlog,
816 "gdbarch_update: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
817 (long) current_gdbarch->d10v_convert_daddr_to_raw
818 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
819 fprintf_unfiltered (gdb_stdlog,
820 "gdbarch_update: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
821 (long) current_gdbarch->d10v_convert_iaddr_to_raw
822 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
823 fprintf_unfiltered (gdb_stdlog,
824 "gdbarch_update: STORE_STRUCT_RETURN = 0x%08lx\n",
825 (long) current_gdbarch->store_struct_return
826 /*STORE_STRUCT_RETURN ()*/);
827 fprintf_unfiltered (gdb_stdlog,
828 "gdbarch_update: STORE_RETURN_VALUE = 0x%08lx\n",
829 (long) current_gdbarch->store_return_value
830 /*STORE_RETURN_VALUE ()*/);
831 fprintf_unfiltered (gdb_stdlog,
832 "gdbarch_update: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
833 (long) current_gdbarch->extract_struct_value_address
834 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
835 fprintf_unfiltered (gdb_stdlog,
836 "gdbarch_update: USE_STRUCT_CONVENTION = 0x%08lx\n",
837 (long) current_gdbarch->use_struct_convention
838 /*USE_STRUCT_CONVENTION ()*/);
839 fprintf_unfiltered (gdb_stdlog,
840 "gdbarch_update: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
841 (long) current_gdbarch->frame_init_saved_regs
842 /*FRAME_INIT_SAVED_REGS ()*/);
843 fprintf_unfiltered (gdb_stdlog,
844 "gdbarch_update: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
845 (long) current_gdbarch->init_extra_frame_info
846 /*INIT_EXTRA_FRAME_INFO ()*/);
847 fprintf_unfiltered (gdb_stdlog,
848 "gdbarch_update: SKIP_PROLOGUE = 0x%08lx\n",
849 (long) current_gdbarch->skip_prologue
850 /*SKIP_PROLOGUE ()*/);
851 fprintf_unfiltered (gdb_stdlog,
852 "gdbarch_update: INNER_THAN = 0x%08lx\n",
853 (long) current_gdbarch->inner_than
855 fprintf_unfiltered (gdb_stdlog,
856 "gdbarch_update: BREAKPOINT_FROM_PC = 0x%08lx\n",
857 (long) current_gdbarch->breakpoint_from_pc
858 /*BREAKPOINT_FROM_PC ()*/);
859 fprintf_unfiltered (gdb_stdlog,
860 "gdbarch_update: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
861 (long) current_gdbarch->memory_insert_breakpoint
862 /*MEMORY_INSERT_BREAKPOINT ()*/);
863 fprintf_unfiltered (gdb_stdlog,
864 "gdbarch_update: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
865 (long) current_gdbarch->memory_remove_breakpoint
866 /*MEMORY_REMOVE_BREAKPOINT ()*/);
867 fprintf_unfiltered (gdb_stdlog,
868 "gdbarch_update: DECR_PC_AFTER_BREAK = %ld\n",
869 (long) DECR_PC_AFTER_BREAK);
870 fprintf_unfiltered (gdb_stdlog,
871 "gdbarch_update: FUNCTION_START_OFFSET = %ld\n",
872 (long) FUNCTION_START_OFFSET);
873 fprintf_unfiltered (gdb_stdlog,
874 "gdbarch_update: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
875 (long) current_gdbarch->remote_translate_xfer_address
876 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
877 fprintf_unfiltered (gdb_stdlog,
878 "gdbarch_update: FRAME_ARGS_SKIP = %ld\n",
879 (long) FRAME_ARGS_SKIP);
880 fprintf_unfiltered (gdb_stdlog,
881 "gdbarch_update: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
882 (long) current_gdbarch->frameless_function_invocation
883 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
884 fprintf_unfiltered (gdb_stdlog,
885 "gdbarch_update: FRAME_CHAIN = 0x%08lx\n",
886 (long) current_gdbarch->frame_chain
888 fprintf_unfiltered (gdb_stdlog,
889 "gdbarch_update: FRAME_CHAIN_VALID = 0x%08lx\n",
890 (long) current_gdbarch->frame_chain_valid
891 /*FRAME_CHAIN_VALID ()*/);
892 fprintf_unfiltered (gdb_stdlog,
893 "gdbarch_update: FRAME_SAVED_PC = 0x%08lx\n",
894 (long) current_gdbarch->frame_saved_pc
895 /*FRAME_SAVED_PC ()*/);
896 fprintf_unfiltered (gdb_stdlog,
897 "gdbarch_update: FRAME_ARGS_ADDRESS = 0x%08lx\n",
898 (long) current_gdbarch->frame_args_address
899 /*FRAME_ARGS_ADDRESS ()*/);
900 fprintf_unfiltered (gdb_stdlog,
901 "gdbarch_update: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
902 (long) current_gdbarch->frame_locals_address
903 /*FRAME_LOCALS_ADDRESS ()*/);
904 fprintf_unfiltered (gdb_stdlog,
905 "gdbarch_update: SAVED_PC_AFTER_CALL = 0x%08lx\n",
906 (long) current_gdbarch->saved_pc_after_call
907 /*SAVED_PC_AFTER_CALL ()*/);
908 fprintf_unfiltered (gdb_stdlog,
909 "gdbarch_update: FRAME_NUM_ARGS = 0x%08lx\n",
910 (long) current_gdbarch->frame_num_args
911 /*FRAME_NUM_ARGS ()*/);
914 struct gdbarch_tdep *
915 gdbarch_tdep (struct gdbarch *gdbarch)
917 if (gdbarch_debug >= 2)
918 /* FIXME: gdb_std??? */
919 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
920 return gdbarch->tdep;
924 const struct bfd_arch_info *
925 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
927 if (gdbarch_debug >= 2)
928 /* FIXME: gdb_std??? */
929 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
930 return gdbarch->bfd_arch_info;
934 gdbarch_byte_order (struct gdbarch *gdbarch)
936 if (gdbarch_debug >= 2)
937 /* FIXME: gdb_std??? */
938 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
939 return gdbarch->byte_order;
943 gdbarch_ptr_bit (struct gdbarch *gdbarch)
945 if (gdbarch->ptr_bit == 0)
946 internal_error ("gdbarch: gdbarch_ptr_bit invalid");
947 if (gdbarch_debug >= 2)
948 /* FIXME: gdb_std??? */
949 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
950 return gdbarch->ptr_bit;
954 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
957 gdbarch->ptr_bit = ptr_bit;
961 gdbarch_short_bit (struct gdbarch *gdbarch)
963 if (gdbarch->short_bit == 0)
964 internal_error ("gdbarch: gdbarch_short_bit invalid");
965 if (gdbarch_debug >= 2)
966 /* FIXME: gdb_std??? */
967 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
968 return gdbarch->short_bit;
972 set_gdbarch_short_bit (struct gdbarch *gdbarch,
975 gdbarch->short_bit = short_bit;
979 gdbarch_int_bit (struct gdbarch *gdbarch)
981 if (gdbarch->int_bit == 0)
982 internal_error ("gdbarch: gdbarch_int_bit invalid");
983 if (gdbarch_debug >= 2)
984 /* FIXME: gdb_std??? */
985 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
986 return gdbarch->int_bit;
990 set_gdbarch_int_bit (struct gdbarch *gdbarch,
993 gdbarch->int_bit = int_bit;
997 gdbarch_long_bit (struct gdbarch *gdbarch)
999 if (gdbarch->long_bit == 0)
1000 internal_error ("gdbarch: gdbarch_long_bit invalid");
1001 if (gdbarch_debug >= 2)
1002 /* FIXME: gdb_std??? */
1003 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1004 return gdbarch->long_bit;
1008 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1011 gdbarch->long_bit = long_bit;
1015 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1017 if (gdbarch->long_long_bit == 0)
1018 internal_error ("gdbarch: gdbarch_long_long_bit invalid");
1019 if (gdbarch_debug >= 2)
1020 /* FIXME: gdb_std??? */
1021 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1022 return gdbarch->long_long_bit;
1026 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1029 gdbarch->long_long_bit = long_long_bit;
1033 gdbarch_float_bit (struct gdbarch *gdbarch)
1035 if (gdbarch->float_bit == 0)
1036 internal_error ("gdbarch: gdbarch_float_bit invalid");
1037 if (gdbarch_debug >= 2)
1038 /* FIXME: gdb_std??? */
1039 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1040 return gdbarch->float_bit;
1044 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1047 gdbarch->float_bit = float_bit;
1051 gdbarch_double_bit (struct gdbarch *gdbarch)
1053 if (gdbarch->double_bit == 0)
1054 internal_error ("gdbarch: gdbarch_double_bit invalid");
1055 if (gdbarch_debug >= 2)
1056 /* FIXME: gdb_std??? */
1057 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1058 return gdbarch->double_bit;
1062 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1065 gdbarch->double_bit = double_bit;
1069 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1071 if (gdbarch->long_double_bit == 0)
1072 internal_error ("gdbarch: gdbarch_long_double_bit invalid");
1073 if (gdbarch_debug >= 2)
1074 /* FIXME: gdb_std??? */
1075 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1076 return gdbarch->long_double_bit;
1080 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1081 int long_double_bit)
1083 gdbarch->long_double_bit = long_double_bit;
1087 gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
1089 if (gdbarch->read_pc == 0)
1090 internal_error ("gdbarch: gdbarch_read_pc invalid");
1091 if (gdbarch_debug >= 2)
1092 /* FIXME: gdb_std??? */
1093 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1094 return gdbarch->read_pc (pid);
1098 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1099 gdbarch_read_pc_ftype read_pc)
1101 gdbarch->read_pc = read_pc;
1105 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
1107 if (gdbarch->write_pc == 0)
1108 internal_error ("gdbarch: gdbarch_write_pc invalid");
1109 if (gdbarch_debug >= 2)
1110 /* FIXME: gdb_std??? */
1111 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1112 gdbarch->write_pc (val, pid);
1116 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1117 gdbarch_write_pc_ftype write_pc)
1119 gdbarch->write_pc = write_pc;
1123 gdbarch_read_fp (struct gdbarch *gdbarch)
1125 if (gdbarch->read_fp == 0)
1126 internal_error ("gdbarch: gdbarch_read_fp invalid");
1127 if (gdbarch_debug >= 2)
1128 /* FIXME: gdb_std??? */
1129 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
1130 return gdbarch->read_fp ();
1134 set_gdbarch_read_fp (struct gdbarch *gdbarch,
1135 gdbarch_read_fp_ftype read_fp)
1137 gdbarch->read_fp = read_fp;
1141 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
1143 if (gdbarch->write_fp == 0)
1144 internal_error ("gdbarch: gdbarch_write_fp invalid");
1145 if (gdbarch_debug >= 2)
1146 /* FIXME: gdb_std??? */
1147 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
1148 gdbarch->write_fp (val);
1152 set_gdbarch_write_fp (struct gdbarch *gdbarch,
1153 gdbarch_write_fp_ftype write_fp)
1155 gdbarch->write_fp = write_fp;
1159 gdbarch_read_sp (struct gdbarch *gdbarch)
1161 if (gdbarch->read_sp == 0)
1162 internal_error ("gdbarch: gdbarch_read_sp invalid");
1163 if (gdbarch_debug >= 2)
1164 /* FIXME: gdb_std??? */
1165 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1166 return gdbarch->read_sp ();
1170 set_gdbarch_read_sp (struct gdbarch *gdbarch,
1171 gdbarch_read_sp_ftype read_sp)
1173 gdbarch->read_sp = read_sp;
1177 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
1179 if (gdbarch->write_sp == 0)
1180 internal_error ("gdbarch: gdbarch_write_sp invalid");
1181 if (gdbarch_debug >= 2)
1182 /* FIXME: gdb_std??? */
1183 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
1184 gdbarch->write_sp (val);
1188 set_gdbarch_write_sp (struct gdbarch *gdbarch,
1189 gdbarch_write_sp_ftype write_sp)
1191 gdbarch->write_sp = write_sp;
1195 gdbarch_num_regs (struct gdbarch *gdbarch)
1197 if (gdbarch->num_regs == -1)
1198 internal_error ("gdbarch: gdbarch_num_regs invalid");
1199 if (gdbarch_debug >= 2)
1200 /* FIXME: gdb_std??? */
1201 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1202 return gdbarch->num_regs;
1206 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1209 gdbarch->num_regs = num_regs;
1213 gdbarch_sp_regnum (struct gdbarch *gdbarch)
1215 if (gdbarch->sp_regnum == -1)
1216 internal_error ("gdbarch: gdbarch_sp_regnum invalid");
1217 if (gdbarch_debug >= 2)
1218 /* FIXME: gdb_std??? */
1219 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
1220 return gdbarch->sp_regnum;
1224 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
1227 gdbarch->sp_regnum = sp_regnum;
1231 gdbarch_fp_regnum (struct gdbarch *gdbarch)
1233 if (gdbarch->fp_regnum == -1)
1234 internal_error ("gdbarch: gdbarch_fp_regnum invalid");
1235 if (gdbarch_debug >= 2)
1236 /* FIXME: gdb_std??? */
1237 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
1238 return gdbarch->fp_regnum;
1242 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
1245 gdbarch->fp_regnum = fp_regnum;
1249 gdbarch_pc_regnum (struct gdbarch *gdbarch)
1251 if (gdbarch->pc_regnum == -1)
1252 internal_error ("gdbarch: gdbarch_pc_regnum invalid");
1253 if (gdbarch_debug >= 2)
1254 /* FIXME: gdb_std??? */
1255 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
1256 return gdbarch->pc_regnum;
1260 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
1263 gdbarch->pc_regnum = pc_regnum;
1267 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
1269 if (gdbarch->register_name == 0)
1270 internal_error ("gdbarch: gdbarch_register_name invalid");
1271 if (gdbarch_debug >= 2)
1272 /* FIXME: gdb_std??? */
1273 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
1274 return gdbarch->register_name (regnr);
1278 set_gdbarch_register_name (struct gdbarch *gdbarch,
1279 gdbarch_register_name_ftype register_name)
1281 gdbarch->register_name = register_name;
1285 gdbarch_register_size (struct gdbarch *gdbarch)
1287 if (gdbarch->register_size == -1)
1288 internal_error ("gdbarch: gdbarch_register_size invalid");
1289 if (gdbarch_debug >= 2)
1290 /* FIXME: gdb_std??? */
1291 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
1292 return gdbarch->register_size;
1296 set_gdbarch_register_size (struct gdbarch *gdbarch,
1299 gdbarch->register_size = register_size;
1303 gdbarch_register_bytes (struct gdbarch *gdbarch)
1305 if (gdbarch->register_bytes == -1)
1306 internal_error ("gdbarch: gdbarch_register_bytes invalid");
1307 if (gdbarch_debug >= 2)
1308 /* FIXME: gdb_std??? */
1309 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
1310 return gdbarch->register_bytes;
1314 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
1317 gdbarch->register_bytes = register_bytes;
1321 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
1323 if (gdbarch->register_byte == 0)
1324 internal_error ("gdbarch: gdbarch_register_byte invalid");
1325 if (gdbarch_debug >= 2)
1326 /* FIXME: gdb_std??? */
1327 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
1328 return gdbarch->register_byte (reg_nr);
1332 set_gdbarch_register_byte (struct gdbarch *gdbarch,
1333 gdbarch_register_byte_ftype register_byte)
1335 gdbarch->register_byte = register_byte;
1339 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
1341 if (gdbarch->register_raw_size == 0)
1342 internal_error ("gdbarch: gdbarch_register_raw_size invalid");
1343 if (gdbarch_debug >= 2)
1344 /* FIXME: gdb_std??? */
1345 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
1346 return gdbarch->register_raw_size (reg_nr);
1350 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
1351 gdbarch_register_raw_size_ftype register_raw_size)
1353 gdbarch->register_raw_size = register_raw_size;
1357 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
1359 if (gdbarch->max_register_raw_size == -1)
1360 internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
1361 if (gdbarch_debug >= 2)
1362 /* FIXME: gdb_std??? */
1363 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
1364 return gdbarch->max_register_raw_size;
1368 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
1369 int max_register_raw_size)
1371 gdbarch->max_register_raw_size = max_register_raw_size;
1375 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
1377 if (gdbarch->register_virtual_size == 0)
1378 internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
1379 if (gdbarch_debug >= 2)
1380 /* FIXME: gdb_std??? */
1381 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
1382 return gdbarch->register_virtual_size (reg_nr);
1386 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
1387 gdbarch_register_virtual_size_ftype register_virtual_size)
1389 gdbarch->register_virtual_size = register_virtual_size;
1393 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
1395 if (gdbarch->max_register_virtual_size == -1)
1396 internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
1397 if (gdbarch_debug >= 2)
1398 /* FIXME: gdb_std??? */
1399 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
1400 return gdbarch->max_register_virtual_size;
1404 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
1405 int max_register_virtual_size)
1407 gdbarch->max_register_virtual_size = max_register_virtual_size;
1411 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
1413 if (gdbarch->register_virtual_type == 0)
1414 internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
1415 if (gdbarch_debug >= 2)
1416 /* FIXME: gdb_std??? */
1417 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
1418 return gdbarch->register_virtual_type (reg_nr);
1422 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
1423 gdbarch_register_virtual_type_ftype register_virtual_type)
1425 gdbarch->register_virtual_type = register_virtual_type;
1429 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
1431 if (gdbarch->use_generic_dummy_frames == -1)
1432 internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
1433 if (gdbarch_debug >= 2)
1434 /* FIXME: gdb_std??? */
1435 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
1436 return gdbarch->use_generic_dummy_frames;
1440 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
1441 int use_generic_dummy_frames)
1443 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
1447 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
1449 if (gdbarch->call_dummy_location == 0)
1450 internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
1451 if (gdbarch_debug >= 2)
1452 /* FIXME: gdb_std??? */
1453 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
1454 return gdbarch->call_dummy_location;
1458 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
1459 int call_dummy_location)
1461 gdbarch->call_dummy_location = call_dummy_location;
1465 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
1467 if (gdbarch->call_dummy_address == 0)
1468 internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
1469 if (gdbarch_debug >= 2)
1470 /* FIXME: gdb_std??? */
1471 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
1472 return gdbarch->call_dummy_address ();
1476 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
1477 gdbarch_call_dummy_address_ftype call_dummy_address)
1479 gdbarch->call_dummy_address = call_dummy_address;
1483 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
1485 if (gdbarch->call_dummy_start_offset == -1)
1486 internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
1487 if (gdbarch_debug >= 2)
1488 /* FIXME: gdb_std??? */
1489 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
1490 return gdbarch->call_dummy_start_offset;
1494 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
1495 CORE_ADDR call_dummy_start_offset)
1497 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
1501 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
1503 if (gdbarch->call_dummy_breakpoint_offset == -1)
1504 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
1505 if (gdbarch_debug >= 2)
1506 /* FIXME: gdb_std??? */
1507 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
1508 return gdbarch->call_dummy_breakpoint_offset;
1512 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
1513 CORE_ADDR call_dummy_breakpoint_offset)
1515 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
1519 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
1521 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
1522 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
1523 if (gdbarch_debug >= 2)
1524 /* FIXME: gdb_std??? */
1525 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
1526 return gdbarch->call_dummy_breakpoint_offset_p;
1530 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
1531 int call_dummy_breakpoint_offset_p)
1533 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
1537 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
1539 if (gdbarch->call_dummy_length == -1)
1540 internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
1541 if (gdbarch_debug >= 2)
1542 /* FIXME: gdb_std??? */
1543 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
1544 return gdbarch->call_dummy_length;
1548 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
1549 int call_dummy_length)
1551 gdbarch->call_dummy_length = call_dummy_length;
1555 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
1557 if (gdbarch->pc_in_call_dummy == 0)
1558 internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
1559 if (gdbarch_debug >= 2)
1560 /* FIXME: gdb_std??? */
1561 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
1562 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
1566 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
1567 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
1569 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
1573 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
1575 if (gdbarch->call_dummy_p == -1)
1576 internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
1577 if (gdbarch_debug >= 2)
1578 /* FIXME: gdb_std??? */
1579 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
1580 return gdbarch->call_dummy_p;
1584 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
1587 gdbarch->call_dummy_p = call_dummy_p;
1591 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
1593 if (gdbarch_debug >= 2)
1594 /* FIXME: gdb_std??? */
1595 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
1596 return gdbarch->call_dummy_words;
1600 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
1601 LONGEST * call_dummy_words)
1603 gdbarch->call_dummy_words = call_dummy_words;
1607 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
1609 if (gdbarch_debug >= 2)
1610 /* FIXME: gdb_std??? */
1611 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
1612 return gdbarch->sizeof_call_dummy_words;
1616 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
1617 int sizeof_call_dummy_words)
1619 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
1623 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
1625 if (gdbarch->call_dummy_stack_adjust_p == -1)
1626 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
1627 if (gdbarch_debug >= 2)
1628 /* FIXME: gdb_std??? */
1629 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
1630 return gdbarch->call_dummy_stack_adjust_p;
1634 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
1635 int call_dummy_stack_adjust_p)
1637 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
1641 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
1643 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
1644 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
1645 if (gdbarch_debug >= 2)
1646 /* FIXME: gdb_std??? */
1647 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
1648 return gdbarch->call_dummy_stack_adjust;
1652 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
1653 int call_dummy_stack_adjust)
1655 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
1659 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)
1661 if (gdbarch->fix_call_dummy == 0)
1662 internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
1663 if (gdbarch_debug >= 2)
1664 /* FIXME: gdb_std??? */
1665 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
1666 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
1670 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
1671 gdbarch_fix_call_dummy_ftype fix_call_dummy)
1673 gdbarch->fix_call_dummy = fix_call_dummy;
1677 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
1679 if (gdbarch_debug >= 2)
1680 /* FIXME: gdb_std??? */
1681 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
1682 return gdbarch->believe_pcc_promotion;
1686 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
1687 int believe_pcc_promotion)
1689 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
1693 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
1695 if (gdbarch_debug >= 2)
1696 /* FIXME: gdb_std??? */
1697 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
1698 return gdbarch->believe_pcc_promotion_type;
1702 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
1703 int believe_pcc_promotion_type)
1705 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
1709 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)
1711 if (gdbarch->get_saved_register == 0)
1712 internal_error ("gdbarch: gdbarch_get_saved_register invalid");
1713 if (gdbarch_debug >= 2)
1714 /* FIXME: gdb_std??? */
1715 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
1716 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
1720 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
1721 gdbarch_get_saved_register_ftype get_saved_register)
1723 gdbarch->get_saved_register = get_saved_register;
1727 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
1729 if (gdbarch->register_convertible == 0)
1730 internal_error ("gdbarch: gdbarch_register_convertible invalid");
1731 if (gdbarch_debug >= 2)
1732 /* FIXME: gdb_std??? */
1733 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
1734 return gdbarch->register_convertible (nr);
1738 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
1739 gdbarch_register_convertible_ftype register_convertible)
1741 gdbarch->register_convertible = register_convertible;
1745 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
1747 if (gdbarch->register_convert_to_virtual == 0)
1748 internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
1749 if (gdbarch_debug >= 2)
1750 /* FIXME: gdb_std??? */
1751 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
1752 gdbarch->register_convert_to_virtual (regnum, type, from, to);
1756 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
1757 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
1759 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
1763 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
1765 if (gdbarch->register_convert_to_raw == 0)
1766 internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
1767 if (gdbarch_debug >= 2)
1768 /* FIXME: gdb_std??? */
1769 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
1770 gdbarch->register_convert_to_raw (type, regnum, from, to);
1774 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
1775 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
1777 gdbarch->register_convert_to_raw = register_convert_to_raw;
1781 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
1783 if (gdbarch->extract_return_value == 0)
1784 internal_error ("gdbarch: gdbarch_extract_return_value invalid");
1785 if (gdbarch_debug >= 2)
1786 /* FIXME: gdb_std??? */
1787 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
1788 gdbarch->extract_return_value (type, regbuf, valbuf);
1792 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
1793 gdbarch_extract_return_value_ftype extract_return_value)
1795 gdbarch->extract_return_value = extract_return_value;
1799 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
1801 if (gdbarch->push_arguments == 0)
1802 internal_error ("gdbarch: gdbarch_push_arguments invalid");
1803 if (gdbarch_debug >= 2)
1804 /* FIXME: gdb_std??? */
1805 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
1806 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
1810 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
1811 gdbarch_push_arguments_ftype push_arguments)
1813 gdbarch->push_arguments = push_arguments;
1817 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
1819 if (gdbarch->push_dummy_frame == 0)
1820 internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
1821 if (gdbarch_debug >= 2)
1822 /* FIXME: gdb_std??? */
1823 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
1824 gdbarch->push_dummy_frame ();
1828 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
1829 gdbarch_push_dummy_frame_ftype push_dummy_frame)
1831 gdbarch->push_dummy_frame = push_dummy_frame;
1835 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
1837 if (gdbarch->push_return_address == 0)
1838 internal_error ("gdbarch: gdbarch_push_return_address invalid");
1839 if (gdbarch_debug >= 2)
1840 /* FIXME: gdb_std??? */
1841 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
1842 return gdbarch->push_return_address (pc, sp);
1846 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
1847 gdbarch_push_return_address_ftype push_return_address)
1849 gdbarch->push_return_address = push_return_address;
1853 gdbarch_pop_frame (struct gdbarch *gdbarch)
1855 if (gdbarch->pop_frame == 0)
1856 internal_error ("gdbarch: gdbarch_pop_frame invalid");
1857 if (gdbarch_debug >= 2)
1858 /* FIXME: gdb_std??? */
1859 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
1860 gdbarch->pop_frame ();
1864 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
1865 gdbarch_pop_frame_ftype pop_frame)
1867 gdbarch->pop_frame = pop_frame;
1871 gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
1873 if (gdbarch->d10v_make_daddr == 0)
1874 internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
1875 if (gdbarch_debug >= 2)
1876 /* FIXME: gdb_std??? */
1877 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
1878 return gdbarch->d10v_make_daddr (x);
1882 set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch,
1883 gdbarch_d10v_make_daddr_ftype d10v_make_daddr)
1885 gdbarch->d10v_make_daddr = d10v_make_daddr;
1889 gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
1891 if (gdbarch->d10v_make_iaddr == 0)
1892 internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
1893 if (gdbarch_debug >= 2)
1894 /* FIXME: gdb_std??? */
1895 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
1896 return gdbarch->d10v_make_iaddr (x);
1900 set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch,
1901 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr)
1903 gdbarch->d10v_make_iaddr = d10v_make_iaddr;
1907 gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
1909 if (gdbarch->d10v_daddr_p == 0)
1910 internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
1911 if (gdbarch_debug >= 2)
1912 /* FIXME: gdb_std??? */
1913 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
1914 return gdbarch->d10v_daddr_p (x);
1918 set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch,
1919 gdbarch_d10v_daddr_p_ftype d10v_daddr_p)
1921 gdbarch->d10v_daddr_p = d10v_daddr_p;
1925 gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
1927 if (gdbarch->d10v_iaddr_p == 0)
1928 internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
1929 if (gdbarch_debug >= 2)
1930 /* FIXME: gdb_std??? */
1931 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
1932 return gdbarch->d10v_iaddr_p (x);
1936 set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch,
1937 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p)
1939 gdbarch->d10v_iaddr_p = d10v_iaddr_p;
1943 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
1945 if (gdbarch->d10v_convert_daddr_to_raw == 0)
1946 internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
1947 if (gdbarch_debug >= 2)
1948 /* FIXME: gdb_std??? */
1949 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
1950 return gdbarch->d10v_convert_daddr_to_raw (x);
1954 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch,
1955 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw)
1957 gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw;
1961 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
1963 if (gdbarch->d10v_convert_iaddr_to_raw == 0)
1964 internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
1965 if (gdbarch_debug >= 2)
1966 /* FIXME: gdb_std??? */
1967 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
1968 return gdbarch->d10v_convert_iaddr_to_raw (x);
1972 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch,
1973 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw)
1975 gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw;
1979 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
1981 if (gdbarch->store_struct_return == 0)
1982 internal_error ("gdbarch: gdbarch_store_struct_return invalid");
1983 if (gdbarch_debug >= 2)
1984 /* FIXME: gdb_std??? */
1985 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
1986 gdbarch->store_struct_return (addr, sp);
1990 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
1991 gdbarch_store_struct_return_ftype store_struct_return)
1993 gdbarch->store_struct_return = store_struct_return;
1997 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
1999 if (gdbarch->store_return_value == 0)
2000 internal_error ("gdbarch: gdbarch_store_return_value invalid");
2001 if (gdbarch_debug >= 2)
2002 /* FIXME: gdb_std??? */
2003 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
2004 gdbarch->store_return_value (type, valbuf);
2008 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
2009 gdbarch_store_return_value_ftype store_return_value)
2011 gdbarch->store_return_value = store_return_value;
2015 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
2017 if (gdbarch->extract_struct_value_address == 0)
2018 internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
2019 if (gdbarch_debug >= 2)
2020 /* FIXME: gdb_std??? */
2021 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
2022 return gdbarch->extract_struct_value_address (regbuf);
2026 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
2027 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
2029 gdbarch->extract_struct_value_address = extract_struct_value_address;
2033 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
2035 if (gdbarch->use_struct_convention == 0)
2036 internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
2037 if (gdbarch_debug >= 2)
2038 /* FIXME: gdb_std??? */
2039 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
2040 return gdbarch->use_struct_convention (gcc_p, value_type);
2044 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
2045 gdbarch_use_struct_convention_ftype use_struct_convention)
2047 gdbarch->use_struct_convention = use_struct_convention;
2051 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
2053 if (gdbarch->frame_init_saved_regs == 0)
2054 internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
2055 if (gdbarch_debug >= 2)
2056 /* FIXME: gdb_std??? */
2057 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
2058 gdbarch->frame_init_saved_regs (frame);
2062 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
2063 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
2065 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
2069 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
2071 if (gdbarch->init_extra_frame_info == 0)
2072 internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
2073 if (gdbarch_debug >= 2)
2074 /* FIXME: gdb_std??? */
2075 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
2076 gdbarch->init_extra_frame_info (fromleaf, frame);
2080 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
2081 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
2083 gdbarch->init_extra_frame_info = init_extra_frame_info;
2087 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2089 if (gdbarch->skip_prologue == 0)
2090 internal_error ("gdbarch: gdbarch_skip_prologue invalid");
2091 if (gdbarch_debug >= 2)
2092 /* FIXME: gdb_std??? */
2093 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2094 return gdbarch->skip_prologue (ip);
2098 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2099 gdbarch_skip_prologue_ftype skip_prologue)
2101 gdbarch->skip_prologue = skip_prologue;
2105 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2107 if (gdbarch->inner_than == 0)
2108 internal_error ("gdbarch: gdbarch_inner_than invalid");
2109 if (gdbarch_debug >= 2)
2110 /* FIXME: gdb_std??? */
2111 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2112 return gdbarch->inner_than (lhs, rhs);
2116 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2117 gdbarch_inner_than_ftype inner_than)
2119 gdbarch->inner_than = inner_than;
2123 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2125 if (gdbarch->breakpoint_from_pc == 0)
2126 internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
2127 if (gdbarch_debug >= 2)
2128 /* FIXME: gdb_std??? */
2129 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2130 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2134 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2135 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2137 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2141 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
2143 if (gdbarch->memory_insert_breakpoint == 0)
2144 internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
2145 if (gdbarch_debug >= 2)
2146 /* FIXME: gdb_std??? */
2147 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2148 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
2152 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2153 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2155 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2159 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
2161 if (gdbarch->memory_remove_breakpoint == 0)
2162 internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
2163 if (gdbarch_debug >= 2)
2164 /* FIXME: gdb_std??? */
2165 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2166 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
2170 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2171 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2173 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2177 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2179 if (gdbarch->decr_pc_after_break == -1)
2180 internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
2181 if (gdbarch_debug >= 2)
2182 /* FIXME: gdb_std??? */
2183 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2184 return gdbarch->decr_pc_after_break;
2188 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2189 CORE_ADDR decr_pc_after_break)
2191 gdbarch->decr_pc_after_break = decr_pc_after_break;
2195 gdbarch_function_start_offset (struct gdbarch *gdbarch)
2197 if (gdbarch->function_start_offset == -1)
2198 internal_error ("gdbarch: gdbarch_function_start_offset invalid");
2199 if (gdbarch_debug >= 2)
2200 /* FIXME: gdb_std??? */
2201 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
2202 return gdbarch->function_start_offset;
2206 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
2207 CORE_ADDR function_start_offset)
2209 gdbarch->function_start_offset = function_start_offset;
2213 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
2215 if (gdbarch->remote_translate_xfer_address == 0)
2216 internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
2217 if (gdbarch_debug >= 2)
2218 /* FIXME: gdb_std??? */
2219 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
2220 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
2224 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
2225 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
2227 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
2231 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2233 if (gdbarch->frame_args_skip == -1)
2234 internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
2235 if (gdbarch_debug >= 2)
2236 /* FIXME: gdb_std??? */
2237 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2238 return gdbarch->frame_args_skip;
2242 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2243 CORE_ADDR frame_args_skip)
2245 gdbarch->frame_args_skip = frame_args_skip;
2249 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
2251 if (gdbarch->frameless_function_invocation == 0)
2252 internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
2253 if (gdbarch_debug >= 2)
2254 /* FIXME: gdb_std??? */
2255 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
2256 return gdbarch->frameless_function_invocation (fi);
2260 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
2261 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
2263 gdbarch->frameless_function_invocation = frameless_function_invocation;
2267 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
2269 if (gdbarch->frame_chain == 0)
2270 internal_error ("gdbarch: gdbarch_frame_chain invalid");
2271 if (gdbarch_debug >= 2)
2272 /* FIXME: gdb_std??? */
2273 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
2274 return gdbarch->frame_chain (frame);
2278 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
2279 gdbarch_frame_chain_ftype frame_chain)
2281 gdbarch->frame_chain = frame_chain;
2285 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
2287 if (gdbarch->frame_chain_valid == 0)
2288 internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
2289 if (gdbarch_debug >= 2)
2290 /* FIXME: gdb_std??? */
2291 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
2292 return gdbarch->frame_chain_valid (chain, thisframe);
2296 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
2297 gdbarch_frame_chain_valid_ftype frame_chain_valid)
2299 gdbarch->frame_chain_valid = frame_chain_valid;
2303 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
2305 if (gdbarch->frame_saved_pc == 0)
2306 internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
2307 if (gdbarch_debug >= 2)
2308 /* FIXME: gdb_std??? */
2309 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
2310 return gdbarch->frame_saved_pc (fi);
2314 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
2315 gdbarch_frame_saved_pc_ftype frame_saved_pc)
2317 gdbarch->frame_saved_pc = frame_saved_pc;
2321 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
2323 if (gdbarch->frame_args_address == 0)
2324 internal_error ("gdbarch: gdbarch_frame_args_address invalid");
2325 if (gdbarch_debug >= 2)
2326 /* FIXME: gdb_std??? */
2327 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
2328 return gdbarch->frame_args_address (fi);
2332 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
2333 gdbarch_frame_args_address_ftype frame_args_address)
2335 gdbarch->frame_args_address = frame_args_address;
2339 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
2341 if (gdbarch->frame_locals_address == 0)
2342 internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
2343 if (gdbarch_debug >= 2)
2344 /* FIXME: gdb_std??? */
2345 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
2346 return gdbarch->frame_locals_address (fi);
2350 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
2351 gdbarch_frame_locals_address_ftype frame_locals_address)
2353 gdbarch->frame_locals_address = frame_locals_address;
2357 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
2359 if (gdbarch->saved_pc_after_call == 0)
2360 internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
2361 if (gdbarch_debug >= 2)
2362 /* FIXME: gdb_std??? */
2363 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
2364 return gdbarch->saved_pc_after_call (frame);
2368 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
2369 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
2371 gdbarch->saved_pc_after_call = saved_pc_after_call;
2375 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2377 if (gdbarch->frame_num_args == 0)
2378 internal_error ("gdbarch: gdbarch_frame_num_args invalid");
2379 if (gdbarch_debug >= 2)
2380 /* FIXME: gdb_std??? */
2381 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2382 return gdbarch->frame_num_args (frame);
2386 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2387 gdbarch_frame_num_args_ftype frame_num_args)
2389 gdbarch->frame_num_args = frame_num_args;
2393 /* Keep a registrary of per-architecture data-pointers required by GDB
2401 struct gdbarch_data_registration
2403 gdbarch_data_ftype *init;
2404 struct gdbarch_data *data;
2405 struct gdbarch_data_registration *next;
2408 struct gdbarch_data_registrary
2411 struct gdbarch_data_registration *registrations;
2414 struct gdbarch_data_registrary gdbarch_data_registrary =
2419 struct gdbarch_data *
2420 register_gdbarch_data (gdbarch_data_ftype *init)
2422 struct gdbarch_data_registration **curr;
2423 for (curr = &gdbarch_data_registrary.registrations;
2425 curr = &(*curr)->next);
2426 (*curr) = XMALLOC (struct gdbarch_data_registration);
2427 (*curr)->next = NULL;
2428 (*curr)->init = init;
2429 (*curr)->data = XMALLOC (struct gdbarch_data);
2430 (*curr)->data->index = gdbarch_data_registrary.nr++;
2431 return (*curr)->data;
2435 /* Walk through all the registered users initializing each in turn. */
2438 init_gdbarch_data (struct gdbarch *gdbarch)
2440 struct gdbarch_data_registration *rego;
2441 gdbarch->nr_data = gdbarch_data_registrary.nr + 1;
2442 gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data);
2443 for (rego = gdbarch_data_registrary.registrations;
2447 if (rego->data->index < gdbarch->nr_data)
2448 gdbarch->data[rego->data->index] = rego->init ();
2453 /* Return the current value of the specified per-architecture
2458 struct gdbarch_data *data;
2460 if (data->index >= current_gdbarch->nr_data)
2461 internal_error ("gdbarch_data: request for non-existant data.");
2462 return current_gdbarch->data[data->index];
2467 /* Keep a registrary of swaped data required by GDB modules. */
2472 struct gdbarch_swap_registration *source;
2473 struct gdbarch_swap *next;
2476 struct gdbarch_swap_registration
2479 unsigned long sizeof_data;
2480 gdbarch_swap_ftype *init;
2481 struct gdbarch_swap_registration *next;
2484 struct gdbarch_swap_registrary
2487 struct gdbarch_swap_registration *registrations;
2490 struct gdbarch_swap_registrary gdbarch_swap_registrary =
2496 register_gdbarch_swap (void *data,
2497 unsigned long sizeof_data,
2498 gdbarch_swap_ftype *init)
2500 struct gdbarch_swap_registration **rego;
2501 for (rego = &gdbarch_swap_registrary.registrations;
2503 rego = &(*rego)->next);
2504 (*rego) = XMALLOC (struct gdbarch_swap_registration);
2505 (*rego)->next = NULL;
2506 (*rego)->init = init;
2507 (*rego)->data = data;
2508 (*rego)->sizeof_data = sizeof_data;
2513 init_gdbarch_swap (struct gdbarch *gdbarch)
2515 struct gdbarch_swap_registration *rego;
2516 struct gdbarch_swap **curr = &gdbarch->swap;
2517 for (rego = gdbarch_swap_registrary.registrations;
2521 if (rego->data != NULL)
2523 (*curr) = XMALLOC (struct gdbarch_swap);
2524 (*curr)->source = rego;
2525 (*curr)->swap = xmalloc (rego->sizeof_data);
2526 (*curr)->next = NULL;
2527 memset (rego->data, 0, rego->sizeof_data);
2528 curr = &(*curr)->next;
2530 if (rego->init != NULL)
2536 swapout_gdbarch_swap (struct gdbarch *gdbarch)
2538 struct gdbarch_swap *curr;
2539 for (curr = gdbarch->swap;
2542 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
2546 swapin_gdbarch_swap (struct gdbarch *gdbarch)
2548 struct gdbarch_swap *curr;
2549 for (curr = gdbarch->swap;
2552 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
2556 /* Keep a registrary of the architectures known by GDB. */
2558 struct gdbarch_init_registration
2560 enum bfd_architecture bfd_architecture;
2561 gdbarch_init_ftype *init;
2562 struct gdbarch_list *arches;
2563 struct gdbarch_init_registration *next;
2566 static struct gdbarch_init_registration *gdbarch_init_registrary = NULL;
2569 register_gdbarch_init (enum bfd_architecture bfd_architecture,
2570 gdbarch_init_ftype *init)
2572 struct gdbarch_init_registration **curr;
2573 const struct bfd_arch_info *bfd_arch_info;
2574 /* Check that BFD reconizes this architecture */
2575 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
2576 if (bfd_arch_info == NULL)
2578 internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
2580 /* Check that we haven't seen this architecture before */
2581 for (curr = &gdbarch_init_registrary;
2583 curr = &(*curr)->next)
2585 if (bfd_architecture == (*curr)->bfd_architecture)
2586 internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
2587 bfd_arch_info->printable_name);
2591 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
2592 bfd_arch_info->printable_name,
2595 (*curr) = XMALLOC (struct gdbarch_init_registration);
2596 (*curr)->bfd_architecture = bfd_architecture;
2597 (*curr)->init = init;
2598 (*curr)->arches = NULL;
2599 (*curr)->next = NULL;
2604 /* Look for an architecture using gdbarch_info. Base search on only
2605 BFD_ARCH_INFO and BYTE_ORDER. */
2607 struct gdbarch_list *
2608 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
2609 const struct gdbarch_info *info)
2611 for (; arches != NULL; arches = arches->next)
2613 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
2615 if (info->byte_order != arches->gdbarch->byte_order)
2623 /* Update the current architecture. Return ZERO if the update request
2627 gdbarch_update (struct gdbarch_info info)
2629 struct gdbarch *new_gdbarch;
2630 struct gdbarch_list **list;
2631 struct gdbarch_init_registration *rego;
2633 /* Fill in any missing bits. Most important is the bfd_architecture
2634 which is used to select the target architecture. */
2635 if (info.bfd_architecture == bfd_arch_unknown)
2637 if (info.bfd_arch_info != NULL)
2638 info.bfd_architecture = info.bfd_arch_info->arch;
2639 else if (info.abfd != NULL)
2640 info.bfd_architecture = bfd_get_arch (info.abfd);
2641 /* FIXME - should query BFD for its default architecture. */
2643 info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
2645 if (info.bfd_arch_info == NULL)
2647 if (target_architecture_auto && info.abfd != NULL)
2648 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
2650 info.bfd_arch_info = current_gdbarch->bfd_arch_info;
2652 if (info.byte_order == 0)
2654 if (target_byte_order_auto && info.abfd != NULL)
2655 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
2656 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
2659 info.byte_order = current_gdbarch->byte_order;
2660 /* FIXME - should query BFD for its default byte-order. */
2662 /* A default for abfd? */
2664 /* Find the target that knows about this architecture. */
2665 for (rego = gdbarch_init_registrary;
2666 rego != NULL && rego->bfd_architecture != info.bfd_architecture;
2671 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
2677 fprintf_unfiltered (gdb_stdlog,
2678 "gdbarch_update: info.bfd_architecture %d (%s)\n",
2679 info.bfd_architecture,
2680 bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
2681 fprintf_unfiltered (gdb_stdlog,
2682 "gdbarch_update: info.bfd_arch_info %s\n",
2683 (info.bfd_arch_info != NULL
2684 ? info.bfd_arch_info->printable_name
2686 fprintf_unfiltered (gdb_stdlog,
2687 "gdbarch_update: info.byte_order %d (%s)\n",
2689 (info.byte_order == BIG_ENDIAN ? "big"
2690 : info.byte_order == LITTLE_ENDIAN ? "little"
2692 fprintf_unfiltered (gdb_stdlog,
2693 "gdbarch_update: info.abfd 0x%lx\n",
2695 fprintf_unfiltered (gdb_stdlog,
2696 "gdbarch_update: info.tdep_info 0x%lx\n",
2697 (long) info.tdep_info);
2700 /* Ask the target for a replacement architecture. */
2701 new_gdbarch = rego->init (info, rego->arches);
2703 /* Did the target like it? No. Reject the change. */
2704 if (new_gdbarch == NULL)
2707 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
2711 /* Did the architecture change? No. Do nothing. */
2712 if (current_gdbarch == new_gdbarch)
2715 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
2717 new_gdbarch->bfd_arch_info->printable_name);
2721 /* Swap all data belonging to the old target out */
2722 swapout_gdbarch_swap (current_gdbarch);
2724 /* Is this a pre-existing architecture? Yes. Swap it in. */
2725 for (list = ®o->arches;
2727 list = &(*list)->next)
2729 if ((*list)->gdbarch == new_gdbarch)
2732 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
2734 new_gdbarch->bfd_arch_info->printable_name);
2735 current_gdbarch = new_gdbarch;
2736 swapin_gdbarch_swap (new_gdbarch);
2741 /* Append this new architecture to this targets list. */
2742 (*list) = XMALLOC (struct gdbarch_list);
2743 (*list)->next = NULL;
2744 (*list)->gdbarch = new_gdbarch;
2746 /* Switch to this new architecture. Dump it out. */
2747 current_gdbarch = new_gdbarch;
2750 fprintf_unfiltered (gdb_stdlog,
2751 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
2753 new_gdbarch->bfd_arch_info->printable_name);
2757 /* Check that the newly installed architecture is valid. */
2758 verify_gdbarch (new_gdbarch);
2760 /* Initialize the per-architecture memory (swap) areas.
2761 CURRENT_GDBARCH must be update before these modules are
2763 init_gdbarch_swap (new_gdbarch);
2765 /* Initialize the per-architecture data-pointer of all parties that
2766 registered an interest in this architecture. CURRENT_GDBARCH
2767 must be updated before these modules are called. */
2768 init_gdbarch_data (new_gdbarch);
2775 /* Functions to manipulate the endianness of the target. */
2777 #ifdef TARGET_BYTE_ORDER_SELECTABLE
2778 /* compat - Catch old targets that expect a selectable byte-order to
2779 default to BIG_ENDIAN */
2780 #ifndef TARGET_BYTE_ORDER_DEFAULT
2781 #define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN
2784 #if !TARGET_BYTE_ORDER_SELECTABLE_P
2785 #ifndef TARGET_BYTE_ORDER_DEFAULT
2786 /* compat - Catch old non byte-order selectable targets that do not
2787 define TARGET_BYTE_ORDER_DEFAULT and instead expect
2788 TARGET_BYTE_ORDER to be used as the default. For targets that
2789 defined neither TARGET_BYTE_ORDER nor TARGET_BYTE_ORDER_DEFAULT the
2790 below will get a strange compiler warning. */
2791 #define TARGET_BYTE_ORDER_DEFAULT TARGET_BYTE_ORDER
2794 #ifndef TARGET_BYTE_ORDER_DEFAULT
2795 #define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN /* arbitrary */
2797 int target_byte_order = TARGET_BYTE_ORDER_DEFAULT;
2798 int target_byte_order_auto = 1;
2800 /* Chain containing the \"set endian\" commands. */
2801 static struct cmd_list_element *endianlist = NULL;
2803 /* Called by ``show endian''. */
2805 show_endian (char *args, int from_tty)
2808 (TARGET_BYTE_ORDER_AUTO
2809 ? "The target endianness is set automatically (currently %s endian)\n"
2810 : "The target is assumed to be %s endian\n");
2811 printf_unfiltered (msg, (TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little"));
2814 /* Called if the user enters ``set endian'' without an argument. */
2816 set_endian (char *args, int from_tty)
2818 printf_unfiltered ("\"set endian\" must be followed by \"auto\", \"big\" or \"little\".\n");
2819 show_endian (args, from_tty);
2822 /* Called by ``set endian big''. */
2824 set_endian_big (char *args, int from_tty)
2826 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2828 target_byte_order = BIG_ENDIAN;
2829 target_byte_order_auto = 0;
2832 struct gdbarch_info info;
2833 memset (&info, 0, sizeof info);
2834 info.byte_order = BIG_ENDIAN;
2835 gdbarch_update (info);
2840 printf_unfiltered ("Byte order is not selectable.");
2841 show_endian (args, from_tty);
2845 /* Called by ``set endian little''. */
2847 set_endian_little (char *args, int from_tty)
2849 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2851 target_byte_order = LITTLE_ENDIAN;
2852 target_byte_order_auto = 0;
2855 struct gdbarch_info info;
2856 memset (&info, 0, sizeof info);
2857 info.byte_order = LITTLE_ENDIAN;
2858 gdbarch_update (info);
2863 printf_unfiltered ("Byte order is not selectable.");
2864 show_endian (args, from_tty);
2868 /* Called by ``set endian auto''. */
2870 set_endian_auto (char *args, int from_tty)
2872 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2874 target_byte_order_auto = 1;
2878 printf_unfiltered ("Byte order is not selectable.");
2879 show_endian (args, from_tty);
2883 /* Set the endianness from a BFD. */
2885 set_endian_from_file (bfd *abfd)
2887 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2891 if (bfd_big_endian (abfd))
2894 want = LITTLE_ENDIAN;
2895 if (TARGET_BYTE_ORDER_AUTO)
2896 target_byte_order = want;
2897 else if (TARGET_BYTE_ORDER != want)
2898 warning ("%s endian file does not match %s endian target.",
2899 want == BIG_ENDIAN ? "big" : "little",
2900 TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
2904 if (bfd_big_endian (abfd)
2905 ? TARGET_BYTE_ORDER != BIG_ENDIAN
2906 : TARGET_BYTE_ORDER == BIG_ENDIAN)
2907 warning ("%s endian file does not match %s endian target.",
2908 bfd_big_endian (abfd) ? "big" : "little",
2909 TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
2915 /* Functions to manipulate the architecture of the target */
2917 enum set_arch { set_arch_auto, set_arch_manual };
2919 int target_architecture_auto = 1;
2920 extern const struct bfd_arch_info bfd_default_arch_struct;
2921 const struct bfd_arch_info *target_architecture = &bfd_default_arch_struct;
2922 int (*target_architecture_hook) (const struct bfd_arch_info *ap);
2924 static void show_endian (char *, int);
2925 static void set_endian (char *, int);
2926 static void set_endian_big (char *, int);
2927 static void set_endian_little (char *, int);
2928 static void set_endian_auto (char *, int);
2929 static void set_endian_from_file (bfd *);
2930 static int arch_ok (const struct bfd_arch_info *arch);
2931 static void set_arch (const struct bfd_arch_info *arch, enum set_arch type);
2932 static void show_architecture (char *, int);
2933 static void set_architecture (char *, int);
2934 static void info_architecture (char *, int);
2935 static void set_architecture_from_file (bfd *);
2937 /* Do the real work of changing the current architecture */
2940 arch_ok (const struct bfd_arch_info *arch)
2942 /* Should be performing the more basic check that the binary is
2943 compatible with GDB. */
2944 /* Check with the target that the architecture is valid. */
2945 return (target_architecture_hook == NULL
2946 || target_architecture_hook (arch));
2950 set_arch (const struct bfd_arch_info *arch,
2956 if (!arch_ok (arch))
2957 warning ("Target may not support %s architecture",
2958 arch->printable_name);
2959 target_architecture = arch;
2961 case set_arch_manual:
2962 if (!arch_ok (arch))
2964 printf_unfiltered ("Target does not support `%s' architecture.\n",
2965 arch->printable_name);
2969 target_architecture_auto = 0;
2970 target_architecture = arch;
2978 /* Called if the user enters ``show architecture'' without an argument. */
2980 show_architecture (char *args, int from_tty)
2983 arch = TARGET_ARCHITECTURE->printable_name;
2984 if (target_architecture_auto)
2985 printf_filtered ("The target architecture is set automatically (currently %s)\n", arch);
2987 printf_filtered ("The target architecture is assumed to be %s\n", arch);
2990 /* Called if the user enters ``set architecture'' with or without an
2993 set_architecture (char *args, int from_tty)
2997 printf_unfiltered ("\"set architecture\" must be followed by \"auto\" or an architecture name.\n");
2999 else if (strcmp (args, "auto") == 0)
3001 target_architecture_auto = 1;
3003 else if (GDB_MULTI_ARCH)
3005 const struct bfd_arch_info *arch = bfd_scan_arch (args);
3007 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3010 struct gdbarch_info info;
3011 memset (&info, 0, sizeof info);
3012 info.bfd_arch_info = arch;
3013 if (gdbarch_update (info))
3014 target_architecture_auto = 0;
3016 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3021 const struct bfd_arch_info *arch = bfd_scan_arch (args);
3023 set_arch (arch, set_arch_manual);
3025 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3029 /* Called if the user enters ``info architecture'' without an argument. */
3031 info_architecture (char *args, int from_tty)
3033 enum bfd_architecture a;
3036 if (gdbarch_init_registrary != NULL)
3038 struct gdbarch_init_registration *rego;
3039 printf_filtered ("Available architectures are:\n");
3040 for (rego = gdbarch_init_registrary;
3044 const struct bfd_arch_info *ap;
3045 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3050 printf_filtered (" %s", ap->printable_name);
3054 printf_filtered ("\n");
3060 printf_filtered ("There are no available architectures.\n");
3064 printf_filtered ("Available architectures are:\n");
3065 for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
3067 const struct bfd_arch_info *ap = bfd_lookup_arch (a, 0);
3072 printf_filtered (" %s", ap->printable_name);
3076 printf_filtered ("\n");
3081 /* Set the architecture from arch/machine */
3083 set_architecture_from_arch_mach (arch, mach)
3084 enum bfd_architecture arch;
3087 const struct bfd_arch_info *wanted = bfd_lookup_arch (arch, mach);
3089 set_arch (wanted, set_arch_manual);
3091 internal_error ("gdbarch: hardwired architecture/machine not reconized");
3094 /* Set the architecture from a BFD */
3096 set_architecture_from_file (bfd *abfd)
3098 const struct bfd_arch_info *wanted = bfd_get_arch_info (abfd);
3099 if (target_architecture_auto)
3101 set_arch (wanted, set_arch_auto);
3103 else if (wanted != target_architecture)
3105 warning ("%s architecture file may be incompatible with %s target.",
3106 wanted->printable_name,
3107 target_architecture->printable_name);
3112 /* Misc helper functions for targets. */
3115 frame_num_args_unknown (fi)
3116 struct frame_info *fi;
3123 generic_register_convertible_not (num)
3131 /* Pointer to the target-dependent disassembly function. */
3132 int (*tm_print_insn) (bfd_vma, disassemble_info *);
3133 disassemble_info tm_print_insn_info;
3137 /* Set the dynamic target-system-dependant parameters (architecture,
3138 byte-order) using information found in the BFD */
3141 set_gdbarch_from_file (abfd)
3146 struct gdbarch_info info;
3147 memset (&info, 0, sizeof info);
3149 gdbarch_update (info);
3152 set_architecture_from_file (abfd);
3153 set_endian_from_file (abfd);
3157 #if defined (CALL_DUMMY)
3158 /* FIXME - this should go away */
3159 LONGEST call_dummy_words[] = CALL_DUMMY;
3160 int sizeof_call_dummy_words = sizeof (call_dummy_words);
3164 extern void _initialize_gdbarch (void);
3166 _initialize_gdbarch ()
3168 add_prefix_cmd ("endian", class_support, set_endian,
3169 "Set endianness of target.",
3170 &endianlist, "set endian ", 0, &setlist);
3171 add_cmd ("big", class_support, set_endian_big,
3172 "Set target as being big endian.", &endianlist);
3173 add_cmd ("little", class_support, set_endian_little,
3174 "Set target as being little endian.", &endianlist);
3175 add_cmd ("auto", class_support, set_endian_auto,
3176 "Select target endianness automatically.", &endianlist);
3177 add_cmd ("endian", class_support, show_endian,
3178 "Show endianness of target.", &showlist);
3180 add_cmd ("architecture", class_support, set_architecture,
3181 "Set architecture of target.", &setlist);
3182 add_alias_cmd ("processor", "architecture", class_support, 1, &setlist);
3183 add_cmd ("architecture", class_support, show_architecture,
3184 "Show architecture of target.", &showlist);
3185 add_cmd ("architecture", class_support, info_architecture,
3186 "List supported target architectures", &infolist);
3188 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
3189 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
3190 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
3191 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
3192 tm_print_insn_info.print_address_func = dis_asm_print_address;
3194 add_show_from_set (add_set_cmd ("archdebug",
3197 (char *)&gdbarch_debug,
3198 "Set architecture debugging.\n\
3199 When non-zero, architecture debugging is enabled.", &setlist),