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