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