revert 1.9. Not approved.
[deliverable/binutils-gdb.git] / gdb / gdbarch.c
1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
2
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998-1999, Free Software Foundation, Inc.
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
22
23 /* This file was created with the aid of ``gdbarch.sh''.
24
25 The bourn shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
28 being reported.
29
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when makeing sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
33 easier. */
34
35
36 #include "defs.h"
37 #include "arch-utils.h"
38
39 #if GDB_MULTI_ARCH
40 #include "gdbcmd.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
42 #else
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
46 #include <ctype.h>
47 #include "symtab.h"
48 #include "frame.h"
49 #include "inferior.h"
50 #include "breakpoint.h"
51 #include "gdb_wait.h"
52 #include "gdbcore.h"
53 #include "gdbcmd.h"
54 #include "target.h"
55 #include "gdbthread.h"
56 #include "annotate.h"
57 #include "symfile.h" /* for overlay functions */
58 #endif
59 #include "symcat.h"
60
61
62 /* Static function declarations */
63
64 static void verify_gdbarch (struct gdbarch *gdbarch);
65 static void init_gdbarch_data (struct gdbarch *);
66 static void init_gdbarch_swap (struct gdbarch *);
67 static void swapout_gdbarch_swap (struct gdbarch *);
68 static void swapin_gdbarch_swap (struct gdbarch *);
69
70 /* Convenience macro for allocting typesafe memory. */
71
72 #ifndef XMALLOC
73 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
74 #endif
75
76
77 /* Non-zero if we want to trace architecture code. */
78
79 #ifndef GDBARCH_DEBUG
80 #define GDBARCH_DEBUG 0
81 #endif
82 int gdbarch_debug = GDBARCH_DEBUG;
83
84
85 /* Maintain the struct gdbarch object */
86
87 struct gdbarch
88 {
89 /* basic architectural information */
90 const struct bfd_arch_info * bfd_arch_info;
91 int byte_order;
92
93 /* target specific vector. */
94 struct gdbarch_tdep *tdep;
95
96 /* per-architecture data-pointers */
97 int nr_data;
98 void **data;
99
100 /* per-architecture swap-regions */
101 struct gdbarch_swap *swap;
102
103 /* Multi-arch values.
104
105 When extending this structure you must:
106
107 Add the field below.
108
109 Declare set/get functions and define the corresponding
110 macro in gdbarch.h.
111
112 gdbarch_alloc(): If zero/NULL is not a suitable default,
113 initialize the new field.
114
115 verify_gdbarch(): Confirm that the target updated the field
116 correctly.
117
118 gdbarch_dump(): Add a fprintf_unfiltered call to so that the new
119 field is dumped out
120
121 ``startup_gdbarch()'': Append an initial value to the static
122 variable (base values on the host's c-type system).
123
124 get_gdbarch(): Implement the set/get functions (probably using
125 the macro's as shortcuts).
126
127 */
128
129 int bfd_vma_bit;
130 int ptr_bit;
131 int short_bit;
132 int int_bit;
133 int long_bit;
134 int long_long_bit;
135 int float_bit;
136 int double_bit;
137 int long_double_bit;
138 int ieee_float;
139 gdbarch_read_pc_ftype *read_pc;
140 gdbarch_write_pc_ftype *write_pc;
141 gdbarch_read_fp_ftype *read_fp;
142 gdbarch_write_fp_ftype *write_fp;
143 gdbarch_read_sp_ftype *read_sp;
144 gdbarch_write_sp_ftype *write_sp;
145 int num_regs;
146 int sp_regnum;
147 int fp_regnum;
148 int pc_regnum;
149 gdbarch_register_name_ftype *register_name;
150 int register_size;
151 int register_bytes;
152 gdbarch_register_byte_ftype *register_byte;
153 gdbarch_register_raw_size_ftype *register_raw_size;
154 int max_register_raw_size;
155 gdbarch_register_virtual_size_ftype *register_virtual_size;
156 int max_register_virtual_size;
157 gdbarch_register_virtual_type_ftype *register_virtual_type;
158 int use_generic_dummy_frames;
159 int call_dummy_location;
160 gdbarch_call_dummy_address_ftype *call_dummy_address;
161 CORE_ADDR call_dummy_start_offset;
162 CORE_ADDR call_dummy_breakpoint_offset;
163 int call_dummy_breakpoint_offset_p;
164 int call_dummy_length;
165 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
166 int call_dummy_p;
167 LONGEST * call_dummy_words;
168 int sizeof_call_dummy_words;
169 int call_dummy_stack_adjust_p;
170 int call_dummy_stack_adjust;
171 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
172 int believe_pcc_promotion;
173 int believe_pcc_promotion_type;
174 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
175 gdbarch_get_saved_register_ftype *get_saved_register;
176 gdbarch_register_convertible_ftype *register_convertible;
177 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
178 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
179 gdbarch_pointer_to_address_ftype *pointer_to_address;
180 gdbarch_address_to_pointer_ftype *address_to_pointer;
181 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
182 gdbarch_extract_return_value_ftype *extract_return_value;
183 gdbarch_push_arguments_ftype *push_arguments;
184 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
185 gdbarch_push_return_address_ftype *push_return_address;
186 gdbarch_pop_frame_ftype *pop_frame;
187 gdbarch_d10v_make_daddr_ftype *d10v_make_daddr;
188 gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr;
189 gdbarch_d10v_daddr_p_ftype *d10v_daddr_p;
190 gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p;
191 gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw;
192 gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw;
193 gdbarch_store_struct_return_ftype *store_struct_return;
194 gdbarch_store_return_value_ftype *store_return_value;
195 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
196 gdbarch_use_struct_convention_ftype *use_struct_convention;
197 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
198 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
199 gdbarch_skip_prologue_ftype *skip_prologue;
200 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
201 gdbarch_inner_than_ftype *inner_than;
202 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
203 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
204 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
205 CORE_ADDR decr_pc_after_break;
206 CORE_ADDR function_start_offset;
207 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
208 CORE_ADDR frame_args_skip;
209 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
210 gdbarch_frame_chain_ftype *frame_chain;
211 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
212 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
213 gdbarch_frame_args_address_ftype *frame_args_address;
214 gdbarch_frame_locals_address_ftype *frame_locals_address;
215 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
216 gdbarch_frame_num_args_ftype *frame_num_args;
217 gdbarch_stack_align_ftype *stack_align;
218 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
219 };
220
221
222 /* The default architecture uses host values (for want of a better
223 choice). */
224
225 extern const struct bfd_arch_info bfd_default_arch_struct;
226
227 struct gdbarch startup_gdbarch = {
228 /* basic architecture information */
229 &bfd_default_arch_struct,
230 BIG_ENDIAN,
231 /* target specific vector */
232 NULL,
233 /*per-architecture data-pointers and swap regions */
234 0, NULL, NULL,
235 /* Multi-arch values */
236 8 * sizeof (void*),
237 8 * sizeof (void*),
238 8 * sizeof (short),
239 8 * sizeof (int),
240 8 * sizeof (long),
241 8 * sizeof (LONGEST),
242 8 * sizeof (float),
243 8 * sizeof (double),
244 8 * sizeof (long double),
245 0,
246 0,
247 0,
248 0,
249 0,
250 0,
251 0,
252 0,
253 0,
254 0,
255 0,
256 0,
257 0,
258 0,
259 0,
260 0,
261 0,
262 0,
263 0,
264 0,
265 0,
266 0,
267 0,
268 0,
269 0,
270 0,
271 0,
272 0,
273 0,
274 0,
275 0,
276 0,
277 0,
278 0,
279 0,
280 0,
281 0,
282 generic_get_saved_register,
283 0,
284 0,
285 0,
286 0,
287 0,
288 0,
289 0,
290 0,
291 0,
292 0,
293 0,
294 0,
295 0,
296 0,
297 0,
298 0,
299 0,
300 0,
301 0,
302 0,
303 0,
304 0,
305 0,
306 0,
307 0,
308 0,
309 0,
310 0,
311 0,
312 0,
313 0,
314 0,
315 0,
316 0,
317 0,
318 0,
319 0,
320 0,
321 0,
322 0,
323 0,
324 0,
325 0,
326 /* startup_gdbarch() */
327 };
328 struct gdbarch *current_gdbarch = &startup_gdbarch;
329
330
331 /* Create a new ``struct gdbarch'' based in information provided by
332 ``struct gdbarch_info''. */
333
334 struct gdbarch *
335 gdbarch_alloc (const struct gdbarch_info *info,
336 struct gdbarch_tdep *tdep)
337 {
338 struct gdbarch *gdbarch = XMALLOC (struct gdbarch);
339 memset (gdbarch, 0, sizeof (*gdbarch));
340
341 gdbarch->tdep = tdep;
342
343 gdbarch->bfd_arch_info = info->bfd_arch_info;
344 gdbarch->byte_order = info->byte_order;
345
346 /* Force the explicit initialization of these. */
347 gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
348 gdbarch->num_regs = -1;
349 gdbarch->sp_regnum = -1;
350 gdbarch->fp_regnum = -1;
351 gdbarch->pc_regnum = -1;
352 gdbarch->register_name = legacy_register_name;
353 gdbarch->register_size = -1;
354 gdbarch->register_bytes = -1;
355 gdbarch->max_register_raw_size = -1;
356 gdbarch->max_register_virtual_size = -1;
357 gdbarch->use_generic_dummy_frames = -1;
358 gdbarch->call_dummy_start_offset = -1;
359 gdbarch->call_dummy_breakpoint_offset = -1;
360 gdbarch->call_dummy_breakpoint_offset_p = -1;
361 gdbarch->call_dummy_length = -1;
362 gdbarch->call_dummy_p = -1;
363 gdbarch->call_dummy_words = legacy_call_dummy_words;
364 gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
365 gdbarch->call_dummy_stack_adjust_p = -1;
366 gdbarch->coerce_float_to_double = default_coerce_float_to_double;
367 gdbarch->register_convertible = generic_register_convertible_not;
368 gdbarch->pointer_to_address = generic_pointer_to_address;
369 gdbarch->address_to_pointer = generic_address_to_pointer;
370 gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
371 gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
372 gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
373 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
374 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
375 gdbarch->decr_pc_after_break = -1;
376 gdbarch->function_start_offset = -1;
377 gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
378 gdbarch->frame_args_skip = -1;
379 gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
380 /* gdbarch_alloc() */
381
382 return gdbarch;
383 }
384
385
386 /* Free a gdbarch struct. This should never happen in normal
387 operation --- once you've created a gdbarch, you keep it around.
388 However, if an architecture's init function encounters an error
389 building the structure, it may need to clean up a partially
390 constructed gdbarch. */
391 void
392 gdbarch_free (struct gdbarch *arch)
393 {
394 /* At the moment, this is trivial. */
395 free (arch);
396 }
397
398
399 /* Ensure that all values in a GDBARCH are reasonable. */
400
401 static void
402 verify_gdbarch (struct gdbarch *gdbarch)
403 {
404 /* Only perform sanity checks on a multi-arch target. */
405 if (GDB_MULTI_ARCH <= 0)
406 return;
407 /* fundamental */
408 if (gdbarch->byte_order == 0)
409 internal_error ("verify_gdbarch: byte-order unset");
410 if (gdbarch->bfd_arch_info == NULL)
411 internal_error ("verify_gdbarch: bfd_arch_info unset");
412 /* Check those that need to be defined for the given multi-arch level. */
413 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
414 if ((GDB_MULTI_ARCH >= 1)
415 && (gdbarch->ptr_bit == 0))
416 internal_error ("gdbarch: verify_gdbarch: ptr_bit invalid");
417 if ((GDB_MULTI_ARCH >= 1)
418 && (gdbarch->short_bit == 0))
419 internal_error ("gdbarch: verify_gdbarch: short_bit invalid");
420 if ((GDB_MULTI_ARCH >= 1)
421 && (gdbarch->int_bit == 0))
422 internal_error ("gdbarch: verify_gdbarch: int_bit invalid");
423 if ((GDB_MULTI_ARCH >= 1)
424 && (gdbarch->long_bit == 0))
425 internal_error ("gdbarch: verify_gdbarch: long_bit invalid");
426 if ((GDB_MULTI_ARCH >= 1)
427 && (gdbarch->long_long_bit == 0))
428 internal_error ("gdbarch: verify_gdbarch: long_long_bit invalid");
429 if ((GDB_MULTI_ARCH >= 1)
430 && (gdbarch->float_bit == 0))
431 internal_error ("gdbarch: verify_gdbarch: float_bit invalid");
432 if ((GDB_MULTI_ARCH >= 1)
433 && (gdbarch->double_bit == 0))
434 internal_error ("gdbarch: verify_gdbarch: double_bit invalid");
435 if ((GDB_MULTI_ARCH >= 1)
436 && (gdbarch->long_double_bit == 0))
437 internal_error ("gdbarch: verify_gdbarch: long_double_bit invalid");
438 /* Skip verify of ieee_float, invalid_p == 0 */
439 if ((GDB_MULTI_ARCH >= 1)
440 && (gdbarch->read_pc == 0))
441 internal_error ("gdbarch: verify_gdbarch: read_pc invalid");
442 if ((GDB_MULTI_ARCH >= 1)
443 && (gdbarch->write_pc == 0))
444 internal_error ("gdbarch: verify_gdbarch: write_pc invalid");
445 if ((GDB_MULTI_ARCH >= 1)
446 && (gdbarch->read_fp == 0))
447 internal_error ("gdbarch: verify_gdbarch: read_fp invalid");
448 if ((GDB_MULTI_ARCH >= 1)
449 && (gdbarch->write_fp == 0))
450 internal_error ("gdbarch: verify_gdbarch: write_fp invalid");
451 if ((GDB_MULTI_ARCH >= 1)
452 && (gdbarch->read_sp == 0))
453 internal_error ("gdbarch: verify_gdbarch: read_sp invalid");
454 if ((GDB_MULTI_ARCH >= 1)
455 && (gdbarch->write_sp == 0))
456 internal_error ("gdbarch: verify_gdbarch: write_sp invalid");
457 if ((GDB_MULTI_ARCH >= 2)
458 && (gdbarch->num_regs == -1))
459 internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
460 if ((GDB_MULTI_ARCH >= 2)
461 && (gdbarch->sp_regnum == -1))
462 internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
463 if ((GDB_MULTI_ARCH >= 2)
464 && (gdbarch->fp_regnum == -1))
465 internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
466 if ((GDB_MULTI_ARCH >= 2)
467 && (gdbarch->pc_regnum == -1))
468 internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
469 /* Skip verify of register_name, invalid_p == 0 */
470 if ((GDB_MULTI_ARCH >= 2)
471 && (gdbarch->register_size == -1))
472 internal_error ("gdbarch: verify_gdbarch: register_size invalid");
473 if ((GDB_MULTI_ARCH >= 2)
474 && (gdbarch->register_bytes == -1))
475 internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
476 if ((GDB_MULTI_ARCH >= 2)
477 && (gdbarch->register_byte == 0))
478 internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
479 if ((GDB_MULTI_ARCH >= 2)
480 && (gdbarch->register_raw_size == 0))
481 internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
482 if ((GDB_MULTI_ARCH >= 2)
483 && (gdbarch->max_register_raw_size == -1))
484 internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
485 if ((GDB_MULTI_ARCH >= 2)
486 && (gdbarch->register_virtual_size == 0))
487 internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
488 if ((GDB_MULTI_ARCH >= 2)
489 && (gdbarch->max_register_virtual_size == -1))
490 internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
491 if ((GDB_MULTI_ARCH >= 2)
492 && (gdbarch->register_virtual_type == 0))
493 internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
494 if ((GDB_MULTI_ARCH >= 1)
495 && (gdbarch->use_generic_dummy_frames == -1))
496 internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
497 if ((GDB_MULTI_ARCH >= 2)
498 && (gdbarch->call_dummy_location == 0))
499 internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
500 if ((GDB_MULTI_ARCH >= 2)
501 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
502 internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
503 if ((GDB_MULTI_ARCH >= 2)
504 && (gdbarch->call_dummy_start_offset == -1))
505 internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
506 if ((GDB_MULTI_ARCH >= 2)
507 && (gdbarch->call_dummy_breakpoint_offset == -1))
508 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
509 if ((GDB_MULTI_ARCH >= 1)
510 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
511 internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
512 if ((GDB_MULTI_ARCH >= 2)
513 && (gdbarch->call_dummy_length == -1))
514 internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
515 if ((GDB_MULTI_ARCH >= 2)
516 && (gdbarch->pc_in_call_dummy == 0))
517 internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
518 if ((GDB_MULTI_ARCH >= 1)
519 && (gdbarch->call_dummy_p == -1))
520 internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
521 /* Skip verify of call_dummy_words, invalid_p == 0 */
522 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
523 if ((GDB_MULTI_ARCH >= 1)
524 && (gdbarch->call_dummy_stack_adjust_p == -1))
525 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
526 if ((GDB_MULTI_ARCH >= 2)
527 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
528 internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
529 if ((GDB_MULTI_ARCH >= 2)
530 && (gdbarch->fix_call_dummy == 0))
531 internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
532 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
533 if ((GDB_MULTI_ARCH >= 1)
534 && (gdbarch->get_saved_register == 0))
535 internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
536 /* Skip verify of register_convertible, invalid_p == 0 */
537 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
538 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
539 /* Skip verify of pointer_to_address, invalid_p == 0 */
540 /* Skip verify of address_to_pointer, invalid_p == 0 */
541 /* Skip verify of return_value_on_stack, invalid_p == 0 */
542 if ((GDB_MULTI_ARCH >= 2)
543 && (gdbarch->extract_return_value == 0))
544 internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
545 if ((GDB_MULTI_ARCH >= 1)
546 && (gdbarch->push_arguments == 0))
547 internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
548 if ((GDB_MULTI_ARCH >= 2)
549 && (gdbarch->push_dummy_frame == 0))
550 internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
551 if ((GDB_MULTI_ARCH >= 1)
552 && (gdbarch->push_return_address == 0))
553 internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
554 if ((GDB_MULTI_ARCH >= 2)
555 && (gdbarch->pop_frame == 0))
556 internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
557 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
558 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
559 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
560 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
561 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
562 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
563 if ((GDB_MULTI_ARCH >= 2)
564 && (gdbarch->store_struct_return == 0))
565 internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
566 if ((GDB_MULTI_ARCH >= 2)
567 && (gdbarch->store_return_value == 0))
568 internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
569 if ((GDB_MULTI_ARCH >= 2)
570 && (gdbarch->extract_struct_value_address == 0))
571 internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
572 if ((GDB_MULTI_ARCH >= 2)
573 && (gdbarch->use_struct_convention == 0))
574 internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
575 if ((GDB_MULTI_ARCH >= 2)
576 && (gdbarch->frame_init_saved_regs == 0))
577 internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
578 if ((GDB_MULTI_ARCH >= 2)
579 && (gdbarch->init_extra_frame_info == 0))
580 internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
581 if ((GDB_MULTI_ARCH >= 2)
582 && (gdbarch->skip_prologue == 0))
583 internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
584 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
585 if ((GDB_MULTI_ARCH >= 2)
586 && (gdbarch->inner_than == 0))
587 internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
588 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
589 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
590 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
591 if ((GDB_MULTI_ARCH >= 2)
592 && (gdbarch->decr_pc_after_break == -1))
593 internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
594 if ((GDB_MULTI_ARCH >= 2)
595 && (gdbarch->function_start_offset == -1))
596 internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
597 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
598 if ((GDB_MULTI_ARCH >= 2)
599 && (gdbarch->frame_args_skip == -1))
600 internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
601 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
602 if ((GDB_MULTI_ARCH >= 2)
603 && (gdbarch->frame_chain == 0))
604 internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
605 if ((GDB_MULTI_ARCH >= 1)
606 && (gdbarch->frame_chain_valid == 0))
607 internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
608 if ((GDB_MULTI_ARCH >= 2)
609 && (gdbarch->frame_saved_pc == 0))
610 internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
611 if ((GDB_MULTI_ARCH >= 2)
612 && (gdbarch->frame_args_address == 0))
613 internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
614 if ((GDB_MULTI_ARCH >= 2)
615 && (gdbarch->frame_locals_address == 0))
616 internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
617 if ((GDB_MULTI_ARCH >= 2)
618 && (gdbarch->saved_pc_after_call == 0))
619 internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
620 if ((GDB_MULTI_ARCH >= 2)
621 && (gdbarch->frame_num_args == 0))
622 internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
623 /* Skip verify of stack_align, has predicate */
624 /* Skip verify of reg_struct_has_addr, has predicate */
625 }
626
627
628 /* Print out the details of the current architecture. */
629
630 void
631 gdbarch_dump (void)
632 {
633 if (TARGET_ARCHITECTURE != NULL)
634 fprintf_unfiltered (gdb_stdlog,
635 "gdbarch_update: TARGET_ARCHITECTURE = %s\n",
636 TARGET_ARCHITECTURE->printable_name);
637 fprintf_unfiltered (gdb_stdlog,
638 "gdbarch_update: TARGET_BYTE_ORDER = %ld\n",
639 (long) TARGET_BYTE_ORDER);
640 fprintf_unfiltered (gdb_stdlog,
641 "gdbarch_update: TARGET_BFD_VMA_BIT = %ld\n",
642 (long) TARGET_BFD_VMA_BIT);
643 fprintf_unfiltered (gdb_stdlog,
644 "gdbarch_update: TARGET_PTR_BIT = %ld\n",
645 (long) TARGET_PTR_BIT);
646 fprintf_unfiltered (gdb_stdlog,
647 "gdbarch_update: TARGET_SHORT_BIT = %ld\n",
648 (long) TARGET_SHORT_BIT);
649 fprintf_unfiltered (gdb_stdlog,
650 "gdbarch_update: TARGET_INT_BIT = %ld\n",
651 (long) TARGET_INT_BIT);
652 fprintf_unfiltered (gdb_stdlog,
653 "gdbarch_update: TARGET_LONG_BIT = %ld\n",
654 (long) TARGET_LONG_BIT);
655 fprintf_unfiltered (gdb_stdlog,
656 "gdbarch_update: TARGET_LONG_LONG_BIT = %ld\n",
657 (long) TARGET_LONG_LONG_BIT);
658 fprintf_unfiltered (gdb_stdlog,
659 "gdbarch_update: TARGET_FLOAT_BIT = %ld\n",
660 (long) TARGET_FLOAT_BIT);
661 fprintf_unfiltered (gdb_stdlog,
662 "gdbarch_update: TARGET_DOUBLE_BIT = %ld\n",
663 (long) TARGET_DOUBLE_BIT);
664 fprintf_unfiltered (gdb_stdlog,
665 "gdbarch_update: TARGET_LONG_DOUBLE_BIT = %ld\n",
666 (long) TARGET_LONG_DOUBLE_BIT);
667 fprintf_unfiltered (gdb_stdlog,
668 "gdbarch_update: IEEE_FLOAT = %ld\n",
669 (long) IEEE_FLOAT);
670 fprintf_unfiltered (gdb_stdlog,
671 "gdbarch_update: TARGET_READ_PC = 0x%08lx\n",
672 (long) current_gdbarch->read_pc
673 /*TARGET_READ_PC ()*/);
674 fprintf_unfiltered (gdb_stdlog,
675 "gdbarch_update: TARGET_WRITE_PC = 0x%08lx\n",
676 (long) current_gdbarch->write_pc
677 /*TARGET_WRITE_PC ()*/);
678 fprintf_unfiltered (gdb_stdlog,
679 "gdbarch_update: TARGET_READ_FP = 0x%08lx\n",
680 (long) current_gdbarch->read_fp
681 /*TARGET_READ_FP ()*/);
682 fprintf_unfiltered (gdb_stdlog,
683 "gdbarch_update: TARGET_WRITE_FP = 0x%08lx\n",
684 (long) current_gdbarch->write_fp
685 /*TARGET_WRITE_FP ()*/);
686 fprintf_unfiltered (gdb_stdlog,
687 "gdbarch_update: TARGET_READ_SP = 0x%08lx\n",
688 (long) current_gdbarch->read_sp
689 /*TARGET_READ_SP ()*/);
690 fprintf_unfiltered (gdb_stdlog,
691 "gdbarch_update: TARGET_WRITE_SP = 0x%08lx\n",
692 (long) current_gdbarch->write_sp
693 /*TARGET_WRITE_SP ()*/);
694 fprintf_unfiltered (gdb_stdlog,
695 "gdbarch_update: NUM_REGS = %ld\n",
696 (long) NUM_REGS);
697 fprintf_unfiltered (gdb_stdlog,
698 "gdbarch_update: SP_REGNUM = %ld\n",
699 (long) SP_REGNUM);
700 fprintf_unfiltered (gdb_stdlog,
701 "gdbarch_update: FP_REGNUM = %ld\n",
702 (long) FP_REGNUM);
703 fprintf_unfiltered (gdb_stdlog,
704 "gdbarch_update: PC_REGNUM = %ld\n",
705 (long) PC_REGNUM);
706 fprintf_unfiltered (gdb_stdlog,
707 "gdbarch_update: REGISTER_NAME = 0x%08lx\n",
708 (long) current_gdbarch->register_name
709 /*REGISTER_NAME ()*/);
710 fprintf_unfiltered (gdb_stdlog,
711 "gdbarch_update: REGISTER_SIZE = %ld\n",
712 (long) REGISTER_SIZE);
713 fprintf_unfiltered (gdb_stdlog,
714 "gdbarch_update: REGISTER_BYTES = %ld\n",
715 (long) REGISTER_BYTES);
716 fprintf_unfiltered (gdb_stdlog,
717 "gdbarch_update: REGISTER_BYTE = 0x%08lx\n",
718 (long) current_gdbarch->register_byte
719 /*REGISTER_BYTE ()*/);
720 fprintf_unfiltered (gdb_stdlog,
721 "gdbarch_update: REGISTER_RAW_SIZE = 0x%08lx\n",
722 (long) current_gdbarch->register_raw_size
723 /*REGISTER_RAW_SIZE ()*/);
724 fprintf_unfiltered (gdb_stdlog,
725 "gdbarch_update: MAX_REGISTER_RAW_SIZE = %ld\n",
726 (long) MAX_REGISTER_RAW_SIZE);
727 fprintf_unfiltered (gdb_stdlog,
728 "gdbarch_update: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
729 (long) current_gdbarch->register_virtual_size
730 /*REGISTER_VIRTUAL_SIZE ()*/);
731 fprintf_unfiltered (gdb_stdlog,
732 "gdbarch_update: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
733 (long) MAX_REGISTER_VIRTUAL_SIZE);
734 fprintf_unfiltered (gdb_stdlog,
735 "gdbarch_update: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
736 (long) current_gdbarch->register_virtual_type
737 /*REGISTER_VIRTUAL_TYPE ()*/);
738 fprintf_unfiltered (gdb_stdlog,
739 "gdbarch_update: USE_GENERIC_DUMMY_FRAMES = %ld\n",
740 (long) USE_GENERIC_DUMMY_FRAMES);
741 fprintf_unfiltered (gdb_stdlog,
742 "gdbarch_update: CALL_DUMMY_LOCATION = %ld\n",
743 (long) CALL_DUMMY_LOCATION);
744 fprintf_unfiltered (gdb_stdlog,
745 "gdbarch_update: CALL_DUMMY_ADDRESS = 0x%08lx\n",
746 (long) current_gdbarch->call_dummy_address
747 /*CALL_DUMMY_ADDRESS ()*/);
748 fprintf_unfiltered (gdb_stdlog,
749 "gdbarch_update: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
750 (long) CALL_DUMMY_START_OFFSET);
751 fprintf_unfiltered (gdb_stdlog,
752 "gdbarch_update: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
753 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
754 fprintf_unfiltered (gdb_stdlog,
755 "gdbarch_update: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
756 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
757 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
758 fprintf_unfiltered (gdb_stdlog,
759 "gdbarch_update: CALL_DUMMY_LENGTH = %ld\n",
760 (long) CALL_DUMMY_LENGTH);
761 fprintf_unfiltered (gdb_stdlog,
762 "gdbarch_update: PC_IN_CALL_DUMMY = 0x%08lx\n",
763 (long) current_gdbarch->pc_in_call_dummy
764 /*PC_IN_CALL_DUMMY ()*/);
765 fprintf_unfiltered (gdb_stdlog,
766 "gdbarch_update: CALL_DUMMY_P = %ld\n",
767 (long) CALL_DUMMY_P);
768 fprintf_unfiltered (gdb_stdlog,
769 "gdbarch_update: CALL_DUMMY_WORDS = 0x%08lx\n",
770 (long) CALL_DUMMY_WORDS);
771 fprintf_unfiltered (gdb_stdlog,
772 "gdbarch_update: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
773 (long) SIZEOF_CALL_DUMMY_WORDS);
774 fprintf_unfiltered (gdb_stdlog,
775 "gdbarch_update: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
776 (long) CALL_DUMMY_STACK_ADJUST_P);
777 if (CALL_DUMMY_STACK_ADJUST_P)
778 fprintf_unfiltered (gdb_stdlog,
779 "gdbarch_update: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
780 (long) CALL_DUMMY_STACK_ADJUST);
781 fprintf_unfiltered (gdb_stdlog,
782 "gdbarch_update: FIX_CALL_DUMMY = 0x%08lx\n",
783 (long) current_gdbarch->fix_call_dummy
784 /*FIX_CALL_DUMMY ()*/);
785 #ifdef BELIEVE_PCC_PROMOTION
786 fprintf_unfiltered (gdb_stdlog,
787 "gdbarch_update: BELIEVE_PCC_PROMOTION = %ld\n",
788 (long) BELIEVE_PCC_PROMOTION);
789 #endif
790 #ifdef BELIEVE_PCC_PROMOTION_TYPE
791 fprintf_unfiltered (gdb_stdlog,
792 "gdbarch_update: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
793 (long) BELIEVE_PCC_PROMOTION_TYPE);
794 #endif
795 fprintf_unfiltered (gdb_stdlog,
796 "gdbarch_update: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
797 (long) current_gdbarch->coerce_float_to_double
798 /*COERCE_FLOAT_TO_DOUBLE ()*/);
799 fprintf_unfiltered (gdb_stdlog,
800 "gdbarch_update: GET_SAVED_REGISTER = 0x%08lx\n",
801 (long) current_gdbarch->get_saved_register
802 /*GET_SAVED_REGISTER ()*/);
803 fprintf_unfiltered (gdb_stdlog,
804 "gdbarch_update: REGISTER_CONVERTIBLE = 0x%08lx\n",
805 (long) current_gdbarch->register_convertible
806 /*REGISTER_CONVERTIBLE ()*/);
807 fprintf_unfiltered (gdb_stdlog,
808 "gdbarch_update: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
809 (long) current_gdbarch->register_convert_to_virtual
810 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
811 fprintf_unfiltered (gdb_stdlog,
812 "gdbarch_update: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
813 (long) current_gdbarch->register_convert_to_raw
814 /*REGISTER_CONVERT_TO_RAW ()*/);
815 fprintf_unfiltered (gdb_stdlog,
816 "gdbarch_update: POINTER_TO_ADDRESS = 0x%08lx\n",
817 (long) current_gdbarch->pointer_to_address
818 /*POINTER_TO_ADDRESS ()*/);
819 fprintf_unfiltered (gdb_stdlog,
820 "gdbarch_update: ADDRESS_TO_POINTER = 0x%08lx\n",
821 (long) current_gdbarch->address_to_pointer
822 /*ADDRESS_TO_POINTER ()*/);
823 fprintf_unfiltered (gdb_stdlog,
824 "gdbarch_update: RETURN_VALUE_ON_STACK = 0x%08lx\n",
825 (long) current_gdbarch->return_value_on_stack
826 /*RETURN_VALUE_ON_STACK ()*/);
827 fprintf_unfiltered (gdb_stdlog,
828 "gdbarch_update: EXTRACT_RETURN_VALUE = 0x%08lx\n",
829 (long) current_gdbarch->extract_return_value
830 /*EXTRACT_RETURN_VALUE ()*/);
831 fprintf_unfiltered (gdb_stdlog,
832 "gdbarch_update: PUSH_ARGUMENTS = 0x%08lx\n",
833 (long) current_gdbarch->push_arguments
834 /*PUSH_ARGUMENTS ()*/);
835 fprintf_unfiltered (gdb_stdlog,
836 "gdbarch_update: PUSH_DUMMY_FRAME = 0x%08lx\n",
837 (long) current_gdbarch->push_dummy_frame
838 /*PUSH_DUMMY_FRAME ()*/);
839 fprintf_unfiltered (gdb_stdlog,
840 "gdbarch_update: PUSH_RETURN_ADDRESS = 0x%08lx\n",
841 (long) current_gdbarch->push_return_address
842 /*PUSH_RETURN_ADDRESS ()*/);
843 fprintf_unfiltered (gdb_stdlog,
844 "gdbarch_update: POP_FRAME = 0x%08lx\n",
845 (long) current_gdbarch->pop_frame
846 /*POP_FRAME ()*/);
847 fprintf_unfiltered (gdb_stdlog,
848 "gdbarch_update: D10V_MAKE_DADDR = 0x%08lx\n",
849 (long) current_gdbarch->d10v_make_daddr
850 /*D10V_MAKE_DADDR ()*/);
851 fprintf_unfiltered (gdb_stdlog,
852 "gdbarch_update: D10V_MAKE_IADDR = 0x%08lx\n",
853 (long) current_gdbarch->d10v_make_iaddr
854 /*D10V_MAKE_IADDR ()*/);
855 fprintf_unfiltered (gdb_stdlog,
856 "gdbarch_update: D10V_DADDR_P = 0x%08lx\n",
857 (long) current_gdbarch->d10v_daddr_p
858 /*D10V_DADDR_P ()*/);
859 fprintf_unfiltered (gdb_stdlog,
860 "gdbarch_update: D10V_IADDR_P = 0x%08lx\n",
861 (long) current_gdbarch->d10v_iaddr_p
862 /*D10V_IADDR_P ()*/);
863 fprintf_unfiltered (gdb_stdlog,
864 "gdbarch_update: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
865 (long) current_gdbarch->d10v_convert_daddr_to_raw
866 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
867 fprintf_unfiltered (gdb_stdlog,
868 "gdbarch_update: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
869 (long) current_gdbarch->d10v_convert_iaddr_to_raw
870 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
871 fprintf_unfiltered (gdb_stdlog,
872 "gdbarch_update: STORE_STRUCT_RETURN = 0x%08lx\n",
873 (long) current_gdbarch->store_struct_return
874 /*STORE_STRUCT_RETURN ()*/);
875 fprintf_unfiltered (gdb_stdlog,
876 "gdbarch_update: STORE_RETURN_VALUE = 0x%08lx\n",
877 (long) current_gdbarch->store_return_value
878 /*STORE_RETURN_VALUE ()*/);
879 fprintf_unfiltered (gdb_stdlog,
880 "gdbarch_update: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
881 (long) current_gdbarch->extract_struct_value_address
882 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
883 fprintf_unfiltered (gdb_stdlog,
884 "gdbarch_update: USE_STRUCT_CONVENTION = 0x%08lx\n",
885 (long) current_gdbarch->use_struct_convention
886 /*USE_STRUCT_CONVENTION ()*/);
887 fprintf_unfiltered (gdb_stdlog,
888 "gdbarch_update: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
889 (long) current_gdbarch->frame_init_saved_regs
890 /*FRAME_INIT_SAVED_REGS ()*/);
891 fprintf_unfiltered (gdb_stdlog,
892 "gdbarch_update: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
893 (long) current_gdbarch->init_extra_frame_info
894 /*INIT_EXTRA_FRAME_INFO ()*/);
895 fprintf_unfiltered (gdb_stdlog,
896 "gdbarch_update: SKIP_PROLOGUE = 0x%08lx\n",
897 (long) current_gdbarch->skip_prologue
898 /*SKIP_PROLOGUE ()*/);
899 fprintf_unfiltered (gdb_stdlog,
900 "gdbarch_update: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
901 (long) current_gdbarch->prologue_frameless_p
902 /*PROLOGUE_FRAMELESS_P ()*/);
903 fprintf_unfiltered (gdb_stdlog,
904 "gdbarch_update: INNER_THAN = 0x%08lx\n",
905 (long) current_gdbarch->inner_than
906 /*INNER_THAN ()*/);
907 fprintf_unfiltered (gdb_stdlog,
908 "gdbarch_update: BREAKPOINT_FROM_PC = 0x%08lx\n",
909 (long) current_gdbarch->breakpoint_from_pc
910 /*BREAKPOINT_FROM_PC ()*/);
911 fprintf_unfiltered (gdb_stdlog,
912 "gdbarch_update: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
913 (long) current_gdbarch->memory_insert_breakpoint
914 /*MEMORY_INSERT_BREAKPOINT ()*/);
915 fprintf_unfiltered (gdb_stdlog,
916 "gdbarch_update: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
917 (long) current_gdbarch->memory_remove_breakpoint
918 /*MEMORY_REMOVE_BREAKPOINT ()*/);
919 fprintf_unfiltered (gdb_stdlog,
920 "gdbarch_update: DECR_PC_AFTER_BREAK = %ld\n",
921 (long) DECR_PC_AFTER_BREAK);
922 fprintf_unfiltered (gdb_stdlog,
923 "gdbarch_update: FUNCTION_START_OFFSET = %ld\n",
924 (long) FUNCTION_START_OFFSET);
925 fprintf_unfiltered (gdb_stdlog,
926 "gdbarch_update: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
927 (long) current_gdbarch->remote_translate_xfer_address
928 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
929 fprintf_unfiltered (gdb_stdlog,
930 "gdbarch_update: FRAME_ARGS_SKIP = %ld\n",
931 (long) FRAME_ARGS_SKIP);
932 fprintf_unfiltered (gdb_stdlog,
933 "gdbarch_update: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
934 (long) current_gdbarch->frameless_function_invocation
935 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
936 fprintf_unfiltered (gdb_stdlog,
937 "gdbarch_update: FRAME_CHAIN = 0x%08lx\n",
938 (long) current_gdbarch->frame_chain
939 /*FRAME_CHAIN ()*/);
940 fprintf_unfiltered (gdb_stdlog,
941 "gdbarch_update: FRAME_CHAIN_VALID = 0x%08lx\n",
942 (long) current_gdbarch->frame_chain_valid
943 /*FRAME_CHAIN_VALID ()*/);
944 fprintf_unfiltered (gdb_stdlog,
945 "gdbarch_update: FRAME_SAVED_PC = 0x%08lx\n",
946 (long) current_gdbarch->frame_saved_pc
947 /*FRAME_SAVED_PC ()*/);
948 fprintf_unfiltered (gdb_stdlog,
949 "gdbarch_update: FRAME_ARGS_ADDRESS = 0x%08lx\n",
950 (long) current_gdbarch->frame_args_address
951 /*FRAME_ARGS_ADDRESS ()*/);
952 fprintf_unfiltered (gdb_stdlog,
953 "gdbarch_update: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
954 (long) current_gdbarch->frame_locals_address
955 /*FRAME_LOCALS_ADDRESS ()*/);
956 fprintf_unfiltered (gdb_stdlog,
957 "gdbarch_update: SAVED_PC_AFTER_CALL = 0x%08lx\n",
958 (long) current_gdbarch->saved_pc_after_call
959 /*SAVED_PC_AFTER_CALL ()*/);
960 fprintf_unfiltered (gdb_stdlog,
961 "gdbarch_update: FRAME_NUM_ARGS = 0x%08lx\n",
962 (long) current_gdbarch->frame_num_args
963 /*FRAME_NUM_ARGS ()*/);
964 fprintf_unfiltered (gdb_stdlog,
965 "gdbarch_update: STACK_ALIGN = 0x%08lx\n",
966 (long) current_gdbarch->stack_align
967 /*STACK_ALIGN ()*/);
968 fprintf_unfiltered (gdb_stdlog,
969 "gdbarch_update: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
970 (long) current_gdbarch->reg_struct_has_addr
971 /*REG_STRUCT_HAS_ADDR ()*/);
972 }
973
974 struct gdbarch_tdep *
975 gdbarch_tdep (struct gdbarch *gdbarch)
976 {
977 if (gdbarch_debug >= 2)
978 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
979 return gdbarch->tdep;
980 }
981
982
983 const struct bfd_arch_info *
984 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
985 {
986 if (gdbarch_debug >= 2)
987 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
988 return gdbarch->bfd_arch_info;
989 }
990
991 int
992 gdbarch_byte_order (struct gdbarch *gdbarch)
993 {
994 if (gdbarch_debug >= 2)
995 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
996 return gdbarch->byte_order;
997 }
998
999 int
1000 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
1001 {
1002 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
1003 if (gdbarch_debug >= 2)
1004 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
1005 return gdbarch->bfd_vma_bit;
1006 }
1007
1008 void
1009 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
1010 int bfd_vma_bit)
1011 {
1012 gdbarch->bfd_vma_bit = bfd_vma_bit;
1013 }
1014
1015 int
1016 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1017 {
1018 if (gdbarch->ptr_bit == 0)
1019 internal_error ("gdbarch: gdbarch_ptr_bit invalid");
1020 if (gdbarch_debug >= 2)
1021 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1022 return gdbarch->ptr_bit;
1023 }
1024
1025 void
1026 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1027 int ptr_bit)
1028 {
1029 gdbarch->ptr_bit = ptr_bit;
1030 }
1031
1032 int
1033 gdbarch_short_bit (struct gdbarch *gdbarch)
1034 {
1035 if (gdbarch->short_bit == 0)
1036 internal_error ("gdbarch: gdbarch_short_bit invalid");
1037 if (gdbarch_debug >= 2)
1038 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1039 return gdbarch->short_bit;
1040 }
1041
1042 void
1043 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1044 int short_bit)
1045 {
1046 gdbarch->short_bit = short_bit;
1047 }
1048
1049 int
1050 gdbarch_int_bit (struct gdbarch *gdbarch)
1051 {
1052 if (gdbarch->int_bit == 0)
1053 internal_error ("gdbarch: gdbarch_int_bit invalid");
1054 if (gdbarch_debug >= 2)
1055 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1056 return gdbarch->int_bit;
1057 }
1058
1059 void
1060 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1061 int int_bit)
1062 {
1063 gdbarch->int_bit = int_bit;
1064 }
1065
1066 int
1067 gdbarch_long_bit (struct gdbarch *gdbarch)
1068 {
1069 if (gdbarch->long_bit == 0)
1070 internal_error ("gdbarch: gdbarch_long_bit invalid");
1071 if (gdbarch_debug >= 2)
1072 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1073 return gdbarch->long_bit;
1074 }
1075
1076 void
1077 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1078 int long_bit)
1079 {
1080 gdbarch->long_bit = long_bit;
1081 }
1082
1083 int
1084 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1085 {
1086 if (gdbarch->long_long_bit == 0)
1087 internal_error ("gdbarch: gdbarch_long_long_bit invalid");
1088 if (gdbarch_debug >= 2)
1089 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1090 return gdbarch->long_long_bit;
1091 }
1092
1093 void
1094 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1095 int long_long_bit)
1096 {
1097 gdbarch->long_long_bit = long_long_bit;
1098 }
1099
1100 int
1101 gdbarch_float_bit (struct gdbarch *gdbarch)
1102 {
1103 if (gdbarch->float_bit == 0)
1104 internal_error ("gdbarch: gdbarch_float_bit invalid");
1105 if (gdbarch_debug >= 2)
1106 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1107 return gdbarch->float_bit;
1108 }
1109
1110 void
1111 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1112 int float_bit)
1113 {
1114 gdbarch->float_bit = float_bit;
1115 }
1116
1117 int
1118 gdbarch_double_bit (struct gdbarch *gdbarch)
1119 {
1120 if (gdbarch->double_bit == 0)
1121 internal_error ("gdbarch: gdbarch_double_bit invalid");
1122 if (gdbarch_debug >= 2)
1123 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1124 return gdbarch->double_bit;
1125 }
1126
1127 void
1128 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1129 int double_bit)
1130 {
1131 gdbarch->double_bit = double_bit;
1132 }
1133
1134 int
1135 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1136 {
1137 if (gdbarch->long_double_bit == 0)
1138 internal_error ("gdbarch: gdbarch_long_double_bit invalid");
1139 if (gdbarch_debug >= 2)
1140 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1141 return gdbarch->long_double_bit;
1142 }
1143
1144 void
1145 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1146 int long_double_bit)
1147 {
1148 gdbarch->long_double_bit = long_double_bit;
1149 }
1150
1151 int
1152 gdbarch_ieee_float (struct gdbarch *gdbarch)
1153 {
1154 /* Skip verify of ieee_float, invalid_p == 0 */
1155 if (gdbarch_debug >= 2)
1156 fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n");
1157 return gdbarch->ieee_float;
1158 }
1159
1160 void
1161 set_gdbarch_ieee_float (struct gdbarch *gdbarch,
1162 int ieee_float)
1163 {
1164 gdbarch->ieee_float = ieee_float;
1165 }
1166
1167 CORE_ADDR
1168 gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
1169 {
1170 if (gdbarch->read_pc == 0)
1171 internal_error ("gdbarch: gdbarch_read_pc invalid");
1172 if (gdbarch_debug >= 2)
1173 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1174 return gdbarch->read_pc (pid);
1175 }
1176
1177 void
1178 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1179 gdbarch_read_pc_ftype read_pc)
1180 {
1181 gdbarch->read_pc = read_pc;
1182 }
1183
1184 void
1185 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
1186 {
1187 if (gdbarch->write_pc == 0)
1188 internal_error ("gdbarch: gdbarch_write_pc invalid");
1189 if (gdbarch_debug >= 2)
1190 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1191 gdbarch->write_pc (val, pid);
1192 }
1193
1194 void
1195 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1196 gdbarch_write_pc_ftype write_pc)
1197 {
1198 gdbarch->write_pc = write_pc;
1199 }
1200
1201 CORE_ADDR
1202 gdbarch_read_fp (struct gdbarch *gdbarch)
1203 {
1204 if (gdbarch->read_fp == 0)
1205 internal_error ("gdbarch: gdbarch_read_fp invalid");
1206 if (gdbarch_debug >= 2)
1207 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
1208 return gdbarch->read_fp ();
1209 }
1210
1211 void
1212 set_gdbarch_read_fp (struct gdbarch *gdbarch,
1213 gdbarch_read_fp_ftype read_fp)
1214 {
1215 gdbarch->read_fp = read_fp;
1216 }
1217
1218 void
1219 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
1220 {
1221 if (gdbarch->write_fp == 0)
1222 internal_error ("gdbarch: gdbarch_write_fp invalid");
1223 if (gdbarch_debug >= 2)
1224 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
1225 gdbarch->write_fp (val);
1226 }
1227
1228 void
1229 set_gdbarch_write_fp (struct gdbarch *gdbarch,
1230 gdbarch_write_fp_ftype write_fp)
1231 {
1232 gdbarch->write_fp = write_fp;
1233 }
1234
1235 CORE_ADDR
1236 gdbarch_read_sp (struct gdbarch *gdbarch)
1237 {
1238 if (gdbarch->read_sp == 0)
1239 internal_error ("gdbarch: gdbarch_read_sp invalid");
1240 if (gdbarch_debug >= 2)
1241 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1242 return gdbarch->read_sp ();
1243 }
1244
1245 void
1246 set_gdbarch_read_sp (struct gdbarch *gdbarch,
1247 gdbarch_read_sp_ftype read_sp)
1248 {
1249 gdbarch->read_sp = read_sp;
1250 }
1251
1252 void
1253 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
1254 {
1255 if (gdbarch->write_sp == 0)
1256 internal_error ("gdbarch: gdbarch_write_sp invalid");
1257 if (gdbarch_debug >= 2)
1258 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
1259 gdbarch->write_sp (val);
1260 }
1261
1262 void
1263 set_gdbarch_write_sp (struct gdbarch *gdbarch,
1264 gdbarch_write_sp_ftype write_sp)
1265 {
1266 gdbarch->write_sp = write_sp;
1267 }
1268
1269 int
1270 gdbarch_num_regs (struct gdbarch *gdbarch)
1271 {
1272 if (gdbarch->num_regs == -1)
1273 internal_error ("gdbarch: gdbarch_num_regs invalid");
1274 if (gdbarch_debug >= 2)
1275 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1276 return gdbarch->num_regs;
1277 }
1278
1279 void
1280 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1281 int num_regs)
1282 {
1283 gdbarch->num_regs = num_regs;
1284 }
1285
1286 int
1287 gdbarch_sp_regnum (struct gdbarch *gdbarch)
1288 {
1289 if (gdbarch->sp_regnum == -1)
1290 internal_error ("gdbarch: gdbarch_sp_regnum invalid");
1291 if (gdbarch_debug >= 2)
1292 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
1293 return gdbarch->sp_regnum;
1294 }
1295
1296 void
1297 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
1298 int sp_regnum)
1299 {
1300 gdbarch->sp_regnum = sp_regnum;
1301 }
1302
1303 int
1304 gdbarch_fp_regnum (struct gdbarch *gdbarch)
1305 {
1306 if (gdbarch->fp_regnum == -1)
1307 internal_error ("gdbarch: gdbarch_fp_regnum invalid");
1308 if (gdbarch_debug >= 2)
1309 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
1310 return gdbarch->fp_regnum;
1311 }
1312
1313 void
1314 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
1315 int fp_regnum)
1316 {
1317 gdbarch->fp_regnum = fp_regnum;
1318 }
1319
1320 int
1321 gdbarch_pc_regnum (struct gdbarch *gdbarch)
1322 {
1323 if (gdbarch->pc_regnum == -1)
1324 internal_error ("gdbarch: gdbarch_pc_regnum invalid");
1325 if (gdbarch_debug >= 2)
1326 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
1327 return gdbarch->pc_regnum;
1328 }
1329
1330 void
1331 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
1332 int pc_regnum)
1333 {
1334 gdbarch->pc_regnum = pc_regnum;
1335 }
1336
1337 char *
1338 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
1339 {
1340 if (gdbarch->register_name == 0)
1341 internal_error ("gdbarch: gdbarch_register_name invalid");
1342 if (gdbarch_debug >= 2)
1343 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
1344 return gdbarch->register_name (regnr);
1345 }
1346
1347 void
1348 set_gdbarch_register_name (struct gdbarch *gdbarch,
1349 gdbarch_register_name_ftype register_name)
1350 {
1351 gdbarch->register_name = register_name;
1352 }
1353
1354 int
1355 gdbarch_register_size (struct gdbarch *gdbarch)
1356 {
1357 if (gdbarch->register_size == -1)
1358 internal_error ("gdbarch: gdbarch_register_size invalid");
1359 if (gdbarch_debug >= 2)
1360 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
1361 return gdbarch->register_size;
1362 }
1363
1364 void
1365 set_gdbarch_register_size (struct gdbarch *gdbarch,
1366 int register_size)
1367 {
1368 gdbarch->register_size = register_size;
1369 }
1370
1371 int
1372 gdbarch_register_bytes (struct gdbarch *gdbarch)
1373 {
1374 if (gdbarch->register_bytes == -1)
1375 internal_error ("gdbarch: gdbarch_register_bytes invalid");
1376 if (gdbarch_debug >= 2)
1377 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
1378 return gdbarch->register_bytes;
1379 }
1380
1381 void
1382 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
1383 int register_bytes)
1384 {
1385 gdbarch->register_bytes = register_bytes;
1386 }
1387
1388 int
1389 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
1390 {
1391 if (gdbarch->register_byte == 0)
1392 internal_error ("gdbarch: gdbarch_register_byte invalid");
1393 if (gdbarch_debug >= 2)
1394 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
1395 return gdbarch->register_byte (reg_nr);
1396 }
1397
1398 void
1399 set_gdbarch_register_byte (struct gdbarch *gdbarch,
1400 gdbarch_register_byte_ftype register_byte)
1401 {
1402 gdbarch->register_byte = register_byte;
1403 }
1404
1405 int
1406 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
1407 {
1408 if (gdbarch->register_raw_size == 0)
1409 internal_error ("gdbarch: gdbarch_register_raw_size invalid");
1410 if (gdbarch_debug >= 2)
1411 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
1412 return gdbarch->register_raw_size (reg_nr);
1413 }
1414
1415 void
1416 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
1417 gdbarch_register_raw_size_ftype register_raw_size)
1418 {
1419 gdbarch->register_raw_size = register_raw_size;
1420 }
1421
1422 int
1423 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
1424 {
1425 if (gdbarch->max_register_raw_size == -1)
1426 internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
1427 if (gdbarch_debug >= 2)
1428 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
1429 return gdbarch->max_register_raw_size;
1430 }
1431
1432 void
1433 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
1434 int max_register_raw_size)
1435 {
1436 gdbarch->max_register_raw_size = max_register_raw_size;
1437 }
1438
1439 int
1440 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
1441 {
1442 if (gdbarch->register_virtual_size == 0)
1443 internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
1444 if (gdbarch_debug >= 2)
1445 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
1446 return gdbarch->register_virtual_size (reg_nr);
1447 }
1448
1449 void
1450 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
1451 gdbarch_register_virtual_size_ftype register_virtual_size)
1452 {
1453 gdbarch->register_virtual_size = register_virtual_size;
1454 }
1455
1456 int
1457 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
1458 {
1459 if (gdbarch->max_register_virtual_size == -1)
1460 internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
1461 if (gdbarch_debug >= 2)
1462 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
1463 return gdbarch->max_register_virtual_size;
1464 }
1465
1466 void
1467 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
1468 int max_register_virtual_size)
1469 {
1470 gdbarch->max_register_virtual_size = max_register_virtual_size;
1471 }
1472
1473 struct type *
1474 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
1475 {
1476 if (gdbarch->register_virtual_type == 0)
1477 internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
1478 if (gdbarch_debug >= 2)
1479 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
1480 return gdbarch->register_virtual_type (reg_nr);
1481 }
1482
1483 void
1484 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
1485 gdbarch_register_virtual_type_ftype register_virtual_type)
1486 {
1487 gdbarch->register_virtual_type = register_virtual_type;
1488 }
1489
1490 int
1491 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
1492 {
1493 if (gdbarch->use_generic_dummy_frames == -1)
1494 internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
1495 if (gdbarch_debug >= 2)
1496 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
1497 return gdbarch->use_generic_dummy_frames;
1498 }
1499
1500 void
1501 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
1502 int use_generic_dummy_frames)
1503 {
1504 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
1505 }
1506
1507 int
1508 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
1509 {
1510 if (gdbarch->call_dummy_location == 0)
1511 internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
1512 if (gdbarch_debug >= 2)
1513 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
1514 return gdbarch->call_dummy_location;
1515 }
1516
1517 void
1518 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
1519 int call_dummy_location)
1520 {
1521 gdbarch->call_dummy_location = call_dummy_location;
1522 }
1523
1524 CORE_ADDR
1525 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
1526 {
1527 if (gdbarch->call_dummy_address == 0)
1528 internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
1529 if (gdbarch_debug >= 2)
1530 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
1531 return gdbarch->call_dummy_address ();
1532 }
1533
1534 void
1535 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
1536 gdbarch_call_dummy_address_ftype call_dummy_address)
1537 {
1538 gdbarch->call_dummy_address = call_dummy_address;
1539 }
1540
1541 CORE_ADDR
1542 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
1543 {
1544 if (gdbarch->call_dummy_start_offset == -1)
1545 internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
1546 if (gdbarch_debug >= 2)
1547 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
1548 return gdbarch->call_dummy_start_offset;
1549 }
1550
1551 void
1552 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
1553 CORE_ADDR call_dummy_start_offset)
1554 {
1555 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
1556 }
1557
1558 CORE_ADDR
1559 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
1560 {
1561 if (gdbarch->call_dummy_breakpoint_offset == -1)
1562 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
1563 if (gdbarch_debug >= 2)
1564 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
1565 return gdbarch->call_dummy_breakpoint_offset;
1566 }
1567
1568 void
1569 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
1570 CORE_ADDR call_dummy_breakpoint_offset)
1571 {
1572 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
1573 }
1574
1575 int
1576 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
1577 {
1578 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
1579 internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
1580 if (gdbarch_debug >= 2)
1581 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
1582 return gdbarch->call_dummy_breakpoint_offset_p;
1583 }
1584
1585 void
1586 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
1587 int call_dummy_breakpoint_offset_p)
1588 {
1589 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
1590 }
1591
1592 int
1593 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
1594 {
1595 if (gdbarch->call_dummy_length == -1)
1596 internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
1597 if (gdbarch_debug >= 2)
1598 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
1599 return gdbarch->call_dummy_length;
1600 }
1601
1602 void
1603 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
1604 int call_dummy_length)
1605 {
1606 gdbarch->call_dummy_length = call_dummy_length;
1607 }
1608
1609 int
1610 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
1611 {
1612 if (gdbarch->pc_in_call_dummy == 0)
1613 internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
1614 if (gdbarch_debug >= 2)
1615 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
1616 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
1617 }
1618
1619 void
1620 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
1621 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
1622 {
1623 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
1624 }
1625
1626 int
1627 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
1628 {
1629 if (gdbarch->call_dummy_p == -1)
1630 internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
1631 if (gdbarch_debug >= 2)
1632 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
1633 return gdbarch->call_dummy_p;
1634 }
1635
1636 void
1637 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
1638 int call_dummy_p)
1639 {
1640 gdbarch->call_dummy_p = call_dummy_p;
1641 }
1642
1643 LONGEST *
1644 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
1645 {
1646 /* Skip verify of call_dummy_words, invalid_p == 0 */
1647 if (gdbarch_debug >= 2)
1648 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
1649 return gdbarch->call_dummy_words;
1650 }
1651
1652 void
1653 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
1654 LONGEST * call_dummy_words)
1655 {
1656 gdbarch->call_dummy_words = call_dummy_words;
1657 }
1658
1659 int
1660 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
1661 {
1662 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
1663 if (gdbarch_debug >= 2)
1664 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
1665 return gdbarch->sizeof_call_dummy_words;
1666 }
1667
1668 void
1669 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
1670 int sizeof_call_dummy_words)
1671 {
1672 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
1673 }
1674
1675 int
1676 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
1677 {
1678 if (gdbarch->call_dummy_stack_adjust_p == -1)
1679 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
1680 if (gdbarch_debug >= 2)
1681 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
1682 return gdbarch->call_dummy_stack_adjust_p;
1683 }
1684
1685 void
1686 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
1687 int call_dummy_stack_adjust_p)
1688 {
1689 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
1690 }
1691
1692 int
1693 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
1694 {
1695 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
1696 internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
1697 if (gdbarch_debug >= 2)
1698 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
1699 return gdbarch->call_dummy_stack_adjust;
1700 }
1701
1702 void
1703 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
1704 int call_dummy_stack_adjust)
1705 {
1706 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
1707 }
1708
1709 void
1710 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)
1711 {
1712 if (gdbarch->fix_call_dummy == 0)
1713 internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
1714 if (gdbarch_debug >= 2)
1715 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
1716 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
1717 }
1718
1719 void
1720 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
1721 gdbarch_fix_call_dummy_ftype fix_call_dummy)
1722 {
1723 gdbarch->fix_call_dummy = fix_call_dummy;
1724 }
1725
1726 int
1727 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
1728 {
1729 if (gdbarch_debug >= 2)
1730 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
1731 return gdbarch->believe_pcc_promotion;
1732 }
1733
1734 void
1735 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
1736 int believe_pcc_promotion)
1737 {
1738 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
1739 }
1740
1741 int
1742 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
1743 {
1744 if (gdbarch_debug >= 2)
1745 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
1746 return gdbarch->believe_pcc_promotion_type;
1747 }
1748
1749 void
1750 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
1751 int believe_pcc_promotion_type)
1752 {
1753 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
1754 }
1755
1756 int
1757 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
1758 {
1759 if (gdbarch->coerce_float_to_double == 0)
1760 internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
1761 if (gdbarch_debug >= 2)
1762 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
1763 return gdbarch->coerce_float_to_double (formal, actual);
1764 }
1765
1766 void
1767 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
1768 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
1769 {
1770 gdbarch->coerce_float_to_double = coerce_float_to_double;
1771 }
1772
1773 void
1774 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)
1775 {
1776 if (gdbarch->get_saved_register == 0)
1777 internal_error ("gdbarch: gdbarch_get_saved_register invalid");
1778 if (gdbarch_debug >= 2)
1779 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
1780 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
1781 }
1782
1783 void
1784 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
1785 gdbarch_get_saved_register_ftype get_saved_register)
1786 {
1787 gdbarch->get_saved_register = get_saved_register;
1788 }
1789
1790 int
1791 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
1792 {
1793 if (gdbarch->register_convertible == 0)
1794 internal_error ("gdbarch: gdbarch_register_convertible invalid");
1795 if (gdbarch_debug >= 2)
1796 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
1797 return gdbarch->register_convertible (nr);
1798 }
1799
1800 void
1801 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
1802 gdbarch_register_convertible_ftype register_convertible)
1803 {
1804 gdbarch->register_convertible = register_convertible;
1805 }
1806
1807 void
1808 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
1809 {
1810 if (gdbarch->register_convert_to_virtual == 0)
1811 internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
1812 if (gdbarch_debug >= 2)
1813 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
1814 gdbarch->register_convert_to_virtual (regnum, type, from, to);
1815 }
1816
1817 void
1818 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
1819 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
1820 {
1821 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
1822 }
1823
1824 void
1825 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
1826 {
1827 if (gdbarch->register_convert_to_raw == 0)
1828 internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
1829 if (gdbarch_debug >= 2)
1830 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
1831 gdbarch->register_convert_to_raw (type, regnum, from, to);
1832 }
1833
1834 void
1835 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
1836 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
1837 {
1838 gdbarch->register_convert_to_raw = register_convert_to_raw;
1839 }
1840
1841 CORE_ADDR
1842 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, char *buf)
1843 {
1844 if (gdbarch->pointer_to_address == 0)
1845 internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
1846 if (gdbarch_debug >= 2)
1847 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
1848 return gdbarch->pointer_to_address (type, buf);
1849 }
1850
1851 void
1852 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
1853 gdbarch_pointer_to_address_ftype pointer_to_address)
1854 {
1855 gdbarch->pointer_to_address = pointer_to_address;
1856 }
1857
1858 void
1859 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, char *buf, CORE_ADDR addr)
1860 {
1861 if (gdbarch->address_to_pointer == 0)
1862 internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
1863 if (gdbarch_debug >= 2)
1864 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
1865 gdbarch->address_to_pointer (type, buf, addr);
1866 }
1867
1868 void
1869 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
1870 gdbarch_address_to_pointer_ftype address_to_pointer)
1871 {
1872 gdbarch->address_to_pointer = address_to_pointer;
1873 }
1874
1875 int
1876 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
1877 {
1878 if (gdbarch->return_value_on_stack == 0)
1879 internal_error ("gdbarch: gdbarch_return_value_on_stack invalid");
1880 if (gdbarch_debug >= 2)
1881 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
1882 return gdbarch->return_value_on_stack (type);
1883 }
1884
1885 void
1886 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
1887 gdbarch_return_value_on_stack_ftype return_value_on_stack)
1888 {
1889 gdbarch->return_value_on_stack = return_value_on_stack;
1890 }
1891
1892 void
1893 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
1894 {
1895 if (gdbarch->extract_return_value == 0)
1896 internal_error ("gdbarch: gdbarch_extract_return_value invalid");
1897 if (gdbarch_debug >= 2)
1898 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
1899 gdbarch->extract_return_value (type, regbuf, valbuf);
1900 }
1901
1902 void
1903 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
1904 gdbarch_extract_return_value_ftype extract_return_value)
1905 {
1906 gdbarch->extract_return_value = extract_return_value;
1907 }
1908
1909 CORE_ADDR
1910 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
1911 {
1912 if (gdbarch->push_arguments == 0)
1913 internal_error ("gdbarch: gdbarch_push_arguments invalid");
1914 if (gdbarch_debug >= 2)
1915 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
1916 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
1917 }
1918
1919 void
1920 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
1921 gdbarch_push_arguments_ftype push_arguments)
1922 {
1923 gdbarch->push_arguments = push_arguments;
1924 }
1925
1926 void
1927 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
1928 {
1929 if (gdbarch->push_dummy_frame == 0)
1930 internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
1931 if (gdbarch_debug >= 2)
1932 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
1933 gdbarch->push_dummy_frame ();
1934 }
1935
1936 void
1937 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
1938 gdbarch_push_dummy_frame_ftype push_dummy_frame)
1939 {
1940 gdbarch->push_dummy_frame = push_dummy_frame;
1941 }
1942
1943 CORE_ADDR
1944 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
1945 {
1946 if (gdbarch->push_return_address == 0)
1947 internal_error ("gdbarch: gdbarch_push_return_address invalid");
1948 if (gdbarch_debug >= 2)
1949 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
1950 return gdbarch->push_return_address (pc, sp);
1951 }
1952
1953 void
1954 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
1955 gdbarch_push_return_address_ftype push_return_address)
1956 {
1957 gdbarch->push_return_address = push_return_address;
1958 }
1959
1960 void
1961 gdbarch_pop_frame (struct gdbarch *gdbarch)
1962 {
1963 if (gdbarch->pop_frame == 0)
1964 internal_error ("gdbarch: gdbarch_pop_frame invalid");
1965 if (gdbarch_debug >= 2)
1966 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
1967 gdbarch->pop_frame ();
1968 }
1969
1970 void
1971 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
1972 gdbarch_pop_frame_ftype pop_frame)
1973 {
1974 gdbarch->pop_frame = pop_frame;
1975 }
1976
1977 CORE_ADDR
1978 gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
1979 {
1980 if (gdbarch->d10v_make_daddr == 0)
1981 internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
1982 if (gdbarch_debug >= 2)
1983 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
1984 return gdbarch->d10v_make_daddr (x);
1985 }
1986
1987 void
1988 set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch,
1989 gdbarch_d10v_make_daddr_ftype d10v_make_daddr)
1990 {
1991 gdbarch->d10v_make_daddr = d10v_make_daddr;
1992 }
1993
1994 CORE_ADDR
1995 gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
1996 {
1997 if (gdbarch->d10v_make_iaddr == 0)
1998 internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
1999 if (gdbarch_debug >= 2)
2000 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
2001 return gdbarch->d10v_make_iaddr (x);
2002 }
2003
2004 void
2005 set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch,
2006 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr)
2007 {
2008 gdbarch->d10v_make_iaddr = d10v_make_iaddr;
2009 }
2010
2011 int
2012 gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
2013 {
2014 if (gdbarch->d10v_daddr_p == 0)
2015 internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
2016 if (gdbarch_debug >= 2)
2017 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
2018 return gdbarch->d10v_daddr_p (x);
2019 }
2020
2021 void
2022 set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch,
2023 gdbarch_d10v_daddr_p_ftype d10v_daddr_p)
2024 {
2025 gdbarch->d10v_daddr_p = d10v_daddr_p;
2026 }
2027
2028 int
2029 gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
2030 {
2031 if (gdbarch->d10v_iaddr_p == 0)
2032 internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
2033 if (gdbarch_debug >= 2)
2034 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
2035 return gdbarch->d10v_iaddr_p (x);
2036 }
2037
2038 void
2039 set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch,
2040 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p)
2041 {
2042 gdbarch->d10v_iaddr_p = d10v_iaddr_p;
2043 }
2044
2045 CORE_ADDR
2046 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
2047 {
2048 if (gdbarch->d10v_convert_daddr_to_raw == 0)
2049 internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
2050 if (gdbarch_debug >= 2)
2051 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
2052 return gdbarch->d10v_convert_daddr_to_raw (x);
2053 }
2054
2055 void
2056 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch,
2057 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw)
2058 {
2059 gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw;
2060 }
2061
2062 CORE_ADDR
2063 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
2064 {
2065 if (gdbarch->d10v_convert_iaddr_to_raw == 0)
2066 internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
2067 if (gdbarch_debug >= 2)
2068 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
2069 return gdbarch->d10v_convert_iaddr_to_raw (x);
2070 }
2071
2072 void
2073 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch,
2074 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw)
2075 {
2076 gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw;
2077 }
2078
2079 void
2080 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
2081 {
2082 if (gdbarch->store_struct_return == 0)
2083 internal_error ("gdbarch: gdbarch_store_struct_return invalid");
2084 if (gdbarch_debug >= 2)
2085 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
2086 gdbarch->store_struct_return (addr, sp);
2087 }
2088
2089 void
2090 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
2091 gdbarch_store_struct_return_ftype store_struct_return)
2092 {
2093 gdbarch->store_struct_return = store_struct_return;
2094 }
2095
2096 void
2097 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
2098 {
2099 if (gdbarch->store_return_value == 0)
2100 internal_error ("gdbarch: gdbarch_store_return_value invalid");
2101 if (gdbarch_debug >= 2)
2102 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
2103 gdbarch->store_return_value (type, valbuf);
2104 }
2105
2106 void
2107 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
2108 gdbarch_store_return_value_ftype store_return_value)
2109 {
2110 gdbarch->store_return_value = store_return_value;
2111 }
2112
2113 CORE_ADDR
2114 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
2115 {
2116 if (gdbarch->extract_struct_value_address == 0)
2117 internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
2118 if (gdbarch_debug >= 2)
2119 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
2120 return gdbarch->extract_struct_value_address (regbuf);
2121 }
2122
2123 void
2124 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
2125 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
2126 {
2127 gdbarch->extract_struct_value_address = extract_struct_value_address;
2128 }
2129
2130 int
2131 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
2132 {
2133 if (gdbarch->use_struct_convention == 0)
2134 internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
2135 if (gdbarch_debug >= 2)
2136 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
2137 return gdbarch->use_struct_convention (gcc_p, value_type);
2138 }
2139
2140 void
2141 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
2142 gdbarch_use_struct_convention_ftype use_struct_convention)
2143 {
2144 gdbarch->use_struct_convention = use_struct_convention;
2145 }
2146
2147 void
2148 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
2149 {
2150 if (gdbarch->frame_init_saved_regs == 0)
2151 internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
2152 if (gdbarch_debug >= 2)
2153 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
2154 gdbarch->frame_init_saved_regs (frame);
2155 }
2156
2157 void
2158 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
2159 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
2160 {
2161 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
2162 }
2163
2164 void
2165 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
2166 {
2167 if (gdbarch->init_extra_frame_info == 0)
2168 internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
2169 if (gdbarch_debug >= 2)
2170 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
2171 gdbarch->init_extra_frame_info (fromleaf, frame);
2172 }
2173
2174 void
2175 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
2176 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
2177 {
2178 gdbarch->init_extra_frame_info = init_extra_frame_info;
2179 }
2180
2181 CORE_ADDR
2182 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2183 {
2184 if (gdbarch->skip_prologue == 0)
2185 internal_error ("gdbarch: gdbarch_skip_prologue invalid");
2186 if (gdbarch_debug >= 2)
2187 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2188 return gdbarch->skip_prologue (ip);
2189 }
2190
2191 void
2192 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2193 gdbarch_skip_prologue_ftype skip_prologue)
2194 {
2195 gdbarch->skip_prologue = skip_prologue;
2196 }
2197
2198 int
2199 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
2200 {
2201 if (gdbarch->prologue_frameless_p == 0)
2202 internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
2203 if (gdbarch_debug >= 2)
2204 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
2205 return gdbarch->prologue_frameless_p (ip);
2206 }
2207
2208 void
2209 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
2210 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
2211 {
2212 gdbarch->prologue_frameless_p = prologue_frameless_p;
2213 }
2214
2215 int
2216 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2217 {
2218 if (gdbarch->inner_than == 0)
2219 internal_error ("gdbarch: gdbarch_inner_than invalid");
2220 if (gdbarch_debug >= 2)
2221 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2222 return gdbarch->inner_than (lhs, rhs);
2223 }
2224
2225 void
2226 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2227 gdbarch_inner_than_ftype inner_than)
2228 {
2229 gdbarch->inner_than = inner_than;
2230 }
2231
2232 unsigned char *
2233 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2234 {
2235 if (gdbarch->breakpoint_from_pc == 0)
2236 internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
2237 if (gdbarch_debug >= 2)
2238 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2239 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2240 }
2241
2242 void
2243 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2244 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2245 {
2246 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2247 }
2248
2249 int
2250 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
2251 {
2252 if (gdbarch->memory_insert_breakpoint == 0)
2253 internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
2254 if (gdbarch_debug >= 2)
2255 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2256 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
2257 }
2258
2259 void
2260 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2261 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2262 {
2263 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2264 }
2265
2266 int
2267 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
2268 {
2269 if (gdbarch->memory_remove_breakpoint == 0)
2270 internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
2271 if (gdbarch_debug >= 2)
2272 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2273 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
2274 }
2275
2276 void
2277 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2278 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2279 {
2280 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2281 }
2282
2283 CORE_ADDR
2284 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2285 {
2286 if (gdbarch->decr_pc_after_break == -1)
2287 internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
2288 if (gdbarch_debug >= 2)
2289 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2290 return gdbarch->decr_pc_after_break;
2291 }
2292
2293 void
2294 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2295 CORE_ADDR decr_pc_after_break)
2296 {
2297 gdbarch->decr_pc_after_break = decr_pc_after_break;
2298 }
2299
2300 CORE_ADDR
2301 gdbarch_function_start_offset (struct gdbarch *gdbarch)
2302 {
2303 if (gdbarch->function_start_offset == -1)
2304 internal_error ("gdbarch: gdbarch_function_start_offset invalid");
2305 if (gdbarch_debug >= 2)
2306 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
2307 return gdbarch->function_start_offset;
2308 }
2309
2310 void
2311 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
2312 CORE_ADDR function_start_offset)
2313 {
2314 gdbarch->function_start_offset = function_start_offset;
2315 }
2316
2317 void
2318 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
2319 {
2320 if (gdbarch->remote_translate_xfer_address == 0)
2321 internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
2322 if (gdbarch_debug >= 2)
2323 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
2324 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
2325 }
2326
2327 void
2328 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
2329 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
2330 {
2331 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
2332 }
2333
2334 CORE_ADDR
2335 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2336 {
2337 if (gdbarch->frame_args_skip == -1)
2338 internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
2339 if (gdbarch_debug >= 2)
2340 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2341 return gdbarch->frame_args_skip;
2342 }
2343
2344 void
2345 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2346 CORE_ADDR frame_args_skip)
2347 {
2348 gdbarch->frame_args_skip = frame_args_skip;
2349 }
2350
2351 int
2352 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
2353 {
2354 if (gdbarch->frameless_function_invocation == 0)
2355 internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
2356 if (gdbarch_debug >= 2)
2357 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
2358 return gdbarch->frameless_function_invocation (fi);
2359 }
2360
2361 void
2362 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
2363 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
2364 {
2365 gdbarch->frameless_function_invocation = frameless_function_invocation;
2366 }
2367
2368 CORE_ADDR
2369 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
2370 {
2371 if (gdbarch->frame_chain == 0)
2372 internal_error ("gdbarch: gdbarch_frame_chain invalid");
2373 if (gdbarch_debug >= 2)
2374 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
2375 return gdbarch->frame_chain (frame);
2376 }
2377
2378 void
2379 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
2380 gdbarch_frame_chain_ftype frame_chain)
2381 {
2382 gdbarch->frame_chain = frame_chain;
2383 }
2384
2385 int
2386 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
2387 {
2388 if (gdbarch->frame_chain_valid == 0)
2389 internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
2390 if (gdbarch_debug >= 2)
2391 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
2392 return gdbarch->frame_chain_valid (chain, thisframe);
2393 }
2394
2395 void
2396 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
2397 gdbarch_frame_chain_valid_ftype frame_chain_valid)
2398 {
2399 gdbarch->frame_chain_valid = frame_chain_valid;
2400 }
2401
2402 CORE_ADDR
2403 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
2404 {
2405 if (gdbarch->frame_saved_pc == 0)
2406 internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
2407 if (gdbarch_debug >= 2)
2408 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
2409 return gdbarch->frame_saved_pc (fi);
2410 }
2411
2412 void
2413 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
2414 gdbarch_frame_saved_pc_ftype frame_saved_pc)
2415 {
2416 gdbarch->frame_saved_pc = frame_saved_pc;
2417 }
2418
2419 CORE_ADDR
2420 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
2421 {
2422 if (gdbarch->frame_args_address == 0)
2423 internal_error ("gdbarch: gdbarch_frame_args_address invalid");
2424 if (gdbarch_debug >= 2)
2425 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
2426 return gdbarch->frame_args_address (fi);
2427 }
2428
2429 void
2430 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
2431 gdbarch_frame_args_address_ftype frame_args_address)
2432 {
2433 gdbarch->frame_args_address = frame_args_address;
2434 }
2435
2436 CORE_ADDR
2437 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
2438 {
2439 if (gdbarch->frame_locals_address == 0)
2440 internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
2441 if (gdbarch_debug >= 2)
2442 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
2443 return gdbarch->frame_locals_address (fi);
2444 }
2445
2446 void
2447 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
2448 gdbarch_frame_locals_address_ftype frame_locals_address)
2449 {
2450 gdbarch->frame_locals_address = frame_locals_address;
2451 }
2452
2453 CORE_ADDR
2454 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
2455 {
2456 if (gdbarch->saved_pc_after_call == 0)
2457 internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
2458 if (gdbarch_debug >= 2)
2459 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
2460 return gdbarch->saved_pc_after_call (frame);
2461 }
2462
2463 void
2464 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
2465 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
2466 {
2467 gdbarch->saved_pc_after_call = saved_pc_after_call;
2468 }
2469
2470 int
2471 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2472 {
2473 if (gdbarch->frame_num_args == 0)
2474 internal_error ("gdbarch: gdbarch_frame_num_args invalid");
2475 if (gdbarch_debug >= 2)
2476 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2477 return gdbarch->frame_num_args (frame);
2478 }
2479
2480 void
2481 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2482 gdbarch_frame_num_args_ftype frame_num_args)
2483 {
2484 gdbarch->frame_num_args = frame_num_args;
2485 }
2486
2487 int
2488 gdbarch_stack_align_p (struct gdbarch *gdbarch)
2489 {
2490 return gdbarch->stack_align != 0;
2491 }
2492
2493 CORE_ADDR
2494 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
2495 {
2496 if (gdbarch->stack_align == 0)
2497 internal_error ("gdbarch: gdbarch_stack_align invalid");
2498 if (gdbarch_debug >= 2)
2499 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
2500 return gdbarch->stack_align (sp);
2501 }
2502
2503 void
2504 set_gdbarch_stack_align (struct gdbarch *gdbarch,
2505 gdbarch_stack_align_ftype stack_align)
2506 {
2507 gdbarch->stack_align = stack_align;
2508 }
2509
2510 int
2511 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
2512 {
2513 return gdbarch->reg_struct_has_addr != 0;
2514 }
2515
2516 int
2517 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
2518 {
2519 if (gdbarch->reg_struct_has_addr == 0)
2520 internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
2521 if (gdbarch_debug >= 2)
2522 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
2523 return gdbarch->reg_struct_has_addr (gcc_p, type);
2524 }
2525
2526 void
2527 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
2528 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
2529 {
2530 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
2531 }
2532
2533
2534 /* Keep a registrary of per-architecture data-pointers required by GDB
2535 modules. */
2536
2537 struct gdbarch_data
2538 {
2539 int index;
2540 };
2541
2542 struct gdbarch_data_registration
2543 {
2544 gdbarch_data_ftype *init;
2545 struct gdbarch_data *data;
2546 struct gdbarch_data_registration *next;
2547 };
2548
2549 struct gdbarch_data_registrary
2550 {
2551 int nr;
2552 struct gdbarch_data_registration *registrations;
2553 };
2554
2555 struct gdbarch_data_registrary gdbarch_data_registrary =
2556 {
2557 0, NULL,
2558 };
2559
2560 struct gdbarch_data *
2561 register_gdbarch_data (gdbarch_data_ftype *init)
2562 {
2563 struct gdbarch_data_registration **curr;
2564 for (curr = &gdbarch_data_registrary.registrations;
2565 (*curr) != NULL;
2566 curr = &(*curr)->next);
2567 (*curr) = XMALLOC (struct gdbarch_data_registration);
2568 (*curr)->next = NULL;
2569 (*curr)->init = init;
2570 (*curr)->data = XMALLOC (struct gdbarch_data);
2571 (*curr)->data->index = gdbarch_data_registrary.nr++;
2572 return (*curr)->data;
2573 }
2574
2575
2576 /* Walk through all the registered users initializing each in turn. */
2577
2578 static void
2579 init_gdbarch_data (struct gdbarch *gdbarch)
2580 {
2581 struct gdbarch_data_registration *rego;
2582 gdbarch->nr_data = gdbarch_data_registrary.nr + 1;
2583 gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data);
2584 for (rego = gdbarch_data_registrary.registrations;
2585 rego != NULL;
2586 rego = rego->next)
2587 {
2588 if (rego->data->index < gdbarch->nr_data)
2589 gdbarch->data[rego->data->index] = rego->init ();
2590 }
2591 }
2592
2593
2594 /* Return the current value of the specified per-architecture
2595 data-pointer. */
2596
2597 void *
2598 gdbarch_data (data)
2599 struct gdbarch_data *data;
2600 {
2601 if (data->index >= current_gdbarch->nr_data)
2602 internal_error ("gdbarch_data: request for non-existant data.");
2603 return current_gdbarch->data[data->index];
2604 }
2605
2606
2607
2608 /* Keep a registrary of swaped data required by GDB modules. */
2609
2610 struct gdbarch_swap
2611 {
2612 void *swap;
2613 struct gdbarch_swap_registration *source;
2614 struct gdbarch_swap *next;
2615 };
2616
2617 struct gdbarch_swap_registration
2618 {
2619 void *data;
2620 unsigned long sizeof_data;
2621 gdbarch_swap_ftype *init;
2622 struct gdbarch_swap_registration *next;
2623 };
2624
2625 struct gdbarch_swap_registrary
2626 {
2627 int nr;
2628 struct gdbarch_swap_registration *registrations;
2629 };
2630
2631 struct gdbarch_swap_registrary gdbarch_swap_registrary =
2632 {
2633 0, NULL,
2634 };
2635
2636 void
2637 register_gdbarch_swap (void *data,
2638 unsigned long sizeof_data,
2639 gdbarch_swap_ftype *init)
2640 {
2641 struct gdbarch_swap_registration **rego;
2642 for (rego = &gdbarch_swap_registrary.registrations;
2643 (*rego) != NULL;
2644 rego = &(*rego)->next);
2645 (*rego) = XMALLOC (struct gdbarch_swap_registration);
2646 (*rego)->next = NULL;
2647 (*rego)->init = init;
2648 (*rego)->data = data;
2649 (*rego)->sizeof_data = sizeof_data;
2650 }
2651
2652
2653 static void
2654 init_gdbarch_swap (struct gdbarch *gdbarch)
2655 {
2656 struct gdbarch_swap_registration *rego;
2657 struct gdbarch_swap **curr = &gdbarch->swap;
2658 for (rego = gdbarch_swap_registrary.registrations;
2659 rego != NULL;
2660 rego = rego->next)
2661 {
2662 if (rego->data != NULL)
2663 {
2664 (*curr) = XMALLOC (struct gdbarch_swap);
2665 (*curr)->source = rego;
2666 (*curr)->swap = xmalloc (rego->sizeof_data);
2667 (*curr)->next = NULL;
2668 memset (rego->data, 0, rego->sizeof_data);
2669 curr = &(*curr)->next;
2670 }
2671 if (rego->init != NULL)
2672 rego->init ();
2673 }
2674 }
2675
2676 static void
2677 swapout_gdbarch_swap (struct gdbarch *gdbarch)
2678 {
2679 struct gdbarch_swap *curr;
2680 for (curr = gdbarch->swap;
2681 curr != NULL;
2682 curr = curr->next)
2683 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
2684 }
2685
2686 static void
2687 swapin_gdbarch_swap (struct gdbarch *gdbarch)
2688 {
2689 struct gdbarch_swap *curr;
2690 for (curr = gdbarch->swap;
2691 curr != NULL;
2692 curr = curr->next)
2693 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
2694 }
2695
2696
2697 /* Keep a registrary of the architectures known by GDB. */
2698
2699 struct gdbarch_init_registration
2700 {
2701 enum bfd_architecture bfd_architecture;
2702 gdbarch_init_ftype *init;
2703 struct gdbarch_list *arches;
2704 struct gdbarch_init_registration *next;
2705 };
2706
2707 static struct gdbarch_init_registration *gdbarch_init_registrary = NULL;
2708
2709 void
2710 register_gdbarch_init (enum bfd_architecture bfd_architecture,
2711 gdbarch_init_ftype *init)
2712 {
2713 struct gdbarch_init_registration **curr;
2714 const struct bfd_arch_info *bfd_arch_info;
2715 /* Check that BFD reconizes this architecture */
2716 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
2717 if (bfd_arch_info == NULL)
2718 {
2719 internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
2720 }
2721 /* Check that we haven't seen this architecture before */
2722 for (curr = &gdbarch_init_registrary;
2723 (*curr) != NULL;
2724 curr = &(*curr)->next)
2725 {
2726 if (bfd_architecture == (*curr)->bfd_architecture)
2727 internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
2728 bfd_arch_info->printable_name);
2729 }
2730 /* log it */
2731 if (gdbarch_debug)
2732 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
2733 bfd_arch_info->printable_name,
2734 (long) init);
2735 /* Append it */
2736 (*curr) = XMALLOC (struct gdbarch_init_registration);
2737 (*curr)->bfd_architecture = bfd_architecture;
2738 (*curr)->init = init;
2739 (*curr)->arches = NULL;
2740 (*curr)->next = NULL;
2741 }
2742
2743
2744
2745 /* Look for an architecture using gdbarch_info. Base search on only
2746 BFD_ARCH_INFO and BYTE_ORDER. */
2747
2748 struct gdbarch_list *
2749 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
2750 const struct gdbarch_info *info)
2751 {
2752 for (; arches != NULL; arches = arches->next)
2753 {
2754 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
2755 continue;
2756 if (info->byte_order != arches->gdbarch->byte_order)
2757 continue;
2758 return arches;
2759 }
2760 return NULL;
2761 }
2762
2763
2764 /* Update the current architecture. Return ZERO if the update request
2765 failed. */
2766
2767 int
2768 gdbarch_update (struct gdbarch_info info)
2769 {
2770 struct gdbarch *new_gdbarch;
2771 struct gdbarch_list **list;
2772 struct gdbarch_init_registration *rego;
2773
2774 /* Fill in any missing bits. Most important is the bfd_architecture
2775 which is used to select the target architecture. */
2776 if (info.bfd_architecture == bfd_arch_unknown)
2777 {
2778 if (info.bfd_arch_info != NULL)
2779 info.bfd_architecture = info.bfd_arch_info->arch;
2780 else if (info.abfd != NULL)
2781 info.bfd_architecture = bfd_get_arch (info.abfd);
2782 /* FIXME - should query BFD for its default architecture. */
2783 else
2784 info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
2785 }
2786 if (info.bfd_arch_info == NULL)
2787 {
2788 if (target_architecture_auto && info.abfd != NULL)
2789 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
2790 else
2791 info.bfd_arch_info = current_gdbarch->bfd_arch_info;
2792 }
2793 if (info.byte_order == 0)
2794 {
2795 if (target_byte_order_auto && info.abfd != NULL)
2796 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
2797 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
2798 : 0);
2799 else
2800 info.byte_order = current_gdbarch->byte_order;
2801 /* FIXME - should query BFD for its default byte-order. */
2802 }
2803 /* A default for abfd? */
2804
2805 /* Find the target that knows about this architecture. */
2806 for (rego = gdbarch_init_registrary;
2807 rego != NULL && rego->bfd_architecture != info.bfd_architecture;
2808 rego = rego->next);
2809 if (rego == NULL)
2810 {
2811 if (gdbarch_debug)
2812 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
2813 return 0;
2814 }
2815
2816 if (gdbarch_debug)
2817 {
2818 fprintf_unfiltered (gdb_stdlog,
2819 "gdbarch_update: info.bfd_architecture %d (%s)\n",
2820 info.bfd_architecture,
2821 bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
2822 fprintf_unfiltered (gdb_stdlog,
2823 "gdbarch_update: info.bfd_arch_info %s\n",
2824 (info.bfd_arch_info != NULL
2825 ? info.bfd_arch_info->printable_name
2826 : "(null)"));
2827 fprintf_unfiltered (gdb_stdlog,
2828 "gdbarch_update: info.byte_order %d (%s)\n",
2829 info.byte_order,
2830 (info.byte_order == BIG_ENDIAN ? "big"
2831 : info.byte_order == LITTLE_ENDIAN ? "little"
2832 : "default"));
2833 fprintf_unfiltered (gdb_stdlog,
2834 "gdbarch_update: info.abfd 0x%lx\n",
2835 (long) info.abfd);
2836 fprintf_unfiltered (gdb_stdlog,
2837 "gdbarch_update: info.tdep_info 0x%lx\n",
2838 (long) info.tdep_info);
2839 }
2840
2841 /* Ask the target for a replacement architecture. */
2842 new_gdbarch = rego->init (info, rego->arches);
2843
2844 /* Did the target like it? No. Reject the change. */
2845 if (new_gdbarch == NULL)
2846 {
2847 if (gdbarch_debug)
2848 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
2849 return 0;
2850 }
2851
2852 /* Did the architecture change? No. Do nothing. */
2853 if (current_gdbarch == new_gdbarch)
2854 {
2855 if (gdbarch_debug)
2856 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
2857 (long) new_gdbarch,
2858 new_gdbarch->bfd_arch_info->printable_name);
2859 return 1;
2860 }
2861
2862 /* Swap all data belonging to the old target out */
2863 swapout_gdbarch_swap (current_gdbarch);
2864
2865 /* Is this a pre-existing architecture? Yes. Swap it in. */
2866 for (list = &rego->arches;
2867 (*list) != NULL;
2868 list = &(*list)->next)
2869 {
2870 if ((*list)->gdbarch == new_gdbarch)
2871 {
2872 if (gdbarch_debug)
2873 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
2874 (long) new_gdbarch,
2875 new_gdbarch->bfd_arch_info->printable_name);
2876 current_gdbarch = new_gdbarch;
2877 swapin_gdbarch_swap (new_gdbarch);
2878 return 1;
2879 }
2880 }
2881
2882 /* Append this new architecture to this targets list. */
2883 (*list) = XMALLOC (struct gdbarch_list);
2884 (*list)->next = NULL;
2885 (*list)->gdbarch = new_gdbarch;
2886
2887 /* Switch to this new architecture. Dump it out. */
2888 current_gdbarch = new_gdbarch;
2889 if (gdbarch_debug)
2890 {
2891 fprintf_unfiltered (gdb_stdlog,
2892 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
2893 (long) new_gdbarch,
2894 new_gdbarch->bfd_arch_info->printable_name);
2895 gdbarch_dump ();
2896 }
2897
2898 /* Check that the newly installed architecture is valid. */
2899 verify_gdbarch (new_gdbarch);
2900
2901 /* Initialize the per-architecture memory (swap) areas.
2902 CURRENT_GDBARCH must be update before these modules are
2903 called. */
2904 init_gdbarch_swap (new_gdbarch);
2905
2906 /* Initialize the per-architecture data-pointer of all parties that
2907 registered an interest in this architecture. CURRENT_GDBARCH
2908 must be updated before these modules are called. */
2909 init_gdbarch_data (new_gdbarch);
2910
2911 return 1;
2912 }
2913
2914
2915
2916 /* Functions to manipulate the endianness of the target. */
2917
2918 #ifdef TARGET_BYTE_ORDER_SELECTABLE
2919 /* compat - Catch old targets that expect a selectable byte-order to
2920 default to BIG_ENDIAN */
2921 #ifndef TARGET_BYTE_ORDER_DEFAULT
2922 #define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN
2923 #endif
2924 #endif
2925 #if !TARGET_BYTE_ORDER_SELECTABLE_P
2926 #ifndef TARGET_BYTE_ORDER_DEFAULT
2927 /* compat - Catch old non byte-order selectable targets that do not
2928 define TARGET_BYTE_ORDER_DEFAULT and instead expect
2929 TARGET_BYTE_ORDER to be used as the default. For targets that
2930 defined neither TARGET_BYTE_ORDER nor TARGET_BYTE_ORDER_DEFAULT the
2931 below will get a strange compiler warning. */
2932 #define TARGET_BYTE_ORDER_DEFAULT TARGET_BYTE_ORDER
2933 #endif
2934 #endif
2935 #ifndef TARGET_BYTE_ORDER_DEFAULT
2936 #define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN /* arbitrary */
2937 #endif
2938 int target_byte_order = TARGET_BYTE_ORDER_DEFAULT;
2939 int target_byte_order_auto = 1;
2940
2941 /* Chain containing the \"set endian\" commands. */
2942 static struct cmd_list_element *endianlist = NULL;
2943
2944 /* Called by ``show endian''. */
2945 static void
2946 show_endian (char *args, int from_tty)
2947 {
2948 char *msg =
2949 (TARGET_BYTE_ORDER_AUTO
2950 ? "The target endianness is set automatically (currently %s endian)\n"
2951 : "The target is assumed to be %s endian\n");
2952 printf_unfiltered (msg, (TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little"));
2953 }
2954
2955 /* Called if the user enters ``set endian'' without an argument. */
2956 static void
2957 set_endian (char *args, int from_tty)
2958 {
2959 printf_unfiltered ("\"set endian\" must be followed by \"auto\", \"big\" or \"little\".\n");
2960 show_endian (args, from_tty);
2961 }
2962
2963 /* Called by ``set endian big''. */
2964 static void
2965 set_endian_big (char *args, int from_tty)
2966 {
2967 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2968 {
2969 target_byte_order = BIG_ENDIAN;
2970 target_byte_order_auto = 0;
2971 if (GDB_MULTI_ARCH)
2972 {
2973 struct gdbarch_info info;
2974 memset (&info, 0, sizeof info);
2975 info.byte_order = BIG_ENDIAN;
2976 gdbarch_update (info);
2977 }
2978 }
2979 else
2980 {
2981 printf_unfiltered ("Byte order is not selectable.");
2982 show_endian (args, from_tty);
2983 }
2984 }
2985
2986 /* Called by ``set endian little''. */
2987 static void
2988 set_endian_little (char *args, int from_tty)
2989 {
2990 if (TARGET_BYTE_ORDER_SELECTABLE_P)
2991 {
2992 target_byte_order = LITTLE_ENDIAN;
2993 target_byte_order_auto = 0;
2994 if (GDB_MULTI_ARCH)
2995 {
2996 struct gdbarch_info info;
2997 memset (&info, 0, sizeof info);
2998 info.byte_order = LITTLE_ENDIAN;
2999 gdbarch_update (info);
3000 }
3001 }
3002 else
3003 {
3004 printf_unfiltered ("Byte order is not selectable.");
3005 show_endian (args, from_tty);
3006 }
3007 }
3008
3009 /* Called by ``set endian auto''. */
3010 static void
3011 set_endian_auto (char *args, int from_tty)
3012 {
3013 if (TARGET_BYTE_ORDER_SELECTABLE_P)
3014 {
3015 target_byte_order_auto = 1;
3016 }
3017 else
3018 {
3019 printf_unfiltered ("Byte order is not selectable.");
3020 show_endian (args, from_tty);
3021 }
3022 }
3023
3024 /* Set the endianness from a BFD. */
3025 static void
3026 set_endian_from_file (bfd *abfd)
3027 {
3028 if (TARGET_BYTE_ORDER_SELECTABLE_P)
3029 {
3030 int want;
3031
3032 if (bfd_big_endian (abfd))
3033 want = BIG_ENDIAN;
3034 else
3035 want = LITTLE_ENDIAN;
3036 if (TARGET_BYTE_ORDER_AUTO)
3037 target_byte_order = want;
3038 else if (TARGET_BYTE_ORDER != want)
3039 warning ("%s endian file does not match %s endian target.",
3040 want == BIG_ENDIAN ? "big" : "little",
3041 TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
3042 }
3043 else
3044 {
3045 if (bfd_big_endian (abfd)
3046 ? TARGET_BYTE_ORDER != BIG_ENDIAN
3047 : TARGET_BYTE_ORDER == BIG_ENDIAN)
3048 warning ("%s endian file does not match %s endian target.",
3049 bfd_big_endian (abfd) ? "big" : "little",
3050 TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
3051 }
3052 }
3053
3054
3055
3056 /* Functions to manipulate the architecture of the target */
3057
3058 enum set_arch { set_arch_auto, set_arch_manual };
3059
3060 int target_architecture_auto = 1;
3061 extern const struct bfd_arch_info bfd_default_arch_struct;
3062 const struct bfd_arch_info *target_architecture = &bfd_default_arch_struct;
3063 int (*target_architecture_hook) (const struct bfd_arch_info *ap);
3064
3065 static void show_endian (char *, int);
3066 static void set_endian (char *, int);
3067 static void set_endian_big (char *, int);
3068 static void set_endian_little (char *, int);
3069 static void set_endian_auto (char *, int);
3070 static void set_endian_from_file (bfd *);
3071 static int arch_ok (const struct bfd_arch_info *arch);
3072 static void set_arch (const struct bfd_arch_info *arch, enum set_arch type);
3073 static void show_architecture (char *, int);
3074 static void set_architecture (char *, int);
3075 static void info_architecture (char *, int);
3076 static void set_architecture_from_file (bfd *);
3077
3078 /* Do the real work of changing the current architecture */
3079
3080 static int
3081 arch_ok (const struct bfd_arch_info *arch)
3082 {
3083 /* Should be performing the more basic check that the binary is
3084 compatible with GDB. */
3085 /* Check with the target that the architecture is valid. */
3086 return (target_architecture_hook == NULL
3087 || target_architecture_hook (arch));
3088 }
3089
3090 static void
3091 set_arch (const struct bfd_arch_info *arch,
3092 enum set_arch type)
3093 {
3094 switch (type)
3095 {
3096 case set_arch_auto:
3097 if (!arch_ok (arch))
3098 warning ("Target may not support %s architecture",
3099 arch->printable_name);
3100 target_architecture = arch;
3101 break;
3102 case set_arch_manual:
3103 if (!arch_ok (arch))
3104 {
3105 printf_unfiltered ("Target does not support `%s' architecture.\n",
3106 arch->printable_name);
3107 }
3108 else
3109 {
3110 target_architecture_auto = 0;
3111 target_architecture = arch;
3112 }
3113 break;
3114 }
3115 if (gdbarch_debug)
3116 gdbarch_dump ();
3117 }
3118
3119 /* Called if the user enters ``show architecture'' without an argument. */
3120 static void
3121 show_architecture (char *args, int from_tty)
3122 {
3123 const char *arch;
3124 arch = TARGET_ARCHITECTURE->printable_name;
3125 if (target_architecture_auto)
3126 printf_filtered ("The target architecture is set automatically (currently %s)\n", arch);
3127 else
3128 printf_filtered ("The target architecture is assumed to be %s\n", arch);
3129 }
3130
3131 /* Called if the user enters ``set architecture'' with or without an
3132 argument. */
3133 static void
3134 set_architecture (char *args, int from_tty)
3135 {
3136 if (args == NULL)
3137 {
3138 printf_unfiltered ("\"set architecture\" must be followed by \"auto\" or an architecture name.\n");
3139 }
3140 else if (strcmp (args, "auto") == 0)
3141 {
3142 target_architecture_auto = 1;
3143 }
3144 else if (GDB_MULTI_ARCH)
3145 {
3146 const struct bfd_arch_info *arch = bfd_scan_arch (args);
3147 if (arch == NULL)
3148 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3149 else
3150 {
3151 struct gdbarch_info info;
3152 memset (&info, 0, sizeof info);
3153 info.bfd_arch_info = arch;
3154 if (gdbarch_update (info))
3155 target_architecture_auto = 0;
3156 else
3157 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3158 }
3159 }
3160 else
3161 {
3162 const struct bfd_arch_info *arch = bfd_scan_arch (args);
3163 if (arch != NULL)
3164 set_arch (arch, set_arch_manual);
3165 else
3166 printf_unfiltered ("Architecture `%s' not reconized.\n", args);
3167 }
3168 }
3169
3170 /* Called if the user enters ``info architecture'' without an argument. */
3171 static void
3172 info_architecture (char *args, int from_tty)
3173 {
3174 enum bfd_architecture a;
3175 if (GDB_MULTI_ARCH)
3176 {
3177 if (gdbarch_init_registrary != NULL)
3178 {
3179 struct gdbarch_init_registration *rego;
3180 printf_filtered ("Available architectures are:\n");
3181 for (rego = gdbarch_init_registrary;
3182 rego != NULL;
3183 rego = rego->next)
3184 {
3185 const struct bfd_arch_info *ap;
3186 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3187 if (ap != NULL)
3188 {
3189 do
3190 {
3191 printf_filtered (" %s", ap->printable_name);
3192 ap = ap->next;
3193 }
3194 while (ap != NULL);
3195 printf_filtered ("\n");
3196 }
3197 }
3198 }
3199 else
3200 {
3201 printf_filtered ("There are no available architectures.\n");
3202 }
3203 return;
3204 }
3205 printf_filtered ("Available architectures are:\n");
3206 for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
3207 {
3208 const struct bfd_arch_info *ap = bfd_lookup_arch (a, 0);
3209 if (ap != NULL)
3210 {
3211 do
3212 {
3213 printf_filtered (" %s", ap->printable_name);
3214 ap = ap->next;
3215 }
3216 while (ap != NULL);
3217 printf_filtered ("\n");
3218 }
3219 }
3220 }
3221
3222 /* Set the architecture from arch/machine */
3223 void
3224 set_architecture_from_arch_mach (arch, mach)
3225 enum bfd_architecture arch;
3226 unsigned long mach;
3227 {
3228 const struct bfd_arch_info *wanted = bfd_lookup_arch (arch, mach);
3229 if (wanted != NULL)
3230 set_arch (wanted, set_arch_manual);
3231 else
3232 internal_error ("gdbarch: hardwired architecture/machine not reconized");
3233 }
3234
3235 /* Set the architecture from a BFD */
3236 static void
3237 set_architecture_from_file (bfd *abfd)
3238 {
3239 const struct bfd_arch_info *wanted = bfd_get_arch_info (abfd);
3240 if (target_architecture_auto)
3241 {
3242 set_arch (wanted, set_arch_auto);
3243 }
3244 else if (wanted != target_architecture)
3245 {
3246 warning ("%s architecture file may be incompatible with %s target.",
3247 wanted->printable_name,
3248 target_architecture->printable_name);
3249 }
3250 }
3251
3252
3253 /* Misc helper functions for targets. */
3254
3255 int
3256 frame_num_args_unknown (fi)
3257 struct frame_info *fi;
3258 {
3259 return -1;
3260 }
3261
3262
3263 int
3264 generic_register_convertible_not (num)
3265 int num;
3266 {
3267 return 0;
3268 }
3269
3270
3271 /* Disassembler */
3272
3273 /* Pointer to the target-dependent disassembly function. */
3274 int (*tm_print_insn) (bfd_vma, disassemble_info *);
3275 disassemble_info tm_print_insn_info;
3276
3277
3278
3279 /* Set the dynamic target-system-dependant parameters (architecture,
3280 byte-order) using information found in the BFD */
3281
3282 void
3283 set_gdbarch_from_file (abfd)
3284 bfd *abfd;
3285 {
3286 if (GDB_MULTI_ARCH)
3287 {
3288 struct gdbarch_info info;
3289 memset (&info, 0, sizeof info);
3290 info.abfd = abfd;
3291 gdbarch_update (info);
3292 return;
3293 }
3294 set_architecture_from_file (abfd);
3295 set_endian_from_file (abfd);
3296 }
3297
3298
3299 /* Initialize the current architecture. */
3300 void
3301 initialize_current_architecture ()
3302 {
3303 if (GDB_MULTI_ARCH)
3304 {
3305 struct gdbarch_init_registration *rego;
3306 const struct bfd_arch_info *chosen = NULL;
3307 for (rego = gdbarch_init_registrary; rego != NULL; rego = rego->next)
3308 {
3309 const struct bfd_arch_info *ap
3310 = bfd_lookup_arch (rego->bfd_architecture, 0);
3311
3312 /* Choose the first architecture alphabetically. */
3313 if (chosen == NULL
3314 || strcmp (ap->printable_name, chosen->printable_name) < 0)
3315 chosen = ap;
3316 }
3317
3318 if (chosen != NULL)
3319 {
3320 struct gdbarch_info info;
3321 memset (&info, 0, sizeof info);
3322 info.bfd_arch_info = chosen;
3323 gdbarch_update (info);
3324 }
3325 }
3326 }
3327
3328 extern void _initialize_gdbarch (void);
3329 void
3330 _initialize_gdbarch ()
3331 {
3332 struct cmd_list_element *c;
3333
3334 add_prefix_cmd ("endian", class_support, set_endian,
3335 "Set endianness of target.",
3336 &endianlist, "set endian ", 0, &setlist);
3337 add_cmd ("big", class_support, set_endian_big,
3338 "Set target as being big endian.", &endianlist);
3339 add_cmd ("little", class_support, set_endian_little,
3340 "Set target as being little endian.", &endianlist);
3341 add_cmd ("auto", class_support, set_endian_auto,
3342 "Select target endianness automatically.", &endianlist);
3343 add_cmd ("endian", class_support, show_endian,
3344 "Show endianness of target.", &showlist);
3345
3346 add_cmd ("architecture", class_support, set_architecture,
3347 "Set architecture of target.", &setlist);
3348 add_alias_cmd ("processor", "architecture", class_support, 1, &setlist);
3349 add_cmd ("architecture", class_support, show_architecture,
3350 "Show architecture of target.", &showlist);
3351 add_cmd ("architecture", class_support, info_architecture,
3352 "List supported target architectures", &infolist);
3353
3354 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
3355 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
3356 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
3357 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
3358 tm_print_insn_info.print_address_func = dis_asm_print_address;
3359
3360 add_show_from_set (add_set_cmd ("arch",
3361 class_maintenance,
3362 var_zinteger,
3363 (char *)&gdbarch_debug,
3364 "Set architecture debugging.\n\
3365 When non-zero, architecture debugging is enabled.", &setdebuglist),
3366 &showdebuglist);
3367 c = add_set_cmd ("archdebug",
3368 class_maintenance,
3369 var_zinteger,
3370 (char *)&gdbarch_debug,
3371 "Set architecture debugging.\n\
3372 When non-zero, architecture debugging is enabled.", &setlist);
3373
3374 deprecate_cmd (c, "set debug arch");
3375 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
3376 }
This page took 0.158019 seconds and 4 git commands to generate.