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