multi-arch ADDR_BITS_REMOVE.
[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, 2000, 2001 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 Bourne 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 making 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 #include "floatformat.h"
62
63 #include "gdb_assert.h"
64
65 /* Static function declarations */
66
67 static void verify_gdbarch (struct gdbarch *gdbarch);
68 static void alloc_gdbarch_data (struct gdbarch *);
69 static void init_gdbarch_data (struct gdbarch *);
70 static void free_gdbarch_data (struct gdbarch *);
71 static void init_gdbarch_swap (struct gdbarch *);
72 static void swapout_gdbarch_swap (struct gdbarch *);
73 static void swapin_gdbarch_swap (struct gdbarch *);
74
75 /* Convenience macro for allocting typesafe memory. */
76
77 #ifndef XMALLOC
78 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
79 #endif
80
81
82 /* Non-zero if we want to trace architecture code. */
83
84 #ifndef GDBARCH_DEBUG
85 #define GDBARCH_DEBUG 0
86 #endif
87 int gdbarch_debug = GDBARCH_DEBUG;
88
89
90 /* Maintain the struct gdbarch object */
91
92 struct gdbarch
93 {
94 /* basic architectural information */
95 const struct bfd_arch_info * bfd_arch_info;
96 int byte_order;
97
98 /* target specific vector. */
99 struct gdbarch_tdep *tdep;
100 gdbarch_dump_tdep_ftype *dump_tdep;
101
102 /* per-architecture data-pointers */
103 unsigned nr_data;
104 void **data;
105
106 /* per-architecture swap-regions */
107 struct gdbarch_swap *swap;
108
109 /* Multi-arch values.
110
111 When extending this structure you must:
112
113 Add the field below.
114
115 Declare set/get functions and define the corresponding
116 macro in gdbarch.h.
117
118 gdbarch_alloc(): If zero/NULL is not a suitable default,
119 initialize the new field.
120
121 verify_gdbarch(): Confirm that the target updated the field
122 correctly.
123
124 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
125 field is dumped out
126
127 ``startup_gdbarch()'': Append an initial value to the static
128 variable (base values on the host's c-type system).
129
130 get_gdbarch(): Implement the set/get functions (probably using
131 the macro's as shortcuts).
132
133 */
134
135 int short_bit;
136 int int_bit;
137 int long_bit;
138 int long_long_bit;
139 int float_bit;
140 int double_bit;
141 int long_double_bit;
142 int ptr_bit;
143 int addr_bit;
144 int bfd_vma_bit;
145 int ieee_float;
146 gdbarch_read_pc_ftype *read_pc;
147 gdbarch_write_pc_ftype *write_pc;
148 gdbarch_read_fp_ftype *read_fp;
149 gdbarch_write_fp_ftype *write_fp;
150 gdbarch_read_sp_ftype *read_sp;
151 gdbarch_write_sp_ftype *write_sp;
152 gdbarch_register_read_ftype *register_read;
153 gdbarch_register_write_ftype *register_write;
154 int num_regs;
155 int num_pseudo_regs;
156 int sp_regnum;
157 int fp_regnum;
158 int pc_regnum;
159 int fp0_regnum;
160 int npc_regnum;
161 int nnpc_regnum;
162 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
163 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
164 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
165 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
166 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
167 gdbarch_register_name_ftype *register_name;
168 int register_size;
169 int register_bytes;
170 gdbarch_register_byte_ftype *register_byte;
171 gdbarch_register_raw_size_ftype *register_raw_size;
172 int max_register_raw_size;
173 gdbarch_register_virtual_size_ftype *register_virtual_size;
174 int max_register_virtual_size;
175 gdbarch_register_virtual_type_ftype *register_virtual_type;
176 gdbarch_do_registers_info_ftype *do_registers_info;
177 gdbarch_register_sim_regno_ftype *register_sim_regno;
178 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
179 int use_generic_dummy_frames;
180 int call_dummy_location;
181 gdbarch_call_dummy_address_ftype *call_dummy_address;
182 CORE_ADDR call_dummy_start_offset;
183 CORE_ADDR call_dummy_breakpoint_offset;
184 int call_dummy_breakpoint_offset_p;
185 int call_dummy_length;
186 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
187 int call_dummy_p;
188 LONGEST * call_dummy_words;
189 int sizeof_call_dummy_words;
190 int call_dummy_stack_adjust_p;
191 int call_dummy_stack_adjust;
192 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
193 int believe_pcc_promotion;
194 int believe_pcc_promotion_type;
195 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
196 gdbarch_get_saved_register_ftype *get_saved_register;
197 gdbarch_register_convertible_ftype *register_convertible;
198 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
199 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
200 gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
201 gdbarch_store_pseudo_register_ftype *store_pseudo_register;
202 gdbarch_pointer_to_address_ftype *pointer_to_address;
203 gdbarch_address_to_pointer_ftype *address_to_pointer;
204 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
205 gdbarch_extract_return_value_ftype *extract_return_value;
206 gdbarch_push_arguments_ftype *push_arguments;
207 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
208 gdbarch_push_return_address_ftype *push_return_address;
209 gdbarch_pop_frame_ftype *pop_frame;
210 gdbarch_d10v_make_daddr_ftype *d10v_make_daddr;
211 gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr;
212 gdbarch_d10v_daddr_p_ftype *d10v_daddr_p;
213 gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p;
214 gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw;
215 gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw;
216 gdbarch_store_struct_return_ftype *store_struct_return;
217 gdbarch_store_return_value_ftype *store_return_value;
218 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
219 gdbarch_use_struct_convention_ftype *use_struct_convention;
220 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
221 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
222 gdbarch_skip_prologue_ftype *skip_prologue;
223 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
224 gdbarch_inner_than_ftype *inner_than;
225 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
226 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
227 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
228 CORE_ADDR decr_pc_after_break;
229 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
230 CORE_ADDR function_start_offset;
231 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
232 CORE_ADDR frame_args_skip;
233 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
234 gdbarch_frame_chain_ftype *frame_chain;
235 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
236 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
237 gdbarch_frame_args_address_ftype *frame_args_address;
238 gdbarch_frame_locals_address_ftype *frame_locals_address;
239 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
240 gdbarch_frame_num_args_ftype *frame_num_args;
241 gdbarch_stack_align_ftype *stack_align;
242 int extra_stack_alignment_needed;
243 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
244 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
245 int parm_boundary;
246 const struct floatformat * float_format;
247 const struct floatformat * double_format;
248 const struct floatformat * long_double_format;
249 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
250 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
251 gdbarch_software_single_step_ftype *software_single_step;
252 };
253
254
255 /* The default architecture uses host values (for want of a better
256 choice). */
257
258 extern const struct bfd_arch_info bfd_default_arch_struct;
259
260 struct gdbarch startup_gdbarch =
261 {
262 /* basic architecture information */
263 &bfd_default_arch_struct,
264 BIG_ENDIAN,
265 /* target specific vector and its dump routine */
266 NULL, NULL,
267 /*per-architecture data-pointers and swap regions */
268 0, NULL, NULL,
269 /* Multi-arch values */
270 8 * sizeof (short),
271 8 * sizeof (int),
272 8 * sizeof (long),
273 8 * sizeof (LONGEST),
274 8 * sizeof (float),
275 8 * sizeof (double),
276 8 * sizeof (long double),
277 8 * sizeof (void*),
278 8 * sizeof (void*),
279 8 * sizeof (void*),
280 0,
281 0,
282 0,
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 0,
327 0,
328 0,
329 0,
330 0,
331 generic_get_saved_register,
332 0,
333 0,
334 0,
335 0,
336 0,
337 0,
338 0,
339 0,
340 0,
341 0,
342 0,
343 0,
344 0,
345 0,
346 0,
347 0,
348 0,
349 0,
350 0,
351 0,
352 0,
353 0,
354 0,
355 0,
356 0,
357 0,
358 0,
359 0,
360 0,
361 0,
362 0,
363 0,
364 0,
365 0,
366 0,
367 0,
368 0,
369 0,
370 0,
371 0,
372 0,
373 0,
374 0,
375 0,
376 0,
377 0,
378 0,
379 0,
380 0,
381 0,
382 0,
383 0,
384 0,
385 0,
386 0,
387 /* startup_gdbarch() */
388 };
389
390 struct gdbarch *current_gdbarch = &startup_gdbarch;
391
392 /* Do any initialization needed for a non-multiarch configuration
393 after the _initialize_MODULE functions have been run. */
394 void
395 initialize_non_multiarch ()
396 {
397 alloc_gdbarch_data (&startup_gdbarch);
398 init_gdbarch_data (&startup_gdbarch);
399 }
400
401
402 /* Create a new ``struct gdbarch'' based on information provided by
403 ``struct gdbarch_info''. */
404
405 struct gdbarch *
406 gdbarch_alloc (const struct gdbarch_info *info,
407 struct gdbarch_tdep *tdep)
408 {
409 struct gdbarch *gdbarch = XMALLOC (struct gdbarch);
410 memset (gdbarch, 0, sizeof (*gdbarch));
411
412 alloc_gdbarch_data (gdbarch);
413
414 gdbarch->tdep = tdep;
415
416 gdbarch->bfd_arch_info = info->bfd_arch_info;
417 gdbarch->byte_order = info->byte_order;
418
419 /* Force the explicit initialization of these. */
420 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
421 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
422 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
423 gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
424 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
425 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
426 gdbarch->long_double_bit = 2*TARGET_DOUBLE_BIT;
427 gdbarch->ptr_bit = TARGET_INT_BIT;
428 gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
429 gdbarch->read_pc = generic_target_read_pc;
430 gdbarch->write_pc = generic_target_write_pc;
431 gdbarch->read_fp = generic_target_read_fp;
432 gdbarch->write_fp = generic_target_write_fp;
433 gdbarch->read_sp = generic_target_read_sp;
434 gdbarch->write_sp = generic_target_write_sp;
435 gdbarch->num_regs = -1;
436 gdbarch->sp_regnum = -1;
437 gdbarch->fp_regnum = -1;
438 gdbarch->pc_regnum = -1;
439 gdbarch->fp0_regnum = -1;
440 gdbarch->npc_regnum = -1;
441 gdbarch->nnpc_regnum = -1;
442 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
443 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
444 gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
445 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
446 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
447 gdbarch->register_name = legacy_register_name;
448 gdbarch->register_size = -1;
449 gdbarch->register_bytes = -1;
450 gdbarch->max_register_raw_size = -1;
451 gdbarch->max_register_virtual_size = -1;
452 gdbarch->do_registers_info = do_registers_info;
453 gdbarch->register_sim_regno = default_register_sim_regno;
454 gdbarch->use_generic_dummy_frames = -1;
455 gdbarch->call_dummy_start_offset = -1;
456 gdbarch->call_dummy_breakpoint_offset = -1;
457 gdbarch->call_dummy_breakpoint_offset_p = -1;
458 gdbarch->call_dummy_length = -1;
459 gdbarch->call_dummy_p = -1;
460 gdbarch->call_dummy_words = legacy_call_dummy_words;
461 gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
462 gdbarch->call_dummy_stack_adjust_p = -1;
463 gdbarch->coerce_float_to_double = default_coerce_float_to_double;
464 gdbarch->register_convertible = generic_register_convertible_not;
465 gdbarch->pointer_to_address = unsigned_pointer_to_address;
466 gdbarch->address_to_pointer = unsigned_address_to_pointer;
467 gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
468 gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
469 gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
470 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
471 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
472 gdbarch->decr_pc_after_break = -1;
473 gdbarch->prepare_to_proceed = default_prepare_to_proceed;
474 gdbarch->function_start_offset = -1;
475 gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
476 gdbarch->frame_args_skip = -1;
477 gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
478 gdbarch->extra_stack_alignment_needed = 1;
479 gdbarch->convert_from_func_ptr_addr = core_addr_identity;
480 gdbarch->addr_bits_remove = core_addr_identity;
481 /* gdbarch_alloc() */
482
483 return gdbarch;
484 }
485
486
487 /* Free a gdbarch struct. This should never happen in normal
488 operation --- once you've created a gdbarch, you keep it around.
489 However, if an architecture's init function encounters an error
490 building the structure, it may need to clean up a partially
491 constructed gdbarch. */
492
493 void
494 gdbarch_free (struct gdbarch *arch)
495 {
496 gdb_assert (arch != NULL);
497 free_gdbarch_data (arch);
498 xfree (arch);
499 }
500
501
502 /* Ensure that all values in a GDBARCH are reasonable. */
503
504 static void
505 verify_gdbarch (struct gdbarch *gdbarch)
506 {
507 /* Only perform sanity checks on a multi-arch target. */
508 if (!GDB_MULTI_ARCH)
509 return;
510 /* fundamental */
511 if (gdbarch->byte_order == 0)
512 internal_error (__FILE__, __LINE__,
513 "verify_gdbarch: byte-order unset");
514 if (gdbarch->bfd_arch_info == NULL)
515 internal_error (__FILE__, __LINE__,
516 "verify_gdbarch: bfd_arch_info unset");
517 /* Check those that need to be defined for the given multi-arch level. */
518 /* Skip verify of short_bit, invalid_p == 0 */
519 /* Skip verify of int_bit, invalid_p == 0 */
520 /* Skip verify of long_bit, invalid_p == 0 */
521 /* Skip verify of long_long_bit, invalid_p == 0 */
522 /* Skip verify of float_bit, invalid_p == 0 */
523 /* Skip verify of double_bit, invalid_p == 0 */
524 /* Skip verify of long_double_bit, invalid_p == 0 */
525 /* Skip verify of ptr_bit, invalid_p == 0 */
526 if (gdbarch->addr_bit == 0)
527 gdbarch->addr_bit = TARGET_PTR_BIT;
528 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
529 /* Skip verify of ieee_float, invalid_p == 0 */
530 /* Skip verify of read_pc, invalid_p == 0 */
531 /* Skip verify of write_pc, invalid_p == 0 */
532 /* Skip verify of read_fp, invalid_p == 0 */
533 /* Skip verify of write_fp, invalid_p == 0 */
534 /* Skip verify of read_sp, invalid_p == 0 */
535 /* Skip verify of write_sp, invalid_p == 0 */
536 /* Skip verify of register_read, has predicate */
537 /* Skip verify of register_write, has predicate */
538 if ((GDB_MULTI_ARCH >= 2)
539 && (gdbarch->num_regs == -1))
540 internal_error (__FILE__, __LINE__,
541 "gdbarch: verify_gdbarch: num_regs invalid");
542 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
543 if ((GDB_MULTI_ARCH >= 2)
544 && (gdbarch->sp_regnum == -1))
545 internal_error (__FILE__, __LINE__,
546 "gdbarch: verify_gdbarch: sp_regnum invalid");
547 if ((GDB_MULTI_ARCH >= 2)
548 && (gdbarch->fp_regnum == -1))
549 internal_error (__FILE__, __LINE__,
550 "gdbarch: verify_gdbarch: fp_regnum invalid");
551 if ((GDB_MULTI_ARCH >= 2)
552 && (gdbarch->pc_regnum == -1))
553 internal_error (__FILE__, __LINE__,
554 "gdbarch: verify_gdbarch: pc_regnum invalid");
555 /* Skip verify of fp0_regnum, invalid_p == 0 */
556 /* Skip verify of npc_regnum, invalid_p == 0 */
557 /* Skip verify of nnpc_regnum, invalid_p == 0 */
558 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
559 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
560 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
561 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
562 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
563 /* Skip verify of register_name, invalid_p == 0 */
564 if ((GDB_MULTI_ARCH >= 2)
565 && (gdbarch->register_size == -1))
566 internal_error (__FILE__, __LINE__,
567 "gdbarch: verify_gdbarch: register_size invalid");
568 if ((GDB_MULTI_ARCH >= 2)
569 && (gdbarch->register_bytes == -1))
570 internal_error (__FILE__, __LINE__,
571 "gdbarch: verify_gdbarch: register_bytes invalid");
572 if ((GDB_MULTI_ARCH >= 2)
573 && (gdbarch->register_byte == 0))
574 internal_error (__FILE__, __LINE__,
575 "gdbarch: verify_gdbarch: register_byte invalid");
576 if ((GDB_MULTI_ARCH >= 2)
577 && (gdbarch->register_raw_size == 0))
578 internal_error (__FILE__, __LINE__,
579 "gdbarch: verify_gdbarch: register_raw_size invalid");
580 if ((GDB_MULTI_ARCH >= 2)
581 && (gdbarch->max_register_raw_size == -1))
582 internal_error (__FILE__, __LINE__,
583 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
584 if ((GDB_MULTI_ARCH >= 2)
585 && (gdbarch->register_virtual_size == 0))
586 internal_error (__FILE__, __LINE__,
587 "gdbarch: verify_gdbarch: register_virtual_size invalid");
588 if ((GDB_MULTI_ARCH >= 2)
589 && (gdbarch->max_register_virtual_size == -1))
590 internal_error (__FILE__, __LINE__,
591 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
592 if ((GDB_MULTI_ARCH >= 2)
593 && (gdbarch->register_virtual_type == 0))
594 internal_error (__FILE__, __LINE__,
595 "gdbarch: verify_gdbarch: register_virtual_type invalid");
596 /* Skip verify of do_registers_info, invalid_p == 0 */
597 /* Skip verify of register_sim_regno, invalid_p == 0 */
598 /* Skip verify of register_bytes_ok, has predicate */
599 if ((GDB_MULTI_ARCH >= 1)
600 && (gdbarch->use_generic_dummy_frames == -1))
601 internal_error (__FILE__, __LINE__,
602 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
603 if ((GDB_MULTI_ARCH >= 2)
604 && (gdbarch->call_dummy_location == 0))
605 internal_error (__FILE__, __LINE__,
606 "gdbarch: verify_gdbarch: call_dummy_location invalid");
607 if ((GDB_MULTI_ARCH >= 2)
608 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
609 internal_error (__FILE__, __LINE__,
610 "gdbarch: verify_gdbarch: call_dummy_address invalid");
611 if ((GDB_MULTI_ARCH >= 2)
612 && (gdbarch->call_dummy_start_offset == -1))
613 internal_error (__FILE__, __LINE__,
614 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
615 if ((GDB_MULTI_ARCH >= 2)
616 && (gdbarch->call_dummy_breakpoint_offset == -1))
617 internal_error (__FILE__, __LINE__,
618 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
619 if ((GDB_MULTI_ARCH >= 1)
620 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
621 internal_error (__FILE__, __LINE__,
622 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
623 if ((GDB_MULTI_ARCH >= 2)
624 && (gdbarch->call_dummy_length == -1))
625 internal_error (__FILE__, __LINE__,
626 "gdbarch: verify_gdbarch: call_dummy_length invalid");
627 if ((GDB_MULTI_ARCH >= 2)
628 && (gdbarch->pc_in_call_dummy == 0))
629 internal_error (__FILE__, __LINE__,
630 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
631 if ((GDB_MULTI_ARCH >= 1)
632 && (gdbarch->call_dummy_p == -1))
633 internal_error (__FILE__, __LINE__,
634 "gdbarch: verify_gdbarch: call_dummy_p invalid");
635 /* Skip verify of call_dummy_words, invalid_p == 0 */
636 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
637 if ((GDB_MULTI_ARCH >= 1)
638 && (gdbarch->call_dummy_stack_adjust_p == -1))
639 internal_error (__FILE__, __LINE__,
640 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
641 if ((GDB_MULTI_ARCH >= 2)
642 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
643 internal_error (__FILE__, __LINE__,
644 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
645 if ((GDB_MULTI_ARCH >= 2)
646 && (gdbarch->fix_call_dummy == 0))
647 internal_error (__FILE__, __LINE__,
648 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
649 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
650 if ((GDB_MULTI_ARCH >= 1)
651 && (gdbarch->get_saved_register == 0))
652 internal_error (__FILE__, __LINE__,
653 "gdbarch: verify_gdbarch: get_saved_register invalid");
654 /* Skip verify of register_convertible, invalid_p == 0 */
655 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
656 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
657 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
658 /* Skip verify of store_pseudo_register, invalid_p == 0 */
659 /* Skip verify of pointer_to_address, invalid_p == 0 */
660 /* Skip verify of address_to_pointer, invalid_p == 0 */
661 /* Skip verify of return_value_on_stack, invalid_p == 0 */
662 if ((GDB_MULTI_ARCH >= 2)
663 && (gdbarch->extract_return_value == 0))
664 internal_error (__FILE__, __LINE__,
665 "gdbarch: verify_gdbarch: extract_return_value invalid");
666 if ((GDB_MULTI_ARCH >= 1)
667 && (gdbarch->push_arguments == 0))
668 internal_error (__FILE__, __LINE__,
669 "gdbarch: verify_gdbarch: push_arguments invalid");
670 if ((GDB_MULTI_ARCH >= 2)
671 && (gdbarch->push_dummy_frame == 0))
672 internal_error (__FILE__, __LINE__,
673 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
674 if ((GDB_MULTI_ARCH >= 1)
675 && (gdbarch->push_return_address == 0))
676 internal_error (__FILE__, __LINE__,
677 "gdbarch: verify_gdbarch: push_return_address invalid");
678 if ((GDB_MULTI_ARCH >= 2)
679 && (gdbarch->pop_frame == 0))
680 internal_error (__FILE__, __LINE__,
681 "gdbarch: verify_gdbarch: pop_frame invalid");
682 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
683 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
684 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
685 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
686 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
687 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
688 if ((GDB_MULTI_ARCH >= 2)
689 && (gdbarch->store_struct_return == 0))
690 internal_error (__FILE__, __LINE__,
691 "gdbarch: verify_gdbarch: store_struct_return invalid");
692 if ((GDB_MULTI_ARCH >= 2)
693 && (gdbarch->store_return_value == 0))
694 internal_error (__FILE__, __LINE__,
695 "gdbarch: verify_gdbarch: store_return_value invalid");
696 /* Skip verify of extract_struct_value_address, has predicate */
697 if ((GDB_MULTI_ARCH >= 2)
698 && (gdbarch->use_struct_convention == 0))
699 internal_error (__FILE__, __LINE__,
700 "gdbarch: verify_gdbarch: use_struct_convention invalid");
701 if ((GDB_MULTI_ARCH >= 2)
702 && (gdbarch->frame_init_saved_regs == 0))
703 internal_error (__FILE__, __LINE__,
704 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
705 if ((GDB_MULTI_ARCH >= 2)
706 && (gdbarch->init_extra_frame_info == 0))
707 internal_error (__FILE__, __LINE__,
708 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
709 if ((GDB_MULTI_ARCH >= 2)
710 && (gdbarch->skip_prologue == 0))
711 internal_error (__FILE__, __LINE__,
712 "gdbarch: verify_gdbarch: skip_prologue invalid");
713 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
714 if ((GDB_MULTI_ARCH >= 2)
715 && (gdbarch->inner_than == 0))
716 internal_error (__FILE__, __LINE__,
717 "gdbarch: verify_gdbarch: inner_than invalid");
718 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
719 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
720 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH >= 2)
722 && (gdbarch->decr_pc_after_break == -1))
723 internal_error (__FILE__, __LINE__,
724 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
725 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
726 if ((GDB_MULTI_ARCH >= 2)
727 && (gdbarch->function_start_offset == -1))
728 internal_error (__FILE__, __LINE__,
729 "gdbarch: verify_gdbarch: function_start_offset invalid");
730 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
731 if ((GDB_MULTI_ARCH >= 2)
732 && (gdbarch->frame_args_skip == -1))
733 internal_error (__FILE__, __LINE__,
734 "gdbarch: verify_gdbarch: frame_args_skip invalid");
735 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH >= 2)
737 && (gdbarch->frame_chain == 0))
738 internal_error (__FILE__, __LINE__,
739 "gdbarch: verify_gdbarch: frame_chain invalid");
740 if ((GDB_MULTI_ARCH >= 1)
741 && (gdbarch->frame_chain_valid == 0))
742 internal_error (__FILE__, __LINE__,
743 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
744 if ((GDB_MULTI_ARCH >= 2)
745 && (gdbarch->frame_saved_pc == 0))
746 internal_error (__FILE__, __LINE__,
747 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
748 if ((GDB_MULTI_ARCH >= 2)
749 && (gdbarch->frame_args_address == 0))
750 internal_error (__FILE__, __LINE__,
751 "gdbarch: verify_gdbarch: frame_args_address invalid");
752 if ((GDB_MULTI_ARCH >= 2)
753 && (gdbarch->frame_locals_address == 0))
754 internal_error (__FILE__, __LINE__,
755 "gdbarch: verify_gdbarch: frame_locals_address invalid");
756 if ((GDB_MULTI_ARCH >= 2)
757 && (gdbarch->saved_pc_after_call == 0))
758 internal_error (__FILE__, __LINE__,
759 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
760 if ((GDB_MULTI_ARCH >= 2)
761 && (gdbarch->frame_num_args == 0))
762 internal_error (__FILE__, __LINE__,
763 "gdbarch: verify_gdbarch: frame_num_args invalid");
764 /* Skip verify of stack_align, has predicate */
765 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
766 /* Skip verify of reg_struct_has_addr, has predicate */
767 /* Skip verify of save_dummy_frame_tos, has predicate */
768 if (gdbarch->float_format == 0)
769 gdbarch->float_format = default_float_format (gdbarch);
770 if (gdbarch->double_format == 0)
771 gdbarch->double_format = default_double_format (gdbarch);
772 if (gdbarch->long_double_format == 0)
773 gdbarch->long_double_format = &floatformat_unknown;
774 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
775 /* Skip verify of addr_bits_remove, invalid_p == 0 */
776 /* Skip verify of software_single_step, has predicate */
777 }
778
779
780 /* Print out the details of the current architecture. */
781
782 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
783 just happens to match the global variable ``current_gdbarch''. That
784 way macros refering to that variable get the local and not the global
785 version - ulgh. Once everything is parameterised with gdbarch, this
786 will go away. */
787
788 void
789 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
790 {
791 fprintf_unfiltered (file,
792 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
793 GDB_MULTI_ARCH);
794 #ifdef TARGET_ARCHITECTURE
795 fprintf_unfiltered (file,
796 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
797 XSTRING (TARGET_ARCHITECTURE));
798 #endif
799 #ifdef TARGET_BYTE_ORDER
800 fprintf_unfiltered (file,
801 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
802 XSTRING (TARGET_BYTE_ORDER));
803 #endif
804 #ifdef TARGET_SHORT_BIT
805 fprintf_unfiltered (file,
806 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
807 XSTRING (TARGET_SHORT_BIT));
808 #endif
809 #ifdef TARGET_INT_BIT
810 fprintf_unfiltered (file,
811 "gdbarch_dump: TARGET_INT_BIT # %s\n",
812 XSTRING (TARGET_INT_BIT));
813 #endif
814 #ifdef TARGET_LONG_BIT
815 fprintf_unfiltered (file,
816 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
817 XSTRING (TARGET_LONG_BIT));
818 #endif
819 #ifdef TARGET_LONG_LONG_BIT
820 fprintf_unfiltered (file,
821 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
822 XSTRING (TARGET_LONG_LONG_BIT));
823 #endif
824 #ifdef TARGET_FLOAT_BIT
825 fprintf_unfiltered (file,
826 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
827 XSTRING (TARGET_FLOAT_BIT));
828 #endif
829 #ifdef TARGET_DOUBLE_BIT
830 fprintf_unfiltered (file,
831 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
832 XSTRING (TARGET_DOUBLE_BIT));
833 #endif
834 #ifdef TARGET_LONG_DOUBLE_BIT
835 fprintf_unfiltered (file,
836 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
837 XSTRING (TARGET_LONG_DOUBLE_BIT));
838 #endif
839 #ifdef TARGET_PTR_BIT
840 fprintf_unfiltered (file,
841 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
842 XSTRING (TARGET_PTR_BIT));
843 #endif
844 #ifdef TARGET_ADDR_BIT
845 fprintf_unfiltered (file,
846 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
847 XSTRING (TARGET_ADDR_BIT));
848 #endif
849 #ifdef TARGET_BFD_VMA_BIT
850 fprintf_unfiltered (file,
851 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
852 XSTRING (TARGET_BFD_VMA_BIT));
853 #endif
854 #ifdef IEEE_FLOAT
855 fprintf_unfiltered (file,
856 "gdbarch_dump: IEEE_FLOAT # %s\n",
857 XSTRING (IEEE_FLOAT));
858 #endif
859 #ifdef TARGET_READ_PC
860 fprintf_unfiltered (file,
861 "gdbarch_dump: %s # %s\n",
862 "TARGET_READ_PC(ptid)",
863 XSTRING (TARGET_READ_PC (ptid)));
864 #endif
865 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
866 /* Macro might contain `[{}]' when not multi-arch */
867 fprintf_unfiltered (file,
868 "gdbarch_dump: %s # %s\n",
869 "TARGET_WRITE_PC(val, ptid)",
870 XSTRING (TARGET_WRITE_PC (val, ptid)));
871 #endif
872 #ifdef TARGET_READ_FP
873 fprintf_unfiltered (file,
874 "gdbarch_dump: %s # %s\n",
875 "TARGET_READ_FP()",
876 XSTRING (TARGET_READ_FP ()));
877 #endif
878 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
879 /* Macro might contain `[{}]' when not multi-arch */
880 fprintf_unfiltered (file,
881 "gdbarch_dump: %s # %s\n",
882 "TARGET_WRITE_FP(val)",
883 XSTRING (TARGET_WRITE_FP (val)));
884 #endif
885 #ifdef TARGET_READ_SP
886 fprintf_unfiltered (file,
887 "gdbarch_dump: %s # %s\n",
888 "TARGET_READ_SP()",
889 XSTRING (TARGET_READ_SP ()));
890 #endif
891 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
892 /* Macro might contain `[{}]' when not multi-arch */
893 fprintf_unfiltered (file,
894 "gdbarch_dump: %s # %s\n",
895 "TARGET_WRITE_SP(val)",
896 XSTRING (TARGET_WRITE_SP (val)));
897 #endif
898 #ifdef NUM_REGS
899 fprintf_unfiltered (file,
900 "gdbarch_dump: NUM_REGS # %s\n",
901 XSTRING (NUM_REGS));
902 #endif
903 #ifdef NUM_PSEUDO_REGS
904 fprintf_unfiltered (file,
905 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
906 XSTRING (NUM_PSEUDO_REGS));
907 #endif
908 #ifdef SP_REGNUM
909 fprintf_unfiltered (file,
910 "gdbarch_dump: SP_REGNUM # %s\n",
911 XSTRING (SP_REGNUM));
912 #endif
913 #ifdef FP_REGNUM
914 fprintf_unfiltered (file,
915 "gdbarch_dump: FP_REGNUM # %s\n",
916 XSTRING (FP_REGNUM));
917 #endif
918 #ifdef PC_REGNUM
919 fprintf_unfiltered (file,
920 "gdbarch_dump: PC_REGNUM # %s\n",
921 XSTRING (PC_REGNUM));
922 #endif
923 #ifdef FP0_REGNUM
924 fprintf_unfiltered (file,
925 "gdbarch_dump: FP0_REGNUM # %s\n",
926 XSTRING (FP0_REGNUM));
927 #endif
928 #ifdef NPC_REGNUM
929 fprintf_unfiltered (file,
930 "gdbarch_dump: NPC_REGNUM # %s\n",
931 XSTRING (NPC_REGNUM));
932 #endif
933 #ifdef NNPC_REGNUM
934 fprintf_unfiltered (file,
935 "gdbarch_dump: NNPC_REGNUM # %s\n",
936 XSTRING (NNPC_REGNUM));
937 #endif
938 #ifdef STAB_REG_TO_REGNUM
939 fprintf_unfiltered (file,
940 "gdbarch_dump: %s # %s\n",
941 "STAB_REG_TO_REGNUM(stab_regnr)",
942 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
943 #endif
944 #ifdef ECOFF_REG_TO_REGNUM
945 fprintf_unfiltered (file,
946 "gdbarch_dump: %s # %s\n",
947 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
948 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
949 #endif
950 #ifdef DWARF_REG_TO_REGNUM
951 fprintf_unfiltered (file,
952 "gdbarch_dump: %s # %s\n",
953 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
954 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
955 #endif
956 #ifdef SDB_REG_TO_REGNUM
957 fprintf_unfiltered (file,
958 "gdbarch_dump: %s # %s\n",
959 "SDB_REG_TO_REGNUM(sdb_regnr)",
960 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
961 #endif
962 #ifdef DWARF2_REG_TO_REGNUM
963 fprintf_unfiltered (file,
964 "gdbarch_dump: %s # %s\n",
965 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
966 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
967 #endif
968 #ifdef REGISTER_NAME
969 fprintf_unfiltered (file,
970 "gdbarch_dump: %s # %s\n",
971 "REGISTER_NAME(regnr)",
972 XSTRING (REGISTER_NAME (regnr)));
973 #endif
974 #ifdef REGISTER_SIZE
975 fprintf_unfiltered (file,
976 "gdbarch_dump: REGISTER_SIZE # %s\n",
977 XSTRING (REGISTER_SIZE));
978 #endif
979 #ifdef REGISTER_BYTES
980 fprintf_unfiltered (file,
981 "gdbarch_dump: REGISTER_BYTES # %s\n",
982 XSTRING (REGISTER_BYTES));
983 #endif
984 #ifdef REGISTER_BYTE
985 fprintf_unfiltered (file,
986 "gdbarch_dump: %s # %s\n",
987 "REGISTER_BYTE(reg_nr)",
988 XSTRING (REGISTER_BYTE (reg_nr)));
989 #endif
990 #ifdef REGISTER_RAW_SIZE
991 fprintf_unfiltered (file,
992 "gdbarch_dump: %s # %s\n",
993 "REGISTER_RAW_SIZE(reg_nr)",
994 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
995 #endif
996 #ifdef MAX_REGISTER_RAW_SIZE
997 fprintf_unfiltered (file,
998 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
999 XSTRING (MAX_REGISTER_RAW_SIZE));
1000 #endif
1001 #ifdef REGISTER_VIRTUAL_SIZE
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: %s # %s\n",
1004 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1005 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
1006 #endif
1007 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1008 fprintf_unfiltered (file,
1009 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1010 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1011 #endif
1012 #ifdef REGISTER_VIRTUAL_TYPE
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: %s # %s\n",
1015 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1016 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
1017 #endif
1018 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1019 /* Macro might contain `[{}]' when not multi-arch */
1020 fprintf_unfiltered (file,
1021 "gdbarch_dump: %s # %s\n",
1022 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1023 XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
1024 #endif
1025 #ifdef REGISTER_SIM_REGNO
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: %s # %s\n",
1028 "REGISTER_SIM_REGNO(reg_nr)",
1029 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1030 #endif
1031 #ifdef REGISTER_BYTES_OK
1032 fprintf_unfiltered (file,
1033 "gdbarch_dump: %s # %s\n",
1034 "REGISTER_BYTES_OK(nr_bytes)",
1035 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1036 #endif
1037 #ifdef USE_GENERIC_DUMMY_FRAMES
1038 fprintf_unfiltered (file,
1039 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1040 XSTRING (USE_GENERIC_DUMMY_FRAMES));
1041 #endif
1042 #ifdef CALL_DUMMY_LOCATION
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1045 XSTRING (CALL_DUMMY_LOCATION));
1046 #endif
1047 #ifdef CALL_DUMMY_ADDRESS
1048 fprintf_unfiltered (file,
1049 "gdbarch_dump: %s # %s\n",
1050 "CALL_DUMMY_ADDRESS()",
1051 XSTRING (CALL_DUMMY_ADDRESS ()));
1052 #endif
1053 #ifdef CALL_DUMMY_START_OFFSET
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1056 XSTRING (CALL_DUMMY_START_OFFSET));
1057 #endif
1058 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1061 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
1062 #endif
1063 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1066 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
1067 #endif
1068 #ifdef CALL_DUMMY_LENGTH
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1071 XSTRING (CALL_DUMMY_LENGTH));
1072 #endif
1073 #ifdef PC_IN_CALL_DUMMY
1074 fprintf_unfiltered (file,
1075 "gdbarch_dump: %s # %s\n",
1076 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1077 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1078 #endif
1079 #ifdef CALL_DUMMY_P
1080 fprintf_unfiltered (file,
1081 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1082 XSTRING (CALL_DUMMY_P));
1083 #endif
1084 #ifdef CALL_DUMMY_WORDS
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1087 XSTRING (CALL_DUMMY_WORDS));
1088 #endif
1089 #ifdef SIZEOF_CALL_DUMMY_WORDS
1090 fprintf_unfiltered (file,
1091 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1092 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
1093 #endif
1094 #ifdef CALL_DUMMY_STACK_ADJUST_P
1095 fprintf_unfiltered (file,
1096 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1097 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
1098 #endif
1099 #ifdef CALL_DUMMY_STACK_ADJUST
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1102 XSTRING (CALL_DUMMY_STACK_ADJUST));
1103 #endif
1104 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1105 /* Macro might contain `[{}]' when not multi-arch */
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: %s # %s\n",
1108 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1109 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1110 #endif
1111 #ifdef BELIEVE_PCC_PROMOTION
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1114 XSTRING (BELIEVE_PCC_PROMOTION));
1115 #endif
1116 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1119 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
1120 #endif
1121 #ifdef COERCE_FLOAT_TO_DOUBLE
1122 fprintf_unfiltered (file,
1123 "gdbarch_dump: %s # %s\n",
1124 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1125 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
1126 #endif
1127 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1128 /* Macro might contain `[{}]' when not multi-arch */
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: %s # %s\n",
1131 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1132 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1133 #endif
1134 #ifdef REGISTER_CONVERTIBLE
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: %s # %s\n",
1137 "REGISTER_CONVERTIBLE(nr)",
1138 XSTRING (REGISTER_CONVERTIBLE (nr)));
1139 #endif
1140 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1141 /* Macro might contain `[{}]' when not multi-arch */
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: %s # %s\n",
1144 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1145 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1146 #endif
1147 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1148 /* Macro might contain `[{}]' when not multi-arch */
1149 fprintf_unfiltered (file,
1150 "gdbarch_dump: %s # %s\n",
1151 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1152 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1153 #endif
1154 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1155 /* Macro might contain `[{}]' when not multi-arch */
1156 fprintf_unfiltered (file,
1157 "gdbarch_dump: %s # %s\n",
1158 "FETCH_PSEUDO_REGISTER(regnum)",
1159 XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
1160 #endif
1161 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1162 /* Macro might contain `[{}]' when not multi-arch */
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: %s # %s\n",
1165 "STORE_PSEUDO_REGISTER(regnum)",
1166 XSTRING (STORE_PSEUDO_REGISTER (regnum)));
1167 #endif
1168 #ifdef POINTER_TO_ADDRESS
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: %s # %s\n",
1171 "POINTER_TO_ADDRESS(type, buf)",
1172 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1173 #endif
1174 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1175 /* Macro might contain `[{}]' when not multi-arch */
1176 fprintf_unfiltered (file,
1177 "gdbarch_dump: %s # %s\n",
1178 "ADDRESS_TO_POINTER(type, buf, addr)",
1179 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
1180 #endif
1181 #ifdef RETURN_VALUE_ON_STACK
1182 fprintf_unfiltered (file,
1183 "gdbarch_dump: %s # %s\n",
1184 "RETURN_VALUE_ON_STACK(type)",
1185 XSTRING (RETURN_VALUE_ON_STACK (type)));
1186 #endif
1187 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1188 /* Macro might contain `[{}]' when not multi-arch */
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: %s # %s\n",
1191 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1192 XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1193 #endif
1194 #ifdef PUSH_ARGUMENTS
1195 fprintf_unfiltered (file,
1196 "gdbarch_dump: %s # %s\n",
1197 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1198 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1199 #endif
1200 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1201 /* Macro might contain `[{}]' when not multi-arch */
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: %s # %s\n",
1204 "PUSH_DUMMY_FRAME(-)",
1205 XSTRING (PUSH_DUMMY_FRAME (-)));
1206 #endif
1207 #ifdef PUSH_RETURN_ADDRESS
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: %s # %s\n",
1210 "PUSH_RETURN_ADDRESS(pc, sp)",
1211 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1212 #endif
1213 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1214 /* Macro might contain `[{}]' when not multi-arch */
1215 fprintf_unfiltered (file,
1216 "gdbarch_dump: %s # %s\n",
1217 "POP_FRAME(-)",
1218 XSTRING (POP_FRAME (-)));
1219 #endif
1220 #ifdef D10V_MAKE_DADDR
1221 fprintf_unfiltered (file,
1222 "gdbarch_dump: %s # %s\n",
1223 "D10V_MAKE_DADDR(x)",
1224 XSTRING (D10V_MAKE_DADDR (x)));
1225 #endif
1226 #ifdef D10V_MAKE_IADDR
1227 fprintf_unfiltered (file,
1228 "gdbarch_dump: %s # %s\n",
1229 "D10V_MAKE_IADDR(x)",
1230 XSTRING (D10V_MAKE_IADDR (x)));
1231 #endif
1232 #ifdef D10V_DADDR_P
1233 fprintf_unfiltered (file,
1234 "gdbarch_dump: %s # %s\n",
1235 "D10V_DADDR_P(x)",
1236 XSTRING (D10V_DADDR_P (x)));
1237 #endif
1238 #ifdef D10V_IADDR_P
1239 fprintf_unfiltered (file,
1240 "gdbarch_dump: %s # %s\n",
1241 "D10V_IADDR_P(x)",
1242 XSTRING (D10V_IADDR_P (x)));
1243 #endif
1244 #ifdef D10V_CONVERT_DADDR_TO_RAW
1245 fprintf_unfiltered (file,
1246 "gdbarch_dump: %s # %s\n",
1247 "D10V_CONVERT_DADDR_TO_RAW(x)",
1248 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x)));
1249 #endif
1250 #ifdef D10V_CONVERT_IADDR_TO_RAW
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: %s # %s\n",
1253 "D10V_CONVERT_IADDR_TO_RAW(x)",
1254 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x)));
1255 #endif
1256 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1257 /* Macro might contain `[{}]' when not multi-arch */
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: %s # %s\n",
1260 "STORE_STRUCT_RETURN(addr, sp)",
1261 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
1262 #endif
1263 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1264 /* Macro might contain `[{}]' when not multi-arch */
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: %s # %s\n",
1267 "STORE_RETURN_VALUE(type, valbuf)",
1268 XSTRING (STORE_RETURN_VALUE (type, valbuf)));
1269 #endif
1270 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: %s # %s\n",
1273 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1274 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1275 #endif
1276 #ifdef USE_STRUCT_CONVENTION
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: %s # %s\n",
1279 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1280 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
1281 #endif
1282 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1283 /* Macro might contain `[{}]' when not multi-arch */
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: %s # %s\n",
1286 "FRAME_INIT_SAVED_REGS(frame)",
1287 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1288 #endif
1289 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1290 /* Macro might contain `[{}]' when not multi-arch */
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: %s # %s\n",
1293 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1294 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1295 #endif
1296 #ifdef SKIP_PROLOGUE
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: %s # %s\n",
1299 "SKIP_PROLOGUE(ip)",
1300 XSTRING (SKIP_PROLOGUE (ip)));
1301 #endif
1302 #ifdef PROLOGUE_FRAMELESS_P
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: %s # %s\n",
1305 "PROLOGUE_FRAMELESS_P(ip)",
1306 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1307 #endif
1308 #ifdef INNER_THAN
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: %s # %s\n",
1311 "INNER_THAN(lhs, rhs)",
1312 XSTRING (INNER_THAN (lhs, rhs)));
1313 #endif
1314 #ifdef BREAKPOINT_FROM_PC
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: %s # %s\n",
1317 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1318 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
1319 #endif
1320 #ifdef MEMORY_INSERT_BREAKPOINT
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: %s # %s\n",
1323 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1324 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1325 #endif
1326 #ifdef MEMORY_REMOVE_BREAKPOINT
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: %s # %s\n",
1329 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1330 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1331 #endif
1332 #ifdef DECR_PC_AFTER_BREAK
1333 fprintf_unfiltered (file,
1334 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1335 XSTRING (DECR_PC_AFTER_BREAK));
1336 #endif
1337 #ifdef PREPARE_TO_PROCEED
1338 fprintf_unfiltered (file,
1339 "gdbarch_dump: %s # %s\n",
1340 "PREPARE_TO_PROCEED(select_it)",
1341 XSTRING (PREPARE_TO_PROCEED (select_it)));
1342 #endif
1343 #ifdef FUNCTION_START_OFFSET
1344 fprintf_unfiltered (file,
1345 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1346 XSTRING (FUNCTION_START_OFFSET));
1347 #endif
1348 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1349 /* Macro might contain `[{}]' when not multi-arch */
1350 fprintf_unfiltered (file,
1351 "gdbarch_dump: %s # %s\n",
1352 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1353 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1354 #endif
1355 #ifdef FRAME_ARGS_SKIP
1356 fprintf_unfiltered (file,
1357 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1358 XSTRING (FRAME_ARGS_SKIP));
1359 #endif
1360 #ifdef FRAMELESS_FUNCTION_INVOCATION
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: %s # %s\n",
1363 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1364 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1365 #endif
1366 #ifdef FRAME_CHAIN
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: %s # %s\n",
1369 "FRAME_CHAIN(frame)",
1370 XSTRING (FRAME_CHAIN (frame)));
1371 #endif
1372 #ifdef FRAME_CHAIN_VALID
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: %s # %s\n",
1375 "FRAME_CHAIN_VALID(chain, thisframe)",
1376 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1377 #endif
1378 #ifdef FRAME_SAVED_PC
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: %s # %s\n",
1381 "FRAME_SAVED_PC(fi)",
1382 XSTRING (FRAME_SAVED_PC (fi)));
1383 #endif
1384 #ifdef FRAME_ARGS_ADDRESS
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: %s # %s\n",
1387 "FRAME_ARGS_ADDRESS(fi)",
1388 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1389 #endif
1390 #ifdef FRAME_LOCALS_ADDRESS
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: %s # %s\n",
1393 "FRAME_LOCALS_ADDRESS(fi)",
1394 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1395 #endif
1396 #ifdef SAVED_PC_AFTER_CALL
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: %s # %s\n",
1399 "SAVED_PC_AFTER_CALL(frame)",
1400 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1401 #endif
1402 #ifdef FRAME_NUM_ARGS
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: %s # %s\n",
1405 "FRAME_NUM_ARGS(frame)",
1406 XSTRING (FRAME_NUM_ARGS (frame)));
1407 #endif
1408 #ifdef STACK_ALIGN
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: %s # %s\n",
1411 "STACK_ALIGN(sp)",
1412 XSTRING (STACK_ALIGN (sp)));
1413 #endif
1414 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1417 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1418 #endif
1419 #ifdef REG_STRUCT_HAS_ADDR
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: %s # %s\n",
1422 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1423 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1424 #endif
1425 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1426 /* Macro might contain `[{}]' when not multi-arch */
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: %s # %s\n",
1429 "SAVE_DUMMY_FRAME_TOS(sp)",
1430 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1431 #endif
1432 #ifdef PARM_BOUNDARY
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1435 XSTRING (PARM_BOUNDARY));
1436 #endif
1437 #ifdef TARGET_FLOAT_FORMAT
1438 fprintf_unfiltered (file,
1439 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1440 XSTRING (TARGET_FLOAT_FORMAT));
1441 #endif
1442 #ifdef TARGET_DOUBLE_FORMAT
1443 fprintf_unfiltered (file,
1444 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1445 XSTRING (TARGET_DOUBLE_FORMAT));
1446 #endif
1447 #ifdef TARGET_LONG_DOUBLE_FORMAT
1448 fprintf_unfiltered (file,
1449 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1450 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1451 #endif
1452 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1453 fprintf_unfiltered (file,
1454 "gdbarch_dump: %s # %s\n",
1455 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1456 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1457 #endif
1458 #ifdef ADDR_BITS_REMOVE
1459 fprintf_unfiltered (file,
1460 "gdbarch_dump: %s # %s\n",
1461 "ADDR_BITS_REMOVE(addr)",
1462 XSTRING (ADDR_BITS_REMOVE (addr)));
1463 #endif
1464 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1465 /* Macro might contain `[{}]' when not multi-arch */
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: %s # %s\n",
1468 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1469 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1470 #endif
1471 #ifdef TARGET_ARCHITECTURE
1472 if (TARGET_ARCHITECTURE != NULL)
1473 fprintf_unfiltered (file,
1474 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1475 TARGET_ARCHITECTURE->printable_name);
1476 #endif
1477 #ifdef TARGET_BYTE_ORDER
1478 fprintf_unfiltered (file,
1479 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1480 (long) TARGET_BYTE_ORDER);
1481 #endif
1482 #ifdef TARGET_SHORT_BIT
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1485 (long) TARGET_SHORT_BIT);
1486 #endif
1487 #ifdef TARGET_INT_BIT
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1490 (long) TARGET_INT_BIT);
1491 #endif
1492 #ifdef TARGET_LONG_BIT
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1495 (long) TARGET_LONG_BIT);
1496 #endif
1497 #ifdef TARGET_LONG_LONG_BIT
1498 fprintf_unfiltered (file,
1499 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1500 (long) TARGET_LONG_LONG_BIT);
1501 #endif
1502 #ifdef TARGET_FLOAT_BIT
1503 fprintf_unfiltered (file,
1504 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1505 (long) TARGET_FLOAT_BIT);
1506 #endif
1507 #ifdef TARGET_DOUBLE_BIT
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1510 (long) TARGET_DOUBLE_BIT);
1511 #endif
1512 #ifdef TARGET_LONG_DOUBLE_BIT
1513 fprintf_unfiltered (file,
1514 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1515 (long) TARGET_LONG_DOUBLE_BIT);
1516 #endif
1517 #ifdef TARGET_PTR_BIT
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1520 (long) TARGET_PTR_BIT);
1521 #endif
1522 #ifdef TARGET_ADDR_BIT
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1525 (long) TARGET_ADDR_BIT);
1526 #endif
1527 #ifdef TARGET_BFD_VMA_BIT
1528 fprintf_unfiltered (file,
1529 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1530 (long) TARGET_BFD_VMA_BIT);
1531 #endif
1532 #ifdef IEEE_FLOAT
1533 fprintf_unfiltered (file,
1534 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1535 (long) IEEE_FLOAT);
1536 #endif
1537 #ifdef TARGET_READ_PC
1538 if (GDB_MULTI_ARCH)
1539 fprintf_unfiltered (file,
1540 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1541 (long) current_gdbarch->read_pc
1542 /*TARGET_READ_PC ()*/);
1543 #endif
1544 #ifdef TARGET_WRITE_PC
1545 if (GDB_MULTI_ARCH)
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1548 (long) current_gdbarch->write_pc
1549 /*TARGET_WRITE_PC ()*/);
1550 #endif
1551 #ifdef TARGET_READ_FP
1552 if (GDB_MULTI_ARCH)
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1555 (long) current_gdbarch->read_fp
1556 /*TARGET_READ_FP ()*/);
1557 #endif
1558 #ifdef TARGET_WRITE_FP
1559 if (GDB_MULTI_ARCH)
1560 fprintf_unfiltered (file,
1561 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1562 (long) current_gdbarch->write_fp
1563 /*TARGET_WRITE_FP ()*/);
1564 #endif
1565 #ifdef TARGET_READ_SP
1566 if (GDB_MULTI_ARCH)
1567 fprintf_unfiltered (file,
1568 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1569 (long) current_gdbarch->read_sp
1570 /*TARGET_READ_SP ()*/);
1571 #endif
1572 #ifdef TARGET_WRITE_SP
1573 if (GDB_MULTI_ARCH)
1574 fprintf_unfiltered (file,
1575 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1576 (long) current_gdbarch->write_sp
1577 /*TARGET_WRITE_SP ()*/);
1578 #endif
1579 if (GDB_MULTI_ARCH)
1580 fprintf_unfiltered (file,
1581 "gdbarch_dump: register_read = 0x%08lx\n",
1582 (long) current_gdbarch->register_read);
1583 if (GDB_MULTI_ARCH)
1584 fprintf_unfiltered (file,
1585 "gdbarch_dump: register_write = 0x%08lx\n",
1586 (long) current_gdbarch->register_write);
1587 #ifdef NUM_REGS
1588 fprintf_unfiltered (file,
1589 "gdbarch_dump: NUM_REGS = %ld\n",
1590 (long) NUM_REGS);
1591 #endif
1592 #ifdef NUM_PSEUDO_REGS
1593 fprintf_unfiltered (file,
1594 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1595 (long) NUM_PSEUDO_REGS);
1596 #endif
1597 #ifdef SP_REGNUM
1598 fprintf_unfiltered (file,
1599 "gdbarch_dump: SP_REGNUM = %ld\n",
1600 (long) SP_REGNUM);
1601 #endif
1602 #ifdef FP_REGNUM
1603 fprintf_unfiltered (file,
1604 "gdbarch_dump: FP_REGNUM = %ld\n",
1605 (long) FP_REGNUM);
1606 #endif
1607 #ifdef PC_REGNUM
1608 fprintf_unfiltered (file,
1609 "gdbarch_dump: PC_REGNUM = %ld\n",
1610 (long) PC_REGNUM);
1611 #endif
1612 #ifdef FP0_REGNUM
1613 fprintf_unfiltered (file,
1614 "gdbarch_dump: FP0_REGNUM = %ld\n",
1615 (long) FP0_REGNUM);
1616 #endif
1617 #ifdef NPC_REGNUM
1618 fprintf_unfiltered (file,
1619 "gdbarch_dump: NPC_REGNUM = %ld\n",
1620 (long) NPC_REGNUM);
1621 #endif
1622 #ifdef NNPC_REGNUM
1623 fprintf_unfiltered (file,
1624 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1625 (long) NNPC_REGNUM);
1626 #endif
1627 #ifdef STAB_REG_TO_REGNUM
1628 if (GDB_MULTI_ARCH)
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1631 (long) current_gdbarch->stab_reg_to_regnum
1632 /*STAB_REG_TO_REGNUM ()*/);
1633 #endif
1634 #ifdef ECOFF_REG_TO_REGNUM
1635 if (GDB_MULTI_ARCH)
1636 fprintf_unfiltered (file,
1637 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1638 (long) current_gdbarch->ecoff_reg_to_regnum
1639 /*ECOFF_REG_TO_REGNUM ()*/);
1640 #endif
1641 #ifdef DWARF_REG_TO_REGNUM
1642 if (GDB_MULTI_ARCH)
1643 fprintf_unfiltered (file,
1644 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1645 (long) current_gdbarch->dwarf_reg_to_regnum
1646 /*DWARF_REG_TO_REGNUM ()*/);
1647 #endif
1648 #ifdef SDB_REG_TO_REGNUM
1649 if (GDB_MULTI_ARCH)
1650 fprintf_unfiltered (file,
1651 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1652 (long) current_gdbarch->sdb_reg_to_regnum
1653 /*SDB_REG_TO_REGNUM ()*/);
1654 #endif
1655 #ifdef DWARF2_REG_TO_REGNUM
1656 if (GDB_MULTI_ARCH)
1657 fprintf_unfiltered (file,
1658 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1659 (long) current_gdbarch->dwarf2_reg_to_regnum
1660 /*DWARF2_REG_TO_REGNUM ()*/);
1661 #endif
1662 #ifdef REGISTER_NAME
1663 if (GDB_MULTI_ARCH)
1664 fprintf_unfiltered (file,
1665 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1666 (long) current_gdbarch->register_name
1667 /*REGISTER_NAME ()*/);
1668 #endif
1669 #ifdef REGISTER_SIZE
1670 fprintf_unfiltered (file,
1671 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1672 (long) REGISTER_SIZE);
1673 #endif
1674 #ifdef REGISTER_BYTES
1675 fprintf_unfiltered (file,
1676 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1677 (long) REGISTER_BYTES);
1678 #endif
1679 #ifdef REGISTER_BYTE
1680 if (GDB_MULTI_ARCH)
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1683 (long) current_gdbarch->register_byte
1684 /*REGISTER_BYTE ()*/);
1685 #endif
1686 #ifdef REGISTER_RAW_SIZE
1687 if (GDB_MULTI_ARCH)
1688 fprintf_unfiltered (file,
1689 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1690 (long) current_gdbarch->register_raw_size
1691 /*REGISTER_RAW_SIZE ()*/);
1692 #endif
1693 #ifdef MAX_REGISTER_RAW_SIZE
1694 fprintf_unfiltered (file,
1695 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1696 (long) MAX_REGISTER_RAW_SIZE);
1697 #endif
1698 #ifdef REGISTER_VIRTUAL_SIZE
1699 if (GDB_MULTI_ARCH)
1700 fprintf_unfiltered (file,
1701 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1702 (long) current_gdbarch->register_virtual_size
1703 /*REGISTER_VIRTUAL_SIZE ()*/);
1704 #endif
1705 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1706 fprintf_unfiltered (file,
1707 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1708 (long) MAX_REGISTER_VIRTUAL_SIZE);
1709 #endif
1710 #ifdef REGISTER_VIRTUAL_TYPE
1711 if (GDB_MULTI_ARCH)
1712 fprintf_unfiltered (file,
1713 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1714 (long) current_gdbarch->register_virtual_type
1715 /*REGISTER_VIRTUAL_TYPE ()*/);
1716 #endif
1717 #ifdef DO_REGISTERS_INFO
1718 if (GDB_MULTI_ARCH)
1719 fprintf_unfiltered (file,
1720 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1721 (long) current_gdbarch->do_registers_info
1722 /*DO_REGISTERS_INFO ()*/);
1723 #endif
1724 #ifdef REGISTER_SIM_REGNO
1725 if (GDB_MULTI_ARCH)
1726 fprintf_unfiltered (file,
1727 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1728 (long) current_gdbarch->register_sim_regno
1729 /*REGISTER_SIM_REGNO ()*/);
1730 #endif
1731 #ifdef REGISTER_BYTES_OK
1732 if (GDB_MULTI_ARCH)
1733 fprintf_unfiltered (file,
1734 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1735 (long) current_gdbarch->register_bytes_ok
1736 /*REGISTER_BYTES_OK ()*/);
1737 #endif
1738 #ifdef USE_GENERIC_DUMMY_FRAMES
1739 fprintf_unfiltered (file,
1740 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1741 (long) USE_GENERIC_DUMMY_FRAMES);
1742 #endif
1743 #ifdef CALL_DUMMY_LOCATION
1744 fprintf_unfiltered (file,
1745 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1746 (long) CALL_DUMMY_LOCATION);
1747 #endif
1748 #ifdef CALL_DUMMY_ADDRESS
1749 if (GDB_MULTI_ARCH)
1750 fprintf_unfiltered (file,
1751 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1752 (long) current_gdbarch->call_dummy_address
1753 /*CALL_DUMMY_ADDRESS ()*/);
1754 #endif
1755 #ifdef CALL_DUMMY_START_OFFSET
1756 fprintf_unfiltered (file,
1757 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1758 (long) CALL_DUMMY_START_OFFSET);
1759 #endif
1760 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1761 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
1762 fprintf_unfiltered (file,
1763 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1764 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
1765 #endif
1766 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1767 fprintf_unfiltered (file,
1768 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1769 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
1770 #endif
1771 #ifdef CALL_DUMMY_LENGTH
1772 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
1773 fprintf_unfiltered (file,
1774 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1775 (long) CALL_DUMMY_LENGTH);
1776 #endif
1777 #ifdef PC_IN_CALL_DUMMY
1778 if (GDB_MULTI_ARCH)
1779 fprintf_unfiltered (file,
1780 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1781 (long) current_gdbarch->pc_in_call_dummy
1782 /*PC_IN_CALL_DUMMY ()*/);
1783 #endif
1784 #ifdef CALL_DUMMY_P
1785 fprintf_unfiltered (file,
1786 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1787 (long) CALL_DUMMY_P);
1788 #endif
1789 #ifdef CALL_DUMMY_WORDS
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1792 (long) CALL_DUMMY_WORDS);
1793 #endif
1794 #ifdef SIZEOF_CALL_DUMMY_WORDS
1795 fprintf_unfiltered (file,
1796 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1797 (long) SIZEOF_CALL_DUMMY_WORDS);
1798 #endif
1799 #ifdef CALL_DUMMY_STACK_ADJUST_P
1800 fprintf_unfiltered (file,
1801 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1802 (long) CALL_DUMMY_STACK_ADJUST_P);
1803 #endif
1804 #ifdef CALL_DUMMY_STACK_ADJUST
1805 if (CALL_DUMMY_STACK_ADJUST_P)
1806 fprintf_unfiltered (file,
1807 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1808 (long) CALL_DUMMY_STACK_ADJUST);
1809 #endif
1810 #ifdef FIX_CALL_DUMMY
1811 if (GDB_MULTI_ARCH)
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1814 (long) current_gdbarch->fix_call_dummy
1815 /*FIX_CALL_DUMMY ()*/);
1816 #endif
1817 #ifdef BELIEVE_PCC_PROMOTION
1818 fprintf_unfiltered (file,
1819 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1820 (long) BELIEVE_PCC_PROMOTION);
1821 #endif
1822 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1825 (long) BELIEVE_PCC_PROMOTION_TYPE);
1826 #endif
1827 #ifdef COERCE_FLOAT_TO_DOUBLE
1828 if (GDB_MULTI_ARCH)
1829 fprintf_unfiltered (file,
1830 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1831 (long) current_gdbarch->coerce_float_to_double
1832 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1833 #endif
1834 #ifdef GET_SAVED_REGISTER
1835 if (GDB_MULTI_ARCH)
1836 fprintf_unfiltered (file,
1837 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1838 (long) current_gdbarch->get_saved_register
1839 /*GET_SAVED_REGISTER ()*/);
1840 #endif
1841 #ifdef REGISTER_CONVERTIBLE
1842 if (GDB_MULTI_ARCH)
1843 fprintf_unfiltered (file,
1844 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1845 (long) current_gdbarch->register_convertible
1846 /*REGISTER_CONVERTIBLE ()*/);
1847 #endif
1848 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1849 if (GDB_MULTI_ARCH)
1850 fprintf_unfiltered (file,
1851 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1852 (long) current_gdbarch->register_convert_to_virtual
1853 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1854 #endif
1855 #ifdef REGISTER_CONVERT_TO_RAW
1856 if (GDB_MULTI_ARCH)
1857 fprintf_unfiltered (file,
1858 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1859 (long) current_gdbarch->register_convert_to_raw
1860 /*REGISTER_CONVERT_TO_RAW ()*/);
1861 #endif
1862 #ifdef FETCH_PSEUDO_REGISTER
1863 if (GDB_MULTI_ARCH)
1864 fprintf_unfiltered (file,
1865 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1866 (long) current_gdbarch->fetch_pseudo_register
1867 /*FETCH_PSEUDO_REGISTER ()*/);
1868 #endif
1869 #ifdef STORE_PSEUDO_REGISTER
1870 if (GDB_MULTI_ARCH)
1871 fprintf_unfiltered (file,
1872 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1873 (long) current_gdbarch->store_pseudo_register
1874 /*STORE_PSEUDO_REGISTER ()*/);
1875 #endif
1876 #ifdef POINTER_TO_ADDRESS
1877 if (GDB_MULTI_ARCH)
1878 fprintf_unfiltered (file,
1879 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1880 (long) current_gdbarch->pointer_to_address
1881 /*POINTER_TO_ADDRESS ()*/);
1882 #endif
1883 #ifdef ADDRESS_TO_POINTER
1884 if (GDB_MULTI_ARCH)
1885 fprintf_unfiltered (file,
1886 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1887 (long) current_gdbarch->address_to_pointer
1888 /*ADDRESS_TO_POINTER ()*/);
1889 #endif
1890 #ifdef RETURN_VALUE_ON_STACK
1891 if (GDB_MULTI_ARCH)
1892 fprintf_unfiltered (file,
1893 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1894 (long) current_gdbarch->return_value_on_stack
1895 /*RETURN_VALUE_ON_STACK ()*/);
1896 #endif
1897 #ifdef EXTRACT_RETURN_VALUE
1898 if (GDB_MULTI_ARCH)
1899 fprintf_unfiltered (file,
1900 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1901 (long) current_gdbarch->extract_return_value
1902 /*EXTRACT_RETURN_VALUE ()*/);
1903 #endif
1904 #ifdef PUSH_ARGUMENTS
1905 if (GDB_MULTI_ARCH)
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1908 (long) current_gdbarch->push_arguments
1909 /*PUSH_ARGUMENTS ()*/);
1910 #endif
1911 #ifdef PUSH_DUMMY_FRAME
1912 if (GDB_MULTI_ARCH)
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1915 (long) current_gdbarch->push_dummy_frame
1916 /*PUSH_DUMMY_FRAME ()*/);
1917 #endif
1918 #ifdef PUSH_RETURN_ADDRESS
1919 if (GDB_MULTI_ARCH)
1920 fprintf_unfiltered (file,
1921 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1922 (long) current_gdbarch->push_return_address
1923 /*PUSH_RETURN_ADDRESS ()*/);
1924 #endif
1925 #ifdef POP_FRAME
1926 if (GDB_MULTI_ARCH)
1927 fprintf_unfiltered (file,
1928 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1929 (long) current_gdbarch->pop_frame
1930 /*POP_FRAME ()*/);
1931 #endif
1932 #ifdef D10V_MAKE_DADDR
1933 if (GDB_MULTI_ARCH)
1934 fprintf_unfiltered (file,
1935 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1936 (long) current_gdbarch->d10v_make_daddr
1937 /*D10V_MAKE_DADDR ()*/);
1938 #endif
1939 #ifdef D10V_MAKE_IADDR
1940 if (GDB_MULTI_ARCH)
1941 fprintf_unfiltered (file,
1942 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1943 (long) current_gdbarch->d10v_make_iaddr
1944 /*D10V_MAKE_IADDR ()*/);
1945 #endif
1946 #ifdef D10V_DADDR_P
1947 if (GDB_MULTI_ARCH)
1948 fprintf_unfiltered (file,
1949 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1950 (long) current_gdbarch->d10v_daddr_p
1951 /*D10V_DADDR_P ()*/);
1952 #endif
1953 #ifdef D10V_IADDR_P
1954 if (GDB_MULTI_ARCH)
1955 fprintf_unfiltered (file,
1956 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1957 (long) current_gdbarch->d10v_iaddr_p
1958 /*D10V_IADDR_P ()*/);
1959 #endif
1960 #ifdef D10V_CONVERT_DADDR_TO_RAW
1961 if (GDB_MULTI_ARCH)
1962 fprintf_unfiltered (file,
1963 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1964 (long) current_gdbarch->d10v_convert_daddr_to_raw
1965 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1966 #endif
1967 #ifdef D10V_CONVERT_IADDR_TO_RAW
1968 if (GDB_MULTI_ARCH)
1969 fprintf_unfiltered (file,
1970 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1971 (long) current_gdbarch->d10v_convert_iaddr_to_raw
1972 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1973 #endif
1974 #ifdef STORE_STRUCT_RETURN
1975 if (GDB_MULTI_ARCH)
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1978 (long) current_gdbarch->store_struct_return
1979 /*STORE_STRUCT_RETURN ()*/);
1980 #endif
1981 #ifdef STORE_RETURN_VALUE
1982 if (GDB_MULTI_ARCH)
1983 fprintf_unfiltered (file,
1984 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1985 (long) current_gdbarch->store_return_value
1986 /*STORE_RETURN_VALUE ()*/);
1987 #endif
1988 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1989 if (GDB_MULTI_ARCH)
1990 fprintf_unfiltered (file,
1991 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1992 (long) current_gdbarch->extract_struct_value_address
1993 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1994 #endif
1995 #ifdef USE_STRUCT_CONVENTION
1996 if (GDB_MULTI_ARCH)
1997 fprintf_unfiltered (file,
1998 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1999 (long) current_gdbarch->use_struct_convention
2000 /*USE_STRUCT_CONVENTION ()*/);
2001 #endif
2002 #ifdef FRAME_INIT_SAVED_REGS
2003 if (GDB_MULTI_ARCH)
2004 fprintf_unfiltered (file,
2005 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
2006 (long) current_gdbarch->frame_init_saved_regs
2007 /*FRAME_INIT_SAVED_REGS ()*/);
2008 #endif
2009 #ifdef INIT_EXTRA_FRAME_INFO
2010 if (GDB_MULTI_ARCH)
2011 fprintf_unfiltered (file,
2012 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
2013 (long) current_gdbarch->init_extra_frame_info
2014 /*INIT_EXTRA_FRAME_INFO ()*/);
2015 #endif
2016 #ifdef SKIP_PROLOGUE
2017 if (GDB_MULTI_ARCH)
2018 fprintf_unfiltered (file,
2019 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
2020 (long) current_gdbarch->skip_prologue
2021 /*SKIP_PROLOGUE ()*/);
2022 #endif
2023 #ifdef PROLOGUE_FRAMELESS_P
2024 if (GDB_MULTI_ARCH)
2025 fprintf_unfiltered (file,
2026 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2027 (long) current_gdbarch->prologue_frameless_p
2028 /*PROLOGUE_FRAMELESS_P ()*/);
2029 #endif
2030 #ifdef INNER_THAN
2031 if (GDB_MULTI_ARCH)
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2034 (long) current_gdbarch->inner_than
2035 /*INNER_THAN ()*/);
2036 #endif
2037 #ifdef BREAKPOINT_FROM_PC
2038 if (GDB_MULTI_ARCH)
2039 fprintf_unfiltered (file,
2040 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2041 (long) current_gdbarch->breakpoint_from_pc
2042 /*BREAKPOINT_FROM_PC ()*/);
2043 #endif
2044 #ifdef MEMORY_INSERT_BREAKPOINT
2045 if (GDB_MULTI_ARCH)
2046 fprintf_unfiltered (file,
2047 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2048 (long) current_gdbarch->memory_insert_breakpoint
2049 /*MEMORY_INSERT_BREAKPOINT ()*/);
2050 #endif
2051 #ifdef MEMORY_REMOVE_BREAKPOINT
2052 if (GDB_MULTI_ARCH)
2053 fprintf_unfiltered (file,
2054 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2055 (long) current_gdbarch->memory_remove_breakpoint
2056 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2057 #endif
2058 #ifdef DECR_PC_AFTER_BREAK
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2061 (long) DECR_PC_AFTER_BREAK);
2062 #endif
2063 #ifdef PREPARE_TO_PROCEED
2064 if (GDB_MULTI_ARCH)
2065 fprintf_unfiltered (file,
2066 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2067 (long) current_gdbarch->prepare_to_proceed
2068 /*PREPARE_TO_PROCEED ()*/);
2069 #endif
2070 #ifdef FUNCTION_START_OFFSET
2071 fprintf_unfiltered (file,
2072 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2073 (long) FUNCTION_START_OFFSET);
2074 #endif
2075 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2076 if (GDB_MULTI_ARCH)
2077 fprintf_unfiltered (file,
2078 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2079 (long) current_gdbarch->remote_translate_xfer_address
2080 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2081 #endif
2082 #ifdef FRAME_ARGS_SKIP
2083 fprintf_unfiltered (file,
2084 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2085 (long) FRAME_ARGS_SKIP);
2086 #endif
2087 #ifdef FRAMELESS_FUNCTION_INVOCATION
2088 if (GDB_MULTI_ARCH)
2089 fprintf_unfiltered (file,
2090 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2091 (long) current_gdbarch->frameless_function_invocation
2092 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2093 #endif
2094 #ifdef FRAME_CHAIN
2095 if (GDB_MULTI_ARCH)
2096 fprintf_unfiltered (file,
2097 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2098 (long) current_gdbarch->frame_chain
2099 /*FRAME_CHAIN ()*/);
2100 #endif
2101 #ifdef FRAME_CHAIN_VALID
2102 if (GDB_MULTI_ARCH)
2103 fprintf_unfiltered (file,
2104 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2105 (long) current_gdbarch->frame_chain_valid
2106 /*FRAME_CHAIN_VALID ()*/);
2107 #endif
2108 #ifdef FRAME_SAVED_PC
2109 if (GDB_MULTI_ARCH)
2110 fprintf_unfiltered (file,
2111 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2112 (long) current_gdbarch->frame_saved_pc
2113 /*FRAME_SAVED_PC ()*/);
2114 #endif
2115 #ifdef FRAME_ARGS_ADDRESS
2116 if (GDB_MULTI_ARCH)
2117 fprintf_unfiltered (file,
2118 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2119 (long) current_gdbarch->frame_args_address
2120 /*FRAME_ARGS_ADDRESS ()*/);
2121 #endif
2122 #ifdef FRAME_LOCALS_ADDRESS
2123 if (GDB_MULTI_ARCH)
2124 fprintf_unfiltered (file,
2125 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2126 (long) current_gdbarch->frame_locals_address
2127 /*FRAME_LOCALS_ADDRESS ()*/);
2128 #endif
2129 #ifdef SAVED_PC_AFTER_CALL
2130 if (GDB_MULTI_ARCH)
2131 fprintf_unfiltered (file,
2132 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2133 (long) current_gdbarch->saved_pc_after_call
2134 /*SAVED_PC_AFTER_CALL ()*/);
2135 #endif
2136 #ifdef FRAME_NUM_ARGS
2137 if (GDB_MULTI_ARCH)
2138 fprintf_unfiltered (file,
2139 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2140 (long) current_gdbarch->frame_num_args
2141 /*FRAME_NUM_ARGS ()*/);
2142 #endif
2143 #ifdef STACK_ALIGN
2144 if (GDB_MULTI_ARCH)
2145 fprintf_unfiltered (file,
2146 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2147 (long) current_gdbarch->stack_align
2148 /*STACK_ALIGN ()*/);
2149 #endif
2150 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2151 fprintf_unfiltered (file,
2152 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2153 (long) EXTRA_STACK_ALIGNMENT_NEEDED);
2154 #endif
2155 #ifdef REG_STRUCT_HAS_ADDR
2156 if (GDB_MULTI_ARCH)
2157 fprintf_unfiltered (file,
2158 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2159 (long) current_gdbarch->reg_struct_has_addr
2160 /*REG_STRUCT_HAS_ADDR ()*/);
2161 #endif
2162 #ifdef SAVE_DUMMY_FRAME_TOS
2163 if (GDB_MULTI_ARCH)
2164 fprintf_unfiltered (file,
2165 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2166 (long) current_gdbarch->save_dummy_frame_tos
2167 /*SAVE_DUMMY_FRAME_TOS ()*/);
2168 #endif
2169 #ifdef PARM_BOUNDARY
2170 fprintf_unfiltered (file,
2171 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2172 (long) PARM_BOUNDARY);
2173 #endif
2174 #ifdef TARGET_FLOAT_FORMAT
2175 fprintf_unfiltered (file,
2176 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2177 (long) TARGET_FLOAT_FORMAT);
2178 #endif
2179 #ifdef TARGET_DOUBLE_FORMAT
2180 fprintf_unfiltered (file,
2181 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2182 (long) TARGET_DOUBLE_FORMAT);
2183 #endif
2184 #ifdef TARGET_LONG_DOUBLE_FORMAT
2185 fprintf_unfiltered (file,
2186 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2187 (long) TARGET_LONG_DOUBLE_FORMAT);
2188 #endif
2189 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2190 if (GDB_MULTI_ARCH)
2191 fprintf_unfiltered (file,
2192 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2193 (long) current_gdbarch->convert_from_func_ptr_addr
2194 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2195 #endif
2196 #ifdef ADDR_BITS_REMOVE
2197 if (GDB_MULTI_ARCH)
2198 fprintf_unfiltered (file,
2199 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
2200 (long) current_gdbarch->addr_bits_remove
2201 /*ADDR_BITS_REMOVE ()*/);
2202 #endif
2203 #ifdef SOFTWARE_SINGLE_STEP
2204 if (GDB_MULTI_ARCH)
2205 fprintf_unfiltered (file,
2206 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2207 (long) current_gdbarch->software_single_step
2208 /*SOFTWARE_SINGLE_STEP ()*/);
2209 #endif
2210 if (current_gdbarch->dump_tdep != NULL)
2211 current_gdbarch->dump_tdep (current_gdbarch, file);
2212 }
2213
2214 struct gdbarch_tdep *
2215 gdbarch_tdep (struct gdbarch *gdbarch)
2216 {
2217 if (gdbarch_debug >= 2)
2218 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2219 return gdbarch->tdep;
2220 }
2221
2222
2223 const struct bfd_arch_info *
2224 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2225 {
2226 if (gdbarch_debug >= 2)
2227 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2228 return gdbarch->bfd_arch_info;
2229 }
2230
2231 int
2232 gdbarch_byte_order (struct gdbarch *gdbarch)
2233 {
2234 if (gdbarch_debug >= 2)
2235 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2236 return gdbarch->byte_order;
2237 }
2238
2239 int
2240 gdbarch_short_bit (struct gdbarch *gdbarch)
2241 {
2242 /* Skip verify of short_bit, invalid_p == 0 */
2243 if (gdbarch_debug >= 2)
2244 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2245 return gdbarch->short_bit;
2246 }
2247
2248 void
2249 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2250 int short_bit)
2251 {
2252 gdbarch->short_bit = short_bit;
2253 }
2254
2255 int
2256 gdbarch_int_bit (struct gdbarch *gdbarch)
2257 {
2258 /* Skip verify of int_bit, invalid_p == 0 */
2259 if (gdbarch_debug >= 2)
2260 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2261 return gdbarch->int_bit;
2262 }
2263
2264 void
2265 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2266 int int_bit)
2267 {
2268 gdbarch->int_bit = int_bit;
2269 }
2270
2271 int
2272 gdbarch_long_bit (struct gdbarch *gdbarch)
2273 {
2274 /* Skip verify of long_bit, invalid_p == 0 */
2275 if (gdbarch_debug >= 2)
2276 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2277 return gdbarch->long_bit;
2278 }
2279
2280 void
2281 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2282 int long_bit)
2283 {
2284 gdbarch->long_bit = long_bit;
2285 }
2286
2287 int
2288 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2289 {
2290 /* Skip verify of long_long_bit, invalid_p == 0 */
2291 if (gdbarch_debug >= 2)
2292 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2293 return gdbarch->long_long_bit;
2294 }
2295
2296 void
2297 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2298 int long_long_bit)
2299 {
2300 gdbarch->long_long_bit = long_long_bit;
2301 }
2302
2303 int
2304 gdbarch_float_bit (struct gdbarch *gdbarch)
2305 {
2306 /* Skip verify of float_bit, invalid_p == 0 */
2307 if (gdbarch_debug >= 2)
2308 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2309 return gdbarch->float_bit;
2310 }
2311
2312 void
2313 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2314 int float_bit)
2315 {
2316 gdbarch->float_bit = float_bit;
2317 }
2318
2319 int
2320 gdbarch_double_bit (struct gdbarch *gdbarch)
2321 {
2322 /* Skip verify of double_bit, invalid_p == 0 */
2323 if (gdbarch_debug >= 2)
2324 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2325 return gdbarch->double_bit;
2326 }
2327
2328 void
2329 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2330 int double_bit)
2331 {
2332 gdbarch->double_bit = double_bit;
2333 }
2334
2335 int
2336 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2337 {
2338 /* Skip verify of long_double_bit, invalid_p == 0 */
2339 if (gdbarch_debug >= 2)
2340 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2341 return gdbarch->long_double_bit;
2342 }
2343
2344 void
2345 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2346 int long_double_bit)
2347 {
2348 gdbarch->long_double_bit = long_double_bit;
2349 }
2350
2351 int
2352 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2353 {
2354 /* Skip verify of ptr_bit, invalid_p == 0 */
2355 if (gdbarch_debug >= 2)
2356 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2357 return gdbarch->ptr_bit;
2358 }
2359
2360 void
2361 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2362 int ptr_bit)
2363 {
2364 gdbarch->ptr_bit = ptr_bit;
2365 }
2366
2367 int
2368 gdbarch_addr_bit (struct gdbarch *gdbarch)
2369 {
2370 if (gdbarch->addr_bit == 0)
2371 internal_error (__FILE__, __LINE__,
2372 "gdbarch: gdbarch_addr_bit invalid");
2373 if (gdbarch_debug >= 2)
2374 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2375 return gdbarch->addr_bit;
2376 }
2377
2378 void
2379 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2380 int addr_bit)
2381 {
2382 gdbarch->addr_bit = addr_bit;
2383 }
2384
2385 int
2386 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2387 {
2388 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2389 if (gdbarch_debug >= 2)
2390 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2391 return gdbarch->bfd_vma_bit;
2392 }
2393
2394 void
2395 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2396 int bfd_vma_bit)
2397 {
2398 gdbarch->bfd_vma_bit = bfd_vma_bit;
2399 }
2400
2401 int
2402 gdbarch_ieee_float (struct gdbarch *gdbarch)
2403 {
2404 /* Skip verify of ieee_float, invalid_p == 0 */
2405 if (gdbarch_debug >= 2)
2406 fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n");
2407 return gdbarch->ieee_float;
2408 }
2409
2410 void
2411 set_gdbarch_ieee_float (struct gdbarch *gdbarch,
2412 int ieee_float)
2413 {
2414 gdbarch->ieee_float = ieee_float;
2415 }
2416
2417 CORE_ADDR
2418 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2419 {
2420 if (gdbarch->read_pc == 0)
2421 internal_error (__FILE__, __LINE__,
2422 "gdbarch: gdbarch_read_pc invalid");
2423 if (gdbarch_debug >= 2)
2424 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2425 return gdbarch->read_pc (ptid);
2426 }
2427
2428 void
2429 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2430 gdbarch_read_pc_ftype read_pc)
2431 {
2432 gdbarch->read_pc = read_pc;
2433 }
2434
2435 void
2436 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2437 {
2438 if (gdbarch->write_pc == 0)
2439 internal_error (__FILE__, __LINE__,
2440 "gdbarch: gdbarch_write_pc invalid");
2441 if (gdbarch_debug >= 2)
2442 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2443 gdbarch->write_pc (val, ptid);
2444 }
2445
2446 void
2447 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2448 gdbarch_write_pc_ftype write_pc)
2449 {
2450 gdbarch->write_pc = write_pc;
2451 }
2452
2453 CORE_ADDR
2454 gdbarch_read_fp (struct gdbarch *gdbarch)
2455 {
2456 if (gdbarch->read_fp == 0)
2457 internal_error (__FILE__, __LINE__,
2458 "gdbarch: gdbarch_read_fp invalid");
2459 if (gdbarch_debug >= 2)
2460 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2461 return gdbarch->read_fp ();
2462 }
2463
2464 void
2465 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2466 gdbarch_read_fp_ftype read_fp)
2467 {
2468 gdbarch->read_fp = read_fp;
2469 }
2470
2471 void
2472 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
2473 {
2474 if (gdbarch->write_fp == 0)
2475 internal_error (__FILE__, __LINE__,
2476 "gdbarch: gdbarch_write_fp invalid");
2477 if (gdbarch_debug >= 2)
2478 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
2479 gdbarch->write_fp (val);
2480 }
2481
2482 void
2483 set_gdbarch_write_fp (struct gdbarch *gdbarch,
2484 gdbarch_write_fp_ftype write_fp)
2485 {
2486 gdbarch->write_fp = write_fp;
2487 }
2488
2489 CORE_ADDR
2490 gdbarch_read_sp (struct gdbarch *gdbarch)
2491 {
2492 if (gdbarch->read_sp == 0)
2493 internal_error (__FILE__, __LINE__,
2494 "gdbarch: gdbarch_read_sp invalid");
2495 if (gdbarch_debug >= 2)
2496 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2497 return gdbarch->read_sp ();
2498 }
2499
2500 void
2501 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2502 gdbarch_read_sp_ftype read_sp)
2503 {
2504 gdbarch->read_sp = read_sp;
2505 }
2506
2507 void
2508 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2509 {
2510 if (gdbarch->write_sp == 0)
2511 internal_error (__FILE__, __LINE__,
2512 "gdbarch: gdbarch_write_sp invalid");
2513 if (gdbarch_debug >= 2)
2514 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2515 gdbarch->write_sp (val);
2516 }
2517
2518 void
2519 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2520 gdbarch_write_sp_ftype write_sp)
2521 {
2522 gdbarch->write_sp = write_sp;
2523 }
2524
2525 int
2526 gdbarch_register_read_p (struct gdbarch *gdbarch)
2527 {
2528 return gdbarch->register_read != 0;
2529 }
2530
2531 void
2532 gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf)
2533 {
2534 if (gdbarch->register_read == 0)
2535 internal_error (__FILE__, __LINE__,
2536 "gdbarch: gdbarch_register_read invalid");
2537 if (gdbarch_debug >= 2)
2538 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_read called\n");
2539 gdbarch->register_read (gdbarch, regnum, buf);
2540 }
2541
2542 void
2543 set_gdbarch_register_read (struct gdbarch *gdbarch,
2544 gdbarch_register_read_ftype register_read)
2545 {
2546 gdbarch->register_read = register_read;
2547 }
2548
2549 int
2550 gdbarch_register_write_p (struct gdbarch *gdbarch)
2551 {
2552 return gdbarch->register_write != 0;
2553 }
2554
2555 void
2556 gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf)
2557 {
2558 if (gdbarch->register_write == 0)
2559 internal_error (__FILE__, __LINE__,
2560 "gdbarch: gdbarch_register_write invalid");
2561 if (gdbarch_debug >= 2)
2562 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n");
2563 gdbarch->register_write (gdbarch, regnum, buf);
2564 }
2565
2566 void
2567 set_gdbarch_register_write (struct gdbarch *gdbarch,
2568 gdbarch_register_write_ftype register_write)
2569 {
2570 gdbarch->register_write = register_write;
2571 }
2572
2573 int
2574 gdbarch_num_regs (struct gdbarch *gdbarch)
2575 {
2576 if (gdbarch->num_regs == -1)
2577 internal_error (__FILE__, __LINE__,
2578 "gdbarch: gdbarch_num_regs invalid");
2579 if (gdbarch_debug >= 2)
2580 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2581 return gdbarch->num_regs;
2582 }
2583
2584 void
2585 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2586 int num_regs)
2587 {
2588 gdbarch->num_regs = num_regs;
2589 }
2590
2591 int
2592 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2593 {
2594 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2595 if (gdbarch_debug >= 2)
2596 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2597 return gdbarch->num_pseudo_regs;
2598 }
2599
2600 void
2601 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2602 int num_pseudo_regs)
2603 {
2604 gdbarch->num_pseudo_regs = num_pseudo_regs;
2605 }
2606
2607 int
2608 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2609 {
2610 if (gdbarch->sp_regnum == -1)
2611 internal_error (__FILE__, __LINE__,
2612 "gdbarch: gdbarch_sp_regnum invalid");
2613 if (gdbarch_debug >= 2)
2614 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2615 return gdbarch->sp_regnum;
2616 }
2617
2618 void
2619 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2620 int sp_regnum)
2621 {
2622 gdbarch->sp_regnum = sp_regnum;
2623 }
2624
2625 int
2626 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2627 {
2628 if (gdbarch->fp_regnum == -1)
2629 internal_error (__FILE__, __LINE__,
2630 "gdbarch: gdbarch_fp_regnum invalid");
2631 if (gdbarch_debug >= 2)
2632 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2633 return gdbarch->fp_regnum;
2634 }
2635
2636 void
2637 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2638 int fp_regnum)
2639 {
2640 gdbarch->fp_regnum = fp_regnum;
2641 }
2642
2643 int
2644 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2645 {
2646 if (gdbarch->pc_regnum == -1)
2647 internal_error (__FILE__, __LINE__,
2648 "gdbarch: gdbarch_pc_regnum invalid");
2649 if (gdbarch_debug >= 2)
2650 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2651 return gdbarch->pc_regnum;
2652 }
2653
2654 void
2655 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2656 int pc_regnum)
2657 {
2658 gdbarch->pc_regnum = pc_regnum;
2659 }
2660
2661 int
2662 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2663 {
2664 /* Skip verify of fp0_regnum, invalid_p == 0 */
2665 if (gdbarch_debug >= 2)
2666 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2667 return gdbarch->fp0_regnum;
2668 }
2669
2670 void
2671 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2672 int fp0_regnum)
2673 {
2674 gdbarch->fp0_regnum = fp0_regnum;
2675 }
2676
2677 int
2678 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2679 {
2680 /* Skip verify of npc_regnum, invalid_p == 0 */
2681 if (gdbarch_debug >= 2)
2682 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2683 return gdbarch->npc_regnum;
2684 }
2685
2686 void
2687 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2688 int npc_regnum)
2689 {
2690 gdbarch->npc_regnum = npc_regnum;
2691 }
2692
2693 int
2694 gdbarch_nnpc_regnum (struct gdbarch *gdbarch)
2695 {
2696 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2697 if (gdbarch_debug >= 2)
2698 fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n");
2699 return gdbarch->nnpc_regnum;
2700 }
2701
2702 void
2703 set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch,
2704 int nnpc_regnum)
2705 {
2706 gdbarch->nnpc_regnum = nnpc_regnum;
2707 }
2708
2709 int
2710 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2711 {
2712 if (gdbarch->stab_reg_to_regnum == 0)
2713 internal_error (__FILE__, __LINE__,
2714 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2715 if (gdbarch_debug >= 2)
2716 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2717 return gdbarch->stab_reg_to_regnum (stab_regnr);
2718 }
2719
2720 void
2721 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2722 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2723 {
2724 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2725 }
2726
2727 int
2728 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2729 {
2730 if (gdbarch->ecoff_reg_to_regnum == 0)
2731 internal_error (__FILE__, __LINE__,
2732 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2733 if (gdbarch_debug >= 2)
2734 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2735 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2736 }
2737
2738 void
2739 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2740 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2741 {
2742 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2743 }
2744
2745 int
2746 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2747 {
2748 if (gdbarch->dwarf_reg_to_regnum == 0)
2749 internal_error (__FILE__, __LINE__,
2750 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2751 if (gdbarch_debug >= 2)
2752 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2753 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2754 }
2755
2756 void
2757 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2758 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2759 {
2760 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2761 }
2762
2763 int
2764 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2765 {
2766 if (gdbarch->sdb_reg_to_regnum == 0)
2767 internal_error (__FILE__, __LINE__,
2768 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2769 if (gdbarch_debug >= 2)
2770 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2771 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2772 }
2773
2774 void
2775 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2776 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2777 {
2778 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2779 }
2780
2781 int
2782 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2783 {
2784 if (gdbarch->dwarf2_reg_to_regnum == 0)
2785 internal_error (__FILE__, __LINE__,
2786 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2787 if (gdbarch_debug >= 2)
2788 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2789 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2790 }
2791
2792 void
2793 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2794 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2795 {
2796 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2797 }
2798
2799 char *
2800 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2801 {
2802 if (gdbarch->register_name == 0)
2803 internal_error (__FILE__, __LINE__,
2804 "gdbarch: gdbarch_register_name invalid");
2805 if (gdbarch_debug >= 2)
2806 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2807 return gdbarch->register_name (regnr);
2808 }
2809
2810 void
2811 set_gdbarch_register_name (struct gdbarch *gdbarch,
2812 gdbarch_register_name_ftype register_name)
2813 {
2814 gdbarch->register_name = register_name;
2815 }
2816
2817 int
2818 gdbarch_register_size (struct gdbarch *gdbarch)
2819 {
2820 if (gdbarch->register_size == -1)
2821 internal_error (__FILE__, __LINE__,
2822 "gdbarch: gdbarch_register_size invalid");
2823 if (gdbarch_debug >= 2)
2824 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2825 return gdbarch->register_size;
2826 }
2827
2828 void
2829 set_gdbarch_register_size (struct gdbarch *gdbarch,
2830 int register_size)
2831 {
2832 gdbarch->register_size = register_size;
2833 }
2834
2835 int
2836 gdbarch_register_bytes (struct gdbarch *gdbarch)
2837 {
2838 if (gdbarch->register_bytes == -1)
2839 internal_error (__FILE__, __LINE__,
2840 "gdbarch: gdbarch_register_bytes invalid");
2841 if (gdbarch_debug >= 2)
2842 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2843 return gdbarch->register_bytes;
2844 }
2845
2846 void
2847 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2848 int register_bytes)
2849 {
2850 gdbarch->register_bytes = register_bytes;
2851 }
2852
2853 int
2854 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2855 {
2856 if (gdbarch->register_byte == 0)
2857 internal_error (__FILE__, __LINE__,
2858 "gdbarch: gdbarch_register_byte invalid");
2859 if (gdbarch_debug >= 2)
2860 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2861 return gdbarch->register_byte (reg_nr);
2862 }
2863
2864 void
2865 set_gdbarch_register_byte (struct gdbarch *gdbarch,
2866 gdbarch_register_byte_ftype register_byte)
2867 {
2868 gdbarch->register_byte = register_byte;
2869 }
2870
2871 int
2872 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2873 {
2874 if (gdbarch->register_raw_size == 0)
2875 internal_error (__FILE__, __LINE__,
2876 "gdbarch: gdbarch_register_raw_size invalid");
2877 if (gdbarch_debug >= 2)
2878 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
2879 return gdbarch->register_raw_size (reg_nr);
2880 }
2881
2882 void
2883 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
2884 gdbarch_register_raw_size_ftype register_raw_size)
2885 {
2886 gdbarch->register_raw_size = register_raw_size;
2887 }
2888
2889 int
2890 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
2891 {
2892 if (gdbarch->max_register_raw_size == -1)
2893 internal_error (__FILE__, __LINE__,
2894 "gdbarch: gdbarch_max_register_raw_size invalid");
2895 if (gdbarch_debug >= 2)
2896 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
2897 return gdbarch->max_register_raw_size;
2898 }
2899
2900 void
2901 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
2902 int max_register_raw_size)
2903 {
2904 gdbarch->max_register_raw_size = max_register_raw_size;
2905 }
2906
2907 int
2908 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2909 {
2910 if (gdbarch->register_virtual_size == 0)
2911 internal_error (__FILE__, __LINE__,
2912 "gdbarch: gdbarch_register_virtual_size invalid");
2913 if (gdbarch_debug >= 2)
2914 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
2915 return gdbarch->register_virtual_size (reg_nr);
2916 }
2917
2918 void
2919 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
2920 gdbarch_register_virtual_size_ftype register_virtual_size)
2921 {
2922 gdbarch->register_virtual_size = register_virtual_size;
2923 }
2924
2925 int
2926 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
2927 {
2928 if (gdbarch->max_register_virtual_size == -1)
2929 internal_error (__FILE__, __LINE__,
2930 "gdbarch: gdbarch_max_register_virtual_size invalid");
2931 if (gdbarch_debug >= 2)
2932 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
2933 return gdbarch->max_register_virtual_size;
2934 }
2935
2936 void
2937 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
2938 int max_register_virtual_size)
2939 {
2940 gdbarch->max_register_virtual_size = max_register_virtual_size;
2941 }
2942
2943 struct type *
2944 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2945 {
2946 if (gdbarch->register_virtual_type == 0)
2947 internal_error (__FILE__, __LINE__,
2948 "gdbarch: gdbarch_register_virtual_type invalid");
2949 if (gdbarch_debug >= 2)
2950 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
2951 return gdbarch->register_virtual_type (reg_nr);
2952 }
2953
2954 void
2955 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
2956 gdbarch_register_virtual_type_ftype register_virtual_type)
2957 {
2958 gdbarch->register_virtual_type = register_virtual_type;
2959 }
2960
2961 void
2962 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2963 {
2964 if (gdbarch->do_registers_info == 0)
2965 internal_error (__FILE__, __LINE__,
2966 "gdbarch: gdbarch_do_registers_info invalid");
2967 if (gdbarch_debug >= 2)
2968 fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
2969 gdbarch->do_registers_info (reg_nr, fpregs);
2970 }
2971
2972 void
2973 set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
2974 gdbarch_do_registers_info_ftype do_registers_info)
2975 {
2976 gdbarch->do_registers_info = do_registers_info;
2977 }
2978
2979 int
2980 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2981 {
2982 if (gdbarch->register_sim_regno == 0)
2983 internal_error (__FILE__, __LINE__,
2984 "gdbarch: gdbarch_register_sim_regno invalid");
2985 if (gdbarch_debug >= 2)
2986 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2987 return gdbarch->register_sim_regno (reg_nr);
2988 }
2989
2990 void
2991 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2992 gdbarch_register_sim_regno_ftype register_sim_regno)
2993 {
2994 gdbarch->register_sim_regno = register_sim_regno;
2995 }
2996
2997 int
2998 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
2999 {
3000 return gdbarch->register_bytes_ok != 0;
3001 }
3002
3003 int
3004 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3005 {
3006 if (gdbarch->register_bytes_ok == 0)
3007 internal_error (__FILE__, __LINE__,
3008 "gdbarch: gdbarch_register_bytes_ok invalid");
3009 if (gdbarch_debug >= 2)
3010 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3011 return gdbarch->register_bytes_ok (nr_bytes);
3012 }
3013
3014 void
3015 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3016 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3017 {
3018 gdbarch->register_bytes_ok = register_bytes_ok;
3019 }
3020
3021 int
3022 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
3023 {
3024 if (gdbarch->use_generic_dummy_frames == -1)
3025 internal_error (__FILE__, __LINE__,
3026 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3027 if (gdbarch_debug >= 2)
3028 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
3029 return gdbarch->use_generic_dummy_frames;
3030 }
3031
3032 void
3033 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
3034 int use_generic_dummy_frames)
3035 {
3036 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
3037 }
3038
3039 int
3040 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3041 {
3042 if (gdbarch->call_dummy_location == 0)
3043 internal_error (__FILE__, __LINE__,
3044 "gdbarch: gdbarch_call_dummy_location invalid");
3045 if (gdbarch_debug >= 2)
3046 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3047 return gdbarch->call_dummy_location;
3048 }
3049
3050 void
3051 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3052 int call_dummy_location)
3053 {
3054 gdbarch->call_dummy_location = call_dummy_location;
3055 }
3056
3057 CORE_ADDR
3058 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3059 {
3060 if (gdbarch->call_dummy_address == 0)
3061 internal_error (__FILE__, __LINE__,
3062 "gdbarch: gdbarch_call_dummy_address invalid");
3063 if (gdbarch_debug >= 2)
3064 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3065 return gdbarch->call_dummy_address ();
3066 }
3067
3068 void
3069 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3070 gdbarch_call_dummy_address_ftype call_dummy_address)
3071 {
3072 gdbarch->call_dummy_address = call_dummy_address;
3073 }
3074
3075 CORE_ADDR
3076 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3077 {
3078 if (gdbarch->call_dummy_start_offset == -1)
3079 internal_error (__FILE__, __LINE__,
3080 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3081 if (gdbarch_debug >= 2)
3082 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3083 return gdbarch->call_dummy_start_offset;
3084 }
3085
3086 void
3087 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3088 CORE_ADDR call_dummy_start_offset)
3089 {
3090 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3091 }
3092
3093 CORE_ADDR
3094 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3095 {
3096 if (gdbarch->call_dummy_breakpoint_offset == -1)
3097 internal_error (__FILE__, __LINE__,
3098 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3099 if (gdbarch_debug >= 2)
3100 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3101 return gdbarch->call_dummy_breakpoint_offset;
3102 }
3103
3104 void
3105 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3106 CORE_ADDR call_dummy_breakpoint_offset)
3107 {
3108 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3109 }
3110
3111 int
3112 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3113 {
3114 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3115 internal_error (__FILE__, __LINE__,
3116 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3117 if (gdbarch_debug >= 2)
3118 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3119 return gdbarch->call_dummy_breakpoint_offset_p;
3120 }
3121
3122 void
3123 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3124 int call_dummy_breakpoint_offset_p)
3125 {
3126 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3127 }
3128
3129 int
3130 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3131 {
3132 if (gdbarch->call_dummy_length == -1)
3133 internal_error (__FILE__, __LINE__,
3134 "gdbarch: gdbarch_call_dummy_length invalid");
3135 if (gdbarch_debug >= 2)
3136 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3137 return gdbarch->call_dummy_length;
3138 }
3139
3140 void
3141 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3142 int call_dummy_length)
3143 {
3144 gdbarch->call_dummy_length = call_dummy_length;
3145 }
3146
3147 int
3148 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3149 {
3150 if (gdbarch->pc_in_call_dummy == 0)
3151 internal_error (__FILE__, __LINE__,
3152 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3153 if (gdbarch_debug >= 2)
3154 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
3155 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
3156 }
3157
3158 void
3159 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
3160 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
3161 {
3162 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
3163 }
3164
3165 int
3166 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3167 {
3168 if (gdbarch->call_dummy_p == -1)
3169 internal_error (__FILE__, __LINE__,
3170 "gdbarch: gdbarch_call_dummy_p invalid");
3171 if (gdbarch_debug >= 2)
3172 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3173 return gdbarch->call_dummy_p;
3174 }
3175
3176 void
3177 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3178 int call_dummy_p)
3179 {
3180 gdbarch->call_dummy_p = call_dummy_p;
3181 }
3182
3183 LONGEST *
3184 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3185 {
3186 /* Skip verify of call_dummy_words, invalid_p == 0 */
3187 if (gdbarch_debug >= 2)
3188 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3189 return gdbarch->call_dummy_words;
3190 }
3191
3192 void
3193 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3194 LONGEST * call_dummy_words)
3195 {
3196 gdbarch->call_dummy_words = call_dummy_words;
3197 }
3198
3199 int
3200 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3201 {
3202 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3203 if (gdbarch_debug >= 2)
3204 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3205 return gdbarch->sizeof_call_dummy_words;
3206 }
3207
3208 void
3209 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3210 int sizeof_call_dummy_words)
3211 {
3212 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3213 }
3214
3215 int
3216 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3217 {
3218 if (gdbarch->call_dummy_stack_adjust_p == -1)
3219 internal_error (__FILE__, __LINE__,
3220 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3221 if (gdbarch_debug >= 2)
3222 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3223 return gdbarch->call_dummy_stack_adjust_p;
3224 }
3225
3226 void
3227 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3228 int call_dummy_stack_adjust_p)
3229 {
3230 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3231 }
3232
3233 int
3234 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3235 {
3236 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3237 internal_error (__FILE__, __LINE__,
3238 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3239 if (gdbarch_debug >= 2)
3240 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3241 return gdbarch->call_dummy_stack_adjust;
3242 }
3243
3244 void
3245 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3246 int call_dummy_stack_adjust)
3247 {
3248 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3249 }
3250
3251 void
3252 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)
3253 {
3254 if (gdbarch->fix_call_dummy == 0)
3255 internal_error (__FILE__, __LINE__,
3256 "gdbarch: gdbarch_fix_call_dummy invalid");
3257 if (gdbarch_debug >= 2)
3258 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3259 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3260 }
3261
3262 void
3263 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3264 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3265 {
3266 gdbarch->fix_call_dummy = fix_call_dummy;
3267 }
3268
3269 int
3270 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3271 {
3272 if (gdbarch_debug >= 2)
3273 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3274 return gdbarch->believe_pcc_promotion;
3275 }
3276
3277 void
3278 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3279 int believe_pcc_promotion)
3280 {
3281 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3282 }
3283
3284 int
3285 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3286 {
3287 if (gdbarch_debug >= 2)
3288 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3289 return gdbarch->believe_pcc_promotion_type;
3290 }
3291
3292 void
3293 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3294 int believe_pcc_promotion_type)
3295 {
3296 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3297 }
3298
3299 int
3300 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
3301 {
3302 if (gdbarch->coerce_float_to_double == 0)
3303 internal_error (__FILE__, __LINE__,
3304 "gdbarch: gdbarch_coerce_float_to_double invalid");
3305 if (gdbarch_debug >= 2)
3306 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
3307 return gdbarch->coerce_float_to_double (formal, actual);
3308 }
3309
3310 void
3311 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
3312 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
3313 {
3314 gdbarch->coerce_float_to_double = coerce_float_to_double;
3315 }
3316
3317 void
3318 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)
3319 {
3320 if (gdbarch->get_saved_register == 0)
3321 internal_error (__FILE__, __LINE__,
3322 "gdbarch: gdbarch_get_saved_register invalid");
3323 if (gdbarch_debug >= 2)
3324 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3325 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3326 }
3327
3328 void
3329 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3330 gdbarch_get_saved_register_ftype get_saved_register)
3331 {
3332 gdbarch->get_saved_register = get_saved_register;
3333 }
3334
3335 int
3336 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3337 {
3338 if (gdbarch->register_convertible == 0)
3339 internal_error (__FILE__, __LINE__,
3340 "gdbarch: gdbarch_register_convertible invalid");
3341 if (gdbarch_debug >= 2)
3342 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3343 return gdbarch->register_convertible (nr);
3344 }
3345
3346 void
3347 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3348 gdbarch_register_convertible_ftype register_convertible)
3349 {
3350 gdbarch->register_convertible = register_convertible;
3351 }
3352
3353 void
3354 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3355 {
3356 if (gdbarch->register_convert_to_virtual == 0)
3357 internal_error (__FILE__, __LINE__,
3358 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3359 if (gdbarch_debug >= 2)
3360 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3361 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3362 }
3363
3364 void
3365 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3366 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3367 {
3368 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3369 }
3370
3371 void
3372 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3373 {
3374 if (gdbarch->register_convert_to_raw == 0)
3375 internal_error (__FILE__, __LINE__,
3376 "gdbarch: gdbarch_register_convert_to_raw invalid");
3377 if (gdbarch_debug >= 2)
3378 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3379 gdbarch->register_convert_to_raw (type, regnum, from, to);
3380 }
3381
3382 void
3383 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3384 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3385 {
3386 gdbarch->register_convert_to_raw = register_convert_to_raw;
3387 }
3388
3389 void
3390 gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
3391 {
3392 if (gdbarch->fetch_pseudo_register == 0)
3393 internal_error (__FILE__, __LINE__,
3394 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3395 if (gdbarch_debug >= 2)
3396 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
3397 gdbarch->fetch_pseudo_register (regnum);
3398 }
3399
3400 void
3401 set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
3402 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
3403 {
3404 gdbarch->fetch_pseudo_register = fetch_pseudo_register;
3405 }
3406
3407 void
3408 gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
3409 {
3410 if (gdbarch->store_pseudo_register == 0)
3411 internal_error (__FILE__, __LINE__,
3412 "gdbarch: gdbarch_store_pseudo_register invalid");
3413 if (gdbarch_debug >= 2)
3414 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
3415 gdbarch->store_pseudo_register (regnum);
3416 }
3417
3418 void
3419 set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
3420 gdbarch_store_pseudo_register_ftype store_pseudo_register)
3421 {
3422 gdbarch->store_pseudo_register = store_pseudo_register;
3423 }
3424
3425 CORE_ADDR
3426 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3427 {
3428 if (gdbarch->pointer_to_address == 0)
3429 internal_error (__FILE__, __LINE__,
3430 "gdbarch: gdbarch_pointer_to_address invalid");
3431 if (gdbarch_debug >= 2)
3432 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3433 return gdbarch->pointer_to_address (type, buf);
3434 }
3435
3436 void
3437 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3438 gdbarch_pointer_to_address_ftype pointer_to_address)
3439 {
3440 gdbarch->pointer_to_address = pointer_to_address;
3441 }
3442
3443 void
3444 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3445 {
3446 if (gdbarch->address_to_pointer == 0)
3447 internal_error (__FILE__, __LINE__,
3448 "gdbarch: gdbarch_address_to_pointer invalid");
3449 if (gdbarch_debug >= 2)
3450 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3451 gdbarch->address_to_pointer (type, buf, addr);
3452 }
3453
3454 void
3455 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3456 gdbarch_address_to_pointer_ftype address_to_pointer)
3457 {
3458 gdbarch->address_to_pointer = address_to_pointer;
3459 }
3460
3461 int
3462 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3463 {
3464 if (gdbarch->return_value_on_stack == 0)
3465 internal_error (__FILE__, __LINE__,
3466 "gdbarch: gdbarch_return_value_on_stack invalid");
3467 if (gdbarch_debug >= 2)
3468 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3469 return gdbarch->return_value_on_stack (type);
3470 }
3471
3472 void
3473 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3474 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3475 {
3476 gdbarch->return_value_on_stack = return_value_on_stack;
3477 }
3478
3479 void
3480 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3481 {
3482 if (gdbarch->extract_return_value == 0)
3483 internal_error (__FILE__, __LINE__,
3484 "gdbarch: gdbarch_extract_return_value invalid");
3485 if (gdbarch_debug >= 2)
3486 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3487 gdbarch->extract_return_value (type, regbuf, valbuf);
3488 }
3489
3490 void
3491 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3492 gdbarch_extract_return_value_ftype extract_return_value)
3493 {
3494 gdbarch->extract_return_value = extract_return_value;
3495 }
3496
3497 CORE_ADDR
3498 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3499 {
3500 if (gdbarch->push_arguments == 0)
3501 internal_error (__FILE__, __LINE__,
3502 "gdbarch: gdbarch_push_arguments invalid");
3503 if (gdbarch_debug >= 2)
3504 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
3505 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
3506 }
3507
3508 void
3509 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
3510 gdbarch_push_arguments_ftype push_arguments)
3511 {
3512 gdbarch->push_arguments = push_arguments;
3513 }
3514
3515 void
3516 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
3517 {
3518 if (gdbarch->push_dummy_frame == 0)
3519 internal_error (__FILE__, __LINE__,
3520 "gdbarch: gdbarch_push_dummy_frame invalid");
3521 if (gdbarch_debug >= 2)
3522 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
3523 gdbarch->push_dummy_frame ();
3524 }
3525
3526 void
3527 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3528 gdbarch_push_dummy_frame_ftype push_dummy_frame)
3529 {
3530 gdbarch->push_dummy_frame = push_dummy_frame;
3531 }
3532
3533 CORE_ADDR
3534 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3535 {
3536 if (gdbarch->push_return_address == 0)
3537 internal_error (__FILE__, __LINE__,
3538 "gdbarch: gdbarch_push_return_address invalid");
3539 if (gdbarch_debug >= 2)
3540 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3541 return gdbarch->push_return_address (pc, sp);
3542 }
3543
3544 void
3545 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3546 gdbarch_push_return_address_ftype push_return_address)
3547 {
3548 gdbarch->push_return_address = push_return_address;
3549 }
3550
3551 void
3552 gdbarch_pop_frame (struct gdbarch *gdbarch)
3553 {
3554 if (gdbarch->pop_frame == 0)
3555 internal_error (__FILE__, __LINE__,
3556 "gdbarch: gdbarch_pop_frame invalid");
3557 if (gdbarch_debug >= 2)
3558 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3559 gdbarch->pop_frame ();
3560 }
3561
3562 void
3563 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3564 gdbarch_pop_frame_ftype pop_frame)
3565 {
3566 gdbarch->pop_frame = pop_frame;
3567 }
3568
3569 CORE_ADDR
3570 gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
3571 {
3572 if (gdbarch->d10v_make_daddr == 0)
3573 internal_error (__FILE__, __LINE__,
3574 "gdbarch: gdbarch_d10v_make_daddr invalid");
3575 if (gdbarch_debug >= 2)
3576 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
3577 return gdbarch->d10v_make_daddr (x);
3578 }
3579
3580 void
3581 set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch,
3582 gdbarch_d10v_make_daddr_ftype d10v_make_daddr)
3583 {
3584 gdbarch->d10v_make_daddr = d10v_make_daddr;
3585 }
3586
3587 CORE_ADDR
3588 gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
3589 {
3590 if (gdbarch->d10v_make_iaddr == 0)
3591 internal_error (__FILE__, __LINE__,
3592 "gdbarch: gdbarch_d10v_make_iaddr invalid");
3593 if (gdbarch_debug >= 2)
3594 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
3595 return gdbarch->d10v_make_iaddr (x);
3596 }
3597
3598 void
3599 set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch,
3600 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr)
3601 {
3602 gdbarch->d10v_make_iaddr = d10v_make_iaddr;
3603 }
3604
3605 int
3606 gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3607 {
3608 if (gdbarch->d10v_daddr_p == 0)
3609 internal_error (__FILE__, __LINE__,
3610 "gdbarch: gdbarch_d10v_daddr_p invalid");
3611 if (gdbarch_debug >= 2)
3612 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
3613 return gdbarch->d10v_daddr_p (x);
3614 }
3615
3616 void
3617 set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch,
3618 gdbarch_d10v_daddr_p_ftype d10v_daddr_p)
3619 {
3620 gdbarch->d10v_daddr_p = d10v_daddr_p;
3621 }
3622
3623 int
3624 gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3625 {
3626 if (gdbarch->d10v_iaddr_p == 0)
3627 internal_error (__FILE__, __LINE__,
3628 "gdbarch: gdbarch_d10v_iaddr_p invalid");
3629 if (gdbarch_debug >= 2)
3630 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
3631 return gdbarch->d10v_iaddr_p (x);
3632 }
3633
3634 void
3635 set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch,
3636 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p)
3637 {
3638 gdbarch->d10v_iaddr_p = d10v_iaddr_p;
3639 }
3640
3641 CORE_ADDR
3642 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3643 {
3644 if (gdbarch->d10v_convert_daddr_to_raw == 0)
3645 internal_error (__FILE__, __LINE__,
3646 "gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3647 if (gdbarch_debug >= 2)
3648 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
3649 return gdbarch->d10v_convert_daddr_to_raw (x);
3650 }
3651
3652 void
3653 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch,
3654 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw)
3655 {
3656 gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw;
3657 }
3658
3659 CORE_ADDR
3660 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3661 {
3662 if (gdbarch->d10v_convert_iaddr_to_raw == 0)
3663 internal_error (__FILE__, __LINE__,
3664 "gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3665 if (gdbarch_debug >= 2)
3666 fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3667 return gdbarch->d10v_convert_iaddr_to_raw (x);
3668 }
3669
3670 void
3671 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch,
3672 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw)
3673 {
3674 gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw;
3675 }
3676
3677 void
3678 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3679 {
3680 if (gdbarch->store_struct_return == 0)
3681 internal_error (__FILE__, __LINE__,
3682 "gdbarch: gdbarch_store_struct_return invalid");
3683 if (gdbarch_debug >= 2)
3684 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3685 gdbarch->store_struct_return (addr, sp);
3686 }
3687
3688 void
3689 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3690 gdbarch_store_struct_return_ftype store_struct_return)
3691 {
3692 gdbarch->store_struct_return = store_struct_return;
3693 }
3694
3695 void
3696 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3697 {
3698 if (gdbarch->store_return_value == 0)
3699 internal_error (__FILE__, __LINE__,
3700 "gdbarch: gdbarch_store_return_value invalid");
3701 if (gdbarch_debug >= 2)
3702 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3703 gdbarch->store_return_value (type, valbuf);
3704 }
3705
3706 void
3707 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3708 gdbarch_store_return_value_ftype store_return_value)
3709 {
3710 gdbarch->store_return_value = store_return_value;
3711 }
3712
3713 int
3714 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
3715 {
3716 return gdbarch->extract_struct_value_address != 0;
3717 }
3718
3719 CORE_ADDR
3720 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
3721 {
3722 if (gdbarch->extract_struct_value_address == 0)
3723 internal_error (__FILE__, __LINE__,
3724 "gdbarch: gdbarch_extract_struct_value_address invalid");
3725 if (gdbarch_debug >= 2)
3726 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
3727 return gdbarch->extract_struct_value_address (regbuf);
3728 }
3729
3730 void
3731 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
3732 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
3733 {
3734 gdbarch->extract_struct_value_address = extract_struct_value_address;
3735 }
3736
3737 int
3738 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3739 {
3740 if (gdbarch->use_struct_convention == 0)
3741 internal_error (__FILE__, __LINE__,
3742 "gdbarch: gdbarch_use_struct_convention invalid");
3743 if (gdbarch_debug >= 2)
3744 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3745 return gdbarch->use_struct_convention (gcc_p, value_type);
3746 }
3747
3748 void
3749 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3750 gdbarch_use_struct_convention_ftype use_struct_convention)
3751 {
3752 gdbarch->use_struct_convention = use_struct_convention;
3753 }
3754
3755 void
3756 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3757 {
3758 if (gdbarch->frame_init_saved_regs == 0)
3759 internal_error (__FILE__, __LINE__,
3760 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3761 if (gdbarch_debug >= 2)
3762 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
3763 gdbarch->frame_init_saved_regs (frame);
3764 }
3765
3766 void
3767 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
3768 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
3769 {
3770 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
3771 }
3772
3773 void
3774 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3775 {
3776 if (gdbarch->init_extra_frame_info == 0)
3777 internal_error (__FILE__, __LINE__,
3778 "gdbarch: gdbarch_init_extra_frame_info invalid");
3779 if (gdbarch_debug >= 2)
3780 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
3781 gdbarch->init_extra_frame_info (fromleaf, frame);
3782 }
3783
3784 void
3785 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
3786 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
3787 {
3788 gdbarch->init_extra_frame_info = init_extra_frame_info;
3789 }
3790
3791 CORE_ADDR
3792 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3793 {
3794 if (gdbarch->skip_prologue == 0)
3795 internal_error (__FILE__, __LINE__,
3796 "gdbarch: gdbarch_skip_prologue invalid");
3797 if (gdbarch_debug >= 2)
3798 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3799 return gdbarch->skip_prologue (ip);
3800 }
3801
3802 void
3803 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3804 gdbarch_skip_prologue_ftype skip_prologue)
3805 {
3806 gdbarch->skip_prologue = skip_prologue;
3807 }
3808
3809 int
3810 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
3811 {
3812 if (gdbarch->prologue_frameless_p == 0)
3813 internal_error (__FILE__, __LINE__,
3814 "gdbarch: gdbarch_prologue_frameless_p invalid");
3815 if (gdbarch_debug >= 2)
3816 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
3817 return gdbarch->prologue_frameless_p (ip);
3818 }
3819
3820 void
3821 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
3822 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
3823 {
3824 gdbarch->prologue_frameless_p = prologue_frameless_p;
3825 }
3826
3827 int
3828 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3829 {
3830 if (gdbarch->inner_than == 0)
3831 internal_error (__FILE__, __LINE__,
3832 "gdbarch: gdbarch_inner_than invalid");
3833 if (gdbarch_debug >= 2)
3834 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3835 return gdbarch->inner_than (lhs, rhs);
3836 }
3837
3838 void
3839 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3840 gdbarch_inner_than_ftype inner_than)
3841 {
3842 gdbarch->inner_than = inner_than;
3843 }
3844
3845 unsigned char *
3846 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3847 {
3848 if (gdbarch->breakpoint_from_pc == 0)
3849 internal_error (__FILE__, __LINE__,
3850 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3851 if (gdbarch_debug >= 2)
3852 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3853 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3854 }
3855
3856 void
3857 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3858 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3859 {
3860 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3861 }
3862
3863 int
3864 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3865 {
3866 if (gdbarch->memory_insert_breakpoint == 0)
3867 internal_error (__FILE__, __LINE__,
3868 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3869 if (gdbarch_debug >= 2)
3870 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3871 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3872 }
3873
3874 void
3875 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3876 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3877 {
3878 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3879 }
3880
3881 int
3882 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3883 {
3884 if (gdbarch->memory_remove_breakpoint == 0)
3885 internal_error (__FILE__, __LINE__,
3886 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3887 if (gdbarch_debug >= 2)
3888 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3889 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3890 }
3891
3892 void
3893 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3894 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3895 {
3896 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3897 }
3898
3899 CORE_ADDR
3900 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3901 {
3902 if (gdbarch->decr_pc_after_break == -1)
3903 internal_error (__FILE__, __LINE__,
3904 "gdbarch: gdbarch_decr_pc_after_break invalid");
3905 if (gdbarch_debug >= 2)
3906 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3907 return gdbarch->decr_pc_after_break;
3908 }
3909
3910 void
3911 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3912 CORE_ADDR decr_pc_after_break)
3913 {
3914 gdbarch->decr_pc_after_break = decr_pc_after_break;
3915 }
3916
3917 int
3918 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
3919 {
3920 if (gdbarch->prepare_to_proceed == 0)
3921 internal_error (__FILE__, __LINE__,
3922 "gdbarch: gdbarch_prepare_to_proceed invalid");
3923 if (gdbarch_debug >= 2)
3924 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
3925 return gdbarch->prepare_to_proceed (select_it);
3926 }
3927
3928 void
3929 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
3930 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
3931 {
3932 gdbarch->prepare_to_proceed = prepare_to_proceed;
3933 }
3934
3935 CORE_ADDR
3936 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3937 {
3938 if (gdbarch->function_start_offset == -1)
3939 internal_error (__FILE__, __LINE__,
3940 "gdbarch: gdbarch_function_start_offset invalid");
3941 if (gdbarch_debug >= 2)
3942 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3943 return gdbarch->function_start_offset;
3944 }
3945
3946 void
3947 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3948 CORE_ADDR function_start_offset)
3949 {
3950 gdbarch->function_start_offset = function_start_offset;
3951 }
3952
3953 void
3954 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
3955 {
3956 if (gdbarch->remote_translate_xfer_address == 0)
3957 internal_error (__FILE__, __LINE__,
3958 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3959 if (gdbarch_debug >= 2)
3960 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3961 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
3962 }
3963
3964 void
3965 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3966 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3967 {
3968 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3969 }
3970
3971 CORE_ADDR
3972 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3973 {
3974 if (gdbarch->frame_args_skip == -1)
3975 internal_error (__FILE__, __LINE__,
3976 "gdbarch: gdbarch_frame_args_skip invalid");
3977 if (gdbarch_debug >= 2)
3978 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3979 return gdbarch->frame_args_skip;
3980 }
3981
3982 void
3983 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3984 CORE_ADDR frame_args_skip)
3985 {
3986 gdbarch->frame_args_skip = frame_args_skip;
3987 }
3988
3989 int
3990 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3991 {
3992 if (gdbarch->frameless_function_invocation == 0)
3993 internal_error (__FILE__, __LINE__,
3994 "gdbarch: gdbarch_frameless_function_invocation invalid");
3995 if (gdbarch_debug >= 2)
3996 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
3997 return gdbarch->frameless_function_invocation (fi);
3998 }
3999
4000 void
4001 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4002 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4003 {
4004 gdbarch->frameless_function_invocation = frameless_function_invocation;
4005 }
4006
4007 CORE_ADDR
4008 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4009 {
4010 if (gdbarch->frame_chain == 0)
4011 internal_error (__FILE__, __LINE__,
4012 "gdbarch: gdbarch_frame_chain invalid");
4013 if (gdbarch_debug >= 2)
4014 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
4015 return gdbarch->frame_chain (frame);
4016 }
4017
4018 void
4019 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
4020 gdbarch_frame_chain_ftype frame_chain)
4021 {
4022 gdbarch->frame_chain = frame_chain;
4023 }
4024
4025 int
4026 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4027 {
4028 if (gdbarch->frame_chain_valid == 0)
4029 internal_error (__FILE__, __LINE__,
4030 "gdbarch: gdbarch_frame_chain_valid invalid");
4031 if (gdbarch_debug >= 2)
4032 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
4033 return gdbarch->frame_chain_valid (chain, thisframe);
4034 }
4035
4036 void
4037 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
4038 gdbarch_frame_chain_valid_ftype frame_chain_valid)
4039 {
4040 gdbarch->frame_chain_valid = frame_chain_valid;
4041 }
4042
4043 CORE_ADDR
4044 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4045 {
4046 if (gdbarch->frame_saved_pc == 0)
4047 internal_error (__FILE__, __LINE__,
4048 "gdbarch: gdbarch_frame_saved_pc invalid");
4049 if (gdbarch_debug >= 2)
4050 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
4051 return gdbarch->frame_saved_pc (fi);
4052 }
4053
4054 void
4055 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
4056 gdbarch_frame_saved_pc_ftype frame_saved_pc)
4057 {
4058 gdbarch->frame_saved_pc = frame_saved_pc;
4059 }
4060
4061 CORE_ADDR
4062 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4063 {
4064 if (gdbarch->frame_args_address == 0)
4065 internal_error (__FILE__, __LINE__,
4066 "gdbarch: gdbarch_frame_args_address invalid");
4067 if (gdbarch_debug >= 2)
4068 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4069 return gdbarch->frame_args_address (fi);
4070 }
4071
4072 void
4073 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4074 gdbarch_frame_args_address_ftype frame_args_address)
4075 {
4076 gdbarch->frame_args_address = frame_args_address;
4077 }
4078
4079 CORE_ADDR
4080 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4081 {
4082 if (gdbarch->frame_locals_address == 0)
4083 internal_error (__FILE__, __LINE__,
4084 "gdbarch: gdbarch_frame_locals_address invalid");
4085 if (gdbarch_debug >= 2)
4086 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4087 return gdbarch->frame_locals_address (fi);
4088 }
4089
4090 void
4091 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4092 gdbarch_frame_locals_address_ftype frame_locals_address)
4093 {
4094 gdbarch->frame_locals_address = frame_locals_address;
4095 }
4096
4097 CORE_ADDR
4098 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4099 {
4100 if (gdbarch->saved_pc_after_call == 0)
4101 internal_error (__FILE__, __LINE__,
4102 "gdbarch: gdbarch_saved_pc_after_call invalid");
4103 if (gdbarch_debug >= 2)
4104 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4105 return gdbarch->saved_pc_after_call (frame);
4106 }
4107
4108 void
4109 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4110 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4111 {
4112 gdbarch->saved_pc_after_call = saved_pc_after_call;
4113 }
4114
4115 int
4116 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4117 {
4118 if (gdbarch->frame_num_args == 0)
4119 internal_error (__FILE__, __LINE__,
4120 "gdbarch: gdbarch_frame_num_args invalid");
4121 if (gdbarch_debug >= 2)
4122 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4123 return gdbarch->frame_num_args (frame);
4124 }
4125
4126 void
4127 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4128 gdbarch_frame_num_args_ftype frame_num_args)
4129 {
4130 gdbarch->frame_num_args = frame_num_args;
4131 }
4132
4133 int
4134 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4135 {
4136 return gdbarch->stack_align != 0;
4137 }
4138
4139 CORE_ADDR
4140 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4141 {
4142 if (gdbarch->stack_align == 0)
4143 internal_error (__FILE__, __LINE__,
4144 "gdbarch: gdbarch_stack_align invalid");
4145 if (gdbarch_debug >= 2)
4146 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4147 return gdbarch->stack_align (sp);
4148 }
4149
4150 void
4151 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4152 gdbarch_stack_align_ftype stack_align)
4153 {
4154 gdbarch->stack_align = stack_align;
4155 }
4156
4157 int
4158 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4159 {
4160 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4161 if (gdbarch_debug >= 2)
4162 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4163 return gdbarch->extra_stack_alignment_needed;
4164 }
4165
4166 void
4167 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4168 int extra_stack_alignment_needed)
4169 {
4170 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4171 }
4172
4173 int
4174 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4175 {
4176 return gdbarch->reg_struct_has_addr != 0;
4177 }
4178
4179 int
4180 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4181 {
4182 if (gdbarch->reg_struct_has_addr == 0)
4183 internal_error (__FILE__, __LINE__,
4184 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4185 if (gdbarch_debug >= 2)
4186 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4187 return gdbarch->reg_struct_has_addr (gcc_p, type);
4188 }
4189
4190 void
4191 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4192 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4193 {
4194 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4195 }
4196
4197 int
4198 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4199 {
4200 return gdbarch->save_dummy_frame_tos != 0;
4201 }
4202
4203 void
4204 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4205 {
4206 if (gdbarch->save_dummy_frame_tos == 0)
4207 internal_error (__FILE__, __LINE__,
4208 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4209 if (gdbarch_debug >= 2)
4210 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4211 gdbarch->save_dummy_frame_tos (sp);
4212 }
4213
4214 void
4215 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4216 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4217 {
4218 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4219 }
4220
4221 int
4222 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4223 {
4224 if (gdbarch_debug >= 2)
4225 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4226 return gdbarch->parm_boundary;
4227 }
4228
4229 void
4230 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4231 int parm_boundary)
4232 {
4233 gdbarch->parm_boundary = parm_boundary;
4234 }
4235
4236 const struct floatformat *
4237 gdbarch_float_format (struct gdbarch *gdbarch)
4238 {
4239 if (gdbarch_debug >= 2)
4240 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4241 return gdbarch->float_format;
4242 }
4243
4244 void
4245 set_gdbarch_float_format (struct gdbarch *gdbarch,
4246 const struct floatformat * float_format)
4247 {
4248 gdbarch->float_format = float_format;
4249 }
4250
4251 const struct floatformat *
4252 gdbarch_double_format (struct gdbarch *gdbarch)
4253 {
4254 if (gdbarch_debug >= 2)
4255 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4256 return gdbarch->double_format;
4257 }
4258
4259 void
4260 set_gdbarch_double_format (struct gdbarch *gdbarch,
4261 const struct floatformat * double_format)
4262 {
4263 gdbarch->double_format = double_format;
4264 }
4265
4266 const struct floatformat *
4267 gdbarch_long_double_format (struct gdbarch *gdbarch)
4268 {
4269 if (gdbarch_debug >= 2)
4270 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4271 return gdbarch->long_double_format;
4272 }
4273
4274 void
4275 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4276 const struct floatformat * long_double_format)
4277 {
4278 gdbarch->long_double_format = long_double_format;
4279 }
4280
4281 CORE_ADDR
4282 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
4283 {
4284 if (gdbarch->convert_from_func_ptr_addr == 0)
4285 internal_error (__FILE__, __LINE__,
4286 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4287 if (gdbarch_debug >= 2)
4288 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4289 return gdbarch->convert_from_func_ptr_addr (addr);
4290 }
4291
4292 void
4293 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4294 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4295 {
4296 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4297 }
4298
4299 CORE_ADDR
4300 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4301 {
4302 if (gdbarch->addr_bits_remove == 0)
4303 internal_error (__FILE__, __LINE__,
4304 "gdbarch: gdbarch_addr_bits_remove invalid");
4305 if (gdbarch_debug >= 2)
4306 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4307 return gdbarch->addr_bits_remove (addr);
4308 }
4309
4310 void
4311 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4312 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4313 {
4314 gdbarch->addr_bits_remove = addr_bits_remove;
4315 }
4316
4317 int
4318 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4319 {
4320 return gdbarch->software_single_step != 0;
4321 }
4322
4323 void
4324 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4325 {
4326 if (gdbarch->software_single_step == 0)
4327 internal_error (__FILE__, __LINE__,
4328 "gdbarch: gdbarch_software_single_step invalid");
4329 if (gdbarch_debug >= 2)
4330 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4331 gdbarch->software_single_step (sig, insert_breakpoints_p);
4332 }
4333
4334 void
4335 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4336 gdbarch_software_single_step_ftype software_single_step)
4337 {
4338 gdbarch->software_single_step = software_single_step;
4339 }
4340
4341
4342 /* Keep a registry of per-architecture data-pointers required by GDB
4343 modules. */
4344
4345 struct gdbarch_data
4346 {
4347 unsigned index;
4348 gdbarch_data_init_ftype *init;
4349 gdbarch_data_free_ftype *free;
4350 };
4351
4352 struct gdbarch_data_registration
4353 {
4354 struct gdbarch_data *data;
4355 struct gdbarch_data_registration *next;
4356 };
4357
4358 struct gdbarch_data_registry
4359 {
4360 unsigned nr;
4361 struct gdbarch_data_registration *registrations;
4362 };
4363
4364 struct gdbarch_data_registry gdbarch_data_registry =
4365 {
4366 0, NULL,
4367 };
4368
4369 struct gdbarch_data *
4370 register_gdbarch_data (gdbarch_data_init_ftype *init,
4371 gdbarch_data_free_ftype *free)
4372 {
4373 struct gdbarch_data_registration **curr;
4374 for (curr = &gdbarch_data_registry.registrations;
4375 (*curr) != NULL;
4376 curr = &(*curr)->next);
4377 (*curr) = XMALLOC (struct gdbarch_data_registration);
4378 (*curr)->next = NULL;
4379 (*curr)->data = XMALLOC (struct gdbarch_data);
4380 (*curr)->data->index = gdbarch_data_registry.nr++;
4381 (*curr)->data->init = init;
4382 (*curr)->data->free = free;
4383 return (*curr)->data;
4384 }
4385
4386
4387 /* Walk through all the registered users initializing each in turn. */
4388
4389 static void
4390 init_gdbarch_data (struct gdbarch *gdbarch)
4391 {
4392 struct gdbarch_data_registration *rego;
4393 for (rego = gdbarch_data_registry.registrations;
4394 rego != NULL;
4395 rego = rego->next)
4396 {
4397 struct gdbarch_data *data = rego->data;
4398 gdb_assert (data->index < gdbarch->nr_data);
4399 if (data->init != NULL)
4400 {
4401 void *pointer = data->init (gdbarch);
4402 set_gdbarch_data (gdbarch, data, pointer);
4403 }
4404 }
4405 }
4406
4407 /* Create/delete the gdbarch data vector. */
4408
4409 static void
4410 alloc_gdbarch_data (struct gdbarch *gdbarch)
4411 {
4412 gdb_assert (gdbarch->data == NULL);
4413 gdbarch->nr_data = gdbarch_data_registry.nr;
4414 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
4415 }
4416
4417 static void
4418 free_gdbarch_data (struct gdbarch *gdbarch)
4419 {
4420 struct gdbarch_data_registration *rego;
4421 gdb_assert (gdbarch->data != NULL);
4422 for (rego = gdbarch_data_registry.registrations;
4423 rego != NULL;
4424 rego = rego->next)
4425 {
4426 struct gdbarch_data *data = rego->data;
4427 gdb_assert (data->index < gdbarch->nr_data);
4428 if (data->free != NULL && gdbarch->data[data->index] != NULL)
4429 {
4430 data->free (gdbarch, gdbarch->data[data->index]);
4431 gdbarch->data[data->index] = NULL;
4432 }
4433 }
4434 xfree (gdbarch->data);
4435 gdbarch->data = NULL;
4436 }
4437
4438
4439 /* Initialize the current value of thee specified per-architecture
4440 data-pointer. */
4441
4442 void
4443 set_gdbarch_data (struct gdbarch *gdbarch,
4444 struct gdbarch_data *data,
4445 void *pointer)
4446 {
4447 gdb_assert (data->index < gdbarch->nr_data);
4448 if (data->free != NULL && gdbarch->data[data->index] != NULL)
4449 data->free (gdbarch, gdbarch->data[data->index]);
4450 gdbarch->data[data->index] = pointer;
4451 }
4452
4453 /* Return the current value of the specified per-architecture
4454 data-pointer. */
4455
4456 void *
4457 gdbarch_data (struct gdbarch_data *data)
4458 {
4459 gdb_assert (data->index < current_gdbarch->nr_data);
4460 return current_gdbarch->data[data->index];
4461 }
4462
4463
4464
4465 /* Keep a registry of swapped data required by GDB modules. */
4466
4467 struct gdbarch_swap
4468 {
4469 void *swap;
4470 struct gdbarch_swap_registration *source;
4471 struct gdbarch_swap *next;
4472 };
4473
4474 struct gdbarch_swap_registration
4475 {
4476 void *data;
4477 unsigned long sizeof_data;
4478 gdbarch_swap_ftype *init;
4479 struct gdbarch_swap_registration *next;
4480 };
4481
4482 struct gdbarch_swap_registry
4483 {
4484 int nr;
4485 struct gdbarch_swap_registration *registrations;
4486 };
4487
4488 struct gdbarch_swap_registry gdbarch_swap_registry =
4489 {
4490 0, NULL,
4491 };
4492
4493 void
4494 register_gdbarch_swap (void *data,
4495 unsigned long sizeof_data,
4496 gdbarch_swap_ftype *init)
4497 {
4498 struct gdbarch_swap_registration **rego;
4499 for (rego = &gdbarch_swap_registry.registrations;
4500 (*rego) != NULL;
4501 rego = &(*rego)->next);
4502 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4503 (*rego)->next = NULL;
4504 (*rego)->init = init;
4505 (*rego)->data = data;
4506 (*rego)->sizeof_data = sizeof_data;
4507 }
4508
4509
4510 static void
4511 init_gdbarch_swap (struct gdbarch *gdbarch)
4512 {
4513 struct gdbarch_swap_registration *rego;
4514 struct gdbarch_swap **curr = &gdbarch->swap;
4515 for (rego = gdbarch_swap_registry.registrations;
4516 rego != NULL;
4517 rego = rego->next)
4518 {
4519 if (rego->data != NULL)
4520 {
4521 (*curr) = XMALLOC (struct gdbarch_swap);
4522 (*curr)->source = rego;
4523 (*curr)->swap = xmalloc (rego->sizeof_data);
4524 (*curr)->next = NULL;
4525 memset (rego->data, 0, rego->sizeof_data);
4526 curr = &(*curr)->next;
4527 }
4528 if (rego->init != NULL)
4529 rego->init ();
4530 }
4531 }
4532
4533 static void
4534 swapout_gdbarch_swap (struct gdbarch *gdbarch)
4535 {
4536 struct gdbarch_swap *curr;
4537 for (curr = gdbarch->swap;
4538 curr != NULL;
4539 curr = curr->next)
4540 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4541 }
4542
4543 static void
4544 swapin_gdbarch_swap (struct gdbarch *gdbarch)
4545 {
4546 struct gdbarch_swap *curr;
4547 for (curr = gdbarch->swap;
4548 curr != NULL;
4549 curr = curr->next)
4550 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4551 }
4552
4553
4554 /* Keep a registry of the architectures known by GDB. */
4555
4556 struct gdbarch_registration
4557 {
4558 enum bfd_architecture bfd_architecture;
4559 gdbarch_init_ftype *init;
4560 gdbarch_dump_tdep_ftype *dump_tdep;
4561 struct gdbarch_list *arches;
4562 struct gdbarch_registration *next;
4563 };
4564
4565 static struct gdbarch_registration *gdbarch_registry = NULL;
4566
4567 static void
4568 append_name (const char ***buf, int *nr, const char *name)
4569 {
4570 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4571 (*buf)[*nr] = name;
4572 *nr += 1;
4573 }
4574
4575 const char **
4576 gdbarch_printable_names (void)
4577 {
4578 if (GDB_MULTI_ARCH)
4579 {
4580 /* Accumulate a list of names based on the registed list of
4581 architectures. */
4582 enum bfd_architecture a;
4583 int nr_arches = 0;
4584 const char **arches = NULL;
4585 struct gdbarch_registration *rego;
4586 for (rego = gdbarch_registry;
4587 rego != NULL;
4588 rego = rego->next)
4589 {
4590 const struct bfd_arch_info *ap;
4591 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4592 if (ap == NULL)
4593 internal_error (__FILE__, __LINE__,
4594 "gdbarch_architecture_names: multi-arch unknown");
4595 do
4596 {
4597 append_name (&arches, &nr_arches, ap->printable_name);
4598 ap = ap->next;
4599 }
4600 while (ap != NULL);
4601 }
4602 append_name (&arches, &nr_arches, NULL);
4603 return arches;
4604 }
4605 else
4606 /* Just return all the architectures that BFD knows. Assume that
4607 the legacy architecture framework supports them. */
4608 return bfd_arch_list ();
4609 }
4610
4611
4612 void
4613 gdbarch_register (enum bfd_architecture bfd_architecture,
4614 gdbarch_init_ftype *init,
4615 gdbarch_dump_tdep_ftype *dump_tdep)
4616 {
4617 struct gdbarch_registration **curr;
4618 const struct bfd_arch_info *bfd_arch_info;
4619 /* Check that BFD recognizes this architecture */
4620 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4621 if (bfd_arch_info == NULL)
4622 {
4623 internal_error (__FILE__, __LINE__,
4624 "gdbarch: Attempt to register unknown architecture (%d)",
4625 bfd_architecture);
4626 }
4627 /* Check that we haven't seen this architecture before */
4628 for (curr = &gdbarch_registry;
4629 (*curr) != NULL;
4630 curr = &(*curr)->next)
4631 {
4632 if (bfd_architecture == (*curr)->bfd_architecture)
4633 internal_error (__FILE__, __LINE__,
4634 "gdbarch: Duplicate registraration of architecture (%s)",
4635 bfd_arch_info->printable_name);
4636 }
4637 /* log it */
4638 if (gdbarch_debug)
4639 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
4640 bfd_arch_info->printable_name,
4641 (long) init);
4642 /* Append it */
4643 (*curr) = XMALLOC (struct gdbarch_registration);
4644 (*curr)->bfd_architecture = bfd_architecture;
4645 (*curr)->init = init;
4646 (*curr)->dump_tdep = dump_tdep;
4647 (*curr)->arches = NULL;
4648 (*curr)->next = NULL;
4649 /* When non- multi-arch, install whatever target dump routine we've
4650 been provided - hopefully that routine has been written correctly
4651 and works regardless of multi-arch. */
4652 if (!GDB_MULTI_ARCH && dump_tdep != NULL
4653 && startup_gdbarch.dump_tdep == NULL)
4654 startup_gdbarch.dump_tdep = dump_tdep;
4655 }
4656
4657 void
4658 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4659 gdbarch_init_ftype *init)
4660 {
4661 gdbarch_register (bfd_architecture, init, NULL);
4662 }
4663
4664
4665 /* Look for an architecture using gdbarch_info. Base search on only
4666 BFD_ARCH_INFO and BYTE_ORDER. */
4667
4668 struct gdbarch_list *
4669 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4670 const struct gdbarch_info *info)
4671 {
4672 for (; arches != NULL; arches = arches->next)
4673 {
4674 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4675 continue;
4676 if (info->byte_order != arches->gdbarch->byte_order)
4677 continue;
4678 return arches;
4679 }
4680 return NULL;
4681 }
4682
4683
4684 /* Update the current architecture. Return ZERO if the update request
4685 failed. */
4686
4687 int
4688 gdbarch_update_p (struct gdbarch_info info)
4689 {
4690 struct gdbarch *new_gdbarch;
4691 struct gdbarch_list **list;
4692 struct gdbarch_registration *rego;
4693
4694 /* Fill in missing parts of the INFO struct using a number of
4695 sources: ``set ...''; INFOabfd supplied; existing target. */
4696
4697 /* ``(gdb) set architecture ...'' */
4698 if (info.bfd_arch_info == NULL
4699 && !TARGET_ARCHITECTURE_AUTO)
4700 info.bfd_arch_info = TARGET_ARCHITECTURE;
4701 if (info.bfd_arch_info == NULL
4702 && info.abfd != NULL
4703 && bfd_get_arch (info.abfd) != bfd_arch_unknown
4704 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
4705 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
4706 if (info.bfd_arch_info == NULL)
4707 info.bfd_arch_info = TARGET_ARCHITECTURE;
4708
4709 /* ``(gdb) set byte-order ...'' */
4710 if (info.byte_order == 0
4711 && !TARGET_BYTE_ORDER_AUTO)
4712 info.byte_order = TARGET_BYTE_ORDER;
4713 /* From the INFO struct. */
4714 if (info.byte_order == 0
4715 && info.abfd != NULL)
4716 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
4717 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
4718 : 0);
4719 /* From the current target. */
4720 if (info.byte_order == 0)
4721 info.byte_order = TARGET_BYTE_ORDER;
4722
4723 /* Must have found some sort of architecture. */
4724 gdb_assert (info.bfd_arch_info != NULL);
4725
4726 if (gdbarch_debug)
4727 {
4728 fprintf_unfiltered (gdb_stdlog,
4729 "gdbarch_update: info.bfd_arch_info %s\n",
4730 (info.bfd_arch_info != NULL
4731 ? info.bfd_arch_info->printable_name
4732 : "(null)"));
4733 fprintf_unfiltered (gdb_stdlog,
4734 "gdbarch_update: info.byte_order %d (%s)\n",
4735 info.byte_order,
4736 (info.byte_order == BIG_ENDIAN ? "big"
4737 : info.byte_order == LITTLE_ENDIAN ? "little"
4738 : "default"));
4739 fprintf_unfiltered (gdb_stdlog,
4740 "gdbarch_update: info.abfd 0x%lx\n",
4741 (long) info.abfd);
4742 fprintf_unfiltered (gdb_stdlog,
4743 "gdbarch_update: info.tdep_info 0x%lx\n",
4744 (long) info.tdep_info);
4745 }
4746
4747 /* Find the target that knows about this architecture. */
4748 for (rego = gdbarch_registry;
4749 rego != NULL;
4750 rego = rego->next)
4751 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4752 break;
4753 if (rego == NULL)
4754 {
4755 if (gdbarch_debug)
4756 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
4757 return 0;
4758 }
4759
4760 /* Ask the target for a replacement architecture. */
4761 new_gdbarch = rego->init (info, rego->arches);
4762
4763 /* Did the target like it? No. Reject the change. */
4764 if (new_gdbarch == NULL)
4765 {
4766 if (gdbarch_debug)
4767 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
4768 return 0;
4769 }
4770
4771 /* Did the architecture change? No. Do nothing. */
4772 if (current_gdbarch == new_gdbarch)
4773 {
4774 if (gdbarch_debug)
4775 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4776 (long) new_gdbarch,
4777 new_gdbarch->bfd_arch_info->printable_name);
4778 return 1;
4779 }
4780
4781 /* Swap all data belonging to the old target out */
4782 swapout_gdbarch_swap (current_gdbarch);
4783
4784 /* Is this a pre-existing architecture? Yes. Swap it in. */
4785 for (list = &rego->arches;
4786 (*list) != NULL;
4787 list = &(*list)->next)
4788 {
4789 if ((*list)->gdbarch == new_gdbarch)
4790 {
4791 if (gdbarch_debug)
4792 fprintf_unfiltered (gdb_stdlog,
4793 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4794 (long) new_gdbarch,
4795 new_gdbarch->bfd_arch_info->printable_name);
4796 current_gdbarch = new_gdbarch;
4797 swapin_gdbarch_swap (new_gdbarch);
4798 return 1;
4799 }
4800 }
4801
4802 /* Append this new architecture to this targets list. */
4803 (*list) = XMALLOC (struct gdbarch_list);
4804 (*list)->next = NULL;
4805 (*list)->gdbarch = new_gdbarch;
4806
4807 /* Switch to this new architecture. Dump it out. */
4808 current_gdbarch = new_gdbarch;
4809 if (gdbarch_debug)
4810 {
4811 fprintf_unfiltered (gdb_stdlog,
4812 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4813 (long) new_gdbarch,
4814 new_gdbarch->bfd_arch_info->printable_name);
4815 }
4816
4817 /* Check that the newly installed architecture is valid. Plug in
4818 any post init values. */
4819 new_gdbarch->dump_tdep = rego->dump_tdep;
4820 verify_gdbarch (new_gdbarch);
4821
4822 /* Initialize the per-architecture memory (swap) areas.
4823 CURRENT_GDBARCH must be update before these modules are
4824 called. */
4825 init_gdbarch_swap (new_gdbarch);
4826
4827 /* Initialize the per-architecture data-pointer of all parties that
4828 registered an interest in this architecture. CURRENT_GDBARCH
4829 must be updated before these modules are called. */
4830 init_gdbarch_data (new_gdbarch);
4831
4832 if (gdbarch_debug)
4833 gdbarch_dump (current_gdbarch, gdb_stdlog);
4834
4835 return 1;
4836 }
4837
4838
4839 /* Disassembler */
4840
4841 /* Pointer to the target-dependent disassembly function. */
4842 int (*tm_print_insn) (bfd_vma, disassemble_info *);
4843 disassemble_info tm_print_insn_info;
4844
4845
4846 extern void _initialize_gdbarch (void);
4847
4848 void
4849 _initialize_gdbarch (void)
4850 {
4851 struct cmd_list_element *c;
4852
4853 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
4854 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
4855 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
4856 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
4857 tm_print_insn_info.print_address_func = dis_asm_print_address;
4858
4859 add_show_from_set (add_set_cmd ("arch",
4860 class_maintenance,
4861 var_zinteger,
4862 (char *)&gdbarch_debug,
4863 "Set architecture debugging.\n\
4864 When non-zero, architecture debugging is enabled.", &setdebuglist),
4865 &showdebuglist);
4866 c = add_set_cmd ("archdebug",
4867 class_maintenance,
4868 var_zinteger,
4869 (char *)&gdbarch_debug,
4870 "Set architecture debugging.\n\
4871 When non-zero, architecture debugging is enabled.", &setlist);
4872
4873 deprecate_cmd (c, "set debug arch");
4874 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
4875 }
This page took 0.218321 seconds and 4 git commands to generate.