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