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