1 /* *INDENT-OFF* */ /* typedef (f)();'' confuses indent */
2 /* Dynamic architecture support for GDB, the GNU debugger.
3 Copyright 1998-1999, Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
28 /* Just include everything in sight so that the every old definition
29 of macro is visible. */
30 #include "gdb_string.h"
35 #include "breakpoint.h"
40 #include "gdbthread.h"
42 #include "symfile.h" /* for overlay functions */
47 /* Convenience macro for allocting typesafe memory. */
50 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
54 /* Non-zero if we want to trace architecture code. */
57 #define GDBARCH_DEBUG 0
59 int gdbarch_debug = GDBARCH_DEBUG;
62 /* Maintain the struct gdbarch object */
66 /* basic architectural information */
67 const struct bfd_arch_info * bfd_arch_info;
70 /* target specific vector. */
71 struct gdbarch_tdep *tdep;
73 /* per-architecture data-pointers */
77 /* per-architecture swap-regions */
78 struct gdbarch_swap *swap;
82 When extending this structure you must:
86 Declare set/get functions and define the corresponding
89 gdbarch_alloc(): If zero/NULL is not a suitable default,
90 initialize the new field.
92 verify_gdbarch(): Confirm that the target updated the field
95 gdbarch_dump(): Add a fprintf_unfiltered call to so that the new
98 ``default_gdbarch()'': Append an initial value to the static
99 variable (base values on the host's c-type system).
101 get_gdbarch(): Implement the set/get functions (probably using
102 the macro's as shortcuts).
114 gdbarch_read_pc_ftype *read_pc;
115 gdbarch_write_pc_ftype *write_pc;
116 gdbarch_read_fp_ftype *read_fp;
117 gdbarch_write_fp_ftype *write_fp;
118 gdbarch_read_sp_ftype *read_sp;
119 gdbarch_write_sp_ftype *write_sp;
124 gdbarch_register_name_ftype *register_name;
127 gdbarch_register_byte_ftype *register_byte;
128 gdbarch_register_raw_size_ftype *register_raw_size;
129 int max_register_raw_size;
130 gdbarch_register_virtual_size_ftype *register_virtual_size;
131 int max_register_virtual_size;
132 gdbarch_register_virtual_type_ftype *register_virtual_type;
133 int use_generic_dummy_frames;
134 int call_dummy_location;
135 gdbarch_call_dummy_address_ftype *call_dummy_address;
136 CORE_ADDR call_dummy_start_offset;
137 CORE_ADDR call_dummy_breakpoint_offset;
138 int call_dummy_breakpoint_offset_p;
139 int call_dummy_length;
140 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
142 LONGEST * call_dummy_words;
143 int sizeof_call_dummy_words;
144 int call_dummy_stack_adjust_p;
145 int call_dummy_stack_adjust;
146 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
147 int believe_pcc_promotion;
148 int believe_pcc_promotion_type;
149 gdbarch_get_saved_register_ftype *get_saved_register;
150 gdbarch_register_convertible_ftype *register_convertible;
151 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
152 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
153 gdbarch_extract_return_value_ftype *extract_return_value;
154 gdbarch_push_arguments_ftype *push_arguments;
155 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
156 gdbarch_push_return_address_ftype *push_return_address;
157 gdbarch_pop_frame_ftype *pop_frame;
158 gdbarch_d10v_make_daddr_ftype *d10v_make_daddr;
159 gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr;
160 gdbarch_d10v_daddr_p_ftype *d10v_daddr_p;
161 gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p;
162 gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw;
163 gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw;
164 gdbarch_store_struct_return_ftype *store_struct_return;
165 gdbarch_store_return_value_ftype *store_return_value;
166 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
167 gdbarch_use_struct_convention_ftype *use_struct_convention;
168 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
169 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
170 gdbarch_skip_prologue_ftype *skip_prologue;
171 gdbarch_inner_than_ftype *inner_than;
172 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
173 CORE_ADDR decr_pc_after_break;
174 CORE_ADDR function_start_offset;
175 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
176 CORE_ADDR frame_args_skip;
177 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
178 gdbarch_frame_chain_ftype *frame_chain;
179 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
180 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
181 gdbarch_frame_args_address_ftype *frame_args_address;
182 gdbarch_frame_locals_address_ftype *frame_locals_address;
183 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
184 gdbarch_frame_num_args_ftype *frame_num_args;
188 /* The default architecture uses host values (for want of a better
191 extern const struct bfd_arch_info bfd_default_arch_struct;
193 struct gdbarch default_gdbarch = {
194 /* basic architecture information */
195 &bfd_default_arch_struct,
197 /* target specific vector */
199 /*per-architecture data-pointers and swap regions */
201 /* Multi-arch values */
206 8 * sizeof (LONGEST),
209 8 * sizeof (long double),
245 generic_get_saved_register,
281 /* default_gdbarch() */
283 struct gdbarch *current_gdbarch = &default_gdbarch;
286 /* Create a new ``struct gdbarch'' based in information provided by
287 ``struct gdbarch_info''. */
290 gdbarch_alloc (info, tdep)
291 const struct gdbarch_info *info;
292 struct gdbarch_tdep *tdep;
294 struct gdbarch *gdbarch = XMALLOC (struct gdbarch);
295 memset (gdbarch, 0, sizeof (*gdbarch));
297 gdbarch->tdep = tdep;
299 gdbarch->bfd_arch_info = info->bfd_arch_info;
300 gdbarch->byte_order = info->byte_order;
302 /* Force the explicit initialization of these. */
303 gdbarch->num_regs = -1;
304 gdbarch->sp_regnum = -1;
305 gdbarch->fp_regnum = -1;
306 gdbarch->pc_regnum = -1;
307 gdbarch->register_size = -1;
308 gdbarch->register_bytes = -1;
309 gdbarch->max_register_raw_size = -1;
310 gdbarch->max_register_virtual_size = -1;
311 gdbarch->use_generic_dummy_frames = -1;
312 gdbarch->call_dummy_start_offset = -1;
313 gdbarch->call_dummy_breakpoint_offset = -1;
314 gdbarch->call_dummy_breakpoint_offset_p = -1;
315 gdbarch->call_dummy_length = -1;
316 gdbarch->call_dummy_p = -1;
317 gdbarch->call_dummy_stack_adjust_p = -1;
318 gdbarch->decr_pc_after_break = -1;
319 gdbarch->function_start_offset = -1;
320 gdbarch->frame_args_skip = -1;
321 /* gdbarch_alloc() */
327 /* Ensure that all values in a GDBARCH are reasonable. */
329 static void verify_gdbarch PARAMS ((struct gdbarch *gdbarch));
331 verify_gdbarch (gdbarch)
332 struct gdbarch *gdbarch;
334 /* Only perform sanity checks on a multi-arch target. */
335 if (GDB_MULTI_ARCH <= 0)
338 if (gdbarch->byte_order == 0)
339 fatal ("verify_gdbarch: byte-order unset");
340 if (gdbarch->bfd_arch_info == NULL)
341 fatal ("verify_gdbarch: bfd_arch_info unset");
342 /* Check those that need to be defined for the given multi-arch level. */
343 if ((GDB_MULTI_ARCH >= 1)
344 && (gdbarch->ptr_bit == 0))
345 fatal ("gdbarch: verify_gdbarch: ptr_bit invalid");
346 if ((GDB_MULTI_ARCH >= 1)
347 && (gdbarch->short_bit == 0))
348 fatal ("gdbarch: verify_gdbarch: short_bit invalid");
349 if ((GDB_MULTI_ARCH >= 1)
350 && (gdbarch->int_bit == 0))
351 fatal ("gdbarch: verify_gdbarch: int_bit invalid");
352 if ((GDB_MULTI_ARCH >= 1)
353 && (gdbarch->long_bit == 0))
354 fatal ("gdbarch: verify_gdbarch: long_bit invalid");
355 if ((GDB_MULTI_ARCH >= 1)
356 && (gdbarch->long_long_bit == 0))
357 fatal ("gdbarch: verify_gdbarch: long_long_bit invalid");
358 if ((GDB_MULTI_ARCH >= 1)
359 && (gdbarch->float_bit == 0))
360 fatal ("gdbarch: verify_gdbarch: float_bit invalid");
361 if ((GDB_MULTI_ARCH >= 1)
362 && (gdbarch->double_bit == 0))
363 fatal ("gdbarch: verify_gdbarch: double_bit invalid");
364 if ((GDB_MULTI_ARCH >= 1)
365 && (gdbarch->long_double_bit == 0))
366 fatal ("gdbarch: verify_gdbarch: long_double_bit invalid");
367 if ((GDB_MULTI_ARCH >= 1)
368 && (gdbarch->read_pc == 0))
369 fatal ("gdbarch: verify_gdbarch: read_pc invalid");
370 if ((GDB_MULTI_ARCH >= 1)
371 && (gdbarch->write_pc == 0))
372 fatal ("gdbarch: verify_gdbarch: write_pc invalid");
373 if ((GDB_MULTI_ARCH >= 1)
374 && (gdbarch->read_fp == 0))
375 fatal ("gdbarch: verify_gdbarch: read_fp invalid");
376 if ((GDB_MULTI_ARCH >= 1)
377 && (gdbarch->write_fp == 0))
378 fatal ("gdbarch: verify_gdbarch: write_fp invalid");
379 if ((GDB_MULTI_ARCH >= 1)
380 && (gdbarch->read_sp == 0))
381 fatal ("gdbarch: verify_gdbarch: read_sp invalid");
382 if ((GDB_MULTI_ARCH >= 1)
383 && (gdbarch->write_sp == 0))
384 fatal ("gdbarch: verify_gdbarch: write_sp invalid");
385 if ((GDB_MULTI_ARCH >= 2)
386 && (gdbarch->num_regs == -1))
387 fatal ("gdbarch: verify_gdbarch: num_regs invalid");
388 if ((GDB_MULTI_ARCH >= 2)
389 && (gdbarch->sp_regnum == -1))
390 fatal ("gdbarch: verify_gdbarch: sp_regnum invalid");
391 if ((GDB_MULTI_ARCH >= 2)
392 && (gdbarch->fp_regnum == -1))
393 fatal ("gdbarch: verify_gdbarch: fp_regnum invalid");
394 if ((GDB_MULTI_ARCH >= 2)
395 && (gdbarch->pc_regnum == -1))
396 fatal ("gdbarch: verify_gdbarch: pc_regnum invalid");
397 if ((GDB_MULTI_ARCH >= 2)
398 && (gdbarch->register_name == 0))
399 fatal ("gdbarch: verify_gdbarch: register_name invalid");
400 if ((GDB_MULTI_ARCH >= 2)
401 && (gdbarch->register_size == -1))
402 fatal ("gdbarch: verify_gdbarch: register_size invalid");
403 if ((GDB_MULTI_ARCH >= 2)
404 && (gdbarch->register_bytes == -1))
405 fatal ("gdbarch: verify_gdbarch: register_bytes invalid");
406 if ((GDB_MULTI_ARCH >= 2)
407 && (gdbarch->register_byte == 0))
408 fatal ("gdbarch: verify_gdbarch: register_byte invalid");
409 if ((GDB_MULTI_ARCH >= 2)
410 && (gdbarch->register_raw_size == 0))
411 fatal ("gdbarch: verify_gdbarch: register_raw_size invalid");
412 if ((GDB_MULTI_ARCH >= 2)
413 && (gdbarch->max_register_raw_size == -1))
414 fatal ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
415 if ((GDB_MULTI_ARCH >= 2)
416 && (gdbarch->register_virtual_size == 0))
417 fatal ("gdbarch: verify_gdbarch: register_virtual_size invalid");
418 if ((GDB_MULTI_ARCH >= 2)
419 && (gdbarch->max_register_virtual_size == -1))
420 fatal ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
421 if ((GDB_MULTI_ARCH >= 2)
422 && (gdbarch->register_virtual_type == 0))
423 fatal ("gdbarch: verify_gdbarch: register_virtual_type invalid");
424 if ((GDB_MULTI_ARCH >= 1)
425 && (gdbarch->use_generic_dummy_frames == -1))
426 fatal ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
427 if ((GDB_MULTI_ARCH >= 2)
428 && (gdbarch->call_dummy_location == 0))
429 fatal ("gdbarch: verify_gdbarch: call_dummy_location invalid");
430 if ((GDB_MULTI_ARCH >= 2)
431 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
432 fatal ("gdbarch: verify_gdbarch: call_dummy_address invalid");
433 if ((GDB_MULTI_ARCH >= 2)
434 && (gdbarch->call_dummy_start_offset == -1))
435 fatal ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
436 if ((GDB_MULTI_ARCH >= 2)
437 && (gdbarch->call_dummy_breakpoint_offset == -1))
438 fatal ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
439 if ((GDB_MULTI_ARCH >= 1)
440 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
441 fatal ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
442 if ((GDB_MULTI_ARCH >= 2)
443 && (gdbarch->call_dummy_length == -1))
444 fatal ("gdbarch: verify_gdbarch: call_dummy_length invalid");
445 if ((GDB_MULTI_ARCH >= 2)
446 && (gdbarch->pc_in_call_dummy == 0))
447 fatal ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
448 if ((GDB_MULTI_ARCH >= 1)
449 && (gdbarch->call_dummy_p == -1))
450 fatal ("gdbarch: verify_gdbarch: call_dummy_p invalid");
451 if ((GDB_MULTI_ARCH >= 1)
452 && (gdbarch->call_dummy_stack_adjust_p == -1))
453 fatal ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
454 if ((GDB_MULTI_ARCH >= 2)
455 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
456 fatal ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
457 if ((GDB_MULTI_ARCH >= 2)
458 && (gdbarch->fix_call_dummy == 0))
459 fatal ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
460 if ((GDB_MULTI_ARCH >= 1)
461 && (gdbarch->get_saved_register == 0))
462 fatal ("gdbarch: verify_gdbarch: get_saved_register invalid");
463 if ((GDB_MULTI_ARCH >= 1)
464 && (gdbarch->register_convertible == 0))
465 fatal ("gdbarch: verify_gdbarch: register_convertible invalid");
466 if ((GDB_MULTI_ARCH >= 2)
467 && (gdbarch->register_convert_to_virtual == 0))
468 fatal ("gdbarch: verify_gdbarch: register_convert_to_virtual invalid");
469 if ((GDB_MULTI_ARCH >= 2)
470 && (gdbarch->register_convert_to_raw == 0))
471 fatal ("gdbarch: verify_gdbarch: register_convert_to_raw invalid");
472 if ((GDB_MULTI_ARCH >= 2)
473 && (gdbarch->extract_return_value == 0))
474 fatal ("gdbarch: verify_gdbarch: extract_return_value invalid");
475 if ((GDB_MULTI_ARCH >= 1)
476 && (gdbarch->push_arguments == 0))
477 fatal ("gdbarch: verify_gdbarch: push_arguments invalid");
478 if ((GDB_MULTI_ARCH >= 2)
479 && (gdbarch->push_dummy_frame == 0))
480 fatal ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
481 if ((GDB_MULTI_ARCH >= 1)
482 && (gdbarch->push_return_address == 0))
483 fatal ("gdbarch: verify_gdbarch: push_return_address invalid");
484 if ((GDB_MULTI_ARCH >= 2)
485 && (gdbarch->pop_frame == 0))
486 fatal ("gdbarch: verify_gdbarch: pop_frame invalid");
487 if ((GDB_MULTI_ARCH >= 2)
488 && (gdbarch->d10v_make_daddr == 0))
489 fatal ("gdbarch: verify_gdbarch: d10v_make_daddr invalid");
490 if ((GDB_MULTI_ARCH >= 2)
491 && (gdbarch->d10v_make_iaddr == 0))
492 fatal ("gdbarch: verify_gdbarch: d10v_make_iaddr invalid");
493 if ((GDB_MULTI_ARCH >= 2)
494 && (gdbarch->d10v_daddr_p == 0))
495 fatal ("gdbarch: verify_gdbarch: d10v_daddr_p invalid");
496 if ((GDB_MULTI_ARCH >= 2)
497 && (gdbarch->d10v_iaddr_p == 0))
498 fatal ("gdbarch: verify_gdbarch: d10v_iaddr_p invalid");
499 if ((GDB_MULTI_ARCH >= 2)
500 && (gdbarch->d10v_convert_daddr_to_raw == 0))
501 fatal ("gdbarch: verify_gdbarch: d10v_convert_daddr_to_raw invalid");
502 if ((GDB_MULTI_ARCH >= 2)
503 && (gdbarch->d10v_convert_iaddr_to_raw == 0))
504 fatal ("gdbarch: verify_gdbarch: d10v_convert_iaddr_to_raw invalid");
505 if ((GDB_MULTI_ARCH >= 2)
506 && (gdbarch->store_struct_return == 0))
507 fatal ("gdbarch: verify_gdbarch: store_struct_return invalid");
508 if ((GDB_MULTI_ARCH >= 2)
509 && (gdbarch->store_return_value == 0))
510 fatal ("gdbarch: verify_gdbarch: store_return_value invalid");
511 if ((GDB_MULTI_ARCH >= 2)
512 && (gdbarch->extract_struct_value_address == 0))
513 fatal ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
514 if ((GDB_MULTI_ARCH >= 2)
515 && (gdbarch->use_struct_convention == 0))
516 fatal ("gdbarch: verify_gdbarch: use_struct_convention invalid");
517 if ((GDB_MULTI_ARCH >= 2)
518 && (gdbarch->frame_init_saved_regs == 0))
519 fatal ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
520 if ((GDB_MULTI_ARCH >= 2)
521 && (gdbarch->init_extra_frame_info == 0))
522 fatal ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
523 if ((GDB_MULTI_ARCH >= 2)
524 && (gdbarch->skip_prologue == 0))
525 fatal ("gdbarch: verify_gdbarch: skip_prologue invalid");
526 if ((GDB_MULTI_ARCH >= 2)
527 && (gdbarch->inner_than == 0))
528 fatal ("gdbarch: verify_gdbarch: inner_than invalid");
529 if ((GDB_MULTI_ARCH >= 2)
530 && (gdbarch->breakpoint_from_pc == 0))
531 fatal ("gdbarch: verify_gdbarch: breakpoint_from_pc invalid");
532 if ((GDB_MULTI_ARCH >= 2)
533 && (gdbarch->decr_pc_after_break == -1))
534 fatal ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
535 if ((GDB_MULTI_ARCH >= 2)
536 && (gdbarch->function_start_offset == -1))
537 fatal ("gdbarch: verify_gdbarch: function_start_offset invalid");
538 if ((GDB_MULTI_ARCH >= 2)
539 && (gdbarch->remote_translate_xfer_address == 0))
540 fatal ("gdbarch: verify_gdbarch: remote_translate_xfer_address invalid");
541 if ((GDB_MULTI_ARCH >= 2)
542 && (gdbarch->frame_args_skip == -1))
543 fatal ("gdbarch: verify_gdbarch: frame_args_skip invalid");
544 if ((GDB_MULTI_ARCH >= 2)
545 && (gdbarch->frameless_function_invocation == 0))
546 fatal ("gdbarch: verify_gdbarch: frameless_function_invocation invalid");
547 if ((GDB_MULTI_ARCH >= 2)
548 && (gdbarch->frame_chain == 0))
549 fatal ("gdbarch: verify_gdbarch: frame_chain invalid");
550 if ((GDB_MULTI_ARCH >= 1)
551 && (gdbarch->frame_chain_valid == 0))
552 fatal ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
553 if ((GDB_MULTI_ARCH >= 2)
554 && (gdbarch->frame_saved_pc == 0))
555 fatal ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
556 if ((GDB_MULTI_ARCH >= 2)
557 && (gdbarch->frame_args_address == 0))
558 fatal ("gdbarch: verify_gdbarch: frame_args_address invalid");
559 if ((GDB_MULTI_ARCH >= 2)
560 && (gdbarch->frame_locals_address == 0))
561 fatal ("gdbarch: verify_gdbarch: frame_locals_address invalid");
562 if ((GDB_MULTI_ARCH >= 2)
563 && (gdbarch->saved_pc_after_call == 0))
564 fatal ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
565 if ((GDB_MULTI_ARCH >= 2)
566 && (gdbarch->frame_num_args == 0))
567 fatal ("gdbarch: verify_gdbarch: frame_num_args invalid");
571 /* Print out the details of the current architecture. */
576 if (TARGET_ARCHITECTURE != NULL)
577 fprintf_unfiltered (gdb_stdlog,
578 "gdbarch_update: TARGET_ARCHITECTURE = %s\n",
579 TARGET_ARCHITECTURE->printable_name);
580 fprintf_unfiltered (gdb_stdlog,
581 "gdbarch_update: TARGET_BYTE_ORDER = %ld\n",
582 (long) TARGET_BYTE_ORDER);
583 fprintf_unfiltered (gdb_stdlog,
584 "gdbarch_update: TARGET_PTR_BIT = %ld\n",
585 (long) TARGET_PTR_BIT);
586 fprintf_unfiltered (gdb_stdlog,
587 "gdbarch_update: TARGET_SHORT_BIT = %ld\n",
588 (long) TARGET_SHORT_BIT);
589 fprintf_unfiltered (gdb_stdlog,
590 "gdbarch_update: TARGET_INT_BIT = %ld\n",
591 (long) TARGET_INT_BIT);
592 fprintf_unfiltered (gdb_stdlog,
593 "gdbarch_update: TARGET_LONG_BIT = %ld\n",
594 (long) TARGET_LONG_BIT);
595 fprintf_unfiltered (gdb_stdlog,
596 "gdbarch_update: TARGET_LONG_LONG_BIT = %ld\n",
597 (long) TARGET_LONG_LONG_BIT);
598 fprintf_unfiltered (gdb_stdlog,
599 "gdbarch_update: TARGET_FLOAT_BIT = %ld\n",
600 (long) TARGET_FLOAT_BIT);
601 fprintf_unfiltered (gdb_stdlog,
602 "gdbarch_update: TARGET_DOUBLE_BIT = %ld\n",
603 (long) TARGET_DOUBLE_BIT);
604 fprintf_unfiltered (gdb_stdlog,
605 "gdbarch_update: TARGET_LONG_DOUBLE_BIT = %ld\n",
606 (long) TARGET_LONG_DOUBLE_BIT);
607 fprintf_unfiltered (gdb_stdlog,
608 "gdbarch_update: TARGET_READ_PC = 0x%08lx\n",
609 (long) current_gdbarch->read_pc
610 /*TARGET_READ_PC ()*/);
611 fprintf_unfiltered (gdb_stdlog,
612 "gdbarch_update: TARGET_WRITE_PC = 0x%08lx\n",
613 (long) current_gdbarch->write_pc
614 /*TARGET_WRITE_PC ()*/);
615 fprintf_unfiltered (gdb_stdlog,
616 "gdbarch_update: TARGET_READ_FP = 0x%08lx\n",
617 (long) current_gdbarch->read_fp
618 /*TARGET_READ_FP ()*/);
619 fprintf_unfiltered (gdb_stdlog,
620 "gdbarch_update: TARGET_WRITE_FP = 0x%08lx\n",
621 (long) current_gdbarch->write_fp
622 /*TARGET_WRITE_FP ()*/);
623 fprintf_unfiltered (gdb_stdlog,
624 "gdbarch_update: TARGET_READ_SP = 0x%08lx\n",
625 (long) current_gdbarch->read_sp
626 /*TARGET_READ_SP ()*/);
627 fprintf_unfiltered (gdb_stdlog,
628 "gdbarch_update: TARGET_WRITE_SP = 0x%08lx\n",
629 (long) current_gdbarch->write_sp
630 /*TARGET_WRITE_SP ()*/);
631 fprintf_unfiltered (gdb_stdlog,
632 "gdbarch_update: NUM_REGS = %ld\n",
634 fprintf_unfiltered (gdb_stdlog,
635 "gdbarch_update: SP_REGNUM = %ld\n",
637 fprintf_unfiltered (gdb_stdlog,
638 "gdbarch_update: FP_REGNUM = %ld\n",
640 fprintf_unfiltered (gdb_stdlog,
641 "gdbarch_update: PC_REGNUM = %ld\n",
643 fprintf_unfiltered (gdb_stdlog,
644 "gdbarch_update: REGISTER_NAME = 0x%08lx\n",
645 (long) current_gdbarch->register_name
646 /*REGISTER_NAME ()*/);
647 fprintf_unfiltered (gdb_stdlog,
648 "gdbarch_update: REGISTER_SIZE = %ld\n",
649 (long) REGISTER_SIZE);
650 fprintf_unfiltered (gdb_stdlog,
651 "gdbarch_update: REGISTER_BYTES = %ld\n",
652 (long) REGISTER_BYTES);
653 fprintf_unfiltered (gdb_stdlog,
654 "gdbarch_update: REGISTER_BYTE = 0x%08lx\n",
655 (long) current_gdbarch->register_byte
656 /*REGISTER_BYTE ()*/);
657 fprintf_unfiltered (gdb_stdlog,
658 "gdbarch_update: REGISTER_RAW_SIZE = 0x%08lx\n",
659 (long) current_gdbarch->register_raw_size
660 /*REGISTER_RAW_SIZE ()*/);
661 fprintf_unfiltered (gdb_stdlog,
662 "gdbarch_update: MAX_REGISTER_RAW_SIZE = %ld\n",
663 (long) MAX_REGISTER_RAW_SIZE);
664 fprintf_unfiltered (gdb_stdlog,
665 "gdbarch_update: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
666 (long) current_gdbarch->register_virtual_size
667 /*REGISTER_VIRTUAL_SIZE ()*/);
668 fprintf_unfiltered (gdb_stdlog,
669 "gdbarch_update: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
670 (long) MAX_REGISTER_VIRTUAL_SIZE);
671 fprintf_unfiltered (gdb_stdlog,
672 "gdbarch_update: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
673 (long) current_gdbarch->register_virtual_type
674 /*REGISTER_VIRTUAL_TYPE ()*/);
675 fprintf_unfiltered (gdb_stdlog,
676 "gdbarch_update: USE_GENERIC_DUMMY_FRAMES = %ld\n",
677 (long) USE_GENERIC_DUMMY_FRAMES);
678 fprintf_unfiltered (gdb_stdlog,
679 "gdbarch_update: CALL_DUMMY_LOCATION = %ld\n",
680 (long) CALL_DUMMY_LOCATION);
681 fprintf_unfiltered (gdb_stdlog,
682 "gdbarch_update: CALL_DUMMY_ADDRESS = 0x%08lx\n",
683 (long) current_gdbarch->call_dummy_address
684 /*CALL_DUMMY_ADDRESS ()*/);
685 fprintf_unfiltered (gdb_stdlog,
686 "gdbarch_update: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
687 (long) CALL_DUMMY_START_OFFSET);
688 fprintf_unfiltered (gdb_stdlog,
689 "gdbarch_update: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
690 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
691 fprintf_unfiltered (gdb_stdlog,
692 "gdbarch_update: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
693 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
694 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
695 fprintf_unfiltered (gdb_stdlog,
696 "gdbarch_update: CALL_DUMMY_LENGTH = %ld\n",
697 (long) CALL_DUMMY_LENGTH);
698 fprintf_unfiltered (gdb_stdlog,
699 "gdbarch_update: PC_IN_CALL_DUMMY = 0x%08lx\n",
700 (long) current_gdbarch->pc_in_call_dummy
701 /*PC_IN_CALL_DUMMY ()*/);
702 fprintf_unfiltered (gdb_stdlog,
703 "gdbarch_update: CALL_DUMMY_P = %ld\n",
704 (long) CALL_DUMMY_P);
705 fprintf_unfiltered (gdb_stdlog,
706 "gdbarch_update: CALL_DUMMY_WORDS = 0x%08lx\n",
707 (long) CALL_DUMMY_WORDS);
708 fprintf_unfiltered (gdb_stdlog,
709 "gdbarch_update: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
710 (long) SIZEOF_CALL_DUMMY_WORDS);
711 fprintf_unfiltered (gdb_stdlog,
712 "gdbarch_update: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
713 (long) CALL_DUMMY_STACK_ADJUST_P);
714 if (CALL_DUMMY_STACK_ADJUST_P)
715 fprintf_unfiltered (gdb_stdlog,
716 "gdbarch_update: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
717 (long) CALL_DUMMY_STACK_ADJUST);
718 fprintf_unfiltered (gdb_stdlog,
719 "gdbarch_update: FIX_CALL_DUMMY = 0x%08lx\n",
720 (long) current_gdbarch->fix_call_dummy
721 /*FIX_CALL_DUMMY ()*/);
722 #ifdef BELIEVE_PCC_PROMOTION
723 fprintf_unfiltered (gdb_stdlog,
724 "gdbarch_update: BELIEVE_PCC_PROMOTION = %ld\n",
725 (long) BELIEVE_PCC_PROMOTION);
727 #ifdef BELIEVE_PCC_PROMOTION_TYPE
728 fprintf_unfiltered (gdb_stdlog,
729 "gdbarch_update: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
730 (long) BELIEVE_PCC_PROMOTION_TYPE);
732 fprintf_unfiltered (gdb_stdlog,
733 "gdbarch_update: GET_SAVED_REGISTER = 0x%08lx\n",
734 (long) current_gdbarch->get_saved_register
735 /*GET_SAVED_REGISTER ()*/);
736 fprintf_unfiltered (gdb_stdlog,
737 "gdbarch_update: REGISTER_CONVERTIBLE = 0x%08lx\n",
738 (long) current_gdbarch->register_convertible
739 /*REGISTER_CONVERTIBLE ()*/);
740 fprintf_unfiltered (gdb_stdlog,
741 "gdbarch_update: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
742 (long) current_gdbarch->register_convert_to_virtual
743 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
744 fprintf_unfiltered (gdb_stdlog,
745 "gdbarch_update: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
746 (long) current_gdbarch->register_convert_to_raw
747 /*REGISTER_CONVERT_TO_RAW ()*/);
748 fprintf_unfiltered (gdb_stdlog,
749 "gdbarch_update: EXTRACT_RETURN_VALUE = 0x%08lx\n",
750 (long) current_gdbarch->extract_return_value
751 /*EXTRACT_RETURN_VALUE ()*/);
752 fprintf_unfiltered (gdb_stdlog,
753 "gdbarch_update: PUSH_ARGUMENTS = 0x%08lx\n",
754 (long) current_gdbarch->push_arguments
755 /*PUSH_ARGUMENTS ()*/);
756 fprintf_unfiltered (gdb_stdlog,
757 "gdbarch_update: PUSH_DUMMY_FRAME = 0x%08lx\n",
758 (long) current_gdbarch->push_dummy_frame
759 /*PUSH_DUMMY_FRAME ()*/);
760 fprintf_unfiltered (gdb_stdlog,
761 "gdbarch_update: PUSH_RETURN_ADDRESS = 0x%08lx\n",
762 (long) current_gdbarch->push_return_address
763 /*PUSH_RETURN_ADDRESS ()*/);
764 fprintf_unfiltered (gdb_stdlog,
765 "gdbarch_update: POP_FRAME = 0x%08lx\n",
766 (long) current_gdbarch->pop_frame
768 fprintf_unfiltered (gdb_stdlog,
769 "gdbarch_update: D10V_MAKE_DADDR = 0x%08lx\n",
770 (long) current_gdbarch->d10v_make_daddr
771 /*D10V_MAKE_DADDR ()*/);
772 fprintf_unfiltered (gdb_stdlog,
773 "gdbarch_update: D10V_MAKE_IADDR = 0x%08lx\n",
774 (long) current_gdbarch->d10v_make_iaddr
775 /*D10V_MAKE_IADDR ()*/);
776 fprintf_unfiltered (gdb_stdlog,
777 "gdbarch_update: D10V_DADDR_P = 0x%08lx\n",
778 (long) current_gdbarch->d10v_daddr_p
779 /*D10V_DADDR_P ()*/);
780 fprintf_unfiltered (gdb_stdlog,
781 "gdbarch_update: D10V_IADDR_P = 0x%08lx\n",
782 (long) current_gdbarch->d10v_iaddr_p
783 /*D10V_IADDR_P ()*/);
784 fprintf_unfiltered (gdb_stdlog,
785 "gdbarch_update: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
786 (long) current_gdbarch->d10v_convert_daddr_to_raw
787 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
788 fprintf_unfiltered (gdb_stdlog,
789 "gdbarch_update: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
790 (long) current_gdbarch->d10v_convert_iaddr_to_raw
791 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
792 fprintf_unfiltered (gdb_stdlog,
793 "gdbarch_update: STORE_STRUCT_RETURN = 0x%08lx\n",
794 (long) current_gdbarch->store_struct_return
795 /*STORE_STRUCT_RETURN ()*/);
796 fprintf_unfiltered (gdb_stdlog,
797 "gdbarch_update: STORE_RETURN_VALUE = 0x%08lx\n",
798 (long) current_gdbarch->store_return_value
799 /*STORE_RETURN_VALUE ()*/);
800 fprintf_unfiltered (gdb_stdlog,
801 "gdbarch_update: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
802 (long) current_gdbarch->extract_struct_value_address
803 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
804 fprintf_unfiltered (gdb_stdlog,
805 "gdbarch_update: USE_STRUCT_CONVENTION = 0x%08lx\n",
806 (long) current_gdbarch->use_struct_convention
807 /*USE_STRUCT_CONVENTION ()*/);
808 fprintf_unfiltered (gdb_stdlog,
809 "gdbarch_update: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
810 (long) current_gdbarch->frame_init_saved_regs
811 /*FRAME_INIT_SAVED_REGS ()*/);
812 fprintf_unfiltered (gdb_stdlog,
813 "gdbarch_update: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
814 (long) current_gdbarch->init_extra_frame_info
815 /*INIT_EXTRA_FRAME_INFO ()*/);
816 fprintf_unfiltered (gdb_stdlog,
817 "gdbarch_update: SKIP_PROLOGUE = 0x%08lx\n",
818 (long) current_gdbarch->skip_prologue
819 /*SKIP_PROLOGUE ()*/);
820 fprintf_unfiltered (gdb_stdlog,
821 "gdbarch_update: INNER_THAN = 0x%08lx\n",
822 (long) current_gdbarch->inner_than
824 fprintf_unfiltered (gdb_stdlog,
825 "gdbarch_update: BREAKPOINT_FROM_PC = 0x%08lx\n",
826 (long) current_gdbarch->breakpoint_from_pc
827 /*BREAKPOINT_FROM_PC ()*/);
828 fprintf_unfiltered (gdb_stdlog,
829 "gdbarch_update: DECR_PC_AFTER_BREAK = %ld\n",
830 (long) DECR_PC_AFTER_BREAK);
831 fprintf_unfiltered (gdb_stdlog,
832 "gdbarch_update: FUNCTION_START_OFFSET = %ld\n",
833 (long) FUNCTION_START_OFFSET);
834 fprintf_unfiltered (gdb_stdlog,
835 "gdbarch_update: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
836 (long) current_gdbarch->remote_translate_xfer_address
837 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
838 fprintf_unfiltered (gdb_stdlog,
839 "gdbarch_update: FRAME_ARGS_SKIP = %ld\n",
840 (long) FRAME_ARGS_SKIP);
841 fprintf_unfiltered (gdb_stdlog,
842 "gdbarch_update: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
843 (long) current_gdbarch->frameless_function_invocation
844 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
845 fprintf_unfiltered (gdb_stdlog,
846 "gdbarch_update: FRAME_CHAIN = 0x%08lx\n",
847 (long) current_gdbarch->frame_chain
849 fprintf_unfiltered (gdb_stdlog,
850 "gdbarch_update: FRAME_CHAIN_VALID = 0x%08lx\n",
851 (long) current_gdbarch->frame_chain_valid
852 /*FRAME_CHAIN_VALID ()*/);
853 fprintf_unfiltered (gdb_stdlog,
854 "gdbarch_update: FRAME_SAVED_PC = 0x%08lx\n",
855 (long) current_gdbarch->frame_saved_pc
856 /*FRAME_SAVED_PC ()*/);
857 fprintf_unfiltered (gdb_stdlog,
858 "gdbarch_update: FRAME_ARGS_ADDRESS = 0x%08lx\n",
859 (long) current_gdbarch->frame_args_address
860 /*FRAME_ARGS_ADDRESS ()*/);
861 fprintf_unfiltered (gdb_stdlog,
862 "gdbarch_update: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
863 (long) current_gdbarch->frame_locals_address
864 /*FRAME_LOCALS_ADDRESS ()*/);
865 fprintf_unfiltered (gdb_stdlog,
866 "gdbarch_update: SAVED_PC_AFTER_CALL = 0x%08lx\n",
867 (long) current_gdbarch->saved_pc_after_call
868 /*SAVED_PC_AFTER_CALL ()*/);
869 fprintf_unfiltered (gdb_stdlog,
870 "gdbarch_update: FRAME_NUM_ARGS = 0x%08lx\n",
871 (long) current_gdbarch->frame_num_args
872 /*FRAME_NUM_ARGS ()*/);
875 struct gdbarch_tdep *
876 gdbarch_tdep (gdbarch)
877 struct gdbarch *gdbarch;
879 if (gdbarch_debug >= 2)
880 /* FIXME: gdb_std??? */
881 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
882 return gdbarch->tdep;
886 const struct bfd_arch_info *
887 gdbarch_bfd_arch_info (gdbarch)
888 struct gdbarch *gdbarch;
890 if (gdbarch_debug >= 2)
891 /* FIXME: gdb_std??? */
892 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
893 return gdbarch->bfd_arch_info;
897 gdbarch_byte_order (gdbarch)
898 struct gdbarch *gdbarch;
900 if (gdbarch_debug >= 2)
901 /* FIXME: gdb_std??? */
902 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
903 return gdbarch->byte_order;
907 gdbarch_ptr_bit (gdbarch)
908 struct gdbarch *gdbarch;
910 if (gdbarch->ptr_bit == 0)
911 fatal ("gdbarch: gdbarch_ptr_bit invalid");
912 if (gdbarch_debug >= 2)
913 /* FIXME: gdb_std??? */
914 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
915 return gdbarch->ptr_bit;
919 set_gdbarch_ptr_bit (gdbarch, ptr_bit)
920 struct gdbarch *gdbarch;
923 gdbarch->ptr_bit = ptr_bit;
927 gdbarch_short_bit (gdbarch)
928 struct gdbarch *gdbarch;
930 if (gdbarch->short_bit == 0)
931 fatal ("gdbarch: gdbarch_short_bit invalid");
932 if (gdbarch_debug >= 2)
933 /* FIXME: gdb_std??? */
934 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
935 return gdbarch->short_bit;
939 set_gdbarch_short_bit (gdbarch, short_bit)
940 struct gdbarch *gdbarch;
943 gdbarch->short_bit = short_bit;
947 gdbarch_int_bit (gdbarch)
948 struct gdbarch *gdbarch;
950 if (gdbarch->int_bit == 0)
951 fatal ("gdbarch: gdbarch_int_bit invalid");
952 if (gdbarch_debug >= 2)
953 /* FIXME: gdb_std??? */
954 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
955 return gdbarch->int_bit;
959 set_gdbarch_int_bit (gdbarch, int_bit)
960 struct gdbarch *gdbarch;
963 gdbarch->int_bit = int_bit;
967 gdbarch_long_bit (gdbarch)
968 struct gdbarch *gdbarch;
970 if (gdbarch->long_bit == 0)
971 fatal ("gdbarch: gdbarch_long_bit invalid");
972 if (gdbarch_debug >= 2)
973 /* FIXME: gdb_std??? */
974 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
975 return gdbarch->long_bit;
979 set_gdbarch_long_bit (gdbarch, long_bit)
980 struct gdbarch *gdbarch;
983 gdbarch->long_bit = long_bit;
987 gdbarch_long_long_bit (gdbarch)
988 struct gdbarch *gdbarch;
990 if (gdbarch->long_long_bit == 0)
991 fatal ("gdbarch: gdbarch_long_long_bit invalid");
992 if (gdbarch_debug >= 2)
993 /* FIXME: gdb_std??? */
994 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
995 return gdbarch->long_long_bit;
999 set_gdbarch_long_long_bit (gdbarch, long_long_bit)
1000 struct gdbarch *gdbarch;
1003 gdbarch->long_long_bit = long_long_bit;
1007 gdbarch_float_bit (gdbarch)
1008 struct gdbarch *gdbarch;
1010 if (gdbarch->float_bit == 0)
1011 fatal ("gdbarch: gdbarch_float_bit invalid");
1012 if (gdbarch_debug >= 2)
1013 /* FIXME: gdb_std??? */
1014 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1015 return gdbarch->float_bit;
1019 set_gdbarch_float_bit (gdbarch, float_bit)
1020 struct gdbarch *gdbarch;
1023 gdbarch->float_bit = float_bit;
1027 gdbarch_double_bit (gdbarch)
1028 struct gdbarch *gdbarch;
1030 if (gdbarch->double_bit == 0)
1031 fatal ("gdbarch: gdbarch_double_bit invalid");
1032 if (gdbarch_debug >= 2)
1033 /* FIXME: gdb_std??? */
1034 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1035 return gdbarch->double_bit;
1039 set_gdbarch_double_bit (gdbarch, double_bit)
1040 struct gdbarch *gdbarch;
1043 gdbarch->double_bit = double_bit;
1047 gdbarch_long_double_bit (gdbarch)
1048 struct gdbarch *gdbarch;
1050 if (gdbarch->long_double_bit == 0)
1051 fatal ("gdbarch: gdbarch_long_double_bit invalid");
1052 if (gdbarch_debug >= 2)
1053 /* FIXME: gdb_std??? */
1054 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1055 return gdbarch->long_double_bit;
1059 set_gdbarch_long_double_bit (gdbarch, long_double_bit)
1060 struct gdbarch *gdbarch;
1061 int long_double_bit;
1063 gdbarch->long_double_bit = long_double_bit;
1067 gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
1069 if (gdbarch->read_pc == 0)
1070 fatal ("gdbarch: gdbarch_read_pc invalid");
1071 if (gdbarch_debug >= 2)
1072 /* FIXME: gdb_std??? */
1073 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1074 return gdbarch->read_pc (pid);
1078 set_gdbarch_read_pc (gdbarch, read_pc)
1079 struct gdbarch *gdbarch;
1080 gdbarch_read_pc_ftype read_pc;
1082 gdbarch->read_pc = read_pc;
1086 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
1088 if (gdbarch->write_pc == 0)
1089 fatal ("gdbarch: gdbarch_write_pc invalid");
1090 if (gdbarch_debug >= 2)
1091 /* FIXME: gdb_std??? */
1092 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1093 gdbarch->write_pc (val, pid);
1097 set_gdbarch_write_pc (gdbarch, write_pc)
1098 struct gdbarch *gdbarch;
1099 gdbarch_write_pc_ftype write_pc;
1101 gdbarch->write_pc = write_pc;
1105 gdbarch_read_fp (struct gdbarch *gdbarch)
1107 if (gdbarch->read_fp == 0)
1108 fatal ("gdbarch: gdbarch_read_fp invalid");
1109 if (gdbarch_debug >= 2)
1110 /* FIXME: gdb_std??? */
1111 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
1112 return gdbarch->read_fp ();
1116 set_gdbarch_read_fp (gdbarch, read_fp)
1117 struct gdbarch *gdbarch;
1118 gdbarch_read_fp_ftype read_fp;
1120 gdbarch->read_fp = read_fp;
1124 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
1126 if (gdbarch->write_fp == 0)
1127 fatal ("gdbarch: gdbarch_write_fp invalid");
1128 if (gdbarch_debug >= 2)
1129 /* FIXME: gdb_std??? */
1130 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
1131 gdbarch->write_fp (val);
1135 set_gdbarch_write_fp (gdbarch, write_fp)
1136 struct gdbarch *gdbarch;
1137 gdbarch_write_fp_ftype write_fp;
1139 gdbarch->write_fp = write_fp;
1143 gdbarch_read_sp (struct gdbarch *gdbarch)
1145 if (gdbarch->read_sp == 0)
1146 fatal ("gdbarch: gdbarch_read_sp invalid");
1147 if (gdbarch_debug >= 2)
1148 /* FIXME: gdb_std??? */
1149 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1150 return gdbarch->read_sp ();
1154 set_gdbarch_read_sp (gdbarch, read_sp)
1155 struct gdbarch *gdbarch;
1156 gdbarch_read_sp_ftype read_sp;
1158 gdbarch->read_sp = read_sp;
1162 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
1164 if (gdbarch->write_sp == 0)
1165 fatal ("gdbarch: gdbarch_write_sp invalid");
1166 if (gdbarch_debug >= 2)
1167 /* FIXME: gdb_std??? */
1168 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
1169 gdbarch->write_sp (val);
1173 set_gdbarch_write_sp (gdbarch, write_sp)
1174 struct gdbarch *gdbarch;
1175 gdbarch_write_sp_ftype write_sp;
1177 gdbarch->write_sp = write_sp;
1181 gdbarch_num_regs (gdbarch)
1182 struct gdbarch *gdbarch;
1184 if (gdbarch->num_regs == -1)
1185 fatal ("gdbarch: gdbarch_num_regs invalid");
1186 if (gdbarch_debug >= 2)
1187 /* FIXME: gdb_std??? */
1188 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1189 return gdbarch->num_regs;
1193 set_gdbarch_num_regs (gdbarch, num_regs)
1194 struct gdbarch *gdbarch;
1197 gdbarch->num_regs = num_regs;
1201 gdbarch_sp_regnum (gdbarch)
1202 struct gdbarch *gdbarch;
1204 if (gdbarch->sp_regnum == -1)
1205 fatal ("gdbarch: gdbarch_sp_regnum invalid");
1206 if (gdbarch_debug >= 2)
1207 /* FIXME: gdb_std??? */
1208 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
1209 return gdbarch->sp_regnum;
1213 set_gdbarch_sp_regnum (gdbarch, sp_regnum)
1214 struct gdbarch *gdbarch;
1217 gdbarch->sp_regnum = sp_regnum;
1221 gdbarch_fp_regnum (gdbarch)
1222 struct gdbarch *gdbarch;
1224 if (gdbarch->fp_regnum == -1)
1225 fatal ("gdbarch: gdbarch_fp_regnum invalid");
1226 if (gdbarch_debug >= 2)
1227 /* FIXME: gdb_std??? */
1228 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
1229 return gdbarch->fp_regnum;
1233 set_gdbarch_fp_regnum (gdbarch, fp_regnum)
1234 struct gdbarch *gdbarch;
1237 gdbarch->fp_regnum = fp_regnum;
1241 gdbarch_pc_regnum (gdbarch)
1242 struct gdbarch *gdbarch;
1244 if (gdbarch->pc_regnum == -1)
1245 fatal ("gdbarch: gdbarch_pc_regnum invalid");
1246 if (gdbarch_debug >= 2)
1247 /* FIXME: gdb_std??? */
1248 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
1249 return gdbarch->pc_regnum;
1253 set_gdbarch_pc_regnum (gdbarch, pc_regnum)
1254 struct gdbarch *gdbarch;
1257 gdbarch->pc_regnum = pc_regnum;
1261 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
1263 if (gdbarch->register_name == 0)
1264 fatal ("gdbarch: gdbarch_register_name invalid");
1265 if (gdbarch_debug >= 2)
1266 /* FIXME: gdb_std??? */
1267 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
1268 return gdbarch->register_name (regnr);
1272 set_gdbarch_register_name (gdbarch, register_name)
1273 struct gdbarch *gdbarch;
1274 gdbarch_register_name_ftype register_name;
1276 gdbarch->register_name = register_name;
1280 gdbarch_register_size (gdbarch)
1281 struct gdbarch *gdbarch;
1283 if (gdbarch->register_size == -1)
1284 fatal ("gdbarch: gdbarch_register_size invalid");
1285 if (gdbarch_debug >= 2)
1286 /* FIXME: gdb_std??? */
1287 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
1288 return gdbarch->register_size;
1292 set_gdbarch_register_size (gdbarch, register_size)
1293 struct gdbarch *gdbarch;
1296 gdbarch->register_size = register_size;
1300 gdbarch_register_bytes (gdbarch)
1301 struct gdbarch *gdbarch;
1303 if (gdbarch->register_bytes == -1)
1304 fatal ("gdbarch: gdbarch_register_bytes invalid");
1305 if (gdbarch_debug >= 2)
1306 /* FIXME: gdb_std??? */
1307 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
1308 return gdbarch->register_bytes;
1312 set_gdbarch_register_bytes (gdbarch, register_bytes)
1313 struct gdbarch *gdbarch;
1316 gdbarch->register_bytes = register_bytes;
1320 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
1322 if (gdbarch->register_byte == 0)
1323 fatal ("gdbarch: gdbarch_register_byte invalid");
1324 if (gdbarch_debug >= 2)
1325 /* FIXME: gdb_std??? */
1326 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
1327 return gdbarch->register_byte (reg_nr);
1331 set_gdbarch_register_byte (gdbarch, register_byte)
1332 struct gdbarch *gdbarch;
1333 gdbarch_register_byte_ftype register_byte;
1335 gdbarch->register_byte = register_byte;
1339 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
1341 if (gdbarch->register_raw_size == 0)
1342 fatal ("gdbarch: gdbarch_register_raw_size invalid");
1343 if (gdbarch_debug >= 2)
1344 /* FIXME: gdb_std??? */
1345 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
1346 return gdbarch->register_raw_size (reg_nr);
1350 set_gdbarch_register_raw_size (gdbarch, register_raw_size)
1351 struct gdbarch *gdbarch;
1352 gdbarch_register_raw_size_ftype register_raw_size;
1354 gdbarch->register_raw_size = register_raw_size;
1358 gdbarch_max_register_raw_size (gdbarch)
1359 struct gdbarch *gdbarch;
1361 if (gdbarch->max_register_raw_size == -1)
1362 fatal ("gdbarch: gdbarch_max_register_raw_size invalid");
1363 if (gdbarch_debug >= 2)
1364 /* FIXME: gdb_std??? */
1365 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
1366 return gdbarch->max_register_raw_size;
1370 set_gdbarch_max_register_raw_size (gdbarch, max_register_raw_size)
1371 struct gdbarch *gdbarch;
1372 int max_register_raw_size;
1374 gdbarch->max_register_raw_size = max_register_raw_size;
1378 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
1380 if (gdbarch->register_virtual_size == 0)
1381 fatal ("gdbarch: gdbarch_register_virtual_size invalid");
1382 if (gdbarch_debug >= 2)
1383 /* FIXME: gdb_std??? */
1384 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
1385 return gdbarch->register_virtual_size (reg_nr);
1389 set_gdbarch_register_virtual_size (gdbarch, register_virtual_size)
1390 struct gdbarch *gdbarch;
1391 gdbarch_register_virtual_size_ftype register_virtual_size;
1393 gdbarch->register_virtual_size = register_virtual_size;
1397 gdbarch_max_register_virtual_size (gdbarch)
1398 struct gdbarch *gdbarch;
1400 if (gdbarch->max_register_virtual_size == -1)
1401 fatal ("gdbarch: gdbarch_max_register_virtual_size invalid");
1402 if (gdbarch_debug >= 2)
1403 /* FIXME: gdb_std??? */
1404 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
1405 return gdbarch->max_register_virtual_size;
1409 set_gdbarch_max_register_virtual_size (gdbarch, max_register_virtual_size)
1410 struct gdbarch *gdbarch;
1411 int max_register_virtual_size;
1413 gdbarch->max_register_virtual_size = max_register_virtual_size;
1417 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
1419 if (gdbarch->register_virtual_type == 0)
1420 fatal ("gdbarch: gdbarch_register_virtual_type invalid");
1421 if (gdbarch_debug >= 2)
1422 /* FIXME: gdb_std??? */
1423 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
1424 return gdbarch->register_virtual_type (reg_nr);
1428 set_gdbarch_register_virtual_type (gdbarch, register_virtual_type)
1429 struct gdbarch *gdbarch;
1430 gdbarch_register_virtual_type_ftype register_virtual_type;
1432 gdbarch->register_virtual_type = register_virtual_type;
1436 gdbarch_use_generic_dummy_frames (gdbarch)
1437 struct gdbarch *gdbarch;
1439 if (gdbarch->use_generic_dummy_frames == -1)
1440 fatal ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
1441 if (gdbarch_debug >= 2)
1442 /* FIXME: gdb_std??? */
1443 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
1444 return gdbarch->use_generic_dummy_frames;
1448 set_gdbarch_use_generic_dummy_frames (gdbarch, use_generic_dummy_frames)
1449 struct gdbarch *gdbarch;
1450 int use_generic_dummy_frames;
1452 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
1456 gdbarch_call_dummy_location (gdbarch)
1457 struct gdbarch *gdbarch;
1459 if (gdbarch->call_dummy_location == 0)
1460 fatal ("gdbarch: gdbarch_call_dummy_location invalid");
1461 if (gdbarch_debug >= 2)
1462 /* FIXME: gdb_std??? */
1463 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
1464 return gdbarch->call_dummy_location;
1468 set_gdbarch_call_dummy_location (gdbarch, call_dummy_location)
1469 struct gdbarch *gdbarch;
1470 int call_dummy_location;
1472 gdbarch->call_dummy_location = call_dummy_location;
1476 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
1478 if (gdbarch->call_dummy_address == 0)
1479 fatal ("gdbarch: gdbarch_call_dummy_address invalid");
1480 if (gdbarch_debug >= 2)
1481 /* FIXME: gdb_std??? */
1482 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
1483 return gdbarch->call_dummy_address ();
1487 set_gdbarch_call_dummy_address (gdbarch, call_dummy_address)
1488 struct gdbarch *gdbarch;
1489 gdbarch_call_dummy_address_ftype call_dummy_address;
1491 gdbarch->call_dummy_address = call_dummy_address;
1495 gdbarch_call_dummy_start_offset (gdbarch)
1496 struct gdbarch *gdbarch;
1498 if (gdbarch->call_dummy_start_offset == -1)
1499 fatal ("gdbarch: gdbarch_call_dummy_start_offset invalid");
1500 if (gdbarch_debug >= 2)
1501 /* FIXME: gdb_std??? */
1502 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
1503 return gdbarch->call_dummy_start_offset;
1507 set_gdbarch_call_dummy_start_offset (gdbarch, call_dummy_start_offset)
1508 struct gdbarch *gdbarch;
1509 CORE_ADDR call_dummy_start_offset;
1511 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
1515 gdbarch_call_dummy_breakpoint_offset (gdbarch)
1516 struct gdbarch *gdbarch;
1518 if (gdbarch->call_dummy_breakpoint_offset == -1)
1519 fatal ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
1520 if (gdbarch_debug >= 2)
1521 /* FIXME: gdb_std??? */
1522 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
1523 return gdbarch->call_dummy_breakpoint_offset;
1527 set_gdbarch_call_dummy_breakpoint_offset (gdbarch, call_dummy_breakpoint_offset)
1528 struct gdbarch *gdbarch;
1529 CORE_ADDR call_dummy_breakpoint_offset;
1531 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
1535 gdbarch_call_dummy_breakpoint_offset_p (gdbarch)
1536 struct gdbarch *gdbarch;
1538 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
1539 fatal ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
1540 if (gdbarch_debug >= 2)
1541 /* FIXME: gdb_std??? */
1542 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
1543 return gdbarch->call_dummy_breakpoint_offset_p;
1547 set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, call_dummy_breakpoint_offset_p)
1548 struct gdbarch *gdbarch;
1549 int call_dummy_breakpoint_offset_p;
1551 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
1555 gdbarch_call_dummy_length (gdbarch)
1556 struct gdbarch *gdbarch;
1558 if (gdbarch->call_dummy_length == -1)
1559 fatal ("gdbarch: gdbarch_call_dummy_length invalid");
1560 if (gdbarch_debug >= 2)
1561 /* FIXME: gdb_std??? */
1562 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
1563 return gdbarch->call_dummy_length;
1567 set_gdbarch_call_dummy_length (gdbarch, call_dummy_length)
1568 struct gdbarch *gdbarch;
1569 int call_dummy_length;
1571 gdbarch->call_dummy_length = call_dummy_length;
1575 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
1577 if (gdbarch->pc_in_call_dummy == 0)
1578 fatal ("gdbarch: gdbarch_pc_in_call_dummy invalid");
1579 if (gdbarch_debug >= 2)
1580 /* FIXME: gdb_std??? */
1581 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
1582 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
1586 set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy)
1587 struct gdbarch *gdbarch;
1588 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy;
1590 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
1594 gdbarch_call_dummy_p (gdbarch)
1595 struct gdbarch *gdbarch;
1597 if (gdbarch->call_dummy_p == -1)
1598 fatal ("gdbarch: gdbarch_call_dummy_p invalid");
1599 if (gdbarch_debug >= 2)
1600 /* FIXME: gdb_std??? */
1601 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
1602 return gdbarch->call_dummy_p;
1606 set_gdbarch_call_dummy_p (gdbarch, call_dummy_p)
1607 struct gdbarch *gdbarch;
1610 gdbarch->call_dummy_p = call_dummy_p;
1614 gdbarch_call_dummy_words (gdbarch)
1615 struct gdbarch *gdbarch;
1617 if (gdbarch_debug >= 2)
1618 /* FIXME: gdb_std??? */
1619 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
1620 return gdbarch->call_dummy_words;
1624 set_gdbarch_call_dummy_words (gdbarch, call_dummy_words)
1625 struct gdbarch *gdbarch;
1626 LONGEST * call_dummy_words;
1628 gdbarch->call_dummy_words = call_dummy_words;
1632 gdbarch_sizeof_call_dummy_words (gdbarch)
1633 struct gdbarch *gdbarch;
1635 if (gdbarch_debug >= 2)
1636 /* FIXME: gdb_std??? */
1637 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
1638 return gdbarch->sizeof_call_dummy_words;
1642 set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_call_dummy_words)
1643 struct gdbarch *gdbarch;
1644 int sizeof_call_dummy_words;
1646 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
1650 gdbarch_call_dummy_stack_adjust_p (gdbarch)
1651 struct gdbarch *gdbarch;
1653 if (gdbarch->call_dummy_stack_adjust_p == -1)
1654 fatal ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
1655 if (gdbarch_debug >= 2)
1656 /* FIXME: gdb_std??? */
1657 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
1658 return gdbarch->call_dummy_stack_adjust_p;
1662 set_gdbarch_call_dummy_stack_adjust_p (gdbarch, call_dummy_stack_adjust_p)
1663 struct gdbarch *gdbarch;
1664 int call_dummy_stack_adjust_p;
1666 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
1670 gdbarch_call_dummy_stack_adjust (gdbarch)
1671 struct gdbarch *gdbarch;
1673 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
1674 fatal ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
1675 if (gdbarch_debug >= 2)
1676 /* FIXME: gdb_std??? */
1677 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
1678 return gdbarch->call_dummy_stack_adjust;
1682 set_gdbarch_call_dummy_stack_adjust (gdbarch, call_dummy_stack_adjust)
1683 struct gdbarch *gdbarch;
1684 int call_dummy_stack_adjust;
1686 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
1690 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)
1692 if (gdbarch->fix_call_dummy == 0)
1693 fatal ("gdbarch: gdbarch_fix_call_dummy invalid");
1694 if (gdbarch_debug >= 2)
1695 /* FIXME: gdb_std??? */
1696 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
1697 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
1701 set_gdbarch_fix_call_dummy (gdbarch, fix_call_dummy)
1702 struct gdbarch *gdbarch;
1703 gdbarch_fix_call_dummy_ftype fix_call_dummy;
1705 gdbarch->fix_call_dummy = fix_call_dummy;
1709 gdbarch_believe_pcc_promotion (gdbarch)
1710 struct gdbarch *gdbarch;
1712 if (gdbarch_debug >= 2)
1713 /* FIXME: gdb_std??? */
1714 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
1715 return gdbarch->believe_pcc_promotion;
1719 set_gdbarch_believe_pcc_promotion (gdbarch, believe_pcc_promotion)
1720 struct gdbarch *gdbarch;
1721 int believe_pcc_promotion;
1723 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
1727 gdbarch_believe_pcc_promotion_type (gdbarch)
1728 struct gdbarch *gdbarch;
1730 if (gdbarch_debug >= 2)
1731 /* FIXME: gdb_std??? */
1732 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
1733 return gdbarch->believe_pcc_promotion_type;
1737 set_gdbarch_believe_pcc_promotion_type (gdbarch, believe_pcc_promotion_type)
1738 struct gdbarch *gdbarch;
1739 int believe_pcc_promotion_type;
1741 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
1745 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)
1747 if (gdbarch->get_saved_register == 0)
1748 fatal ("gdbarch: gdbarch_get_saved_register invalid");
1749 if (gdbarch_debug >= 2)
1750 /* FIXME: gdb_std??? */
1751 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
1752 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
1756 set_gdbarch_get_saved_register (gdbarch, get_saved_register)
1757 struct gdbarch *gdbarch;
1758 gdbarch_get_saved_register_ftype get_saved_register;
1760 gdbarch->get_saved_register = get_saved_register;
1764 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
1766 if (gdbarch->register_convertible == 0)
1767 fatal ("gdbarch: gdbarch_register_convertible invalid");
1768 if (gdbarch_debug >= 2)
1769 /* FIXME: gdb_std??? */
1770 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
1771 return gdbarch->register_convertible (nr);
1775 set_gdbarch_register_convertible (gdbarch, register_convertible)
1776 struct gdbarch *gdbarch;
1777 gdbarch_register_convertible_ftype register_convertible;
1779 gdbarch->register_convertible = register_convertible;
1783 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
1785 if (gdbarch->register_convert_to_virtual == 0)
1786 fatal ("gdbarch: gdbarch_register_convert_to_virtual invalid");
1787 if (gdbarch_debug >= 2)
1788 /* FIXME: gdb_std??? */
1789 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
1790 gdbarch->register_convert_to_virtual (regnum, type, from, to);
1794 set_gdbarch_register_convert_to_virtual (gdbarch, register_convert_to_virtual)
1795 struct gdbarch *gdbarch;
1796 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual;
1798 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
1802 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
1804 if (gdbarch->register_convert_to_raw == 0)
1805 fatal ("gdbarch: gdbarch_register_convert_to_raw invalid");
1806 if (gdbarch_debug >= 2)
1807 /* FIXME: gdb_std??? */
1808 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
1809 gdbarch->register_convert_to_raw (type, regnum, from, to);
1813 set_gdbarch_register_convert_to_raw (gdbarch, register_convert_to_raw)
1814 struct gdbarch *gdbarch;
1815 gdbarch_register_convert_to_raw_ftype register_convert_to_raw;
1817 gdbarch->register_convert_to_raw = register_convert_to_raw;
1821 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
1823 if (gdbarch->extract_return_value == 0)
1824 fatal ("gdbarch: gdbarch_extract_return_value invalid");
1825 if (gdbarch_debug >= 2)
1826 /* FIXME: gdb_std??? */
1827 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
1828 gdbarch->extract_return_value (type, regbuf, valbuf);
1832 set_gdbarch_extract_return_value (gdbarch, extract_return_value)
1833 struct gdbarch *gdbarch;
1834 gdbarch_extract_return_value_ftype extract_return_value;
1836 gdbarch->extract_return_value = extract_return_value;
1840 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
1842 if (gdbarch->push_arguments == 0)
1843 fatal ("gdbarch: gdbarch_push_arguments invalid");
1844 if (gdbarch_debug >= 2)
1845 /* FIXME: gdb_std??? */
1846 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
1847 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
1851 set_gdbarch_push_arguments (gdbarch, push_arguments)
1852 struct gdbarch *gdbarch;
1853 gdbarch_push_arguments_ftype push_arguments;
1855 gdbarch->push_arguments = push_arguments;
1859 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
1861 if (gdbarch->push_dummy_frame == 0)
1862 fatal ("gdbarch: gdbarch_push_dummy_frame invalid");
1863 if (gdbarch_debug >= 2)
1864 /* FIXME: gdb_std??? */
1865 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
1866 gdbarch->push_dummy_frame ();
1870 set_gdbarch_push_dummy_frame (gdbarch, push_dummy_frame)
1871 struct gdbarch *gdbarch;
1872 gdbarch_push_dummy_frame_ftype push_dummy_frame;
1874 gdbarch->push_dummy_frame = push_dummy_frame;
1878 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
1880 if (gdbarch->push_return_address == 0)
1881 fatal ("gdbarch: gdbarch_push_return_address invalid");
1882 if (gdbarch_debug >= 2)
1883 /* FIXME: gdb_std??? */
1884 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
1885 return gdbarch->push_return_address (pc, sp);
1889 set_gdbarch_push_return_address (gdbarch, push_return_address)
1890 struct gdbarch *gdbarch;
1891 gdbarch_push_return_address_ftype push_return_address;
1893 gdbarch->push_return_address = push_return_address;
1897 gdbarch_pop_frame (struct gdbarch *gdbarch)
1899 if (gdbarch->pop_frame == 0)
1900 fatal ("gdbarch: gdbarch_pop_frame invalid");
1901 if (gdbarch_debug >= 2)
1902 /* FIXME: gdb_std??? */
1903 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
1904 gdbarch->pop_frame ();
1908 set_gdbarch_pop_frame (gdbarch, pop_frame)
1909 struct gdbarch *gdbarch;
1910 gdbarch_pop_frame_ftype pop_frame;
1912 gdbarch->pop_frame = pop_frame;
1916 gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
1918 if (gdbarch->d10v_make_daddr == 0)
1919 fatal ("gdbarch: gdbarch_d10v_make_daddr invalid");
1920 if (gdbarch_debug >= 2)
1921 /* FIXME: gdb_std??? */
1922 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
1923 return gdbarch->d10v_make_daddr (x);
1927 set_gdbarch_d10v_make_daddr (gdbarch, d10v_make_daddr)
1928 struct gdbarch *gdbarch;
1929 gdbarch_d10v_make_daddr_ftype d10v_make_daddr;
1931 gdbarch->d10v_make_daddr = d10v_make_daddr;
1935 gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
1937 if (gdbarch->d10v_make_iaddr == 0)
1938 fatal ("gdbarch: gdbarch_d10v_make_iaddr invalid");
1939 if (gdbarch_debug >= 2)
1940 /* FIXME: gdb_std??? */
1941 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
1942 return gdbarch->d10v_make_iaddr (x);
1946 set_gdbarch_d10v_make_iaddr (gdbarch, d10v_make_iaddr)
1947 struct gdbarch *gdbarch;
1948 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr;
1950 gdbarch->d10v_make_iaddr = d10v_make_iaddr;
1954 gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
1956 if (gdbarch->d10v_daddr_p == 0)
1957 fatal ("gdbarch: gdbarch_d10v_daddr_p invalid");
1958 if (gdbarch_debug >= 2)
1959 /* FIXME: gdb_std??? */
1960 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
1961 return gdbarch->d10v_daddr_p (x);
1965 set_gdbarch_d10v_daddr_p (gdbarch, d10v_daddr_p)
1966 struct gdbarch *gdbarch;
1967 gdbarch_d10v_daddr_p_ftype d10v_daddr_p;
1969 gdbarch->d10v_daddr_p = d10v_daddr_p;
1973 gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
1975 if (gdbarch->d10v_iaddr_p == 0)
1976 fatal ("gdbarch: gdbarch_d10v_iaddr_p invalid");
1977 if (gdbarch_debug >= 2)
1978 /* FIXME: gdb_std??? */
1979 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
1980 return gdbarch->d10v_iaddr_p (x);
1984 set_gdbarch_d10v_iaddr_p (gdbarch, d10v_iaddr_p)
1985 struct gdbarch *gdbarch;
1986 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p;
1988 gdbarch->d10v_iaddr_p = d10v_iaddr_p;
1992 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
1994 if (gdbarch->d10v_convert_daddr_to_raw == 0)
1995 fatal ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
1996 if (gdbarch_debug >= 2)
1997 /* FIXME: gdb_std??? */
1998 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
1999 return gdbarch->d10v_convert_daddr_to_raw (x);
2003 set_gdbarch_d10v_convert_daddr_to_raw (gdbarch, d10v_convert_daddr_to_raw)
2004 struct gdbarch *gdbarch;
2005 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw;
2007 gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw;
2011 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
2013 if (gdbarch->d10v_convert_iaddr_to_raw == 0)
2014 fatal ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
2015 if (gdbarch_debug >= 2)
2016 /* FIXME: gdb_std??? */
2017 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
2018 return gdbarch->d10v_convert_iaddr_to_raw (x);
2022 set_gdbarch_d10v_convert_iaddr_to_raw (gdbarch, d10v_convert_iaddr_to_raw)
2023 struct gdbarch *gdbarch;
2024 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw;
2026 gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw;
2030 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
2032 if (gdbarch->store_struct_return == 0)
2033 fatal ("gdbarch: gdbarch_store_struct_return invalid");
2034 if (gdbarch_debug >= 2)
2035 /* FIXME: gdb_std??? */
2036 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
2037 gdbarch->store_struct_return (addr, sp);
2041 set_gdbarch_store_struct_return (gdbarch, store_struct_return)
2042 struct gdbarch *gdbarch;
2043 gdbarch_store_struct_return_ftype store_struct_return;
2045 gdbarch->store_struct_return = store_struct_return;
2049 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
2051 if (gdbarch->store_return_value == 0)
2052 fatal ("gdbarch: gdbarch_store_return_value invalid");
2053 if (gdbarch_debug >= 2)
2054 /* FIXME: gdb_std??? */
2055 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
2056 gdbarch->store_return_value (type, valbuf);
2060 set_gdbarch_store_return_value (gdbarch, store_return_value)
2061 struct gdbarch *gdbarch;
2062 gdbarch_store_return_value_ftype store_return_value;
2064 gdbarch->store_return_value = store_return_value;
2068 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
2070 if (gdbarch->extract_struct_value_address == 0)
2071 fatal ("gdbarch: gdbarch_extract_struct_value_address invalid");
2072 if (gdbarch_debug >= 2)
2073 /* FIXME: gdb_std??? */
2074 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
2075 return gdbarch->extract_struct_value_address (regbuf);
2079 set_gdbarch_extract_struct_value_address (gdbarch, extract_struct_value_address)
2080 struct gdbarch *gdbarch;
2081 gdbarch_extract_struct_value_address_ftype extract_struct_value_address;
2083 gdbarch->extract_struct_value_address = extract_struct_value_address;
2087 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
2089 if (gdbarch->use_struct_convention == 0)
2090 fatal ("gdbarch: gdbarch_use_struct_convention invalid");
2091 if (gdbarch_debug >= 2)
2092 /* FIXME: gdb_std??? */
2093 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
2094 return gdbarch->use_struct_convention (gcc_p, value_type);
2098 set_gdbarch_use_struct_convention (gdbarch, use_struct_convention)
2099 struct gdbarch *gdbarch;
2100 gdbarch_use_struct_convention_ftype use_struct_convention;
2102 gdbarch->use_struct_convention = use_struct_convention;
2106 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
2108 if (gdbarch->frame_init_saved_regs == 0)
2109 fatal ("gdbarch: gdbarch_frame_init_saved_regs invalid");
2110 if (gdbarch_debug >= 2)
2111 /* FIXME: gdb_std??? */
2112 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
2113 gdbarch->frame_init_saved_regs (frame);
2117 set_gdbarch_frame_init_saved_regs (gdbarch, frame_init_saved_regs)
2118 struct gdbarch *gdbarch;
2119 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs;
2121 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
2125 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
2127 if (gdbarch->init_extra_frame_info == 0)
2128 fatal ("gdbarch: gdbarch_init_extra_frame_info invalid");
2129 if (gdbarch_debug >= 2)
2130 /* FIXME: gdb_std??? */
2131 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
2132 gdbarch->init_extra_frame_info (fromleaf, frame);
2136 set_gdbarch_init_extra_frame_info (gdbarch, init_extra_frame_info)
2137 struct gdbarch *gdbarch;
2138 gdbarch_init_extra_frame_info_ftype init_extra_frame_info;
2140 gdbarch->init_extra_frame_info = init_extra_frame_info;
2144 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2146 if (gdbarch->skip_prologue == 0)
2147 fatal ("gdbarch: gdbarch_skip_prologue invalid");
2148 if (gdbarch_debug >= 2)
2149 /* FIXME: gdb_std??? */
2150 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2151 return gdbarch->skip_prologue (ip);
2155 set_gdbarch_skip_prologue (gdbarch, skip_prologue)
2156 struct gdbarch *gdbarch;
2157 gdbarch_skip_prologue_ftype skip_prologue;
2159 gdbarch->skip_prologue = skip_prologue;
2163 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2165 if (gdbarch->inner_than == 0)
2166 fatal ("gdbarch: gdbarch_inner_than invalid");
2167 if (gdbarch_debug >= 2)
2168 /* FIXME: gdb_std??? */
2169 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2170 return gdbarch->inner_than (lhs, rhs);
2174 set_gdbarch_inner_than (gdbarch, inner_than)
2175 struct gdbarch *gdbarch;
2176 gdbarch_inner_than_ftype inner_than;
2178 gdbarch->inner_than = inner_than;
2182 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2184 if (gdbarch->breakpoint_from_pc == 0)
2185 fatal ("gdbarch: gdbarch_breakpoint_from_pc invalid");
2186 if (gdbarch_debug >= 2)
2187 /* FIXME: gdb_std??? */
2188 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2189 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2193 set_gdbarch_breakpoint_from_pc (gdbarch, breakpoint_from_pc)
2194 struct gdbarch *gdbarch;
2195 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc;
2197 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2201 gdbarch_decr_pc_after_break (gdbarch)
2202 struct gdbarch *gdbarch;
2204 if (gdbarch->decr_pc_after_break == -1)
2205 fatal ("gdbarch: gdbarch_decr_pc_after_break invalid");
2206 if (gdbarch_debug >= 2)
2207 /* FIXME: gdb_std??? */
2208 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2209 return gdbarch->decr_pc_after_break;
2213 set_gdbarch_decr_pc_after_break (gdbarch, decr_pc_after_break)
2214 struct gdbarch *gdbarch;
2215 CORE_ADDR decr_pc_after_break;
2217 gdbarch->decr_pc_after_break = decr_pc_after_break;
2221 gdbarch_function_start_offset (gdbarch)
2222 struct gdbarch *gdbarch;
2224 if (gdbarch->function_start_offset == -1)
2225 fatal ("gdbarch: gdbarch_function_start_offset invalid");
2226 if (gdbarch_debug >= 2)
2227 /* FIXME: gdb_std??? */
2228 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
2229 return gdbarch->function_start_offset;
2233 set_gdbarch_function_start_offset (gdbarch, function_start_offset)
2234 struct gdbarch *gdbarch;
2235 CORE_ADDR function_start_offset;
2237 gdbarch->function_start_offset = function_start_offset;
2241 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
2243 if (gdbarch->remote_translate_xfer_address == 0)
2244 fatal ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
2245 if (gdbarch_debug >= 2)
2246 /* FIXME: gdb_std??? */
2247 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
2248 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
2252 set_gdbarch_remote_translate_xfer_address (gdbarch, remote_translate_xfer_address)
2253 struct gdbarch *gdbarch;
2254 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address;
2256 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
2260 gdbarch_frame_args_skip (gdbarch)
2261 struct gdbarch *gdbarch;
2263 if (gdbarch->frame_args_skip == -1)
2264 fatal ("gdbarch: gdbarch_frame_args_skip invalid");
2265 if (gdbarch_debug >= 2)
2266 /* FIXME: gdb_std??? */
2267 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2268 return gdbarch->frame_args_skip;
2272 set_gdbarch_frame_args_skip (gdbarch, frame_args_skip)
2273 struct gdbarch *gdbarch;
2274 CORE_ADDR frame_args_skip;
2276 gdbarch->frame_args_skip = frame_args_skip;
2280 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
2282 if (gdbarch->frameless_function_invocation == 0)
2283 fatal ("gdbarch: gdbarch_frameless_function_invocation invalid");
2284 if (gdbarch_debug >= 2)
2285 /* FIXME: gdb_std??? */
2286 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
2287 return gdbarch->frameless_function_invocation (fi);
2291 set_gdbarch_frameless_function_invocation (gdbarch, frameless_function_invocation)
2292 struct gdbarch *gdbarch;
2293 gdbarch_frameless_function_invocation_ftype frameless_function_invocation;
2295 gdbarch->frameless_function_invocation = frameless_function_invocation;
2299 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
2301 if (gdbarch->frame_chain == 0)
2302 fatal ("gdbarch: gdbarch_frame_chain invalid");
2303 if (gdbarch_debug >= 2)
2304 /* FIXME: gdb_std??? */
2305 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
2306 return gdbarch->frame_chain (frame);
2310 set_gdbarch_frame_chain (gdbarch, frame_chain)
2311 struct gdbarch *gdbarch;
2312 gdbarch_frame_chain_ftype frame_chain;
2314 gdbarch->frame_chain = frame_chain;
2318 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
2320 if (gdbarch->frame_chain_valid == 0)
2321 fatal ("gdbarch: gdbarch_frame_chain_valid invalid");
2322 if (gdbarch_debug >= 2)
2323 /* FIXME: gdb_std??? */
2324 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
2325 return gdbarch->frame_chain_valid (chain, thisframe);
2329 set_gdbarch_frame_chain_valid (gdbarch, frame_chain_valid)
2330 struct gdbarch *gdbarch;
2331 gdbarch_frame_chain_valid_ftype frame_chain_valid;
2333 gdbarch->frame_chain_valid = frame_chain_valid;
2337 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
2339 if (gdbarch->frame_saved_pc == 0)
2340 fatal ("gdbarch: gdbarch_frame_saved_pc invalid");
2341 if (gdbarch_debug >= 2)
2342 /* FIXME: gdb_std??? */
2343 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
2344 return gdbarch->frame_saved_pc (fi);
2348 set_gdbarch_frame_saved_pc (gdbarch, frame_saved_pc)
2349 struct gdbarch *gdbarch;
2350 gdbarch_frame_saved_pc_ftype frame_saved_pc;
2352 gdbarch->frame_saved_pc = frame_saved_pc;
2356 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
2358 if (gdbarch->frame_args_address == 0)
2359 fatal ("gdbarch: gdbarch_frame_args_address invalid");
2360 if (gdbarch_debug >= 2)
2361 /* FIXME: gdb_std??? */
2362 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
2363 return gdbarch->frame_args_address (fi);
2367 set_gdbarch_frame_args_address (gdbarch, frame_args_address)
2368 struct gdbarch *gdbarch;
2369 gdbarch_frame_args_address_ftype frame_args_address;
2371 gdbarch->frame_args_address = frame_args_address;
2375 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
2377 if (gdbarch->frame_locals_address == 0)
2378 fatal ("gdbarch: gdbarch_frame_locals_address invalid");
2379 if (gdbarch_debug >= 2)
2380 /* FIXME: gdb_std??? */
2381 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
2382 return gdbarch->frame_locals_address (fi);
2386 set_gdbarch_frame_locals_address (gdbarch, frame_locals_address)
2387 struct gdbarch *gdbarch;
2388 gdbarch_frame_locals_address_ftype frame_locals_address;
2390 gdbarch->frame_locals_address = frame_locals_address;
2394 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
2396 if (gdbarch->saved_pc_after_call == 0)
2397 fatal ("gdbarch: gdbarch_saved_pc_after_call invalid");
2398 if (gdbarch_debug >= 2)
2399 /* FIXME: gdb_std??? */
2400 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
2401 return gdbarch->saved_pc_after_call (frame);
2405 set_gdbarch_saved_pc_after_call (gdbarch, saved_pc_after_call)
2406 struct gdbarch *gdbarch;
2407 gdbarch_saved_pc_after_call_ftype saved_pc_after_call;
2409 gdbarch->saved_pc_after_call = saved_pc_after_call;
2413 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2415 if (gdbarch->frame_num_args == 0)
2416 fatal ("gdbarch: gdbarch_frame_num_args invalid");
2417 if (gdbarch_debug >= 2)
2418 /* FIXME: gdb_std??? */
2419 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2420 return gdbarch->frame_num_args (frame);
2424 set_gdbarch_frame_num_args (gdbarch, frame_num_args)
2425 struct gdbarch *gdbarch;
2426 gdbarch_frame_num_args_ftype frame_num_args;
2428 gdbarch->frame_num_args = frame_num_args;
2432 /* Keep a registrary of per-architecture data-pointers required by GDB
2440 struct gdbarch_data_registration
2442 gdbarch_data_ftype *init;
2443 struct gdbarch_data *data;
2444 struct gdbarch_data_registration *next;
2447 struct gdbarch_data_registrary
2450 struct gdbarch_data_registration *registrations;
2453 struct gdbarch_data_registrary gdbarch_data_registrary =
2458 struct gdbarch_data *
2459 register_gdbarch_data (init)
2460 gdbarch_data_ftype *init;
2462 struct gdbarch_data_registration **curr;
2463 for (curr = &gdbarch_data_registrary.registrations;
2465 curr = &(*curr)->next);
2466 (*curr) = XMALLOC (struct gdbarch_data_registration);
2467 (*curr)->next = NULL;
2468 (*curr)->init = init;
2469 (*curr)->data = XMALLOC (struct gdbarch_data);
2470 (*curr)->data->index = gdbarch_data_registrary.nr++;
2471 return (*curr)->data;
2475 /* Walk through all the registered users initializing each in turn. */
2477 static void init_gdbarch_data PARAMS ((struct gdbarch *));
2479 init_gdbarch_data (gdbarch)
2480 struct gdbarch *gdbarch;
2482 struct gdbarch_data_registration *rego;
2483 gdbarch->nr_data = gdbarch_data_registrary.nr + 1;
2484 gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data);
2485 for (rego = gdbarch_data_registrary.registrations;
2489 if (rego->data->index < gdbarch->nr_data)
2490 gdbarch->data[rego->data->index] = rego->init ();
2495 /* Return the current value of the specified per-architecture
2500 struct gdbarch_data *data;
2502 if (data->index >= current_gdbarch->nr_data)
2503 fatal ("gdbarch_data: request for non-existant data.");
2504 return current_gdbarch->data[data->index];
2509 /* Keep a registrary of swaped data required by GDB modules. */
2514 struct gdbarch_swap_registration *source;
2515 struct gdbarch_swap *next;
2518 struct gdbarch_swap_registration
2521 unsigned long sizeof_data;
2522 gdbarch_swap_ftype *init;
2523 struct gdbarch_swap_registration *next;
2526 struct gdbarch_swap_registrary
2529 struct gdbarch_swap_registration *registrations;
2532 struct gdbarch_swap_registrary gdbarch_swap_registrary =
2538 register_gdbarch_swap (data, sizeof_data, init)
2540 unsigned long sizeof_data;
2541 gdbarch_swap_ftype *init;
2543 struct gdbarch_swap_registration **rego;
2544 for (rego = &gdbarch_swap_registrary.registrations;
2546 rego = &(*rego)->next);
2547 (*rego) = XMALLOC (struct gdbarch_swap_registration);
2548 (*rego)->next = NULL;
2549 (*rego)->init = init;
2550 (*rego)->data = data;
2551 (*rego)->sizeof_data = sizeof_data;
2555 static void init_gdbarch_swap PARAMS ((struct gdbarch *));
2557 init_gdbarch_swap (gdbarch)
2558 struct gdbarch *gdbarch;
2560 struct gdbarch_swap_registration *rego;
2561 struct gdbarch_swap **curr = &gdbarch->swap;
2562 for (rego = gdbarch_swap_registrary.registrations;
2566 if (rego->data != NULL)
2568 (*curr) = XMALLOC (struct gdbarch_swap);
2569 (*curr)->source = rego;
2570 (*curr)->swap = xmalloc (rego->sizeof_data);
2571 (*curr)->next = NULL;
2572 memset (rego->data, 0, rego->sizeof_data);
2573 curr = &(*curr)->next;
2575 if (rego->init != NULL)
2580 static void swapout_gdbarch_swap PARAMS ((struct gdbarch *));
2582 swapout_gdbarch_swap (gdbarch)
2583 struct gdbarch *gdbarch;
2585 struct gdbarch_swap *curr;
2586 for (curr = gdbarch->swap;
2589 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
2592 static void swapin_gdbarch_swap PARAMS ((struct gdbarch *));
2594 swapin_gdbarch_swap (gdbarch)
2595 struct gdbarch *gdbarch;
2597 struct gdbarch_swap *curr;
2598 for (curr = gdbarch->swap;
2601 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
2605 /* Keep a registrary of the architectures known by GDB. */
2607 struct gdbarch_init_registration
2609 enum bfd_architecture bfd_architecture;
2610 gdbarch_init_ftype *init;
2611 struct gdbarch_list *arches;
2612 struct gdbarch_init_registration *next;
2615 static struct gdbarch_init_registration *gdbarch_init_registrary = NULL;
2618 register_gdbarch_init (bfd_architecture, init)
2619 enum bfd_architecture bfd_architecture;
2620 gdbarch_init_ftype *init;
2622 struct gdbarch_init_registration **curr;
2623 const struct bfd_arch_info *bfd_arch_info;
2624 /* Check that BFD reconizes this architecture */
2625 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
2626 if (bfd_arch_info == NULL)
2628 fatal ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
2630 /* Check that we haven't seen this architecture before */
2631 for (curr = &gdbarch_init_registrary;
2633 curr = &(*curr)->next)
2635 if (bfd_architecture == (*curr)->bfd_architecture)
2636 fatal ("gdbarch: Duplicate registraration of architecture (%s)",
2637 bfd_arch_info->printable_name);
2641 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
2642 bfd_arch_info->printable_name,
2645 (*curr) = XMALLOC (struct gdbarch_init_registration);
2646 (*curr)->bfd_architecture = bfd_architecture;
2647 (*curr)->init = init;
2648 (*curr)->arches = NULL;
2649 (*curr)->next = NULL;
2654 /* Look for an architecture using gdbarch_info. Base search on only
2655 BFD_ARCH_INFO and BYTE_ORDER. */
2657 struct gdbarch_list *
2658 gdbarch_list_lookup_by_info (arches, info)
2659 struct gdbarch_list *arches;
2660 const struct gdbarch_info *info;
2662 for (; arches != NULL; arches = arches->next)
2664 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
2666 if (info->byte_order != arches->gdbarch->byte_order)
2674 /* Update the current architecture. Return ZERO if the update request
2678 gdbarch_update (info)
2679 struct gdbarch_info info;
2681 struct gdbarch *new_gdbarch;
2682 struct gdbarch_list **list;
2683 struct gdbarch_init_registration *rego;
2685 /* Fill in any missing bits. Most important is the bfd_architecture
2686 which is used to select the target architecture. */
2687 if (info.bfd_architecture == bfd_arch_unknown)
2689 if (info.bfd_arch_info != NULL)
2690 info.bfd_architecture = info.bfd_arch_info->arch;
2691 else if (info.abfd != NULL)
2692 info.bfd_architecture = bfd_get_arch (info.abfd);
2693 /* FIXME - should query BFD for its default architecture. */
2695 info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
2697 if (info.bfd_arch_info == NULL)
2699 if (target_architecture_auto && info.abfd != NULL)
2700 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
2702 info.bfd_arch_info = current_gdbarch->bfd_arch_info;
2704 if (info.byte_order == 0)
2706 if (target_byte_order_auto && info.abfd != NULL)
2707 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
2708 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
2711 info.byte_order = current_gdbarch->byte_order;
2712 /* FIXME - should query BFD for its default byte-order. */
2714 /* A default for abfd? */
2716 /* Find the target that knows about this architecture. */
2717 for (rego = gdbarch_init_registrary;
2718 rego != NULL && rego->bfd_architecture != info.bfd_architecture;
2723 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
2729 fprintf_unfiltered (gdb_stdlog,
2730 "gdbarch_update: info.bfd_architecture %d (%s)\n",
2731 info.bfd_architecture,
2732 bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
2733 fprintf_unfiltered (gdb_stdlog,
2734 "gdbarch_update: info.bfd_arch_info %s\n",
2735 (info.bfd_arch_info != NULL
2736 ? info.bfd_arch_info->printable_name
2738 fprintf_unfiltered (gdb_stdlog,
2739 "gdbarch_update: info.byte_order %d (%s)\n",
2741 (info.byte_order == BIG_ENDIAN ? "big"
2742 : info.byte_order == LITTLE_ENDIAN ? "little"
2744 fprintf_unfiltered (gdb_stdlog,
2745 "gdbarch_update: info.abfd 0x%lx\n",
2747 fprintf_unfiltered (gdb_stdlog,
2748 "gdbarch_update: info.tdep_info 0x%lx\n",
2749 (long) info.tdep_info);
2752 /* Ask the target for a replacement architecture. */
2753 new_gdbarch = rego->init (info, rego->arches);
2755 /* Did the target like it? No. Reject the change. */
2756 if (new_gdbarch == NULL)
2759 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
2763 /* Did the architecture change? No. Do nothing. */
2764 if (current_gdbarch == new_gdbarch)
2767 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
2769 new_gdbarch->bfd_arch_info->printable_name);
2773 /* Swap all data belonging to the old target out */
2774 swapout_gdbarch_swap (current_gdbarch);
2776 /* Is this a pre-existing architecture? Yes. Swap it in. */
2777 for (list = ®o->arches;
2779 list = &(*list)->next)
2781 if ((*list)->gdbarch == new_gdbarch)
2784 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
2786 new_gdbarch->bfd_arch_info->printable_name);
2787 current_gdbarch = new_gdbarch;
2788 swapin_gdbarch_swap (new_gdbarch);
2793 /* Append this new architecture to this targets list. */
2794 (*list) = XMALLOC (struct gdbarch_list);
2795 (*list)->next = NULL;
2796 (*list)->gdbarch = new_gdbarch;
2798 /* Switch to this new architecture. Dump it out. */
2799 current_gdbarch = new_gdbarch;
2802 fprintf_unfiltered (gdb_stdlog,
2803 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
2805 new_gdbarch->bfd_arch_info->printable_name);
2809 /* Check that the newly installed architecture is valid. */
2810 verify_gdbarch (new_gdbarch);
2812 /* Initialize the per-architecture memory (swap) areas.
2813 CURRENT_GDBARCH must be update before these modules are
2815 init_gdbarch_swap (new_gdbarch);
2817 /* Initialize the per-architecture data-pointer of all parties that
2818 registered an interest in this architecture. CURRENT_GDBARCH
2819 must be updated before these modules are called. */
2820 init_gdbarch_data (new_gdbarch);
2827 /* Functions to manipulate the endianness of the target. */
2829 #ifdef TARGET_BYTE_ORDER_SELECTABLE
2830 /* compat - Catch old targets that expect a selectable byte-order to
2831 default to BIG_ENDIAN */
2832 #ifndef TARGET_BYTE_ORDER_DEFAULT
2833 #define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN
2836 #if !TARGET_BYTE_ORDER_SELECTABLE_P
2837 #ifndef TARGET_BYTE_ORDER_DEFAULT
2838 /* compat - Catch old non byte-order selectable targets that do not
2839 define TARGET_BYTE_ORDER_DEFAULT and instead expect
2840 TARGET_BYTE_ORDER to be used as the default. For targets that
2841 defined neither TARGET_BYTE_ORDER nor TARGET_BYTE_ORDER_DEFAULT the
2842 below will get a strange compiler warning. */
2843 #define TARGET_BYTE_ORDER_DEFAULT TARGET_BYTE_ORDER
2846 #ifndef TARGET_BYTE_ORDER_DEFAULT
2847 #define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN /* arbitrary */
2849 int target_byte_order = TARGET_BYTE_ORDER_DEFAULT;
2850 int target_byte_order_auto = 1;
2852 /* Chain containing the \"set endian\" commands. */
2853 static struct cmd_list_element *endianlist = NULL;
2855 /* Called by ``show endian''. */
2856 static void show_endian PARAMS ((char *, int));
2858 show_endian (args, from_tty)
2863 (TARGET_BYTE_ORDER_AUTO
2864 ? "The target endianness is set automatically (currently %s endian)\n"
2865 : "The target is assumed to be %s endian\n");
2866 printf_unfiltered (msg, (TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little"));
2869 /* Called if the user enters ``set endian'' without an argument. */
2870 static void set_endian PARAMS ((char *, int));
2872 set_endian (args, from_tty)
2876 printf_unfiltered ("\"set endian\" must be followed by \"auto\", \"big\" or \"little\".\n");
2877 show_endian (args, from_tty);
2880 /* Called by ``set endian big''. */
2881 static void set_endian_big PARAMS ((char *, int));
2883 set_endian_big (args, from_tty)
2887 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2889 target_byte_order = BIG_ENDIAN;
2890 target_byte_order_auto = 0;
2893 struct gdbarch_info info;
2894 memset (&info, 0, sizeof info);
2895 info.byte_order = BIG_ENDIAN;
2896 gdbarch_update (info);
2901 printf_unfiltered ("Byte order is not selectable.");
2902 show_endian (args, from_tty);
2906 /* Called by ``set endian little''. */
2907 static void set_endian_little PARAMS ((char *, int));
2909 set_endian_little (args, from_tty)
2913 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2915 target_byte_order = LITTLE_ENDIAN;
2916 target_byte_order_auto = 0;
2919 struct gdbarch_info info;
2920 memset (&info, 0, sizeof info);
2921 info.byte_order = LITTLE_ENDIAN;
2922 gdbarch_update (info);
2927 printf_unfiltered ("Byte order is not selectable.");
2928 show_endian (args, from_tty);
2932 /* Called by ``set endian auto''. */
2933 static void set_endian_auto PARAMS ((char *, int));
2935 set_endian_auto (args, from_tty)
2939 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2941 target_byte_order_auto = 1;
2945 printf_unfiltered ("Byte order is not selectable.");
2946 show_endian (args, from_tty);
2950 /* Set the endianness from a BFD. */
2951 static void set_endian_from_file PARAMS ((bfd *));
2953 set_endian_from_file (abfd)
2956 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2960 if (bfd_big_endian (abfd))
2963 want = LITTLE_ENDIAN;
2964 if (TARGET_BYTE_ORDER_AUTO)
2965 target_byte_order = want;
2966 else if (TARGET_BYTE_ORDER != want)
2967 warning ("%s endian file does not match %s endian target.",
2968 want == BIG_ENDIAN ? "big" : "little",
2969 TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
2973 if (bfd_big_endian (abfd)
2974 ? TARGET_BYTE_ORDER != BIG_ENDIAN
2975 : TARGET_BYTE_ORDER == BIG_ENDIAN)
2976 warning ("%s endian file does not match %s endian target.",
2977 bfd_big_endian (abfd) ? "big" : "little",
2978 TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
2984 /* Functions to manipulate the architecture of the target */
2986 int target_architecture_auto = 1;
2987 extern const struct bfd_arch_info bfd_default_arch_struct;
2988 const struct bfd_arch_info *target_architecture = &bfd_default_arch_struct;
2989 int (*target_architecture_hook) PARAMS ((const struct bfd_arch_info *ap));
2991 /* Do the real work of changing the current architecture */
2993 static int arch_ok PARAMS ((const struct bfd_arch_info *arch));
2996 const struct bfd_arch_info *arch;
2998 /* Should be performing the more basic check that the binary is
2999 compatible with GDB. */
3000 /* Check with the target that the architecture is valid. */
3001 return (target_architecture_hook == NULL
3002 || target_architecture_hook (arch));
3005 enum set_arch { set_arch_auto, set_arch_manual };
3007 static void set_arch PARAMS ((const struct bfd_arch_info *arch, enum set_arch type));
3009 set_arch (arch, type)
3010 const struct bfd_arch_info *arch;
3016 if (!arch_ok (arch))
3017 warning ("Target may not support %s architecture",
3018 arch->printable_name);
3019 target_architecture = arch;
3021 case set_arch_manual:
3022 if (!arch_ok (arch))
3024 printf_unfiltered ("Target does not support `%s' architecture.\n",
3025 arch->printable_name);
3029 target_architecture_auto = 0;
3030 target_architecture = arch;
3038 /* Called if the user enters ``show architecture'' without an argument. */
3039 static void show_architecture PARAMS ((char *, int));
3041 show_architecture (args, from_tty)
3046 arch = TARGET_ARCHITECTURE->printable_name;
3047 if (target_architecture_auto)
3048 printf_filtered ("The target architecture is set automatically (currently %s)\n", arch);
3050 printf_filtered ("The target architecture is assumed to be %s\n", arch);
3053 /* Called if the user enters ``set architecture'' with or without an
3055 static void set_architecture PARAMS ((char *, int));
3057 set_architecture (args, from_tty)
3063 printf_unfiltered ("\"set architecture\" must be followed by \"auto\" or an architecture name.\n");
3065 else if (strcmp (args, "auto") == 0)
3067 target_architecture_auto = 1;
3069 else if (GDB_MULTI_ARCH)
3071 const struct bfd_arch_info *arch = bfd_scan_arch (args);
3073 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3076 struct gdbarch_info info;
3077 memset (&info, 0, sizeof info);
3078 info.bfd_arch_info = arch;
3079 if (gdbarch_update (info))
3080 target_architecture_auto = 0;
3082 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3087 const struct bfd_arch_info *arch = bfd_scan_arch (args);
3089 set_arch (arch, set_arch_manual);
3091 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3095 /* Called if the user enters ``info architecture'' without an argument. */
3096 static void info_architecture PARAMS ((char *, int));
3098 info_architecture (args, from_tty)
3102 enum bfd_architecture a;
3105 if (gdbarch_init_registrary != NULL)
3107 struct gdbarch_init_registration *rego;
3108 printf_filtered ("Available architectures are:\n");
3109 for (rego = gdbarch_init_registrary;
3113 const struct bfd_arch_info *ap;
3114 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3119 printf_filtered (" %s", ap->printable_name);
3123 printf_filtered ("\n");
3129 printf_filtered ("There are no available architectures.\n");
3133 printf_filtered ("Available architectures are:\n");
3134 for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
3136 const struct bfd_arch_info *ap = bfd_lookup_arch (a, 0);
3141 printf_filtered (" %s", ap->printable_name);
3145 printf_filtered ("\n");
3150 /* Set the architecture from arch/machine */
3152 set_architecture_from_arch_mach (arch, mach)
3153 enum bfd_architecture arch;
3156 const struct bfd_arch_info *wanted = bfd_lookup_arch (arch, mach);
3158 set_arch (wanted, set_arch_manual);
3160 fatal ("gdbarch: hardwired architecture/machine not reconized");
3163 /* Set the architecture from a BFD */
3164 static void set_architecture_from_file PARAMS ((bfd *));
3166 set_architecture_from_file (abfd)
3169 const struct bfd_arch_info *wanted = bfd_get_arch_info (abfd);
3170 if (target_architecture_auto)
3172 set_arch (wanted, set_arch_auto);
3174 else if (wanted != target_architecture)
3176 warning ("%s architecture file may be incompatible with %s target.",
3177 wanted->printable_name,
3178 target_architecture->printable_name);
3183 /* Misc helper functions for targets. */
3186 frame_num_args_unknown (fi)
3187 struct frame_info *fi;
3194 generic_register_convertible_not (num)
3202 /* Pointer to the target-dependent disassembly function. */
3203 int (*tm_print_insn) PARAMS ((bfd_vma, disassemble_info *));
3204 disassemble_info tm_print_insn_info;
3208 /* Set the dynamic target-system-dependant parameters (architecture,
3209 byte-order) using information found in the BFD */
3212 set_gdbarch_from_file (abfd)
3217 struct gdbarch_info info;
3218 memset (&info, 0, sizeof info);
3220 gdbarch_update (info);
3223 set_architecture_from_file (abfd);
3224 set_endian_from_file (abfd);
3228 #if defined (CALL_DUMMY)
3229 /* FIXME - this should go away */
3230 LONGEST call_dummy_words[] = CALL_DUMMY;
3231 int sizeof_call_dummy_words = sizeof (call_dummy_words);
3235 extern void _initialize_gdbarch PARAMS ((void));
3237 _initialize_gdbarch ()
3239 add_prefix_cmd ("endian", class_support, set_endian,
3240 "Set endianness of target.",
3241 &endianlist, "set endian ", 0, &setlist);
3242 add_cmd ("big", class_support, set_endian_big,
3243 "Set target as being big endian.", &endianlist);
3244 add_cmd ("little", class_support, set_endian_little,
3245 "Set target as being little endian.", &endianlist);
3246 add_cmd ("auto", class_support, set_endian_auto,
3247 "Select target endianness automatically.", &endianlist);
3248 add_cmd ("endian", class_support, show_endian,
3249 "Show endianness of target.", &showlist);
3251 add_cmd ("architecture", class_support, set_architecture,
3252 "Set architecture of target.", &setlist);
3253 add_alias_cmd ("processor", "architecture", class_support, 1, &setlist);
3254 add_cmd ("architecture", class_support, show_architecture,
3255 "Show architecture of target.", &showlist);
3256 add_cmd ("architecture", class_support, info_architecture,
3257 "List supported target architectures", &infolist);
3259 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
3260 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
3261 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
3262 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
3263 tm_print_insn_info.print_address_func = dis_asm_print_address;
3265 add_show_from_set (add_set_cmd ("archdebug",
3268 (char *)&gdbarch_debug,
3269 "Set architecture debugging.\n\
3270 When non-zero, architecture debugging is enabled.", &setlist),