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