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 */
28 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
30 /* Just include everything in sight so that the every old definition
31 of macro is visible. */
32 #include "gdb_string.h"
37 #include "breakpoint.h"
42 #include "gdbthread.h"
44 #include "symfile.h" /* for overlay functions */
49 /* Convenience macro for allocting typesafe memory. */
52 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
56 /* Non-zero if we want to trace architecture code. */
59 #define GDBARCH_DEBUG 0
61 int gdbarch_debug = GDBARCH_DEBUG;
64 /* Maintain the struct gdbarch object */
68 /* basic architectural information */
69 const struct bfd_arch_info * bfd_arch_info;
72 /* target specific vector. */
73 struct gdbarch_tdep *tdep;
75 /* per-architecture data-pointers */
79 /* per-architecture swap-regions */
80 struct gdbarch_swap *swap;
84 When extending this structure you must:
88 Declare set/get functions and define the corresponding
91 gdbarch_alloc(): If zero/NULL is not a suitable default,
92 initialize the new field.
94 verify_gdbarch(): Confirm that the target updated the field
97 gdbarch_dump(): Add a fprintf_unfiltered call to so that the new
100 ``default_gdbarch()'': Append an initial value to the static
101 variable (base values on the host's c-type system).
103 get_gdbarch(): Implement the set/get functions (probably using
104 the macro's as shortcuts).
116 gdbarch_read_pc_ftype *read_pc;
117 gdbarch_write_pc_ftype *write_pc;
118 gdbarch_read_fp_ftype *read_fp;
119 gdbarch_write_fp_ftype *write_fp;
120 gdbarch_read_sp_ftype *read_sp;
121 gdbarch_write_sp_ftype *write_sp;
126 gdbarch_register_name_ftype *register_name;
129 gdbarch_register_byte_ftype *register_byte;
130 gdbarch_register_raw_size_ftype *register_raw_size;
131 int max_register_raw_size;
132 gdbarch_register_virtual_size_ftype *register_virtual_size;
133 int max_register_virtual_size;
134 gdbarch_register_virtual_type_ftype *register_virtual_type;
135 int use_generic_dummy_frames;
136 int call_dummy_location;
137 gdbarch_call_dummy_address_ftype *call_dummy_address;
138 CORE_ADDR call_dummy_start_offset;
139 CORE_ADDR call_dummy_breakpoint_offset;
140 int call_dummy_breakpoint_offset_p;
141 int call_dummy_length;
142 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
144 LONGEST * call_dummy_words;
145 int sizeof_call_dummy_words;
146 int call_dummy_stack_adjust_p;
147 int call_dummy_stack_adjust;
148 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
149 int believe_pcc_promotion;
150 int believe_pcc_promotion_type;
151 gdbarch_get_saved_register_ftype *get_saved_register;
152 gdbarch_register_convertible_ftype *register_convertible;
153 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
154 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
155 gdbarch_extract_return_value_ftype *extract_return_value;
156 gdbarch_push_arguments_ftype *push_arguments;
157 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
158 gdbarch_push_return_address_ftype *push_return_address;
159 gdbarch_pop_frame_ftype *pop_frame;
160 gdbarch_d10v_make_daddr_ftype *d10v_make_daddr;
161 gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr;
162 gdbarch_d10v_daddr_p_ftype *d10v_daddr_p;
163 gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p;
164 gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw;
165 gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw;
166 gdbarch_store_struct_return_ftype *store_struct_return;
167 gdbarch_store_return_value_ftype *store_return_value;
168 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
169 gdbarch_use_struct_convention_ftype *use_struct_convention;
170 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
171 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
172 gdbarch_skip_prologue_ftype *skip_prologue;
173 gdbarch_inner_than_ftype *inner_than;
174 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
175 CORE_ADDR decr_pc_after_break;
176 CORE_ADDR function_start_offset;
177 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
178 CORE_ADDR frame_args_skip;
179 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
180 gdbarch_frame_chain_ftype *frame_chain;
181 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
182 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
183 gdbarch_frame_args_address_ftype *frame_args_address;
184 gdbarch_frame_locals_address_ftype *frame_locals_address;
185 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
186 gdbarch_frame_num_args_ftype *frame_num_args;
190 /* The default architecture uses host values (for want of a better
193 extern const struct bfd_arch_info bfd_default_arch_struct;
195 struct gdbarch default_gdbarch = {
196 /* basic architecture information */
197 &bfd_default_arch_struct,
199 /* target specific vector */
201 /*per-architecture data-pointers and swap regions */
203 /* Multi-arch values */
208 8 * sizeof (LONGEST),
211 8 * sizeof (long double),
247 generic_get_saved_register,
283 /* default_gdbarch() */
285 struct gdbarch *current_gdbarch = &default_gdbarch;
288 /* Create a new ``struct gdbarch'' based in information provided by
289 ``struct gdbarch_info''. */
292 gdbarch_alloc (info, tdep)
293 const struct gdbarch_info *info;
294 struct gdbarch_tdep *tdep;
296 struct gdbarch *gdbarch = XMALLOC (struct gdbarch);
297 memset (gdbarch, 0, sizeof (*gdbarch));
299 gdbarch->tdep = tdep;
301 gdbarch->bfd_arch_info = info->bfd_arch_info;
302 gdbarch->byte_order = info->byte_order;
304 /* Force the explicit initialization of these. */
305 gdbarch->num_regs = -1;
306 gdbarch->sp_regnum = -1;
307 gdbarch->fp_regnum = -1;
308 gdbarch->pc_regnum = -1;
309 gdbarch->register_size = -1;
310 gdbarch->register_bytes = -1;
311 gdbarch->max_register_raw_size = -1;
312 gdbarch->max_register_virtual_size = -1;
313 gdbarch->use_generic_dummy_frames = -1;
314 gdbarch->call_dummy_start_offset = -1;
315 gdbarch->call_dummy_breakpoint_offset = -1;
316 gdbarch->call_dummy_breakpoint_offset_p = -1;
317 gdbarch->call_dummy_length = -1;
318 gdbarch->call_dummy_p = -1;
319 gdbarch->call_dummy_stack_adjust_p = -1;
320 gdbarch->decr_pc_after_break = -1;
321 gdbarch->function_start_offset = -1;
322 gdbarch->frame_args_skip = -1;
323 /* gdbarch_alloc() */
329 /* Ensure that all values in a GDBARCH are reasonable. */
331 static void verify_gdbarch PARAMS ((struct gdbarch *gdbarch));
333 verify_gdbarch (gdbarch)
334 struct gdbarch *gdbarch;
336 /* Only perform sanity checks on a multi-arch target. */
337 if (GDB_MULTI_ARCH <= 0)
340 if (gdbarch->byte_order == 0)
341 internal_error ("verify_gdbarch: byte-order unset");
342 if (gdbarch->bfd_arch_info == NULL)
343 internal_error ("verify_gdbarch: bfd_arch_info unset");
344 /* Check those that need to be defined for the given multi-arch level. */
345 if ((GDB_MULTI_ARCH >= 1)
346 && (gdbarch->ptr_bit == 0))
347 internal_error ("gdbarch: verify_gdbarch: ptr_bit invalid");
348 if ((GDB_MULTI_ARCH >= 1)
349 && (gdbarch->short_bit == 0))
350 internal_error ("gdbarch: verify_gdbarch: short_bit invalid");
351 if ((GDB_MULTI_ARCH >= 1)
352 && (gdbarch->int_bit == 0))
353 internal_error ("gdbarch: verify_gdbarch: int_bit invalid");
354 if ((GDB_MULTI_ARCH >= 1)
355 && (gdbarch->long_bit == 0))
356 internal_error ("gdbarch: verify_gdbarch: long_bit invalid");
357 if ((GDB_MULTI_ARCH >= 1)
358 && (gdbarch->long_long_bit == 0))
359 internal_error ("gdbarch: verify_gdbarch: long_long_bit invalid");
360 if ((GDB_MULTI_ARCH >= 1)
361 && (gdbarch->float_bit == 0))
362 internal_error ("gdbarch: verify_gdbarch: float_bit invalid");
363 if ((GDB_MULTI_ARCH >= 1)
364 && (gdbarch->double_bit == 0))
365 internal_error ("gdbarch: verify_gdbarch: double_bit invalid");
366 if ((GDB_MULTI_ARCH >= 1)
367 && (gdbarch->long_double_bit == 0))
368 internal_error ("gdbarch: verify_gdbarch: long_double_bit invalid");
369 if ((GDB_MULTI_ARCH >= 1)
370 && (gdbarch->read_pc == 0))
371 internal_error ("gdbarch: verify_gdbarch: read_pc invalid");
372 if ((GDB_MULTI_ARCH >= 1)
373 && (gdbarch->write_pc == 0))
374 internal_error ("gdbarch: verify_gdbarch: write_pc invalid");
375 if ((GDB_MULTI_ARCH >= 1)
376 && (gdbarch->read_fp == 0))
377 internal_error ("gdbarch: verify_gdbarch: read_fp invalid");
378 if ((GDB_MULTI_ARCH >= 1)
379 && (gdbarch->write_fp == 0))
380 internal_error ("gdbarch: verify_gdbarch: write_fp invalid");
381 if ((GDB_MULTI_ARCH >= 1)
382 && (gdbarch->read_sp == 0))
383 internal_error ("gdbarch: verify_gdbarch: read_sp invalid");
384 if ((GDB_MULTI_ARCH >= 1)
385 && (gdbarch->write_sp == 0))
386 internal_error ("gdbarch: verify_gdbarch: write_sp invalid");
387 if ((GDB_MULTI_ARCH >= 2)
388 && (gdbarch->num_regs == -1))
389 internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
390 if ((GDB_MULTI_ARCH >= 2)
391 && (gdbarch->sp_regnum == -1))
392 internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
393 if ((GDB_MULTI_ARCH >= 2)
394 && (gdbarch->fp_regnum == -1))
395 internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
396 if ((GDB_MULTI_ARCH >= 2)
397 && (gdbarch->pc_regnum == -1))
398 internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
399 if ((GDB_MULTI_ARCH >= 2)
400 && (gdbarch->register_name == 0))
401 internal_error ("gdbarch: verify_gdbarch: register_name invalid");
402 if ((GDB_MULTI_ARCH >= 2)
403 && (gdbarch->register_size == -1))
404 internal_error ("gdbarch: verify_gdbarch: register_size invalid");
405 if ((GDB_MULTI_ARCH >= 2)
406 && (gdbarch->register_bytes == -1))
407 internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
408 if ((GDB_MULTI_ARCH >= 2)
409 && (gdbarch->register_byte == 0))
410 internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
411 if ((GDB_MULTI_ARCH >= 2)
412 && (gdbarch->register_raw_size == 0))
413 internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
414 if ((GDB_MULTI_ARCH >= 2)
415 && (gdbarch->max_register_raw_size == -1))
416 internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
417 if ((GDB_MULTI_ARCH >= 2)
418 && (gdbarch->register_virtual_size == 0))
419 internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
420 if ((GDB_MULTI_ARCH >= 2)
421 && (gdbarch->max_register_virtual_size == -1))
422 internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
423 if ((GDB_MULTI_ARCH >= 2)
424 && (gdbarch->register_virtual_type == 0))
425 internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
426 if ((GDB_MULTI_ARCH >= 1)
427 && (gdbarch->use_generic_dummy_frames == -1))
428 internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
429 if ((GDB_MULTI_ARCH >= 2)
430 && (gdbarch->call_dummy_location == 0))
431 internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
432 if ((GDB_MULTI_ARCH >= 2)
433 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
434 internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
435 if ((GDB_MULTI_ARCH >= 2)
436 && (gdbarch->call_dummy_start_offset == -1))
437 internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
438 if ((GDB_MULTI_ARCH >= 2)
439 && (gdbarch->call_dummy_breakpoint_offset == -1))
440 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
441 if ((GDB_MULTI_ARCH >= 1)
442 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
443 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
444 if ((GDB_MULTI_ARCH >= 2)
445 && (gdbarch->call_dummy_length == -1))
446 internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
447 if ((GDB_MULTI_ARCH >= 2)
448 && (gdbarch->pc_in_call_dummy == 0))
449 internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
450 if ((GDB_MULTI_ARCH >= 1)
451 && (gdbarch->call_dummy_p == -1))
452 internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
453 if ((GDB_MULTI_ARCH >= 1)
454 && (gdbarch->call_dummy_stack_adjust_p == -1))
455 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
456 if ((GDB_MULTI_ARCH >= 2)
457 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
458 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
459 if ((GDB_MULTI_ARCH >= 2)
460 && (gdbarch->fix_call_dummy == 0))
461 internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
462 if ((GDB_MULTI_ARCH >= 1)
463 && (gdbarch->get_saved_register == 0))
464 internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
465 if ((GDB_MULTI_ARCH >= 1)
466 && (gdbarch->register_convertible == 0))
467 internal_error ("gdbarch: verify_gdbarch: register_convertible invalid");
468 if ((GDB_MULTI_ARCH >= 2)
469 && (gdbarch->register_convert_to_virtual == 0))
470 internal_error ("gdbarch: verify_gdbarch: register_convert_to_virtual invalid");
471 if ((GDB_MULTI_ARCH >= 2)
472 && (gdbarch->register_convert_to_raw == 0))
473 internal_error ("gdbarch: verify_gdbarch: register_convert_to_raw invalid");
474 if ((GDB_MULTI_ARCH >= 2)
475 && (gdbarch->extract_return_value == 0))
476 internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
477 if ((GDB_MULTI_ARCH >= 1)
478 && (gdbarch->push_arguments == 0))
479 internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
480 if ((GDB_MULTI_ARCH >= 2)
481 && (gdbarch->push_dummy_frame == 0))
482 internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
483 if ((GDB_MULTI_ARCH >= 1)
484 && (gdbarch->push_return_address == 0))
485 internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
486 if ((GDB_MULTI_ARCH >= 2)
487 && (gdbarch->pop_frame == 0))
488 internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
489 if ((GDB_MULTI_ARCH >= 2)
490 && (gdbarch->d10v_make_daddr == 0))
491 internal_error ("gdbarch: verify_gdbarch: d10v_make_daddr invalid");
492 if ((GDB_MULTI_ARCH >= 2)
493 && (gdbarch->d10v_make_iaddr == 0))
494 internal_error ("gdbarch: verify_gdbarch: d10v_make_iaddr invalid");
495 if ((GDB_MULTI_ARCH >= 2)
496 && (gdbarch->d10v_daddr_p == 0))
497 internal_error ("gdbarch: verify_gdbarch: d10v_daddr_p invalid");
498 if ((GDB_MULTI_ARCH >= 2)
499 && (gdbarch->d10v_iaddr_p == 0))
500 internal_error ("gdbarch: verify_gdbarch: d10v_iaddr_p invalid");
501 if ((GDB_MULTI_ARCH >= 2)
502 && (gdbarch->d10v_convert_daddr_to_raw == 0))
503 internal_error ("gdbarch: verify_gdbarch: d10v_convert_daddr_to_raw invalid");
504 if ((GDB_MULTI_ARCH >= 2)
505 && (gdbarch->d10v_convert_iaddr_to_raw == 0))
506 internal_error ("gdbarch: verify_gdbarch: d10v_convert_iaddr_to_raw invalid");
507 if ((GDB_MULTI_ARCH >= 2)
508 && (gdbarch->store_struct_return == 0))
509 internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
510 if ((GDB_MULTI_ARCH >= 2)
511 && (gdbarch->store_return_value == 0))
512 internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
513 if ((GDB_MULTI_ARCH >= 2)
514 && (gdbarch->extract_struct_value_address == 0))
515 internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
516 if ((GDB_MULTI_ARCH >= 2)
517 && (gdbarch->use_struct_convention == 0))
518 internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
519 if ((GDB_MULTI_ARCH >= 2)
520 && (gdbarch->frame_init_saved_regs == 0))
521 internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
522 if ((GDB_MULTI_ARCH >= 2)
523 && (gdbarch->init_extra_frame_info == 0))
524 internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
525 if ((GDB_MULTI_ARCH >= 2)
526 && (gdbarch->skip_prologue == 0))
527 internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
528 if ((GDB_MULTI_ARCH >= 2)
529 && (gdbarch->inner_than == 0))
530 internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
531 if ((GDB_MULTI_ARCH >= 2)
532 && (gdbarch->breakpoint_from_pc == 0))
533 internal_error ("gdbarch: verify_gdbarch: breakpoint_from_pc invalid");
534 if ((GDB_MULTI_ARCH >= 2)
535 && (gdbarch->decr_pc_after_break == -1))
536 internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
537 if ((GDB_MULTI_ARCH >= 2)
538 && (gdbarch->function_start_offset == -1))
539 internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
540 if ((GDB_MULTI_ARCH >= 2)
541 && (gdbarch->remote_translate_xfer_address == 0))
542 internal_error ("gdbarch: verify_gdbarch: remote_translate_xfer_address invalid");
543 if ((GDB_MULTI_ARCH >= 2)
544 && (gdbarch->frame_args_skip == -1))
545 internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
546 if ((GDB_MULTI_ARCH >= 2)
547 && (gdbarch->frameless_function_invocation == 0))
548 internal_error ("gdbarch: verify_gdbarch: frameless_function_invocation invalid");
549 if ((GDB_MULTI_ARCH >= 2)
550 && (gdbarch->frame_chain == 0))
551 internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
552 if ((GDB_MULTI_ARCH >= 1)
553 && (gdbarch->frame_chain_valid == 0))
554 internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
555 if ((GDB_MULTI_ARCH >= 2)
556 && (gdbarch->frame_saved_pc == 0))
557 internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
558 if ((GDB_MULTI_ARCH >= 2)
559 && (gdbarch->frame_args_address == 0))
560 internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
561 if ((GDB_MULTI_ARCH >= 2)
562 && (gdbarch->frame_locals_address == 0))
563 internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
564 if ((GDB_MULTI_ARCH >= 2)
565 && (gdbarch->saved_pc_after_call == 0))
566 internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
567 if ((GDB_MULTI_ARCH >= 2)
568 && (gdbarch->frame_num_args == 0))
569 internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
573 /* Print out the details of the current architecture. */
578 if (TARGET_ARCHITECTURE != NULL)
579 fprintf_unfiltered (gdb_stdlog,
580 "gdbarch_update: TARGET_ARCHITECTURE = %s\n",
581 TARGET_ARCHITECTURE->printable_name);
582 fprintf_unfiltered (gdb_stdlog,
583 "gdbarch_update: TARGET_BYTE_ORDER = %ld\n",
584 (long) TARGET_BYTE_ORDER);
585 fprintf_unfiltered (gdb_stdlog,
586 "gdbarch_update: TARGET_PTR_BIT = %ld\n",
587 (long) TARGET_PTR_BIT);
588 fprintf_unfiltered (gdb_stdlog,
589 "gdbarch_update: TARGET_SHORT_BIT = %ld\n",
590 (long) TARGET_SHORT_BIT);
591 fprintf_unfiltered (gdb_stdlog,
592 "gdbarch_update: TARGET_INT_BIT = %ld\n",
593 (long) TARGET_INT_BIT);
594 fprintf_unfiltered (gdb_stdlog,
595 "gdbarch_update: TARGET_LONG_BIT = %ld\n",
596 (long) TARGET_LONG_BIT);
597 fprintf_unfiltered (gdb_stdlog,
598 "gdbarch_update: TARGET_LONG_LONG_BIT = %ld\n",
599 (long) TARGET_LONG_LONG_BIT);
600 fprintf_unfiltered (gdb_stdlog,
601 "gdbarch_update: TARGET_FLOAT_BIT = %ld\n",
602 (long) TARGET_FLOAT_BIT);
603 fprintf_unfiltered (gdb_stdlog,
604 "gdbarch_update: TARGET_DOUBLE_BIT = %ld\n",
605 (long) TARGET_DOUBLE_BIT);
606 fprintf_unfiltered (gdb_stdlog,
607 "gdbarch_update: TARGET_LONG_DOUBLE_BIT = %ld\n",
608 (long) TARGET_LONG_DOUBLE_BIT);
609 fprintf_unfiltered (gdb_stdlog,
610 "gdbarch_update: TARGET_READ_PC = 0x%08lx\n",
611 (long) current_gdbarch->read_pc
612 /*TARGET_READ_PC ()*/);
613 fprintf_unfiltered (gdb_stdlog,
614 "gdbarch_update: TARGET_WRITE_PC = 0x%08lx\n",
615 (long) current_gdbarch->write_pc
616 /*TARGET_WRITE_PC ()*/);
617 fprintf_unfiltered (gdb_stdlog,
618 "gdbarch_update: TARGET_READ_FP = 0x%08lx\n",
619 (long) current_gdbarch->read_fp
620 /*TARGET_READ_FP ()*/);
621 fprintf_unfiltered (gdb_stdlog,
622 "gdbarch_update: TARGET_WRITE_FP = 0x%08lx\n",
623 (long) current_gdbarch->write_fp
624 /*TARGET_WRITE_FP ()*/);
625 fprintf_unfiltered (gdb_stdlog,
626 "gdbarch_update: TARGET_READ_SP = 0x%08lx\n",
627 (long) current_gdbarch->read_sp
628 /*TARGET_READ_SP ()*/);
629 fprintf_unfiltered (gdb_stdlog,
630 "gdbarch_update: TARGET_WRITE_SP = 0x%08lx\n",
631 (long) current_gdbarch->write_sp
632 /*TARGET_WRITE_SP ()*/);
633 fprintf_unfiltered (gdb_stdlog,
634 "gdbarch_update: NUM_REGS = %ld\n",
636 fprintf_unfiltered (gdb_stdlog,
637 "gdbarch_update: SP_REGNUM = %ld\n",
639 fprintf_unfiltered (gdb_stdlog,
640 "gdbarch_update: FP_REGNUM = %ld\n",
642 fprintf_unfiltered (gdb_stdlog,
643 "gdbarch_update: PC_REGNUM = %ld\n",
645 fprintf_unfiltered (gdb_stdlog,
646 "gdbarch_update: REGISTER_NAME = 0x%08lx\n",
647 (long) current_gdbarch->register_name
648 /*REGISTER_NAME ()*/);
649 fprintf_unfiltered (gdb_stdlog,
650 "gdbarch_update: REGISTER_SIZE = %ld\n",
651 (long) REGISTER_SIZE);
652 fprintf_unfiltered (gdb_stdlog,
653 "gdbarch_update: REGISTER_BYTES = %ld\n",
654 (long) REGISTER_BYTES);
655 fprintf_unfiltered (gdb_stdlog,
656 "gdbarch_update: REGISTER_BYTE = 0x%08lx\n",
657 (long) current_gdbarch->register_byte
658 /*REGISTER_BYTE ()*/);
659 fprintf_unfiltered (gdb_stdlog,
660 "gdbarch_update: REGISTER_RAW_SIZE = 0x%08lx\n",
661 (long) current_gdbarch->register_raw_size
662 /*REGISTER_RAW_SIZE ()*/);
663 fprintf_unfiltered (gdb_stdlog,
664 "gdbarch_update: MAX_REGISTER_RAW_SIZE = %ld\n",
665 (long) MAX_REGISTER_RAW_SIZE);
666 fprintf_unfiltered (gdb_stdlog,
667 "gdbarch_update: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
668 (long) current_gdbarch->register_virtual_size
669 /*REGISTER_VIRTUAL_SIZE ()*/);
670 fprintf_unfiltered (gdb_stdlog,
671 "gdbarch_update: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
672 (long) MAX_REGISTER_VIRTUAL_SIZE);
673 fprintf_unfiltered (gdb_stdlog,
674 "gdbarch_update: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
675 (long) current_gdbarch->register_virtual_type
676 /*REGISTER_VIRTUAL_TYPE ()*/);
677 fprintf_unfiltered (gdb_stdlog,
678 "gdbarch_update: USE_GENERIC_DUMMY_FRAMES = %ld\n",
679 (long) USE_GENERIC_DUMMY_FRAMES);
680 fprintf_unfiltered (gdb_stdlog,
681 "gdbarch_update: CALL_DUMMY_LOCATION = %ld\n",
682 (long) CALL_DUMMY_LOCATION);
683 fprintf_unfiltered (gdb_stdlog,
684 "gdbarch_update: CALL_DUMMY_ADDRESS = 0x%08lx\n",
685 (long) current_gdbarch->call_dummy_address
686 /*CALL_DUMMY_ADDRESS ()*/);
687 fprintf_unfiltered (gdb_stdlog,
688 "gdbarch_update: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
689 (long) CALL_DUMMY_START_OFFSET);
690 fprintf_unfiltered (gdb_stdlog,
691 "gdbarch_update: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
692 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
693 fprintf_unfiltered (gdb_stdlog,
694 "gdbarch_update: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
695 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
696 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
697 fprintf_unfiltered (gdb_stdlog,
698 "gdbarch_update: CALL_DUMMY_LENGTH = %ld\n",
699 (long) CALL_DUMMY_LENGTH);
700 fprintf_unfiltered (gdb_stdlog,
701 "gdbarch_update: PC_IN_CALL_DUMMY = 0x%08lx\n",
702 (long) current_gdbarch->pc_in_call_dummy
703 /*PC_IN_CALL_DUMMY ()*/);
704 fprintf_unfiltered (gdb_stdlog,
705 "gdbarch_update: CALL_DUMMY_P = %ld\n",
706 (long) CALL_DUMMY_P);
707 fprintf_unfiltered (gdb_stdlog,
708 "gdbarch_update: CALL_DUMMY_WORDS = 0x%08lx\n",
709 (long) CALL_DUMMY_WORDS);
710 fprintf_unfiltered (gdb_stdlog,
711 "gdbarch_update: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
712 (long) SIZEOF_CALL_DUMMY_WORDS);
713 fprintf_unfiltered (gdb_stdlog,
714 "gdbarch_update: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
715 (long) CALL_DUMMY_STACK_ADJUST_P);
716 if (CALL_DUMMY_STACK_ADJUST_P)
717 fprintf_unfiltered (gdb_stdlog,
718 "gdbarch_update: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
719 (long) CALL_DUMMY_STACK_ADJUST);
720 fprintf_unfiltered (gdb_stdlog,
721 "gdbarch_update: FIX_CALL_DUMMY = 0x%08lx\n",
722 (long) current_gdbarch->fix_call_dummy
723 /*FIX_CALL_DUMMY ()*/);
724 #ifdef BELIEVE_PCC_PROMOTION
725 fprintf_unfiltered (gdb_stdlog,
726 "gdbarch_update: BELIEVE_PCC_PROMOTION = %ld\n",
727 (long) BELIEVE_PCC_PROMOTION);
729 #ifdef BELIEVE_PCC_PROMOTION_TYPE
730 fprintf_unfiltered (gdb_stdlog,
731 "gdbarch_update: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
732 (long) BELIEVE_PCC_PROMOTION_TYPE);
734 fprintf_unfiltered (gdb_stdlog,
735 "gdbarch_update: GET_SAVED_REGISTER = 0x%08lx\n",
736 (long) current_gdbarch->get_saved_register
737 /*GET_SAVED_REGISTER ()*/);
738 fprintf_unfiltered (gdb_stdlog,
739 "gdbarch_update: REGISTER_CONVERTIBLE = 0x%08lx\n",
740 (long) current_gdbarch->register_convertible
741 /*REGISTER_CONVERTIBLE ()*/);
742 fprintf_unfiltered (gdb_stdlog,
743 "gdbarch_update: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
744 (long) current_gdbarch->register_convert_to_virtual
745 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
746 fprintf_unfiltered (gdb_stdlog,
747 "gdbarch_update: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
748 (long) current_gdbarch->register_convert_to_raw
749 /*REGISTER_CONVERT_TO_RAW ()*/);
750 fprintf_unfiltered (gdb_stdlog,
751 "gdbarch_update: EXTRACT_RETURN_VALUE = 0x%08lx\n",
752 (long) current_gdbarch->extract_return_value
753 /*EXTRACT_RETURN_VALUE ()*/);
754 fprintf_unfiltered (gdb_stdlog,
755 "gdbarch_update: PUSH_ARGUMENTS = 0x%08lx\n",
756 (long) current_gdbarch->push_arguments
757 /*PUSH_ARGUMENTS ()*/);
758 fprintf_unfiltered (gdb_stdlog,
759 "gdbarch_update: PUSH_DUMMY_FRAME = 0x%08lx\n",
760 (long) current_gdbarch->push_dummy_frame
761 /*PUSH_DUMMY_FRAME ()*/);
762 fprintf_unfiltered (gdb_stdlog,
763 "gdbarch_update: PUSH_RETURN_ADDRESS = 0x%08lx\n",
764 (long) current_gdbarch->push_return_address
765 /*PUSH_RETURN_ADDRESS ()*/);
766 fprintf_unfiltered (gdb_stdlog,
767 "gdbarch_update: POP_FRAME = 0x%08lx\n",
768 (long) current_gdbarch->pop_frame
770 fprintf_unfiltered (gdb_stdlog,
771 "gdbarch_update: D10V_MAKE_DADDR = 0x%08lx\n",
772 (long) current_gdbarch->d10v_make_daddr
773 /*D10V_MAKE_DADDR ()*/);
774 fprintf_unfiltered (gdb_stdlog,
775 "gdbarch_update: D10V_MAKE_IADDR = 0x%08lx\n",
776 (long) current_gdbarch->d10v_make_iaddr
777 /*D10V_MAKE_IADDR ()*/);
778 fprintf_unfiltered (gdb_stdlog,
779 "gdbarch_update: D10V_DADDR_P = 0x%08lx\n",
780 (long) current_gdbarch->d10v_daddr_p
781 /*D10V_DADDR_P ()*/);
782 fprintf_unfiltered (gdb_stdlog,
783 "gdbarch_update: D10V_IADDR_P = 0x%08lx\n",
784 (long) current_gdbarch->d10v_iaddr_p
785 /*D10V_IADDR_P ()*/);
786 fprintf_unfiltered (gdb_stdlog,
787 "gdbarch_update: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
788 (long) current_gdbarch->d10v_convert_daddr_to_raw
789 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
790 fprintf_unfiltered (gdb_stdlog,
791 "gdbarch_update: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
792 (long) current_gdbarch->d10v_convert_iaddr_to_raw
793 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
794 fprintf_unfiltered (gdb_stdlog,
795 "gdbarch_update: STORE_STRUCT_RETURN = 0x%08lx\n",
796 (long) current_gdbarch->store_struct_return
797 /*STORE_STRUCT_RETURN ()*/);
798 fprintf_unfiltered (gdb_stdlog,
799 "gdbarch_update: STORE_RETURN_VALUE = 0x%08lx\n",
800 (long) current_gdbarch->store_return_value
801 /*STORE_RETURN_VALUE ()*/);
802 fprintf_unfiltered (gdb_stdlog,
803 "gdbarch_update: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
804 (long) current_gdbarch->extract_struct_value_address
805 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
806 fprintf_unfiltered (gdb_stdlog,
807 "gdbarch_update: USE_STRUCT_CONVENTION = 0x%08lx\n",
808 (long) current_gdbarch->use_struct_convention
809 /*USE_STRUCT_CONVENTION ()*/);
810 fprintf_unfiltered (gdb_stdlog,
811 "gdbarch_update: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
812 (long) current_gdbarch->frame_init_saved_regs
813 /*FRAME_INIT_SAVED_REGS ()*/);
814 fprintf_unfiltered (gdb_stdlog,
815 "gdbarch_update: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
816 (long) current_gdbarch->init_extra_frame_info
817 /*INIT_EXTRA_FRAME_INFO ()*/);
818 fprintf_unfiltered (gdb_stdlog,
819 "gdbarch_update: SKIP_PROLOGUE = 0x%08lx\n",
820 (long) current_gdbarch->skip_prologue
821 /*SKIP_PROLOGUE ()*/);
822 fprintf_unfiltered (gdb_stdlog,
823 "gdbarch_update: INNER_THAN = 0x%08lx\n",
824 (long) current_gdbarch->inner_than
826 fprintf_unfiltered (gdb_stdlog,
827 "gdbarch_update: BREAKPOINT_FROM_PC = 0x%08lx\n",
828 (long) current_gdbarch->breakpoint_from_pc
829 /*BREAKPOINT_FROM_PC ()*/);
830 fprintf_unfiltered (gdb_stdlog,
831 "gdbarch_update: DECR_PC_AFTER_BREAK = %ld\n",
832 (long) DECR_PC_AFTER_BREAK);
833 fprintf_unfiltered (gdb_stdlog,
834 "gdbarch_update: FUNCTION_START_OFFSET = %ld\n",
835 (long) FUNCTION_START_OFFSET);
836 fprintf_unfiltered (gdb_stdlog,
837 "gdbarch_update: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
838 (long) current_gdbarch->remote_translate_xfer_address
839 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
840 fprintf_unfiltered (gdb_stdlog,
841 "gdbarch_update: FRAME_ARGS_SKIP = %ld\n",
842 (long) FRAME_ARGS_SKIP);
843 fprintf_unfiltered (gdb_stdlog,
844 "gdbarch_update: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
845 (long) current_gdbarch->frameless_function_invocation
846 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
847 fprintf_unfiltered (gdb_stdlog,
848 "gdbarch_update: FRAME_CHAIN = 0x%08lx\n",
849 (long) current_gdbarch->frame_chain
851 fprintf_unfiltered (gdb_stdlog,
852 "gdbarch_update: FRAME_CHAIN_VALID = 0x%08lx\n",
853 (long) current_gdbarch->frame_chain_valid
854 /*FRAME_CHAIN_VALID ()*/);
855 fprintf_unfiltered (gdb_stdlog,
856 "gdbarch_update: FRAME_SAVED_PC = 0x%08lx\n",
857 (long) current_gdbarch->frame_saved_pc
858 /*FRAME_SAVED_PC ()*/);
859 fprintf_unfiltered (gdb_stdlog,
860 "gdbarch_update: FRAME_ARGS_ADDRESS = 0x%08lx\n",
861 (long) current_gdbarch->frame_args_address
862 /*FRAME_ARGS_ADDRESS ()*/);
863 fprintf_unfiltered (gdb_stdlog,
864 "gdbarch_update: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
865 (long) current_gdbarch->frame_locals_address
866 /*FRAME_LOCALS_ADDRESS ()*/);
867 fprintf_unfiltered (gdb_stdlog,
868 "gdbarch_update: SAVED_PC_AFTER_CALL = 0x%08lx\n",
869 (long) current_gdbarch->saved_pc_after_call
870 /*SAVED_PC_AFTER_CALL ()*/);
871 fprintf_unfiltered (gdb_stdlog,
872 "gdbarch_update: FRAME_NUM_ARGS = 0x%08lx\n",
873 (long) current_gdbarch->frame_num_args
874 /*FRAME_NUM_ARGS ()*/);
877 struct gdbarch_tdep *
878 gdbarch_tdep (gdbarch)
879 struct gdbarch *gdbarch;
881 if (gdbarch_debug >= 2)
882 /* FIXME: gdb_std??? */
883 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
884 return gdbarch->tdep;
888 const struct bfd_arch_info *
889 gdbarch_bfd_arch_info (gdbarch)
890 struct gdbarch *gdbarch;
892 if (gdbarch_debug >= 2)
893 /* FIXME: gdb_std??? */
894 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
895 return gdbarch->bfd_arch_info;
899 gdbarch_byte_order (gdbarch)
900 struct gdbarch *gdbarch;
902 if (gdbarch_debug >= 2)
903 /* FIXME: gdb_std??? */
904 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
905 return gdbarch->byte_order;
909 gdbarch_ptr_bit (gdbarch)
910 struct gdbarch *gdbarch;
912 if (gdbarch->ptr_bit == 0)
913 internal_error ("gdbarch: gdbarch_ptr_bit invalid");
914 if (gdbarch_debug >= 2)
915 /* FIXME: gdb_std??? */
916 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
917 return gdbarch->ptr_bit;
921 set_gdbarch_ptr_bit (gdbarch, ptr_bit)
922 struct gdbarch *gdbarch;
925 gdbarch->ptr_bit = ptr_bit;
929 gdbarch_short_bit (gdbarch)
930 struct gdbarch *gdbarch;
932 if (gdbarch->short_bit == 0)
933 internal_error ("gdbarch: gdbarch_short_bit invalid");
934 if (gdbarch_debug >= 2)
935 /* FIXME: gdb_std??? */
936 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
937 return gdbarch->short_bit;
941 set_gdbarch_short_bit (gdbarch, short_bit)
942 struct gdbarch *gdbarch;
945 gdbarch->short_bit = short_bit;
949 gdbarch_int_bit (gdbarch)
950 struct gdbarch *gdbarch;
952 if (gdbarch->int_bit == 0)
953 internal_error ("gdbarch: gdbarch_int_bit invalid");
954 if (gdbarch_debug >= 2)
955 /* FIXME: gdb_std??? */
956 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
957 return gdbarch->int_bit;
961 set_gdbarch_int_bit (gdbarch, int_bit)
962 struct gdbarch *gdbarch;
965 gdbarch->int_bit = int_bit;
969 gdbarch_long_bit (gdbarch)
970 struct gdbarch *gdbarch;
972 if (gdbarch->long_bit == 0)
973 internal_error ("gdbarch: gdbarch_long_bit invalid");
974 if (gdbarch_debug >= 2)
975 /* FIXME: gdb_std??? */
976 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
977 return gdbarch->long_bit;
981 set_gdbarch_long_bit (gdbarch, long_bit)
982 struct gdbarch *gdbarch;
985 gdbarch->long_bit = long_bit;
989 gdbarch_long_long_bit (gdbarch)
990 struct gdbarch *gdbarch;
992 if (gdbarch->long_long_bit == 0)
993 internal_error ("gdbarch: gdbarch_long_long_bit invalid");
994 if (gdbarch_debug >= 2)
995 /* FIXME: gdb_std??? */
996 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
997 return gdbarch->long_long_bit;
1001 set_gdbarch_long_long_bit (gdbarch, long_long_bit)
1002 struct gdbarch *gdbarch;
1005 gdbarch->long_long_bit = long_long_bit;
1009 gdbarch_float_bit (gdbarch)
1010 struct gdbarch *gdbarch;
1012 if (gdbarch->float_bit == 0)
1013 internal_error ("gdbarch: gdbarch_float_bit invalid");
1014 if (gdbarch_debug >= 2)
1015 /* FIXME: gdb_std??? */
1016 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1017 return gdbarch->float_bit;
1021 set_gdbarch_float_bit (gdbarch, float_bit)
1022 struct gdbarch *gdbarch;
1025 gdbarch->float_bit = float_bit;
1029 gdbarch_double_bit (gdbarch)
1030 struct gdbarch *gdbarch;
1032 if (gdbarch->double_bit == 0)
1033 internal_error ("gdbarch: gdbarch_double_bit invalid");
1034 if (gdbarch_debug >= 2)
1035 /* FIXME: gdb_std??? */
1036 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1037 return gdbarch->double_bit;
1041 set_gdbarch_double_bit (gdbarch, double_bit)
1042 struct gdbarch *gdbarch;
1045 gdbarch->double_bit = double_bit;
1049 gdbarch_long_double_bit (gdbarch)
1050 struct gdbarch *gdbarch;
1052 if (gdbarch->long_double_bit == 0)
1053 internal_error ("gdbarch: gdbarch_long_double_bit invalid");
1054 if (gdbarch_debug >= 2)
1055 /* FIXME: gdb_std??? */
1056 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1057 return gdbarch->long_double_bit;
1061 set_gdbarch_long_double_bit (gdbarch, long_double_bit)
1062 struct gdbarch *gdbarch;
1063 int long_double_bit;
1065 gdbarch->long_double_bit = long_double_bit;
1069 gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
1071 if (gdbarch->read_pc == 0)
1072 internal_error ("gdbarch: gdbarch_read_pc invalid");
1073 if (gdbarch_debug >= 2)
1074 /* FIXME: gdb_std??? */
1075 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1076 return gdbarch->read_pc (pid);
1080 set_gdbarch_read_pc (gdbarch, read_pc)
1081 struct gdbarch *gdbarch;
1082 gdbarch_read_pc_ftype read_pc;
1084 gdbarch->read_pc = read_pc;
1088 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
1090 if (gdbarch->write_pc == 0)
1091 internal_error ("gdbarch: gdbarch_write_pc invalid");
1092 if (gdbarch_debug >= 2)
1093 /* FIXME: gdb_std??? */
1094 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1095 gdbarch->write_pc (val, pid);
1099 set_gdbarch_write_pc (gdbarch, write_pc)
1100 struct gdbarch *gdbarch;
1101 gdbarch_write_pc_ftype write_pc;
1103 gdbarch->write_pc = write_pc;
1107 gdbarch_read_fp (struct gdbarch *gdbarch)
1109 if (gdbarch->read_fp == 0)
1110 internal_error ("gdbarch: gdbarch_read_fp invalid");
1111 if (gdbarch_debug >= 2)
1112 /* FIXME: gdb_std??? */
1113 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
1114 return gdbarch->read_fp ();
1118 set_gdbarch_read_fp (gdbarch, read_fp)
1119 struct gdbarch *gdbarch;
1120 gdbarch_read_fp_ftype read_fp;
1122 gdbarch->read_fp = read_fp;
1126 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
1128 if (gdbarch->write_fp == 0)
1129 internal_error ("gdbarch: gdbarch_write_fp invalid");
1130 if (gdbarch_debug >= 2)
1131 /* FIXME: gdb_std??? */
1132 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
1133 gdbarch->write_fp (val);
1137 set_gdbarch_write_fp (gdbarch, write_fp)
1138 struct gdbarch *gdbarch;
1139 gdbarch_write_fp_ftype write_fp;
1141 gdbarch->write_fp = write_fp;
1145 gdbarch_read_sp (struct gdbarch *gdbarch)
1147 if (gdbarch->read_sp == 0)
1148 internal_error ("gdbarch: gdbarch_read_sp invalid");
1149 if (gdbarch_debug >= 2)
1150 /* FIXME: gdb_std??? */
1151 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1152 return gdbarch->read_sp ();
1156 set_gdbarch_read_sp (gdbarch, read_sp)
1157 struct gdbarch *gdbarch;
1158 gdbarch_read_sp_ftype read_sp;
1160 gdbarch->read_sp = read_sp;
1164 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
1166 if (gdbarch->write_sp == 0)
1167 internal_error ("gdbarch: gdbarch_write_sp invalid");
1168 if (gdbarch_debug >= 2)
1169 /* FIXME: gdb_std??? */
1170 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
1171 gdbarch->write_sp (val);
1175 set_gdbarch_write_sp (gdbarch, write_sp)
1176 struct gdbarch *gdbarch;
1177 gdbarch_write_sp_ftype write_sp;
1179 gdbarch->write_sp = write_sp;
1183 gdbarch_num_regs (gdbarch)
1184 struct gdbarch *gdbarch;
1186 if (gdbarch->num_regs == -1)
1187 internal_error ("gdbarch: gdbarch_num_regs invalid");
1188 if (gdbarch_debug >= 2)
1189 /* FIXME: gdb_std??? */
1190 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1191 return gdbarch->num_regs;
1195 set_gdbarch_num_regs (gdbarch, num_regs)
1196 struct gdbarch *gdbarch;
1199 gdbarch->num_regs = num_regs;
1203 gdbarch_sp_regnum (gdbarch)
1204 struct gdbarch *gdbarch;
1206 if (gdbarch->sp_regnum == -1)
1207 internal_error ("gdbarch: gdbarch_sp_regnum invalid");
1208 if (gdbarch_debug >= 2)
1209 /* FIXME: gdb_std??? */
1210 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
1211 return gdbarch->sp_regnum;
1215 set_gdbarch_sp_regnum (gdbarch, sp_regnum)
1216 struct gdbarch *gdbarch;
1219 gdbarch->sp_regnum = sp_regnum;
1223 gdbarch_fp_regnum (gdbarch)
1224 struct gdbarch *gdbarch;
1226 if (gdbarch->fp_regnum == -1)
1227 internal_error ("gdbarch: gdbarch_fp_regnum invalid");
1228 if (gdbarch_debug >= 2)
1229 /* FIXME: gdb_std??? */
1230 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
1231 return gdbarch->fp_regnum;
1235 set_gdbarch_fp_regnum (gdbarch, fp_regnum)
1236 struct gdbarch *gdbarch;
1239 gdbarch->fp_regnum = fp_regnum;
1243 gdbarch_pc_regnum (gdbarch)
1244 struct gdbarch *gdbarch;
1246 if (gdbarch->pc_regnum == -1)
1247 internal_error ("gdbarch: gdbarch_pc_regnum invalid");
1248 if (gdbarch_debug >= 2)
1249 /* FIXME: gdb_std??? */
1250 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
1251 return gdbarch->pc_regnum;
1255 set_gdbarch_pc_regnum (gdbarch, pc_regnum)
1256 struct gdbarch *gdbarch;
1259 gdbarch->pc_regnum = pc_regnum;
1263 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
1265 if (gdbarch->register_name == 0 || 1)
1266 internal_error ("gdbarch: gdbarch_register_name invalid");
1267 if (gdbarch_debug >= 2)
1268 /* FIXME: gdb_std??? */
1269 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
1270 return gdbarch->register_name (regnr);
1274 set_gdbarch_register_name (gdbarch, register_name)
1275 struct gdbarch *gdbarch;
1276 gdbarch_register_name_ftype register_name;
1278 gdbarch->register_name = register_name;
1282 gdbarch_register_size (gdbarch)
1283 struct gdbarch *gdbarch;
1285 if (gdbarch->register_size == -1)
1286 internal_error ("gdbarch: gdbarch_register_size invalid");
1287 if (gdbarch_debug >= 2)
1288 /* FIXME: gdb_std??? */
1289 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
1290 return gdbarch->register_size;
1294 set_gdbarch_register_size (gdbarch, register_size)
1295 struct gdbarch *gdbarch;
1298 gdbarch->register_size = register_size;
1302 gdbarch_register_bytes (gdbarch)
1303 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 (gdbarch, register_bytes)
1315 struct gdbarch *gdbarch;
1318 gdbarch->register_bytes = register_bytes;
1322 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
1324 if (gdbarch->register_byte == 0)
1325 internal_error ("gdbarch: gdbarch_register_byte invalid");
1326 if (gdbarch_debug >= 2)
1327 /* FIXME: gdb_std??? */
1328 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
1329 return gdbarch->register_byte (reg_nr);
1333 set_gdbarch_register_byte (gdbarch, register_byte)
1334 struct gdbarch *gdbarch;
1335 gdbarch_register_byte_ftype register_byte;
1337 gdbarch->register_byte = register_byte;
1341 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
1343 if (gdbarch->register_raw_size == 0)
1344 internal_error ("gdbarch: gdbarch_register_raw_size invalid");
1345 if (gdbarch_debug >= 2)
1346 /* FIXME: gdb_std??? */
1347 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
1348 return gdbarch->register_raw_size (reg_nr);
1352 set_gdbarch_register_raw_size (gdbarch, register_raw_size)
1353 struct gdbarch *gdbarch;
1354 gdbarch_register_raw_size_ftype register_raw_size;
1356 gdbarch->register_raw_size = register_raw_size;
1360 gdbarch_max_register_raw_size (gdbarch)
1361 struct gdbarch *gdbarch;
1363 if (gdbarch->max_register_raw_size == -1)
1364 internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
1365 if (gdbarch_debug >= 2)
1366 /* FIXME: gdb_std??? */
1367 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
1368 return gdbarch->max_register_raw_size;
1372 set_gdbarch_max_register_raw_size (gdbarch, max_register_raw_size)
1373 struct gdbarch *gdbarch;
1374 int max_register_raw_size;
1376 gdbarch->max_register_raw_size = max_register_raw_size;
1380 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
1382 if (gdbarch->register_virtual_size == 0)
1383 internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
1384 if (gdbarch_debug >= 2)
1385 /* FIXME: gdb_std??? */
1386 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
1387 return gdbarch->register_virtual_size (reg_nr);
1391 set_gdbarch_register_virtual_size (gdbarch, register_virtual_size)
1392 struct gdbarch *gdbarch;
1393 gdbarch_register_virtual_size_ftype register_virtual_size;
1395 gdbarch->register_virtual_size = register_virtual_size;
1399 gdbarch_max_register_virtual_size (gdbarch)
1400 struct gdbarch *gdbarch;
1402 if (gdbarch->max_register_virtual_size == -1)
1403 internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
1404 if (gdbarch_debug >= 2)
1405 /* FIXME: gdb_std??? */
1406 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
1407 return gdbarch->max_register_virtual_size;
1411 set_gdbarch_max_register_virtual_size (gdbarch, max_register_virtual_size)
1412 struct gdbarch *gdbarch;
1413 int max_register_virtual_size;
1415 gdbarch->max_register_virtual_size = max_register_virtual_size;
1419 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
1421 if (gdbarch->register_virtual_type == 0)
1422 internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
1423 if (gdbarch_debug >= 2)
1424 /* FIXME: gdb_std??? */
1425 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
1426 return gdbarch->register_virtual_type (reg_nr);
1430 set_gdbarch_register_virtual_type (gdbarch, register_virtual_type)
1431 struct gdbarch *gdbarch;
1432 gdbarch_register_virtual_type_ftype register_virtual_type;
1434 gdbarch->register_virtual_type = register_virtual_type;
1438 gdbarch_use_generic_dummy_frames (gdbarch)
1439 struct gdbarch *gdbarch;
1441 if (gdbarch->use_generic_dummy_frames == -1)
1442 internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
1443 if (gdbarch_debug >= 2)
1444 /* FIXME: gdb_std??? */
1445 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
1446 return gdbarch->use_generic_dummy_frames;
1450 set_gdbarch_use_generic_dummy_frames (gdbarch, use_generic_dummy_frames)
1451 struct gdbarch *gdbarch;
1452 int use_generic_dummy_frames;
1454 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
1458 gdbarch_call_dummy_location (gdbarch)
1459 struct gdbarch *gdbarch;
1461 if (gdbarch->call_dummy_location == 0)
1462 internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
1463 if (gdbarch_debug >= 2)
1464 /* FIXME: gdb_std??? */
1465 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
1466 return gdbarch->call_dummy_location;
1470 set_gdbarch_call_dummy_location (gdbarch, call_dummy_location)
1471 struct gdbarch *gdbarch;
1472 int call_dummy_location;
1474 gdbarch->call_dummy_location = call_dummy_location;
1478 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
1480 if (gdbarch->call_dummy_address == 0)
1481 internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
1482 if (gdbarch_debug >= 2)
1483 /* FIXME: gdb_std??? */
1484 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
1485 return gdbarch->call_dummy_address ();
1489 set_gdbarch_call_dummy_address (gdbarch, call_dummy_address)
1490 struct gdbarch *gdbarch;
1491 gdbarch_call_dummy_address_ftype call_dummy_address;
1493 gdbarch->call_dummy_address = call_dummy_address;
1497 gdbarch_call_dummy_start_offset (gdbarch)
1498 struct gdbarch *gdbarch;
1500 if (gdbarch->call_dummy_start_offset == -1)
1501 internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
1502 if (gdbarch_debug >= 2)
1503 /* FIXME: gdb_std??? */
1504 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
1505 return gdbarch->call_dummy_start_offset;
1509 set_gdbarch_call_dummy_start_offset (gdbarch, call_dummy_start_offset)
1510 struct gdbarch *gdbarch;
1511 CORE_ADDR call_dummy_start_offset;
1513 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
1517 gdbarch_call_dummy_breakpoint_offset (gdbarch)
1518 struct gdbarch *gdbarch;
1520 if (gdbarch->call_dummy_breakpoint_offset == -1)
1521 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
1522 if (gdbarch_debug >= 2)
1523 /* FIXME: gdb_std??? */
1524 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
1525 return gdbarch->call_dummy_breakpoint_offset;
1529 set_gdbarch_call_dummy_breakpoint_offset (gdbarch, call_dummy_breakpoint_offset)
1530 struct gdbarch *gdbarch;
1531 CORE_ADDR call_dummy_breakpoint_offset;
1533 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
1537 gdbarch_call_dummy_breakpoint_offset_p (gdbarch)
1538 struct gdbarch *gdbarch;
1540 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
1541 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
1542 if (gdbarch_debug >= 2)
1543 /* FIXME: gdb_std??? */
1544 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
1545 return gdbarch->call_dummy_breakpoint_offset_p;
1549 set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, call_dummy_breakpoint_offset_p)
1550 struct gdbarch *gdbarch;
1551 int call_dummy_breakpoint_offset_p;
1553 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
1557 gdbarch_call_dummy_length (gdbarch)
1558 struct gdbarch *gdbarch;
1560 if (gdbarch->call_dummy_length == -1)
1561 internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
1562 if (gdbarch_debug >= 2)
1563 /* FIXME: gdb_std??? */
1564 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
1565 return gdbarch->call_dummy_length;
1569 set_gdbarch_call_dummy_length (gdbarch, call_dummy_length)
1570 struct gdbarch *gdbarch;
1571 int call_dummy_length;
1573 gdbarch->call_dummy_length = call_dummy_length;
1577 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
1579 if (gdbarch->pc_in_call_dummy == 0)
1580 internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
1581 if (gdbarch_debug >= 2)
1582 /* FIXME: gdb_std??? */
1583 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
1584 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
1588 set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy)
1589 struct gdbarch *gdbarch;
1590 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy;
1592 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
1596 gdbarch_call_dummy_p (gdbarch)
1597 struct gdbarch *gdbarch;
1599 if (gdbarch->call_dummy_p == -1)
1600 internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
1601 if (gdbarch_debug >= 2)
1602 /* FIXME: gdb_std??? */
1603 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
1604 return gdbarch->call_dummy_p;
1608 set_gdbarch_call_dummy_p (gdbarch, call_dummy_p)
1609 struct gdbarch *gdbarch;
1612 gdbarch->call_dummy_p = call_dummy_p;
1616 gdbarch_call_dummy_words (gdbarch)
1617 struct gdbarch *gdbarch;
1619 if (gdbarch_debug >= 2)
1620 /* FIXME: gdb_std??? */
1621 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
1622 return gdbarch->call_dummy_words;
1626 set_gdbarch_call_dummy_words (gdbarch, call_dummy_words)
1627 struct gdbarch *gdbarch;
1628 LONGEST * call_dummy_words;
1630 gdbarch->call_dummy_words = call_dummy_words;
1634 gdbarch_sizeof_call_dummy_words (gdbarch)
1635 struct gdbarch *gdbarch;
1637 if (gdbarch_debug >= 2)
1638 /* FIXME: gdb_std??? */
1639 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
1640 return gdbarch->sizeof_call_dummy_words;
1644 set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_call_dummy_words)
1645 struct gdbarch *gdbarch;
1646 int sizeof_call_dummy_words;
1648 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
1652 gdbarch_call_dummy_stack_adjust_p (gdbarch)
1653 struct gdbarch *gdbarch;
1655 if (gdbarch->call_dummy_stack_adjust_p == -1)
1656 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
1657 if (gdbarch_debug >= 2)
1658 /* FIXME: gdb_std??? */
1659 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
1660 return gdbarch->call_dummy_stack_adjust_p;
1664 set_gdbarch_call_dummy_stack_adjust_p (gdbarch, call_dummy_stack_adjust_p)
1665 struct gdbarch *gdbarch;
1666 int call_dummy_stack_adjust_p;
1668 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
1672 gdbarch_call_dummy_stack_adjust (gdbarch)
1673 struct gdbarch *gdbarch;
1675 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
1676 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
1677 if (gdbarch_debug >= 2)
1678 /* FIXME: gdb_std??? */
1679 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
1680 return gdbarch->call_dummy_stack_adjust;
1684 set_gdbarch_call_dummy_stack_adjust (gdbarch, call_dummy_stack_adjust)
1685 struct gdbarch *gdbarch;
1686 int call_dummy_stack_adjust;
1688 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
1692 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)
1694 if (gdbarch->fix_call_dummy == 0)
1695 internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
1696 if (gdbarch_debug >= 2)
1697 /* FIXME: gdb_std??? */
1698 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
1699 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
1703 set_gdbarch_fix_call_dummy (gdbarch, fix_call_dummy)
1704 struct gdbarch *gdbarch;
1705 gdbarch_fix_call_dummy_ftype fix_call_dummy;
1707 gdbarch->fix_call_dummy = fix_call_dummy;
1711 gdbarch_believe_pcc_promotion (gdbarch)
1712 struct gdbarch *gdbarch;
1714 if (gdbarch_debug >= 2)
1715 /* FIXME: gdb_std??? */
1716 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
1717 return gdbarch->believe_pcc_promotion;
1721 set_gdbarch_believe_pcc_promotion (gdbarch, believe_pcc_promotion)
1722 struct gdbarch *gdbarch;
1723 int believe_pcc_promotion;
1725 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
1729 gdbarch_believe_pcc_promotion_type (gdbarch)
1730 struct gdbarch *gdbarch;
1732 if (gdbarch_debug >= 2)
1733 /* FIXME: gdb_std??? */
1734 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
1735 return gdbarch->believe_pcc_promotion_type;
1739 set_gdbarch_believe_pcc_promotion_type (gdbarch, believe_pcc_promotion_type)
1740 struct gdbarch *gdbarch;
1741 int believe_pcc_promotion_type;
1743 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
1747 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)
1749 if (gdbarch->get_saved_register == 0)
1750 internal_error ("gdbarch: gdbarch_get_saved_register invalid");
1751 if (gdbarch_debug >= 2)
1752 /* FIXME: gdb_std??? */
1753 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
1754 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
1758 set_gdbarch_get_saved_register (gdbarch, get_saved_register)
1759 struct gdbarch *gdbarch;
1760 gdbarch_get_saved_register_ftype get_saved_register;
1762 gdbarch->get_saved_register = get_saved_register;
1766 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
1768 if (gdbarch->register_convertible == 0)
1769 internal_error ("gdbarch: gdbarch_register_convertible invalid");
1770 if (gdbarch_debug >= 2)
1771 /* FIXME: gdb_std??? */
1772 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
1773 return gdbarch->register_convertible (nr);
1777 set_gdbarch_register_convertible (gdbarch, register_convertible)
1778 struct gdbarch *gdbarch;
1779 gdbarch_register_convertible_ftype register_convertible;
1781 gdbarch->register_convertible = register_convertible;
1785 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
1787 if (gdbarch->register_convert_to_virtual == 0)
1788 internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
1789 if (gdbarch_debug >= 2)
1790 /* FIXME: gdb_std??? */
1791 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
1792 gdbarch->register_convert_to_virtual (regnum, type, from, to);
1796 set_gdbarch_register_convert_to_virtual (gdbarch, register_convert_to_virtual)
1797 struct gdbarch *gdbarch;
1798 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual;
1800 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
1804 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
1806 if (gdbarch->register_convert_to_raw == 0)
1807 internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
1808 if (gdbarch_debug >= 2)
1809 /* FIXME: gdb_std??? */
1810 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
1811 gdbarch->register_convert_to_raw (type, regnum, from, to);
1815 set_gdbarch_register_convert_to_raw (gdbarch, register_convert_to_raw)
1816 struct gdbarch *gdbarch;
1817 gdbarch_register_convert_to_raw_ftype register_convert_to_raw;
1819 gdbarch->register_convert_to_raw = register_convert_to_raw;
1823 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
1825 if (gdbarch->extract_return_value == 0)
1826 internal_error ("gdbarch: gdbarch_extract_return_value invalid");
1827 if (gdbarch_debug >= 2)
1828 /* FIXME: gdb_std??? */
1829 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
1830 gdbarch->extract_return_value (type, regbuf, valbuf);
1834 set_gdbarch_extract_return_value (gdbarch, extract_return_value)
1835 struct gdbarch *gdbarch;
1836 gdbarch_extract_return_value_ftype extract_return_value;
1838 gdbarch->extract_return_value = extract_return_value;
1842 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
1844 if (gdbarch->push_arguments == 0)
1845 internal_error ("gdbarch: gdbarch_push_arguments invalid");
1846 if (gdbarch_debug >= 2)
1847 /* FIXME: gdb_std??? */
1848 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
1849 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
1853 set_gdbarch_push_arguments (gdbarch, push_arguments)
1854 struct gdbarch *gdbarch;
1855 gdbarch_push_arguments_ftype push_arguments;
1857 gdbarch->push_arguments = push_arguments;
1861 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
1863 if (gdbarch->push_dummy_frame == 0)
1864 internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
1865 if (gdbarch_debug >= 2)
1866 /* FIXME: gdb_std??? */
1867 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
1868 gdbarch->push_dummy_frame ();
1872 set_gdbarch_push_dummy_frame (gdbarch, push_dummy_frame)
1873 struct gdbarch *gdbarch;
1874 gdbarch_push_dummy_frame_ftype push_dummy_frame;
1876 gdbarch->push_dummy_frame = push_dummy_frame;
1880 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
1882 if (gdbarch->push_return_address == 0)
1883 internal_error ("gdbarch: gdbarch_push_return_address invalid");
1884 if (gdbarch_debug >= 2)
1885 /* FIXME: gdb_std??? */
1886 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
1887 return gdbarch->push_return_address (pc, sp);
1891 set_gdbarch_push_return_address (gdbarch, push_return_address)
1892 struct gdbarch *gdbarch;
1893 gdbarch_push_return_address_ftype push_return_address;
1895 gdbarch->push_return_address = push_return_address;
1899 gdbarch_pop_frame (struct gdbarch *gdbarch)
1901 if (gdbarch->pop_frame == 0)
1902 internal_error ("gdbarch: gdbarch_pop_frame invalid");
1903 if (gdbarch_debug >= 2)
1904 /* FIXME: gdb_std??? */
1905 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
1906 gdbarch->pop_frame ();
1910 set_gdbarch_pop_frame (gdbarch, pop_frame)
1911 struct gdbarch *gdbarch;
1912 gdbarch_pop_frame_ftype pop_frame;
1914 gdbarch->pop_frame = pop_frame;
1918 gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
1920 if (gdbarch->d10v_make_daddr == 0)
1921 internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
1922 if (gdbarch_debug >= 2)
1923 /* FIXME: gdb_std??? */
1924 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
1925 return gdbarch->d10v_make_daddr (x);
1929 set_gdbarch_d10v_make_daddr (gdbarch, d10v_make_daddr)
1930 struct gdbarch *gdbarch;
1931 gdbarch_d10v_make_daddr_ftype d10v_make_daddr;
1933 gdbarch->d10v_make_daddr = d10v_make_daddr;
1937 gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
1939 if (gdbarch->d10v_make_iaddr == 0)
1940 internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
1941 if (gdbarch_debug >= 2)
1942 /* FIXME: gdb_std??? */
1943 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
1944 return gdbarch->d10v_make_iaddr (x);
1948 set_gdbarch_d10v_make_iaddr (gdbarch, d10v_make_iaddr)
1949 struct gdbarch *gdbarch;
1950 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr;
1952 gdbarch->d10v_make_iaddr = d10v_make_iaddr;
1956 gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
1958 if (gdbarch->d10v_daddr_p == 0)
1959 internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
1960 if (gdbarch_debug >= 2)
1961 /* FIXME: gdb_std??? */
1962 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
1963 return gdbarch->d10v_daddr_p (x);
1967 set_gdbarch_d10v_daddr_p (gdbarch, d10v_daddr_p)
1968 struct gdbarch *gdbarch;
1969 gdbarch_d10v_daddr_p_ftype d10v_daddr_p;
1971 gdbarch->d10v_daddr_p = d10v_daddr_p;
1975 gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
1977 if (gdbarch->d10v_iaddr_p == 0)
1978 internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
1979 if (gdbarch_debug >= 2)
1980 /* FIXME: gdb_std??? */
1981 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
1982 return gdbarch->d10v_iaddr_p (x);
1986 set_gdbarch_d10v_iaddr_p (gdbarch, d10v_iaddr_p)
1987 struct gdbarch *gdbarch;
1988 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p;
1990 gdbarch->d10v_iaddr_p = d10v_iaddr_p;
1994 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
1996 if (gdbarch->d10v_convert_daddr_to_raw == 0)
1997 internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
1998 if (gdbarch_debug >= 2)
1999 /* FIXME: gdb_std??? */
2000 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
2001 return gdbarch->d10v_convert_daddr_to_raw (x);
2005 set_gdbarch_d10v_convert_daddr_to_raw (gdbarch, d10v_convert_daddr_to_raw)
2006 struct gdbarch *gdbarch;
2007 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw;
2009 gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw;
2013 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
2015 if (gdbarch->d10v_convert_iaddr_to_raw == 0)
2016 internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
2017 if (gdbarch_debug >= 2)
2018 /* FIXME: gdb_std??? */
2019 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
2020 return gdbarch->d10v_convert_iaddr_to_raw (x);
2024 set_gdbarch_d10v_convert_iaddr_to_raw (gdbarch, d10v_convert_iaddr_to_raw)
2025 struct gdbarch *gdbarch;
2026 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw;
2028 gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw;
2032 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
2034 if (gdbarch->store_struct_return == 0)
2035 internal_error ("gdbarch: gdbarch_store_struct_return invalid");
2036 if (gdbarch_debug >= 2)
2037 /* FIXME: gdb_std??? */
2038 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
2039 gdbarch->store_struct_return (addr, sp);
2043 set_gdbarch_store_struct_return (gdbarch, store_struct_return)
2044 struct gdbarch *gdbarch;
2045 gdbarch_store_struct_return_ftype store_struct_return;
2047 gdbarch->store_struct_return = store_struct_return;
2051 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
2053 if (gdbarch->store_return_value == 0)
2054 internal_error ("gdbarch: gdbarch_store_return_value invalid");
2055 if (gdbarch_debug >= 2)
2056 /* FIXME: gdb_std??? */
2057 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
2058 gdbarch->store_return_value (type, valbuf);
2062 set_gdbarch_store_return_value (gdbarch, store_return_value)
2063 struct gdbarch *gdbarch;
2064 gdbarch_store_return_value_ftype store_return_value;
2066 gdbarch->store_return_value = store_return_value;
2070 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
2072 if (gdbarch->extract_struct_value_address == 0)
2073 internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
2074 if (gdbarch_debug >= 2)
2075 /* FIXME: gdb_std??? */
2076 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
2077 return gdbarch->extract_struct_value_address (regbuf);
2081 set_gdbarch_extract_struct_value_address (gdbarch, extract_struct_value_address)
2082 struct gdbarch *gdbarch;
2083 gdbarch_extract_struct_value_address_ftype extract_struct_value_address;
2085 gdbarch->extract_struct_value_address = extract_struct_value_address;
2089 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
2091 if (gdbarch->use_struct_convention == 0)
2092 internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
2093 if (gdbarch_debug >= 2)
2094 /* FIXME: gdb_std??? */
2095 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
2096 return gdbarch->use_struct_convention (gcc_p, value_type);
2100 set_gdbarch_use_struct_convention (gdbarch, use_struct_convention)
2101 struct gdbarch *gdbarch;
2102 gdbarch_use_struct_convention_ftype use_struct_convention;
2104 gdbarch->use_struct_convention = use_struct_convention;
2108 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
2110 if (gdbarch->frame_init_saved_regs == 0)
2111 internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
2112 if (gdbarch_debug >= 2)
2113 /* FIXME: gdb_std??? */
2114 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
2115 gdbarch->frame_init_saved_regs (frame);
2119 set_gdbarch_frame_init_saved_regs (gdbarch, frame_init_saved_regs)
2120 struct gdbarch *gdbarch;
2121 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs;
2123 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
2127 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
2129 if (gdbarch->init_extra_frame_info == 0)
2130 internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
2131 if (gdbarch_debug >= 2)
2132 /* FIXME: gdb_std??? */
2133 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
2134 gdbarch->init_extra_frame_info (fromleaf, frame);
2138 set_gdbarch_init_extra_frame_info (gdbarch, init_extra_frame_info)
2139 struct gdbarch *gdbarch;
2140 gdbarch_init_extra_frame_info_ftype init_extra_frame_info;
2142 gdbarch->init_extra_frame_info = init_extra_frame_info;
2146 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2148 if (gdbarch->skip_prologue == 0)
2149 internal_error ("gdbarch: gdbarch_skip_prologue invalid");
2150 if (gdbarch_debug >= 2)
2151 /* FIXME: gdb_std??? */
2152 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2153 return gdbarch->skip_prologue (ip);
2157 set_gdbarch_skip_prologue (gdbarch, skip_prologue)
2158 struct gdbarch *gdbarch;
2159 gdbarch_skip_prologue_ftype skip_prologue;
2161 gdbarch->skip_prologue = skip_prologue;
2165 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2167 if (gdbarch->inner_than == 0)
2168 internal_error ("gdbarch: gdbarch_inner_than invalid");
2169 if (gdbarch_debug >= 2)
2170 /* FIXME: gdb_std??? */
2171 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2172 return gdbarch->inner_than (lhs, rhs);
2176 set_gdbarch_inner_than (gdbarch, inner_than)
2177 struct gdbarch *gdbarch;
2178 gdbarch_inner_than_ftype inner_than;
2180 gdbarch->inner_than = inner_than;
2184 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2186 if (gdbarch->breakpoint_from_pc == 0)
2187 internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
2188 if (gdbarch_debug >= 2)
2189 /* FIXME: gdb_std??? */
2190 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2191 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2195 set_gdbarch_breakpoint_from_pc (gdbarch, breakpoint_from_pc)
2196 struct gdbarch *gdbarch;
2197 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc;
2199 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2203 gdbarch_decr_pc_after_break (gdbarch)
2204 struct gdbarch *gdbarch;
2206 if (gdbarch->decr_pc_after_break == -1)
2207 internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
2208 if (gdbarch_debug >= 2)
2209 /* FIXME: gdb_std??? */
2210 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2211 return gdbarch->decr_pc_after_break;
2215 set_gdbarch_decr_pc_after_break (gdbarch, decr_pc_after_break)
2216 struct gdbarch *gdbarch;
2217 CORE_ADDR decr_pc_after_break;
2219 gdbarch->decr_pc_after_break = decr_pc_after_break;
2223 gdbarch_function_start_offset (gdbarch)
2224 struct gdbarch *gdbarch;
2226 if (gdbarch->function_start_offset == -1)
2227 internal_error ("gdbarch: gdbarch_function_start_offset invalid");
2228 if (gdbarch_debug >= 2)
2229 /* FIXME: gdb_std??? */
2230 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
2231 return gdbarch->function_start_offset;
2235 set_gdbarch_function_start_offset (gdbarch, function_start_offset)
2236 struct gdbarch *gdbarch;
2237 CORE_ADDR function_start_offset;
2239 gdbarch->function_start_offset = function_start_offset;
2243 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
2245 if (gdbarch->remote_translate_xfer_address == 0)
2246 internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
2247 if (gdbarch_debug >= 2)
2248 /* FIXME: gdb_std??? */
2249 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
2250 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
2254 set_gdbarch_remote_translate_xfer_address (gdbarch, remote_translate_xfer_address)
2255 struct gdbarch *gdbarch;
2256 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address;
2258 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
2262 gdbarch_frame_args_skip (gdbarch)
2263 struct gdbarch *gdbarch;
2265 if (gdbarch->frame_args_skip == -1)
2266 internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
2267 if (gdbarch_debug >= 2)
2268 /* FIXME: gdb_std??? */
2269 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2270 return gdbarch->frame_args_skip;
2274 set_gdbarch_frame_args_skip (gdbarch, frame_args_skip)
2275 struct gdbarch *gdbarch;
2276 CORE_ADDR frame_args_skip;
2278 gdbarch->frame_args_skip = frame_args_skip;
2282 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
2284 if (gdbarch->frameless_function_invocation == 0)
2285 internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
2286 if (gdbarch_debug >= 2)
2287 /* FIXME: gdb_std??? */
2288 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
2289 return gdbarch->frameless_function_invocation (fi);
2293 set_gdbarch_frameless_function_invocation (gdbarch, frameless_function_invocation)
2294 struct gdbarch *gdbarch;
2295 gdbarch_frameless_function_invocation_ftype frameless_function_invocation;
2297 gdbarch->frameless_function_invocation = frameless_function_invocation;
2301 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
2303 if (gdbarch->frame_chain == 0)
2304 internal_error ("gdbarch: gdbarch_frame_chain invalid");
2305 if (gdbarch_debug >= 2)
2306 /* FIXME: gdb_std??? */
2307 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
2308 return gdbarch->frame_chain (frame);
2312 set_gdbarch_frame_chain (gdbarch, frame_chain)
2313 struct gdbarch *gdbarch;
2314 gdbarch_frame_chain_ftype frame_chain;
2316 gdbarch->frame_chain = frame_chain;
2320 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
2322 if (gdbarch->frame_chain_valid == 0)
2323 internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
2324 if (gdbarch_debug >= 2)
2325 /* FIXME: gdb_std??? */
2326 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
2327 return gdbarch->frame_chain_valid (chain, thisframe);
2331 set_gdbarch_frame_chain_valid (gdbarch, frame_chain_valid)
2332 struct gdbarch *gdbarch;
2333 gdbarch_frame_chain_valid_ftype frame_chain_valid;
2335 gdbarch->frame_chain_valid = frame_chain_valid;
2339 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
2341 if (gdbarch->frame_saved_pc == 0)
2342 internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
2343 if (gdbarch_debug >= 2)
2344 /* FIXME: gdb_std??? */
2345 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
2346 return gdbarch->frame_saved_pc (fi);
2350 set_gdbarch_frame_saved_pc (gdbarch, frame_saved_pc)
2351 struct gdbarch *gdbarch;
2352 gdbarch_frame_saved_pc_ftype frame_saved_pc;
2354 gdbarch->frame_saved_pc = frame_saved_pc;
2358 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
2360 if (gdbarch->frame_args_address == 0)
2361 internal_error ("gdbarch: gdbarch_frame_args_address invalid");
2362 if (gdbarch_debug >= 2)
2363 /* FIXME: gdb_std??? */
2364 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
2365 return gdbarch->frame_args_address (fi);
2369 set_gdbarch_frame_args_address (gdbarch, frame_args_address)
2370 struct gdbarch *gdbarch;
2371 gdbarch_frame_args_address_ftype frame_args_address;
2373 gdbarch->frame_args_address = frame_args_address;
2377 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
2379 if (gdbarch->frame_locals_address == 0)
2380 internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
2381 if (gdbarch_debug >= 2)
2382 /* FIXME: gdb_std??? */
2383 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
2384 return gdbarch->frame_locals_address (fi);
2388 set_gdbarch_frame_locals_address (gdbarch, frame_locals_address)
2389 struct gdbarch *gdbarch;
2390 gdbarch_frame_locals_address_ftype frame_locals_address;
2392 gdbarch->frame_locals_address = frame_locals_address;
2396 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
2398 if (gdbarch->saved_pc_after_call == 0)
2399 internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
2400 if (gdbarch_debug >= 2)
2401 /* FIXME: gdb_std??? */
2402 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
2403 return gdbarch->saved_pc_after_call (frame);
2407 set_gdbarch_saved_pc_after_call (gdbarch, saved_pc_after_call)
2408 struct gdbarch *gdbarch;
2409 gdbarch_saved_pc_after_call_ftype saved_pc_after_call;
2411 gdbarch->saved_pc_after_call = saved_pc_after_call;
2415 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2417 if (gdbarch->frame_num_args == 0)
2418 internal_error ("gdbarch: gdbarch_frame_num_args invalid");
2419 if (gdbarch_debug >= 2)
2420 /* FIXME: gdb_std??? */
2421 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2422 return gdbarch->frame_num_args (frame);
2426 set_gdbarch_frame_num_args (gdbarch, frame_num_args)
2427 struct gdbarch *gdbarch;
2428 gdbarch_frame_num_args_ftype frame_num_args;
2430 gdbarch->frame_num_args = frame_num_args;
2434 /* Keep a registrary of per-architecture data-pointers required by GDB
2442 struct gdbarch_data_registration
2444 gdbarch_data_ftype *init;
2445 struct gdbarch_data *data;
2446 struct gdbarch_data_registration *next;
2449 struct gdbarch_data_registrary
2452 struct gdbarch_data_registration *registrations;
2455 struct gdbarch_data_registrary gdbarch_data_registrary =
2460 struct gdbarch_data *
2461 register_gdbarch_data (init)
2462 gdbarch_data_ftype *init;
2464 struct gdbarch_data_registration **curr;
2465 for (curr = &gdbarch_data_registrary.registrations;
2467 curr = &(*curr)->next);
2468 (*curr) = XMALLOC (struct gdbarch_data_registration);
2469 (*curr)->next = NULL;
2470 (*curr)->init = init;
2471 (*curr)->data = XMALLOC (struct gdbarch_data);
2472 (*curr)->data->index = gdbarch_data_registrary.nr++;
2473 return (*curr)->data;
2477 /* Walk through all the registered users initializing each in turn. */
2479 static void init_gdbarch_data PARAMS ((struct gdbarch *));
2481 init_gdbarch_data (gdbarch)
2482 struct gdbarch *gdbarch;
2484 struct gdbarch_data_registration *rego;
2485 gdbarch->nr_data = gdbarch_data_registrary.nr + 1;
2486 gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data);
2487 for (rego = gdbarch_data_registrary.registrations;
2491 if (rego->data->index < gdbarch->nr_data)
2492 gdbarch->data[rego->data->index] = rego->init ();
2497 /* Return the current value of the specified per-architecture
2502 struct gdbarch_data *data;
2504 if (data->index >= current_gdbarch->nr_data)
2505 internal_error ("gdbarch_data: request for non-existant data.");
2506 return current_gdbarch->data[data->index];
2511 /* Keep a registrary of swaped data required by GDB modules. */
2516 struct gdbarch_swap_registration *source;
2517 struct gdbarch_swap *next;
2520 struct gdbarch_swap_registration
2523 unsigned long sizeof_data;
2524 gdbarch_swap_ftype *init;
2525 struct gdbarch_swap_registration *next;
2528 struct gdbarch_swap_registrary
2531 struct gdbarch_swap_registration *registrations;
2534 struct gdbarch_swap_registrary gdbarch_swap_registrary =
2540 register_gdbarch_swap (data, sizeof_data, init)
2542 unsigned long sizeof_data;
2543 gdbarch_swap_ftype *init;
2545 struct gdbarch_swap_registration **rego;
2546 for (rego = &gdbarch_swap_registrary.registrations;
2548 rego = &(*rego)->next);
2549 (*rego) = XMALLOC (struct gdbarch_swap_registration);
2550 (*rego)->next = NULL;
2551 (*rego)->init = init;
2552 (*rego)->data = data;
2553 (*rego)->sizeof_data = sizeof_data;
2557 static void init_gdbarch_swap PARAMS ((struct gdbarch *));
2559 init_gdbarch_swap (gdbarch)
2560 struct gdbarch *gdbarch;
2562 struct gdbarch_swap_registration *rego;
2563 struct gdbarch_swap **curr = &gdbarch->swap;
2564 for (rego = gdbarch_swap_registrary.registrations;
2568 if (rego->data != NULL)
2570 (*curr) = XMALLOC (struct gdbarch_swap);
2571 (*curr)->source = rego;
2572 (*curr)->swap = xmalloc (rego->sizeof_data);
2573 (*curr)->next = NULL;
2574 memset (rego->data, 0, rego->sizeof_data);
2575 curr = &(*curr)->next;
2577 if (rego->init != NULL)
2582 static void swapout_gdbarch_swap PARAMS ((struct gdbarch *));
2584 swapout_gdbarch_swap (gdbarch)
2585 struct gdbarch *gdbarch;
2587 struct gdbarch_swap *curr;
2588 for (curr = gdbarch->swap;
2591 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
2594 static void swapin_gdbarch_swap PARAMS ((struct gdbarch *));
2596 swapin_gdbarch_swap (gdbarch)
2597 struct gdbarch *gdbarch;
2599 struct gdbarch_swap *curr;
2600 for (curr = gdbarch->swap;
2603 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
2607 /* Keep a registrary of the architectures known by GDB. */
2609 struct gdbarch_init_registration
2611 enum bfd_architecture bfd_architecture;
2612 gdbarch_init_ftype *init;
2613 struct gdbarch_list *arches;
2614 struct gdbarch_init_registration *next;
2617 static struct gdbarch_init_registration *gdbarch_init_registrary = NULL;
2620 register_gdbarch_init (bfd_architecture, init)
2621 enum bfd_architecture bfd_architecture;
2622 gdbarch_init_ftype *init;
2624 struct gdbarch_init_registration **curr;
2625 const struct bfd_arch_info *bfd_arch_info;
2626 /* Check that BFD reconizes this architecture */
2627 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
2628 if (bfd_arch_info == NULL)
2630 internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
2632 /* Check that we haven't seen this architecture before */
2633 for (curr = &gdbarch_init_registrary;
2635 curr = &(*curr)->next)
2637 if (bfd_architecture == (*curr)->bfd_architecture)
2638 internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
2639 bfd_arch_info->printable_name);
2643 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
2644 bfd_arch_info->printable_name,
2647 (*curr) = XMALLOC (struct gdbarch_init_registration);
2648 (*curr)->bfd_architecture = bfd_architecture;
2649 (*curr)->init = init;
2650 (*curr)->arches = NULL;
2651 (*curr)->next = NULL;
2656 /* Look for an architecture using gdbarch_info. Base search on only
2657 BFD_ARCH_INFO and BYTE_ORDER. */
2659 struct gdbarch_list *
2660 gdbarch_list_lookup_by_info (arches, info)
2661 struct gdbarch_list *arches;
2662 const struct gdbarch_info *info;
2664 for (; arches != NULL; arches = arches->next)
2666 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
2668 if (info->byte_order != arches->gdbarch->byte_order)
2676 /* Update the current architecture. Return ZERO if the update request
2680 gdbarch_update (info)
2681 struct gdbarch_info info;
2683 struct gdbarch *new_gdbarch;
2684 struct gdbarch_list **list;
2685 struct gdbarch_init_registration *rego;
2687 /* Fill in any missing bits. Most important is the bfd_architecture
2688 which is used to select the target architecture. */
2689 if (info.bfd_architecture == bfd_arch_unknown)
2691 if (info.bfd_arch_info != NULL)
2692 info.bfd_architecture = info.bfd_arch_info->arch;
2693 else if (info.abfd != NULL)
2694 info.bfd_architecture = bfd_get_arch (info.abfd);
2695 /* FIXME - should query BFD for its default architecture. */
2697 info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
2699 if (info.bfd_arch_info == NULL)
2701 if (target_architecture_auto && info.abfd != NULL)
2702 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
2704 info.bfd_arch_info = current_gdbarch->bfd_arch_info;
2706 if (info.byte_order == 0)
2708 if (target_byte_order_auto && info.abfd != NULL)
2709 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
2710 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
2713 info.byte_order = current_gdbarch->byte_order;
2714 /* FIXME - should query BFD for its default byte-order. */
2716 /* A default for abfd? */
2718 /* Find the target that knows about this architecture. */
2719 for (rego = gdbarch_init_registrary;
2720 rego != NULL && rego->bfd_architecture != info.bfd_architecture;
2725 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
2731 fprintf_unfiltered (gdb_stdlog,
2732 "gdbarch_update: info.bfd_architecture %d (%s)\n",
2733 info.bfd_architecture,
2734 bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
2735 fprintf_unfiltered (gdb_stdlog,
2736 "gdbarch_update: info.bfd_arch_info %s\n",
2737 (info.bfd_arch_info != NULL
2738 ? info.bfd_arch_info->printable_name
2740 fprintf_unfiltered (gdb_stdlog,
2741 "gdbarch_update: info.byte_order %d (%s)\n",
2743 (info.byte_order == BIG_ENDIAN ? "big"
2744 : info.byte_order == LITTLE_ENDIAN ? "little"
2746 fprintf_unfiltered (gdb_stdlog,
2747 "gdbarch_update: info.abfd 0x%lx\n",
2749 fprintf_unfiltered (gdb_stdlog,
2750 "gdbarch_update: info.tdep_info 0x%lx\n",
2751 (long) info.tdep_info);
2754 /* Ask the target for a replacement architecture. */
2755 new_gdbarch = rego->init (info, rego->arches);
2757 /* Did the target like it? No. Reject the change. */
2758 if (new_gdbarch == NULL)
2761 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
2765 /* Did the architecture change? No. Do nothing. */
2766 if (current_gdbarch == new_gdbarch)
2769 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
2771 new_gdbarch->bfd_arch_info->printable_name);
2775 /* Swap all data belonging to the old target out */
2776 swapout_gdbarch_swap (current_gdbarch);
2778 /* Is this a pre-existing architecture? Yes. Swap it in. */
2779 for (list = ®o->arches;
2781 list = &(*list)->next)
2783 if ((*list)->gdbarch == new_gdbarch)
2786 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
2788 new_gdbarch->bfd_arch_info->printable_name);
2789 current_gdbarch = new_gdbarch;
2790 swapin_gdbarch_swap (new_gdbarch);
2795 /* Append this new architecture to this targets list. */
2796 (*list) = XMALLOC (struct gdbarch_list);
2797 (*list)->next = NULL;
2798 (*list)->gdbarch = new_gdbarch;
2800 /* Switch to this new architecture. Dump it out. */
2801 current_gdbarch = new_gdbarch;
2804 fprintf_unfiltered (gdb_stdlog,
2805 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
2807 new_gdbarch->bfd_arch_info->printable_name);
2811 /* Check that the newly installed architecture is valid. */
2812 verify_gdbarch (new_gdbarch);
2814 /* Initialize the per-architecture memory (swap) areas.
2815 CURRENT_GDBARCH must be update before these modules are
2817 init_gdbarch_swap (new_gdbarch);
2819 /* Initialize the per-architecture data-pointer of all parties that
2820 registered an interest in this architecture. CURRENT_GDBARCH
2821 must be updated before these modules are called. */
2822 init_gdbarch_data (new_gdbarch);
2829 /* Functions to manipulate the endianness of the target. */
2831 #ifdef TARGET_BYTE_ORDER_SELECTABLE
2832 /* compat - Catch old targets that expect a selectable byte-order to
2833 default to BIG_ENDIAN */
2834 #ifndef TARGET_BYTE_ORDER_DEFAULT
2835 #define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN
2838 #if !TARGET_BYTE_ORDER_SELECTABLE_P
2839 #ifndef TARGET_BYTE_ORDER_DEFAULT
2840 /* compat - Catch old non byte-order selectable targets that do not
2841 define TARGET_BYTE_ORDER_DEFAULT and instead expect
2842 TARGET_BYTE_ORDER to be used as the default. For targets that
2843 defined neither TARGET_BYTE_ORDER nor TARGET_BYTE_ORDER_DEFAULT the
2844 below will get a strange compiler warning. */
2845 #define TARGET_BYTE_ORDER_DEFAULT TARGET_BYTE_ORDER
2848 #ifndef TARGET_BYTE_ORDER_DEFAULT
2849 #define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN /* arbitrary */
2851 int target_byte_order = TARGET_BYTE_ORDER_DEFAULT;
2852 int target_byte_order_auto = 1;
2854 /* Chain containing the \"set endian\" commands. */
2855 static struct cmd_list_element *endianlist = NULL;
2857 /* Called by ``show endian''. */
2858 static void show_endian PARAMS ((char *, int));
2860 show_endian (args, from_tty)
2865 (TARGET_BYTE_ORDER_AUTO
2866 ? "The target endianness is set automatically (currently %s endian)\n"
2867 : "The target is assumed to be %s endian\n");
2868 printf_unfiltered (msg, (TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little"));
2871 /* Called if the user enters ``set endian'' without an argument. */
2872 static void set_endian PARAMS ((char *, int));
2874 set_endian (args, from_tty)
2878 printf_unfiltered ("\"set endian\" must be followed by \"auto\", \"big\" or \"little\".\n");
2879 show_endian (args, from_tty);
2882 /* Called by ``set endian big''. */
2883 static void set_endian_big PARAMS ((char *, int));
2885 set_endian_big (args, from_tty)
2889 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2891 target_byte_order = BIG_ENDIAN;
2892 target_byte_order_auto = 0;
2895 struct gdbarch_info info;
2896 memset (&info, 0, sizeof info);
2897 info.byte_order = BIG_ENDIAN;
2898 gdbarch_update (info);
2903 printf_unfiltered ("Byte order is not selectable.");
2904 show_endian (args, from_tty);
2908 /* Called by ``set endian little''. */
2909 static void set_endian_little PARAMS ((char *, int));
2911 set_endian_little (args, from_tty)
2915 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2917 target_byte_order = LITTLE_ENDIAN;
2918 target_byte_order_auto = 0;
2921 struct gdbarch_info info;
2922 memset (&info, 0, sizeof info);
2923 info.byte_order = LITTLE_ENDIAN;
2924 gdbarch_update (info);
2929 printf_unfiltered ("Byte order is not selectable.");
2930 show_endian (args, from_tty);
2934 /* Called by ``set endian auto''. */
2935 static void set_endian_auto PARAMS ((char *, int));
2937 set_endian_auto (args, from_tty)
2941 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2943 target_byte_order_auto = 1;
2947 printf_unfiltered ("Byte order is not selectable.");
2948 show_endian (args, from_tty);
2952 /* Set the endianness from a BFD. */
2953 static void set_endian_from_file PARAMS ((bfd *));
2955 set_endian_from_file (abfd)
2958 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2962 if (bfd_big_endian (abfd))
2965 want = LITTLE_ENDIAN;
2966 if (TARGET_BYTE_ORDER_AUTO)
2967 target_byte_order = want;
2968 else if (TARGET_BYTE_ORDER != want)
2969 warning ("%s endian file does not match %s endian target.",
2970 want == BIG_ENDIAN ? "big" : "little",
2971 TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
2975 if (bfd_big_endian (abfd)
2976 ? TARGET_BYTE_ORDER != BIG_ENDIAN
2977 : TARGET_BYTE_ORDER == BIG_ENDIAN)
2978 warning ("%s endian file does not match %s endian target.",
2979 bfd_big_endian (abfd) ? "big" : "little",
2980 TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
2986 /* Functions to manipulate the architecture of the target */
2988 int target_architecture_auto = 1;
2989 extern const struct bfd_arch_info bfd_default_arch_struct;
2990 const struct bfd_arch_info *target_architecture = &bfd_default_arch_struct;
2991 int (*target_architecture_hook) PARAMS ((const struct bfd_arch_info *ap));
2993 /* Do the real work of changing the current architecture */
2995 static int arch_ok PARAMS ((const struct bfd_arch_info *arch));
2998 const struct bfd_arch_info *arch;
3000 /* Should be performing the more basic check that the binary is
3001 compatible with GDB. */
3002 /* Check with the target that the architecture is valid. */
3003 return (target_architecture_hook == NULL
3004 || target_architecture_hook (arch));
3007 enum set_arch { set_arch_auto, set_arch_manual };
3009 static void set_arch PARAMS ((const struct bfd_arch_info *arch, enum set_arch type));
3011 set_arch (arch, type)
3012 const struct bfd_arch_info *arch;
3018 if (!arch_ok (arch))
3019 warning ("Target may not support %s architecture",
3020 arch->printable_name);
3021 target_architecture = arch;
3023 case set_arch_manual:
3024 if (!arch_ok (arch))
3026 printf_unfiltered ("Target does not support `%s' architecture.\n",
3027 arch->printable_name);
3031 target_architecture_auto = 0;
3032 target_architecture = arch;
3040 /* Called if the user enters ``show architecture'' without an argument. */
3041 static void show_architecture PARAMS ((char *, int));
3043 show_architecture (args, from_tty)
3048 arch = TARGET_ARCHITECTURE->printable_name;
3049 if (target_architecture_auto)
3050 printf_filtered ("The target architecture is set automatically (currently %s)\n", arch);
3052 printf_filtered ("The target architecture is assumed to be %s\n", arch);
3055 /* Called if the user enters ``set architecture'' with or without an
3057 static void set_architecture PARAMS ((char *, int));
3059 set_architecture (args, from_tty)
3065 printf_unfiltered ("\"set architecture\" must be followed by \"auto\" or an architecture name.\n");
3067 else if (strcmp (args, "auto") == 0)
3069 target_architecture_auto = 1;
3071 else if (GDB_MULTI_ARCH)
3073 const struct bfd_arch_info *arch = bfd_scan_arch (args);
3075 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3078 struct gdbarch_info info;
3079 memset (&info, 0, sizeof info);
3080 info.bfd_arch_info = arch;
3081 if (gdbarch_update (info))
3082 target_architecture_auto = 0;
3084 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3089 const struct bfd_arch_info *arch = bfd_scan_arch (args);
3091 set_arch (arch, set_arch_manual);
3093 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3097 /* Called if the user enters ``info architecture'' without an argument. */
3098 static void info_architecture PARAMS ((char *, int));
3100 info_architecture (args, from_tty)
3104 enum bfd_architecture a;
3107 if (gdbarch_init_registrary != NULL)
3109 struct gdbarch_init_registration *rego;
3110 printf_filtered ("Available architectures are:\n");
3111 for (rego = gdbarch_init_registrary;
3115 const struct bfd_arch_info *ap;
3116 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3121 printf_filtered (" %s", ap->printable_name);
3125 printf_filtered ("\n");
3131 printf_filtered ("There are no available architectures.\n");
3135 printf_filtered ("Available architectures are:\n");
3136 for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
3138 const struct bfd_arch_info *ap = bfd_lookup_arch (a, 0);
3143 printf_filtered (" %s", ap->printable_name);
3147 printf_filtered ("\n");
3152 /* Set the architecture from arch/machine */
3154 set_architecture_from_arch_mach (arch, mach)
3155 enum bfd_architecture arch;
3158 const struct bfd_arch_info *wanted = bfd_lookup_arch (arch, mach);
3160 set_arch (wanted, set_arch_manual);
3162 internal_error ("gdbarch: hardwired architecture/machine not reconized");
3165 /* Set the architecture from a BFD */
3166 static void set_architecture_from_file PARAMS ((bfd *));
3168 set_architecture_from_file (abfd)
3171 const struct bfd_arch_info *wanted = bfd_get_arch_info (abfd);
3172 if (target_architecture_auto)
3174 set_arch (wanted, set_arch_auto);
3176 else if (wanted != target_architecture)
3178 warning ("%s architecture file may be incompatible with %s target.",
3179 wanted->printable_name,
3180 target_architecture->printable_name);
3185 /* Misc helper functions for targets. */
3188 frame_num_args_unknown (fi)
3189 struct frame_info *fi;
3196 generic_register_convertible_not (num)
3204 /* Pointer to the target-dependent disassembly function. */
3205 int (*tm_print_insn) PARAMS ((bfd_vma, disassemble_info *));
3206 disassemble_info tm_print_insn_info;
3210 /* Set the dynamic target-system-dependant parameters (architecture,
3211 byte-order) using information found in the BFD */
3214 set_gdbarch_from_file (abfd)
3219 struct gdbarch_info info;
3220 memset (&info, 0, sizeof info);
3222 gdbarch_update (info);
3225 set_architecture_from_file (abfd);
3226 set_endian_from_file (abfd);
3230 #if defined (CALL_DUMMY)
3231 /* FIXME - this should go away */
3232 LONGEST call_dummy_words[] = CALL_DUMMY;
3233 int sizeof_call_dummy_words = sizeof (call_dummy_words);
3237 extern void _initialize_gdbarch PARAMS ((void));
3239 _initialize_gdbarch ()
3241 add_prefix_cmd ("endian", class_support, set_endian,
3242 "Set endianness of target.",
3243 &endianlist, "set endian ", 0, &setlist);
3244 add_cmd ("big", class_support, set_endian_big,
3245 "Set target as being big endian.", &endianlist);
3246 add_cmd ("little", class_support, set_endian_little,
3247 "Set target as being little endian.", &endianlist);
3248 add_cmd ("auto", class_support, set_endian_auto,
3249 "Select target endianness automatically.", &endianlist);
3250 add_cmd ("endian", class_support, show_endian,
3251 "Show endianness of target.", &showlist);
3253 add_cmd ("architecture", class_support, set_architecture,
3254 "Set architecture of target.", &setlist);
3255 add_alias_cmd ("processor", "architecture", class_support, 1, &setlist);
3256 add_cmd ("architecture", class_support, show_architecture,
3257 "Show architecture of target.", &showlist);
3258 add_cmd ("architecture", class_support, info_architecture,
3259 "List supported target architectures", &infolist);
3261 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
3262 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
3263 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
3264 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
3265 tm_print_insn_info.print_address_func = dis_asm_print_address;
3267 add_show_from_set (add_set_cmd ("archdebug",
3270 (char *)&gdbarch_debug,
3271 "Set architecture debugging.\n\
3272 When non-zero, architecture debugging is enabled.", &setlist),