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