1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
6 Software Foundation, Inc.
8 This file is part of GDB.
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.
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.
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. */
25 /* This file was created with the aid of ``gdbarch.sh''.
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
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
39 #include "arch-utils.h"
42 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
45 #include "floatformat.h"
47 #include "gdb_assert.h"
48 #include "gdb_string.h"
49 #include "gdb-events.h"
50 #include "reggroups.h"
52 #include "gdb_obstack.h"
54 /* Static function declarations */
56 static void alloc_gdbarch_data (struct gdbarch *);
58 /* Non-zero if we want to trace architecture code. */
61 #define GDBARCH_DEBUG 0
63 int gdbarch_debug = GDBARCH_DEBUG;
66 /* Maintain the struct gdbarch object */
70 /* Has this architecture been fully initialized? */
73 /* An obstack bound to the lifetime of the architecture. */
74 struct obstack *obstack;
76 /* basic architectural information */
77 const struct bfd_arch_info * bfd_arch_info;
81 /* target specific vector. */
82 struct gdbarch_tdep *tdep;
83 gdbarch_dump_tdep_ftype *dump_tdep;
85 /* per-architecture data-pointers */
89 /* per-architecture swap-regions */
90 struct gdbarch_swap *swap;
94 When extending this structure you must:
98 Declare set/get functions and define the corresponding
101 gdbarch_alloc(): If zero/NULL is not a suitable default,
102 initialize the new field.
104 verify_gdbarch(): Confirm that the target updated the field
107 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
110 ``startup_gdbarch()'': Append an initial value to the static
111 variable (base values on the host's c-type system).
113 get_gdbarch(): Implement the set/get functions (probably using
114 the macro's as shortcuts).
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;
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;
259 /* The default architecture uses host values (for want of a better
262 extern const struct bfd_arch_info bfd_default_arch_struct;
264 struct gdbarch startup_gdbarch =
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 */
274 /*per-architecture data-pointers and swap regions */
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 */
291 0, /* virtual_frame_pointer */
292 0, /* pseudo_register_read */
293 0, /* pseudo_register_write */
295 0, /* num_pseudo_regs */
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 */
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 */
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 */
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 */
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() */
418 struct gdbarch *current_gdbarch = &startup_gdbarch;
420 /* Create a new ``struct gdbarch'' based on information provided by
421 ``struct gdbarch_info''. */
424 gdbarch_alloc (const struct gdbarch_info *info,
425 struct gdbarch_tdep *tdep)
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;
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;
443 alloc_gdbarch_data (current_gdbarch);
445 current_gdbarch->tdep = tdep;
447 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
448 current_gdbarch->byte_order = info->byte_order;
449 current_gdbarch->osabi = info->osabi;
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() */
516 return current_gdbarch;
520 /* Allocate extra space using the per-architecture obstack. */
523 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
525 void *data = obstack_alloc (arch->obstack, size);
526 memset (data, 0, size);
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. */
538 gdbarch_free (struct gdbarch *arch)
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. */
549 /* Ensure that all values in a GDBARCH are reasonable. */
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
558 verify_gdbarch (struct gdbarch *current_gdbarch)
561 struct cleanup *cleanups;
564 log = mem_fileopen ();
565 cleanups = make_cleanup_ui_file_delete (log);
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",
722 do_cleanups (cleanups);
726 /* Print out the details of the current architecture. */
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
735 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
737 fprintf_unfiltered (file,
738 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
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 ());
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 ()*/);
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 ()*/);
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 ()*/);
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);
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 ()*/);
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);
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 ()*/);
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);
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 ()*/);
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 ()*/);
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 ()*/);
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);
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);
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);
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);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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);
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 ());
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);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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);
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 ());
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 ()*/);
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 ()*/);
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 ()*/);
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 ());
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 ()*/);
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);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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);
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 ());
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 ()*/);
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 ()*/);
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 ());
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 ()*/);
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 ());
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ());
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 ()*/);
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",
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);
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 ());
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 ()*/);
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);
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);
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 ());
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 ()*/);
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);
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
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 ());
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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",
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",
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",
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",
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 ()*/);
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);
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",
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 ());
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
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 ());
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 ()*/);
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",
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 ()*/);
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 ()*/);
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",
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);
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);
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);
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);
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",
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);
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",
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);
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",
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",
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);
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);
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);
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);
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 ()*/);
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",
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 ());
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 ()*/);
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 ());
2242 #ifdef TARGET_READ_SP
2243 fprintf_unfiltered (file,
2244 "gdbarch_dump: %s # %s\n",
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 ()*/);
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",
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 ()*/);
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 ()*/);
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 ()*/);
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 ()*/);
2318 if (current_gdbarch->dump_tdep != NULL)
2319 current_gdbarch->dump_tdep (current_gdbarch, file);
2322 struct gdbarch_tdep *
2323 gdbarch_tdep (struct gdbarch *gdbarch)
2325 if (gdbarch_debug >= 2)
2326 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2327 return gdbarch->tdep;
2331 const struct bfd_arch_info *
2332 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
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;
2341 gdbarch_byte_order (struct gdbarch *gdbarch)
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;
2350 gdbarch_osabi (struct gdbarch *gdbarch)
2352 gdb_assert (gdbarch != NULL);
2353 if (gdbarch_debug >= 2)
2354 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2355 return gdbarch->osabi;
2359 gdbarch_short_bit (struct gdbarch *gdbarch)
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;
2369 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2372 gdbarch->short_bit = short_bit;
2376 gdbarch_int_bit (struct gdbarch *gdbarch)
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;
2386 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2389 gdbarch->int_bit = int_bit;
2393 gdbarch_long_bit (struct gdbarch *gdbarch)
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;
2403 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2406 gdbarch->long_bit = long_bit;
2410 gdbarch_long_long_bit (struct gdbarch *gdbarch)
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;
2420 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2423 gdbarch->long_long_bit = long_long_bit;
2427 gdbarch_float_bit (struct gdbarch *gdbarch)
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;
2437 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2440 gdbarch->float_bit = float_bit;
2444 gdbarch_double_bit (struct gdbarch *gdbarch)
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;
2454 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2457 gdbarch->double_bit = double_bit;
2461 gdbarch_long_double_bit (struct gdbarch *gdbarch)
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;
2471 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2472 int long_double_bit)
2474 gdbarch->long_double_bit = long_double_bit;
2478 gdbarch_ptr_bit (struct gdbarch *gdbarch)
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;
2488 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2491 gdbarch->ptr_bit = ptr_bit;
2495 gdbarch_addr_bit (struct gdbarch *gdbarch)
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;
2506 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2509 gdbarch->addr_bit = addr_bit;
2513 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
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;
2523 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2526 gdbarch->bfd_vma_bit = bfd_vma_bit;
2530 gdbarch_char_signed (struct gdbarch *gdbarch)
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;
2541 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2544 gdbarch->char_signed = char_signed;
2548 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2550 gdb_assert (gdbarch != NULL);
2551 return gdbarch->read_pc != NULL;
2555 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
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);
2565 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2566 gdbarch_read_pc_ftype read_pc)
2568 gdbarch->read_pc = read_pc;
2572 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
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);
2582 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2583 gdbarch_write_pc_ftype write_pc)
2585 gdbarch->write_pc = write_pc;
2589 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2591 gdb_assert (gdbarch != NULL);
2592 return gdbarch->read_sp != NULL;
2596 gdbarch_read_sp (struct gdbarch *gdbarch)
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 ();
2606 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2607 gdbarch_read_sp_ftype read_sp)
2609 gdbarch->read_sp = read_sp;
2613 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
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);
2623 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2624 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2626 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2630 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2632 gdb_assert (gdbarch != NULL);
2633 return gdbarch->pseudo_register_read != NULL;
2637 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
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);
2647 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2648 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2650 gdbarch->pseudo_register_read = pseudo_register_read;
2654 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2656 gdb_assert (gdbarch != NULL);
2657 return gdbarch->pseudo_register_write != NULL;
2661 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
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);
2671 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2672 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2674 gdbarch->pseudo_register_write = pseudo_register_write;
2678 gdbarch_num_regs (struct gdbarch *gdbarch)
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;
2689 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2692 gdbarch->num_regs = num_regs;
2696 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
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;
2706 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2707 int num_pseudo_regs)
2709 gdbarch->num_pseudo_regs = num_pseudo_regs;
2713 gdbarch_sp_regnum (struct gdbarch *gdbarch)
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;
2723 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2726 gdbarch->sp_regnum = sp_regnum;
2730 gdbarch_pc_regnum (struct gdbarch *gdbarch)
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;
2740 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2743 gdbarch->pc_regnum = pc_regnum;
2747 gdbarch_ps_regnum (struct gdbarch *gdbarch)
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;
2757 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2760 gdbarch->ps_regnum = ps_regnum;
2764 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
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;
2774 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2777 gdbarch->fp0_regnum = fp0_regnum;
2781 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
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);
2791 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2792 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2794 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2798 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
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);
2808 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2809 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2811 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2815 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
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);
2825 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2826 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2828 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2832 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
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);
2842 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2843 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2845 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2849 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
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);
2859 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2860 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2862 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2866 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
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);
2876 set_gdbarch_register_name (struct gdbarch *gdbarch,
2877 gdbarch_register_name_ftype register_name)
2879 gdbarch->register_name = register_name;
2883 gdbarch_register_type_p (struct gdbarch *gdbarch)
2885 gdb_assert (gdbarch != NULL);
2886 return gdbarch->register_type != NULL;
2890 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
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);
2900 set_gdbarch_register_type (struct gdbarch *gdbarch,
2901 gdbarch_register_type_ftype register_type)
2903 gdbarch->register_type = register_type;
2907 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2909 gdb_assert (gdbarch != NULL);
2910 return gdbarch->deprecated_register_virtual_type != NULL;
2914 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
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);
2924 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2925 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2927 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2931 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
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;
2940 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2941 int deprecated_register_bytes)
2943 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2947 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2949 gdb_assert (gdbarch != NULL);
2950 return gdbarch->deprecated_register_byte != generic_register_byte;
2954 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
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);
2965 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2966 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2968 gdbarch->deprecated_register_byte = deprecated_register_byte;
2972 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2974 gdb_assert (gdbarch != NULL);
2975 return gdbarch->deprecated_register_raw_size != generic_register_size;
2979 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
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);
2990 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2991 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2993 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2997 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2999 gdb_assert (gdbarch != NULL);
3000 return gdbarch->deprecated_register_virtual_size != generic_register_size;
3004 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
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);
3015 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
3016 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
3018 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
3022 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3024 gdb_assert (gdbarch != NULL);
3025 return gdbarch->deprecated_max_register_raw_size != 0;
3029 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
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;
3038 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3039 int deprecated_max_register_raw_size)
3041 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3045 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3047 gdb_assert (gdbarch != NULL);
3048 return gdbarch->deprecated_max_register_virtual_size != 0;
3052 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
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;
3061 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3062 int deprecated_max_register_virtual_size)
3064 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3068 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
3070 gdb_assert (gdbarch != NULL);
3071 return gdbarch->unwind_dummy_id != NULL;
3075 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
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);
3085 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
3086 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
3088 gdbarch->unwind_dummy_id = unwind_dummy_id;
3092 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3094 gdb_assert (gdbarch != NULL);
3095 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
3099 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
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);
3109 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
3110 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
3112 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
3116 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
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;
3126 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3127 int deprecated_fp_regnum)
3129 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3133 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
3135 gdb_assert (gdbarch != NULL);
3136 return gdbarch->deprecated_target_read_fp != NULL;
3140 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
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 ();
3150 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
3151 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
3153 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
3157 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
3159 gdb_assert (gdbarch != NULL);
3160 return gdbarch->push_dummy_call != NULL;
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)
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);
3174 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
3175 gdbarch_push_dummy_call_ftype push_dummy_call)
3177 gdbarch->push_dummy_call = push_dummy_call;
3181 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3183 gdb_assert (gdbarch != NULL);
3184 return gdbarch->deprecated_push_arguments != NULL;
3188 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
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);
3198 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3199 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3201 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3205 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3207 gdb_assert (gdbarch != NULL);
3208 return gdbarch->deprecated_push_return_address != NULL;
3212 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
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);
3222 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3223 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3225 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3229 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3231 gdb_assert (gdbarch != NULL);
3232 return gdbarch->deprecated_dummy_write_sp != NULL;
3236 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
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);
3246 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3247 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3249 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3253 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
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;
3262 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3263 int deprecated_register_size)
3265 gdbarch->deprecated_register_size = deprecated_register_size;
3269 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
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;
3279 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3280 int call_dummy_location)
3282 gdbarch->call_dummy_location = call_dummy_location;
3286 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch)
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;
3295 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch,
3296 CORE_ADDR deprecated_call_dummy_start_offset)
3298 gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset;
3302 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
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;
3311 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3312 CORE_ADDR deprecated_call_dummy_breakpoint_offset)
3314 gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
3318 gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
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;
3328 set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
3329 LONGEST * deprecated_call_dummy_words)
3331 gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
3335 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
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;
3345 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3346 int deprecated_sizeof_call_dummy_words)
3348 gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
3352 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
3354 gdb_assert (gdbarch != NULL);
3355 return gdbarch->deprecated_fix_call_dummy != NULL;
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)
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);
3369 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
3370 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
3372 gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
3376 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3378 gdb_assert (gdbarch != NULL);
3379 return gdbarch->push_dummy_code != NULL;
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)
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);
3393 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3394 gdbarch_push_dummy_code_ftype push_dummy_code)
3396 gdbarch->push_dummy_code = push_dummy_code;
3400 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
3402 gdb_assert (gdbarch != NULL);
3403 return gdbarch->deprecated_push_dummy_frame != NULL;
3407 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
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 ();
3417 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
3418 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
3420 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
3424 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3426 gdb_assert (gdbarch != NULL);
3427 return gdbarch->deprecated_do_registers_info != NULL;
3431 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
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);
3441 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3442 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3444 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3448 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
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);
3458 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3459 gdbarch_print_registers_info_ftype print_registers_info)
3461 gdbarch->print_registers_info = print_registers_info;
3465 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3467 gdb_assert (gdbarch != NULL);
3468 return gdbarch->print_float_info != NULL;
3472 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
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);
3482 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3483 gdbarch_print_float_info_ftype print_float_info)
3485 gdbarch->print_float_info = print_float_info;
3489 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3491 gdb_assert (gdbarch != NULL);
3492 return gdbarch->print_vector_info != NULL;
3496 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
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);
3506 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3507 gdbarch_print_vector_info_ftype print_vector_info)
3509 gdbarch->print_vector_info = print_vector_info;
3513 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
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);
3523 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3524 gdbarch_register_sim_regno_ftype register_sim_regno)
3526 gdbarch->register_sim_regno = register_sim_regno;
3530 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3532 gdb_assert (gdbarch != NULL);
3533 return gdbarch->register_bytes_ok != NULL;
3537 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
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);
3547 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3548 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3550 gdbarch->register_bytes_ok = register_bytes_ok;
3554 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
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);
3564 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3565 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3567 gdbarch->cannot_fetch_register = cannot_fetch_register;
3571 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
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);
3581 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3582 gdbarch_cannot_store_register_ftype cannot_store_register)
3584 gdbarch->cannot_store_register = cannot_store_register;
3588 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3590 gdb_assert (gdbarch != NULL);
3591 return gdbarch->get_longjmp_target != NULL;
3595 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
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);
3605 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3606 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3608 gdbarch->get_longjmp_target = get_longjmp_target;
3612 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3614 gdb_assert (gdbarch != NULL);
3615 return gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy;
3619 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
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);
3630 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3631 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3633 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3637 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3639 gdb_assert (gdbarch != NULL);
3640 return gdbarch->deprecated_init_frame_pc != NULL;
3644 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
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);
3654 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3655 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3657 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3661 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
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;
3670 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3671 int believe_pcc_promotion)
3673 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3677 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3679 gdb_assert (gdbarch != NULL);
3680 return gdbarch->deprecated_get_saved_register != NULL;
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)
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);
3694 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3695 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3697 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3701 gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch)
3703 gdb_assert (gdbarch != NULL);
3704 return gdbarch->deprecated_register_convertible != NULL;
3708 gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
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);
3718 set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
3719 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
3721 gdbarch->deprecated_register_convertible = deprecated_register_convertible;
3725 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
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);
3735 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
3736 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
3738 gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
3742 gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
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);
3752 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
3753 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
3755 gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
3759 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
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);
3769 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3770 gdbarch_convert_register_p_ftype convert_register_p)
3772 gdbarch->convert_register_p = convert_register_p;
3776 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
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);
3786 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3787 gdbarch_register_to_value_ftype register_to_value)
3789 gdbarch->register_to_value = register_to_value;
3793 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
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);
3803 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3804 gdbarch_value_to_register_ftype value_to_register)
3806 gdbarch->value_to_register = value_to_register;
3810 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
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);
3820 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3821 gdbarch_pointer_to_address_ftype pointer_to_address)
3823 gdbarch->pointer_to_address = pointer_to_address;
3827 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
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);
3837 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3838 gdbarch_address_to_pointer_ftype address_to_pointer)
3840 gdbarch->address_to_pointer = address_to_pointer;
3844 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3846 gdb_assert (gdbarch != NULL);
3847 return gdbarch->integer_to_address != NULL;
3851 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
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);
3861 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3862 gdbarch_integer_to_address_ftype integer_to_address)
3864 gdbarch->integer_to_address = integer_to_address;
3868 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3870 gdb_assert (gdbarch != NULL);
3871 return gdbarch->deprecated_pop_frame != NULL;
3875 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
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 ();
3885 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3886 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3888 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3892 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3894 gdb_assert (gdbarch != NULL);
3895 return gdbarch->deprecated_store_struct_return != NULL;
3899 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
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);
3909 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3910 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3912 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3916 gdbarch_return_value_p (struct gdbarch *gdbarch)
3918 gdb_assert (gdbarch != NULL);
3919 return gdbarch->return_value != NULL;
3922 enum return_value_convention
3923 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
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);
3933 set_gdbarch_return_value (struct gdbarch *gdbarch,
3934 gdbarch_return_value_ftype return_value)
3936 gdbarch->return_value = return_value;
3940 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
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);
3950 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3951 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3953 gdbarch->return_value_on_stack = return_value_on_stack;
3957 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
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);
3967 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3968 gdbarch_extract_return_value_ftype extract_return_value)
3970 gdbarch->extract_return_value = extract_return_value;
3974 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
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);
3984 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3985 gdbarch_store_return_value_ftype store_return_value)
3987 gdbarch->store_return_value = store_return_value;
3991 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
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);
4001 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4002 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4004 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4008 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
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);
4018 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4019 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4021 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4025 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
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);
4035 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4036 gdbarch_use_struct_convention_ftype use_struct_convention)
4038 gdbarch->use_struct_convention = use_struct_convention;
4042 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4044 gdb_assert (gdbarch != NULL);
4045 return gdbarch->deprecated_extract_struct_value_address != NULL;
4049 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
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);
4059 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4060 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4062 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4066 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4068 gdb_assert (gdbarch != NULL);
4069 return gdbarch->deprecated_frame_init_saved_regs != NULL;
4073 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
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);
4083 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4084 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4086 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4090 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4092 gdb_assert (gdbarch != NULL);
4093 return gdbarch->deprecated_init_extra_frame_info != NULL;
4097 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
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);
4107 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4108 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4110 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4114 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
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);
4124 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4125 gdbarch_skip_prologue_ftype skip_prologue)
4127 gdbarch->skip_prologue = skip_prologue;
4131 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
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);
4141 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4142 gdbarch_inner_than_ftype inner_than)
4144 gdbarch->inner_than = inner_than;
4147 const unsigned char *
4148 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
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);
4158 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4159 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4161 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4165 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
4167 gdb_assert (gdbarch != NULL);
4168 return gdbarch->adjust_breakpoint_address != NULL;
4172 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
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);
4182 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
4183 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
4185 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
4189 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
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);
4199 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4200 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4202 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4206 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
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);
4216 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4217 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4219 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4223 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
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;
4233 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4234 CORE_ADDR decr_pc_after_break)
4236 gdbarch->decr_pc_after_break = decr_pc_after_break;
4240 gdbarch_function_start_offset (struct gdbarch *gdbarch)
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;
4250 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4251 CORE_ADDR function_start_offset)
4253 gdbarch->function_start_offset = function_start_offset;
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)
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);
4267 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4268 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4270 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4274 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
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;
4284 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4285 CORE_ADDR frame_args_skip)
4287 gdbarch->frame_args_skip = frame_args_skip;
4291 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
4293 gdb_assert (gdbarch != NULL);
4294 return gdbarch->deprecated_frameless_function_invocation != NULL;
4298 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
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);
4308 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
4309 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
4311 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
4315 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4317 gdb_assert (gdbarch != NULL);
4318 return gdbarch->deprecated_frame_chain != NULL;
4322 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
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);
4332 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4333 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4335 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4339 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4341 gdb_assert (gdbarch != NULL);
4342 return gdbarch->deprecated_frame_chain_valid != NULL;
4346 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
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);
4356 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4357 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4359 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4363 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4365 gdb_assert (gdbarch != NULL);
4366 return gdbarch->deprecated_frame_saved_pc != NULL;
4370 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
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);
4380 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4381 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4383 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4387 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4389 gdb_assert (gdbarch != NULL);
4390 return gdbarch->unwind_pc != NULL;
4394 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
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);
4404 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4405 gdbarch_unwind_pc_ftype unwind_pc)
4407 gdbarch->unwind_pc = unwind_pc;
4411 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4413 gdb_assert (gdbarch != NULL);
4414 return gdbarch->unwind_sp != NULL;
4418 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
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);
4428 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
4429 gdbarch_unwind_sp_ftype unwind_sp)
4431 gdbarch->unwind_sp = unwind_sp;
4435 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
4437 gdb_assert (gdbarch != NULL);
4438 return gdbarch->deprecated_frame_args_address != get_frame_base;
4442 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
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);
4453 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
4454 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
4456 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
4460 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
4462 gdb_assert (gdbarch != NULL);
4463 return gdbarch->deprecated_frame_locals_address != get_frame_base;
4467 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
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);
4478 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4479 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4481 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4485 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4487 gdb_assert (gdbarch != NULL);
4488 return gdbarch->deprecated_saved_pc_after_call != NULL;
4492 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
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);
4502 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4503 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4505 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4509 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4511 gdb_assert (gdbarch != NULL);
4512 return gdbarch->frame_num_args != NULL;
4516 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
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);
4526 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4527 gdbarch_frame_num_args_ftype frame_num_args)
4529 gdbarch->frame_num_args = frame_num_args;
4533 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4535 gdb_assert (gdbarch != NULL);
4536 return gdbarch->deprecated_stack_align != NULL;
4540 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
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);
4550 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4551 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4553 gdbarch->deprecated_stack_align = deprecated_stack_align;
4557 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4559 gdb_assert (gdbarch != NULL);
4560 return gdbarch->frame_align != NULL;
4564 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
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);
4574 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4575 gdbarch_frame_align_ftype frame_align)
4577 gdbarch->frame_align = frame_align;
4581 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4583 gdb_assert (gdbarch != NULL);
4584 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4588 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
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);
4598 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4599 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4601 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4605 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
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);
4615 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4616 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4618 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4622 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
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;
4631 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4632 int frame_red_zone_size)
4634 gdbarch->frame_red_zone_size = frame_red_zone_size;
4637 const struct floatformat *
4638 gdbarch_float_format (struct gdbarch *gdbarch)
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;
4647 set_gdbarch_float_format (struct gdbarch *gdbarch,
4648 const struct floatformat * float_format)
4650 gdbarch->float_format = float_format;
4653 const struct floatformat *
4654 gdbarch_double_format (struct gdbarch *gdbarch)
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;
4663 set_gdbarch_double_format (struct gdbarch *gdbarch,
4664 const struct floatformat * double_format)
4666 gdbarch->double_format = double_format;
4669 const struct floatformat *
4670 gdbarch_long_double_format (struct gdbarch *gdbarch)
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;
4679 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4680 const struct floatformat * long_double_format)
4682 gdbarch->long_double_format = long_double_format;
4686 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
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);
4696 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4697 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4699 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4703 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
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);
4713 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4714 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4716 gdbarch->addr_bits_remove = addr_bits_remove;
4720 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
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);
4730 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4731 gdbarch_smash_text_address_ftype smash_text_address)
4733 gdbarch->smash_text_address = smash_text_address;
4737 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4739 gdb_assert (gdbarch != NULL);
4740 return gdbarch->software_single_step != NULL;
4744 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
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);
4754 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4755 gdbarch_software_single_step_ftype software_single_step)
4757 gdbarch->software_single_step = software_single_step;
4761 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
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);
4771 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4772 gdbarch_print_insn_ftype print_insn)
4774 gdbarch->print_insn = print_insn;
4778 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
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);
4788 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4789 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4791 gdbarch->skip_trampoline_code = skip_trampoline_code;
4795 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
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);
4805 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4806 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4808 gdbarch->skip_solib_resolver = skip_solib_resolver;
4812 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
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);
4822 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4823 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4825 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4829 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
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);
4839 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4840 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4842 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4846 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
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);
4856 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4857 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4859 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4863 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
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);
4873 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4874 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4876 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4880 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
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);
4890 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4891 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4893 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4897 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
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);
4907 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4908 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4910 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4914 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
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;
4924 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4925 const char * name_of_malloc)
4927 gdbarch->name_of_malloc = name_of_malloc;
4931 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
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;
4941 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4942 int cannot_step_breakpoint)
4944 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4948 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
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;
4958 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4959 int have_nonsteppable_watchpoint)
4961 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4965 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4967 gdb_assert (gdbarch != NULL);
4968 return gdbarch->address_class_type_flags != NULL;
4972 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
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);
4982 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4983 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4985 gdbarch->address_class_type_flags = address_class_type_flags;
4989 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4991 gdb_assert (gdbarch != NULL);
4992 return gdbarch->address_class_type_flags_to_name != NULL;
4996 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
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);
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)
5009 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5013 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5015 gdb_assert (gdbarch != NULL);
5016 return gdbarch->address_class_name_to_type_flags != NULL;
5020 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
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);
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)
5033 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5037 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
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);
5047 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5048 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5050 gdbarch->register_reggroup_p = register_reggroup_p;
5054 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
5056 gdb_assert (gdbarch != NULL);
5057 return gdbarch->fetch_pointer_argument != NULL;
5061 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
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);
5071 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
5072 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
5074 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
5078 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
5080 gdb_assert (gdbarch != NULL);
5081 return gdbarch->regset_from_core_section != NULL;
5084 const struct regset *
5085 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
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);
5095 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
5096 gdbarch_regset_from_core_section_ftype regset_from_core_section)
5098 gdbarch->regset_from_core_section = regset_from_core_section;
5102 /* Keep a registry of per-architecture data-pointers required by GDB
5109 gdbarch_data_pre_init_ftype *pre_init;
5110 gdbarch_data_post_init_ftype *post_init;
5113 struct gdbarch_data_registration
5115 struct gdbarch_data *data;
5116 struct gdbarch_data_registration *next;
5119 struct gdbarch_data_registry
5122 struct gdbarch_data_registration *registrations;
5125 struct gdbarch_data_registry gdbarch_data_registry =
5130 static struct gdbarch_data *
5131 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
5132 gdbarch_data_post_init_ftype *post_init)
5134 struct gdbarch_data_registration **curr;
5135 /* Append the new registraration. */
5136 for (curr = &gdbarch_data_registry.registrations;
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;
5149 struct gdbarch_data *
5150 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
5152 return gdbarch_data_register (pre_init, NULL);
5155 struct gdbarch_data *
5156 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
5158 return gdbarch_data_register (NULL, post_init);
5161 /* Create/delete the gdbarch data vector. */
5164 alloc_gdbarch_data (struct gdbarch *gdbarch)
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 *);
5171 /* Initialize the current value of the specified per-architecture
5175 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
5176 struct gdbarch_data *data,
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;
5185 /* Return the current value of the specified per-architecture
5189 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5191 gdb_assert (data->index < gdbarch->nr_data);
5192 if (gdbarch->data[data->index] == NULL)
5194 /* The data-pointer isn't initialized, call init() to get a
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
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. */
5208 gdb_assert (data->init_p);
5210 gdbarch->data[data->index] = data->post_init (gdbarch);
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. */
5219 gdb_assert (gdbarch->data[data->index] != NULL);
5221 return gdbarch->data[data->index];
5226 /* Keep a registry of swapped data required by GDB modules. */
5231 struct gdbarch_swap_registration *source;
5232 struct gdbarch_swap *next;
5235 struct gdbarch_swap_registration
5238 unsigned long sizeof_data;
5239 gdbarch_swap_ftype *init;
5240 struct gdbarch_swap_registration *next;
5243 struct gdbarch_swap_registry
5246 struct gdbarch_swap_registration *registrations;
5249 struct gdbarch_swap_registry gdbarch_swap_registry =
5255 deprecated_register_gdbarch_swap (void *data,
5256 unsigned long sizeof_data,
5257 gdbarch_swap_ftype *init)
5259 struct gdbarch_swap_registration **rego;
5260 for (rego = &gdbarch_swap_registry.registrations;
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;
5271 current_gdbarch_swap_init_hack (void)
5273 struct gdbarch_swap_registration *rego;
5274 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
5275 for (rego = gdbarch_swap_registry.registrations;
5279 if (rego->data != NULL)
5281 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
5282 struct gdbarch_swap);
5283 (*curr)->source = rego;
5284 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
5286 (*curr)->next = NULL;
5287 curr = &(*curr)->next;
5289 if (rego->init != NULL)
5294 static struct gdbarch *
5295 current_gdbarch_swap_out_hack (void)
5297 struct gdbarch *old_gdbarch = current_gdbarch;
5298 struct gdbarch_swap *curr;
5300 gdb_assert (old_gdbarch != NULL);
5301 for (curr = old_gdbarch->swap;
5305 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5306 memset (curr->source->data, 0, curr->source->sizeof_data);
5308 current_gdbarch = NULL;
5313 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
5315 struct gdbarch_swap *curr;
5317 gdb_assert (current_gdbarch == NULL);
5318 for (curr = new_gdbarch->swap;
5321 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5322 current_gdbarch = new_gdbarch;
5326 /* Keep a registry of the architectures known by GDB. */
5328 struct gdbarch_registration
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;
5337 static struct gdbarch_registration *gdbarch_registry = NULL;
5340 append_name (const char ***buf, int *nr, const char *name)
5342 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5348 gdbarch_printable_names (void)
5350 /* Accumulate a list of names based on the registed list of
5352 enum bfd_architecture a;
5354 const char **arches = NULL;
5355 struct gdbarch_registration *rego;
5356 for (rego = gdbarch_registry;
5360 const struct bfd_arch_info *ap;
5361 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5363 internal_error (__FILE__, __LINE__,
5364 "gdbarch_architecture_names: multi-arch unknown");
5367 append_name (&arches, &nr_arches, ap->printable_name);
5372 append_name (&arches, &nr_arches, NULL);
5378 gdbarch_register (enum bfd_architecture bfd_architecture,
5379 gdbarch_init_ftype *init,
5380 gdbarch_dump_tdep_ftype *dump_tdep)
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)
5388 internal_error (__FILE__, __LINE__,
5389 "gdbarch: Attempt to register unknown architecture (%d)",
5392 /* Check that we haven't seen this architecture before */
5393 for (curr = &gdbarch_registry;
5395 curr = &(*curr)->next)
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);
5404 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5405 bfd_arch_info->printable_name,
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;
5417 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5418 gdbarch_init_ftype *init)
5420 gdbarch_register (bfd_architecture, init, NULL);
5424 /* Look for an architecture using gdbarch_info. Base search on only
5425 BFD_ARCH_INFO and BYTE_ORDER. */
5427 struct gdbarch_list *
5428 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5429 const struct gdbarch_info *info)
5431 for (; arches != NULL; arches = arches->next)
5433 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5435 if (info->byte_order != arches->gdbarch->byte_order)
5437 if (info->osabi != arches->gdbarch->osabi)
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. */
5449 static struct gdbarch *
5450 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
5452 struct gdbarch *new_gdbarch;
5453 struct gdbarch_registration *rego;
5455 /* The existing architecture has been swapped out - all this code
5456 works from a clean slate. */
5457 gdb_assert (current_gdbarch == NULL);
5459 /* Fill in missing parts of the INFO struct using a number of
5460 sources: "set ..."; INFOabfd supplied; and the existing
5462 gdbarch_info_fill (old_gdbarch, &info);
5464 /* Must have found some sort of architecture. */
5465 gdb_assert (info.bfd_arch_info != NULL);
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
5474 fprintf_unfiltered (gdb_stdlog,
5475 "find_arch_by_info: info.byte_order %d (%s)\n",
5477 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5478 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
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",
5486 fprintf_unfiltered (gdb_stdlog,
5487 "find_arch_by_info: info.tdep_info 0x%lx\n",
5488 (long) info.tdep_info);
5491 /* Find the tdep code that knows about this architecture. */
5492 for (rego = gdbarch_registry;
5495 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5500 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5501 "No matching architecture\n");
5505 /* Ask the tdep code for an architecture that matches "info". */
5506 new_gdbarch = rego->init (info, rego->arches);
5508 /* Did the tdep code like it? No. Reject the change and revert to
5509 the old architecture. */
5510 if (new_gdbarch == NULL)
5513 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5514 "Target rejected architecture\n");
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)
5523 struct gdbarch_list **list;
5524 struct gdbarch_list *this;
5526 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5527 "Previous architecture 0x%08lx (%s) selected\n",
5529 new_gdbarch->bfd_arch_info->printable_name);
5530 /* Find the existing arch in the list. */
5531 for (list = ®o->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);
5538 (*list) = this->next;
5539 /* Insert THIS at the front. */
5540 this->next = rego->arches;
5541 rego->arches = this;
5546 /* It's a new architecture. */
5548 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5549 "New architecture 0x%08lx (%s) selected\n",
5551 new_gdbarch->bfd_arch_info->printable_name);
5553 /* Insert the new architecture into the front of the architecture
5554 list (keep the list sorted Most Recently Used). */
5556 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5557 this->next = rego->arches;
5558 this->gdbarch = new_gdbarch;
5559 rego->arches = this;
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;
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 ();
5576 gdbarch_dump (new_gdbarch, gdb_stdlog);
5582 gdbarch_find_by_info (struct gdbarch_info info)
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 ();
5592 /* Find the specified architecture. */
5593 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5595 /* Restore the existing architecture. */
5596 gdb_assert (current_gdbarch == NULL);
5597 current_gdbarch_swap_in_hack (old_gdbarch);
5602 /* Make the specified architecture current, swapping the existing one
5606 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
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 ();
5616 extern void _initialize_gdbarch (void);
5619 _initialize_gdbarch (void)
5621 struct cmd_list_element *c;
5623 add_show_from_set (add_set_cmd ("arch",
5626 (char *)&gdbarch_debug,
5627 "Set architecture debugging.\n\
5628 When non-zero, architecture debugging is enabled.", &setdebuglist),
5630 c = add_set_cmd ("archdebug",
5633 (char *)&gdbarch_debug,
5634 "Set architecture debugging.\n\
5635 When non-zero, architecture debugging is enabled.", &setlist);
5637 deprecate_cmd (c, "set debug arch");
5638 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");