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