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