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