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