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