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