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