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