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