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 gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
150 gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
151 gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
152 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
153 gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos;
154 int deprecated_fp_regnum;
155 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
156 gdbarch_push_dummy_call_ftype *push_dummy_call;
157 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
158 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
159 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
160 int deprecated_register_size;
161 int call_dummy_location;
162 gdbarch_push_dummy_code_ftype *push_dummy_code;
163 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
164 gdbarch_print_registers_info_ftype *print_registers_info;
165 gdbarch_print_float_info_ftype *print_float_info;
166 gdbarch_print_vector_info_ftype *print_vector_info;
167 gdbarch_register_sim_regno_ftype *register_sim_regno;
168 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
169 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
170 gdbarch_cannot_store_register_ftype *cannot_store_register;
171 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
172 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
173 int believe_pcc_promotion;
174 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
175 gdbarch_convert_register_p_ftype *convert_register_p;
176 gdbarch_register_to_value_ftype *register_to_value;
177 gdbarch_value_to_register_ftype *value_to_register;
178 gdbarch_pointer_to_address_ftype *pointer_to_address;
179 gdbarch_address_to_pointer_ftype *address_to_pointer;
180 gdbarch_integer_to_address_ftype *integer_to_address;
181 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
182 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
183 gdbarch_return_value_ftype *return_value;
184 gdbarch_extract_return_value_ftype *extract_return_value;
185 gdbarch_store_return_value_ftype *store_return_value;
186 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
187 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
188 gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
189 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
190 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
191 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
192 gdbarch_skip_prologue_ftype *skip_prologue;
193 gdbarch_inner_than_ftype *inner_than;
194 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
195 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
196 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
197 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
198 CORE_ADDR decr_pc_after_break;
199 CORE_ADDR deprecated_function_start_offset;
200 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
201 CORE_ADDR frame_args_skip;
202 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
203 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
204 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
205 gdbarch_unwind_pc_ftype *unwind_pc;
206 gdbarch_unwind_sp_ftype *unwind_sp;
207 gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
208 gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
209 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
210 gdbarch_frame_num_args_ftype *frame_num_args;
211 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
212 gdbarch_frame_align_ftype *frame_align;
213 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
214 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
215 int frame_red_zone_size;
216 const struct floatformat * float_format;
217 const struct floatformat * double_format;
218 const struct floatformat * long_double_format;
219 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
220 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
221 gdbarch_smash_text_address_ftype *smash_text_address;
222 gdbarch_software_single_step_ftype *software_single_step;
223 gdbarch_print_insn_ftype *print_insn;
224 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
225 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
226 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
227 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
228 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
229 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
230 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
231 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
232 const char * name_of_malloc;
233 int cannot_step_breakpoint;
234 int have_nonsteppable_watchpoint;
235 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
236 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
237 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
238 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
239 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
240 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
244 /* The default architecture uses host values (for want of a better
247 extern const struct bfd_arch_info bfd_default_arch_struct;
249 struct gdbarch startup_gdbarch =
251 1, /* Always initialized. */
252 NULL, /* The obstack. */
253 /* basic architecture information */
254 &bfd_default_arch_struct, /* bfd_arch_info */
255 BFD_ENDIAN_BIG, /* byte_order */
256 GDB_OSABI_UNKNOWN, /* osabi */
257 /* target specific vector and its dump routine */
259 /*per-architecture data-pointers and swap regions */
261 /* Multi-arch values */
262 8 * sizeof (short), /* short_bit */
263 8 * sizeof (int), /* int_bit */
264 8 * sizeof (long), /* long_bit */
265 8 * sizeof (LONGEST), /* long_long_bit */
266 8 * sizeof (float), /* float_bit */
267 8 * sizeof (double), /* double_bit */
268 8 * sizeof (long double), /* long_double_bit */
269 8 * sizeof (void*), /* ptr_bit */
270 8 * sizeof (void*), /* addr_bit */
271 8 * sizeof (void*), /* bfd_vma_bit */
276 0, /* virtual_frame_pointer */
277 0, /* pseudo_register_read */
278 0, /* pseudo_register_write */
280 0, /* num_pseudo_regs */
285 0, /* stab_reg_to_regnum */
286 0, /* ecoff_reg_to_regnum */
287 0, /* dwarf_reg_to_regnum */
288 0, /* sdb_reg_to_regnum */
289 0, /* dwarf2_reg_to_regnum */
290 0, /* register_name */
291 0, /* register_type */
292 0, /* deprecated_register_virtual_type */
293 generic_register_byte, /* deprecated_register_byte */
294 generic_register_size, /* deprecated_register_raw_size */
295 generic_register_size, /* deprecated_register_virtual_size */
296 0, /* unwind_dummy_id */
297 0, /* deprecated_save_dummy_frame_tos */
298 -1, /* deprecated_fp_regnum */
299 0, /* deprecated_target_read_fp */
300 0, /* push_dummy_call */
301 0, /* deprecated_push_arguments */
302 0, /* deprecated_push_return_address */
303 0, /* deprecated_dummy_write_sp */
304 0, /* deprecated_register_size */
305 0, /* call_dummy_location */
306 0, /* push_dummy_code */
307 0, /* deprecated_do_registers_info */
308 default_print_registers_info, /* print_registers_info */
309 0, /* print_float_info */
310 0, /* print_vector_info */
311 0, /* register_sim_regno */
312 0, /* register_bytes_ok */
313 0, /* cannot_fetch_register */
314 0, /* cannot_store_register */
315 0, /* get_longjmp_target */
316 0, /* deprecated_init_frame_pc */
317 0, /* believe_pcc_promotion */
318 0, /* deprecated_get_saved_register */
319 0, /* convert_register_p */
320 0, /* register_to_value */
321 0, /* value_to_register */
322 0, /* pointer_to_address */
323 0, /* address_to_pointer */
324 0, /* integer_to_address */
325 0, /* deprecated_pop_frame */
326 0, /* deprecated_store_struct_return */
327 0, /* return_value */
328 0, /* extract_return_value */
329 0, /* store_return_value */
330 0, /* deprecated_extract_return_value */
331 0, /* deprecated_store_return_value */
332 0, /* deprecated_use_struct_convention */
333 0, /* deprecated_extract_struct_value_address */
334 0, /* deprecated_frame_init_saved_regs */
335 0, /* deprecated_init_extra_frame_info */
336 0, /* skip_prologue */
338 0, /* breakpoint_from_pc */
339 0, /* adjust_breakpoint_address */
340 0, /* memory_insert_breakpoint */
341 0, /* memory_remove_breakpoint */
342 0, /* decr_pc_after_break */
343 0, /* deprecated_function_start_offset */
344 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
345 0, /* frame_args_skip */
346 0, /* deprecated_frame_chain */
347 0, /* deprecated_frame_chain_valid */
348 0, /* deprecated_frame_saved_pc */
351 get_frame_base, /* deprecated_frame_args_address */
352 get_frame_base, /* deprecated_frame_locals_address */
353 0, /* deprecated_saved_pc_after_call */
354 0, /* frame_num_args */
355 0, /* deprecated_stack_align */
357 0, /* deprecated_reg_struct_has_addr */
358 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
359 0, /* frame_red_zone_size */
360 0, /* float_format */
361 0, /* double_format */
362 0, /* long_double_format */
363 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
364 0, /* addr_bits_remove */
365 0, /* smash_text_address */
366 0, /* software_single_step */
368 0, /* skip_trampoline_code */
369 generic_skip_solib_resolver, /* skip_solib_resolver */
370 0, /* in_solib_call_trampoline */
371 0, /* in_solib_return_trampoline */
372 generic_in_function_epilogue_p, /* in_function_epilogue_p */
373 construct_inferior_arguments, /* construct_inferior_arguments */
374 0, /* elf_make_msymbol_special */
375 0, /* coff_make_msymbol_special */
376 "malloc", /* name_of_malloc */
377 0, /* cannot_step_breakpoint */
378 0, /* have_nonsteppable_watchpoint */
379 0, /* address_class_type_flags */
380 0, /* address_class_type_flags_to_name */
381 0, /* address_class_name_to_type_flags */
382 default_register_reggroup_p, /* register_reggroup_p */
383 0, /* fetch_pointer_argument */
384 0, /* regset_from_core_section */
385 /* startup_gdbarch() */
388 struct gdbarch *current_gdbarch = &startup_gdbarch;
390 /* Create a new ``struct gdbarch'' based on information provided by
391 ``struct gdbarch_info''. */
394 gdbarch_alloc (const struct gdbarch_info *info,
395 struct gdbarch_tdep *tdep)
397 /* NOTE: The new architecture variable is named ``current_gdbarch''
398 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
399 the current local architecture and not the previous global
400 architecture. This ensures that the new architectures initial
401 values are not influenced by the previous architecture. Once
402 everything is parameterised with gdbarch, this will go away. */
403 struct gdbarch *current_gdbarch;
405 /* Create an obstack for allocating all the per-architecture memory,
406 then use that to allocate the architecture vector. */
407 struct obstack *obstack = XMALLOC (struct obstack);
408 obstack_init (obstack);
409 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
410 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
411 current_gdbarch->obstack = obstack;
413 alloc_gdbarch_data (current_gdbarch);
415 current_gdbarch->tdep = tdep;
417 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
418 current_gdbarch->byte_order = info->byte_order;
419 current_gdbarch->osabi = info->osabi;
421 /* Force the explicit initialization of these. */
422 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
423 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
424 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
425 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
426 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
427 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
428 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
429 current_gdbarch->ptr_bit = TARGET_INT_BIT;
430 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
431 current_gdbarch->char_signed = -1;
432 current_gdbarch->write_pc = generic_target_write_pc;
433 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
434 current_gdbarch->num_regs = -1;
435 current_gdbarch->sp_regnum = -1;
436 current_gdbarch->pc_regnum = -1;
437 current_gdbarch->ps_regnum = -1;
438 current_gdbarch->fp0_regnum = -1;
439 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
440 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
441 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
442 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
443 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
444 current_gdbarch->deprecated_register_byte = generic_register_byte;
445 current_gdbarch->deprecated_register_raw_size = generic_register_size;
446 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
447 current_gdbarch->deprecated_fp_regnum = -1;
448 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
449 current_gdbarch->print_registers_info = default_print_registers_info;
450 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
451 current_gdbarch->cannot_fetch_register = cannot_register_not;
452 current_gdbarch->cannot_store_register = cannot_register_not;
453 current_gdbarch->convert_register_p = generic_convert_register_p;
454 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
455 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
456 current_gdbarch->return_value = legacy_return_value;
457 current_gdbarch->extract_return_value = legacy_extract_return_value;
458 current_gdbarch->store_return_value = legacy_store_return_value;
459 current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
460 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
461 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
462 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
463 current_gdbarch->deprecated_frame_args_address = get_frame_base;
464 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
465 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
466 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
467 current_gdbarch->addr_bits_remove = core_addr_identity;
468 current_gdbarch->smash_text_address = core_addr_identity;
469 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
470 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
471 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
472 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
473 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
474 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
475 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
476 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
477 current_gdbarch->name_of_malloc = "malloc";
478 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
479 /* gdbarch_alloc() */
481 return current_gdbarch;
485 /* Allocate extra space using the per-architecture obstack. */
488 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
490 void *data = obstack_alloc (arch->obstack, size);
491 memset (data, 0, size);
496 /* Free a gdbarch struct. This should never happen in normal
497 operation --- once you've created a gdbarch, you keep it around.
498 However, if an architecture's init function encounters an error
499 building the structure, it may need to clean up a partially
500 constructed gdbarch. */
503 gdbarch_free (struct gdbarch *arch)
505 struct obstack *obstack;
506 gdb_assert (arch != NULL);
507 gdb_assert (!arch->initialized_p);
508 obstack = arch->obstack;
509 obstack_free (obstack, 0); /* Includes the ARCH. */
514 /* Ensure that all values in a GDBARCH are reasonable. */
516 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
517 just happens to match the global variable ``current_gdbarch''. That
518 way macros refering to that variable get the local and not the global
519 version - ulgh. Once everything is parameterised with gdbarch, this
523 verify_gdbarch (struct gdbarch *current_gdbarch)
526 struct cleanup *cleanups;
529 log = mem_fileopen ();
530 cleanups = make_cleanup_ui_file_delete (log);
532 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
533 fprintf_unfiltered (log, "\n\tbyte-order");
534 if (current_gdbarch->bfd_arch_info == NULL)
535 fprintf_unfiltered (log, "\n\tbfd_arch_info");
536 /* Check those that need to be defined for the given multi-arch level. */
537 /* Skip verify of short_bit, invalid_p == 0 */
538 /* Skip verify of int_bit, invalid_p == 0 */
539 /* Skip verify of long_bit, invalid_p == 0 */
540 /* Skip verify of long_long_bit, invalid_p == 0 */
541 /* Skip verify of float_bit, invalid_p == 0 */
542 /* Skip verify of double_bit, invalid_p == 0 */
543 /* Skip verify of long_double_bit, invalid_p == 0 */
544 /* Skip verify of ptr_bit, invalid_p == 0 */
545 if (current_gdbarch->addr_bit == 0)
546 current_gdbarch->addr_bit = TARGET_PTR_BIT;
547 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
548 if (current_gdbarch->char_signed == -1)
549 current_gdbarch->char_signed = 1;
550 /* Skip verify of read_pc, has predicate */
551 /* Skip verify of write_pc, invalid_p == 0 */
552 /* Skip verify of read_sp, has predicate */
553 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
554 /* Skip verify of pseudo_register_read, has predicate */
555 /* Skip verify of pseudo_register_write, has predicate */
556 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
557 && (current_gdbarch->num_regs == -1))
558 fprintf_unfiltered (log, "\n\tnum_regs");
559 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
560 /* Skip verify of sp_regnum, invalid_p == 0 */
561 /* Skip verify of pc_regnum, invalid_p == 0 */
562 /* Skip verify of ps_regnum, invalid_p == 0 */
563 /* Skip verify of fp0_regnum, invalid_p == 0 */
564 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
565 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
566 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
567 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
568 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
569 /* Skip verify of register_type, has predicate */
570 /* Skip verify of deprecated_register_virtual_type, has predicate */
571 /* Skip verify of deprecated_register_byte, has predicate */
572 /* Skip verify of deprecated_register_raw_size, has predicate */
573 /* Skip verify of deprecated_register_virtual_size, has predicate */
574 /* Skip verify of unwind_dummy_id, has predicate */
575 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
576 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
577 /* Skip verify of deprecated_target_read_fp, has predicate */
578 /* Skip verify of push_dummy_call, has predicate */
579 /* Skip verify of deprecated_push_arguments, has predicate */
580 /* Skip verify of deprecated_push_return_address, has predicate */
581 /* Skip verify of deprecated_dummy_write_sp, has predicate */
582 /* Skip verify of call_dummy_location, invalid_p == 0 */
583 /* Skip verify of push_dummy_code, has predicate */
584 /* Skip verify of deprecated_do_registers_info, has predicate */
585 /* Skip verify of print_registers_info, invalid_p == 0 */
586 /* Skip verify of print_float_info, has predicate */
587 /* Skip verify of print_vector_info, has predicate */
588 /* Skip verify of register_sim_regno, invalid_p == 0 */
589 /* Skip verify of register_bytes_ok, has predicate */
590 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
591 /* Skip verify of cannot_store_register, invalid_p == 0 */
592 /* Skip verify of get_longjmp_target, has predicate */
593 /* Skip verify of deprecated_init_frame_pc, has predicate */
594 /* Skip verify of deprecated_get_saved_register, has predicate */
595 /* Skip verify of convert_register_p, invalid_p == 0 */
596 /* Skip verify of pointer_to_address, invalid_p == 0 */
597 /* Skip verify of address_to_pointer, invalid_p == 0 */
598 /* Skip verify of integer_to_address, has predicate */
599 /* Skip verify of deprecated_pop_frame, has predicate */
600 /* Skip verify of deprecated_store_struct_return, has predicate */
601 /* Skip verify of return_value, has predicate */
602 /* Skip verify of extract_return_value, invalid_p == 0 */
603 /* Skip verify of store_return_value, invalid_p == 0 */
604 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
605 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
606 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
607 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
608 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
609 && (current_gdbarch->skip_prologue == 0))
610 fprintf_unfiltered (log, "\n\tskip_prologue");
611 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
612 && (current_gdbarch->inner_than == 0))
613 fprintf_unfiltered (log, "\n\tinner_than");
614 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
615 && (current_gdbarch->breakpoint_from_pc == 0))
616 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
617 /* Skip verify of adjust_breakpoint_address, has predicate */
618 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
619 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
620 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
621 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
622 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
623 /* Skip verify of frame_args_skip, invalid_p == 0 */
624 /* Skip verify of deprecated_frame_chain, has predicate */
625 /* Skip verify of deprecated_frame_chain_valid, has predicate */
626 /* Skip verify of deprecated_frame_saved_pc, has predicate */
627 /* Skip verify of unwind_pc, has predicate */
628 /* Skip verify of unwind_sp, has predicate */
629 /* Skip verify of deprecated_frame_args_address, has predicate */
630 /* Skip verify of deprecated_frame_locals_address, has predicate */
631 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
632 /* Skip verify of frame_num_args, has predicate */
633 /* Skip verify of deprecated_stack_align, has predicate */
634 /* Skip verify of frame_align, has predicate */
635 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
636 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
637 if (current_gdbarch->float_format == 0)
638 current_gdbarch->float_format = default_float_format (current_gdbarch);
639 if (current_gdbarch->double_format == 0)
640 current_gdbarch->double_format = default_double_format (current_gdbarch);
641 if (current_gdbarch->long_double_format == 0)
642 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
643 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
644 /* Skip verify of addr_bits_remove, invalid_p == 0 */
645 /* Skip verify of smash_text_address, invalid_p == 0 */
646 /* Skip verify of software_single_step, has predicate */
647 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
648 && (current_gdbarch->print_insn == 0))
649 fprintf_unfiltered (log, "\n\tprint_insn");
650 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
651 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
652 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
653 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
654 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
655 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
656 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
657 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
658 /* Skip verify of name_of_malloc, invalid_p == 0 */
659 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
660 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
661 /* Skip verify of address_class_type_flags, has predicate */
662 /* Skip verify of address_class_type_flags_to_name, has predicate */
663 /* Skip verify of address_class_name_to_type_flags, has predicate */
664 /* Skip verify of register_reggroup_p, invalid_p == 0 */
665 /* Skip verify of fetch_pointer_argument, has predicate */
666 /* Skip verify of regset_from_core_section, has predicate */
667 buf = ui_file_xstrdup (log, &dummy);
668 make_cleanup (xfree, buf);
669 if (strlen (buf) > 0)
670 internal_error (__FILE__, __LINE__,
671 "verify_gdbarch: the following are invalid ...%s",
673 do_cleanups (cleanups);
677 /* Print out the details of the current architecture. */
679 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
680 just happens to match the global variable ``current_gdbarch''. That
681 way macros refering to that variable get the local and not the global
682 version - ulgh. Once everything is parameterised with gdbarch, this
686 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
688 fprintf_unfiltered (file,
689 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
691 #ifdef TARGET_ADDR_BIT
692 fprintf_unfiltered (file,
693 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
694 XSTRING (TARGET_ADDR_BIT));
696 fprintf_unfiltered (file,
697 "gdbarch_dump: addr_bit = %s\n",
698 paddr_d (current_gdbarch->addr_bit));
699 #ifdef ADDR_BITS_REMOVE
700 fprintf_unfiltered (file,
701 "gdbarch_dump: %s # %s\n",
702 "ADDR_BITS_REMOVE(addr)",
703 XSTRING (ADDR_BITS_REMOVE (addr)));
705 fprintf_unfiltered (file,
706 "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
707 (long) current_gdbarch->addr_bits_remove);
708 fprintf_unfiltered (file,
709 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
710 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
711 fprintf_unfiltered (file,
712 "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
713 (long) current_gdbarch->address_class_name_to_type_flags);
714 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
715 fprintf_unfiltered (file,
716 "gdbarch_dump: %s # %s\n",
717 "ADDRESS_CLASS_TYPE_FLAGS_P()",
718 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
720 fprintf_unfiltered (file,
721 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
722 gdbarch_address_class_type_flags_p (current_gdbarch));
723 #ifdef ADDRESS_CLASS_TYPE_FLAGS
724 fprintf_unfiltered (file,
725 "gdbarch_dump: %s # %s\n",
726 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
727 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
729 fprintf_unfiltered (file,
730 "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
731 (long) current_gdbarch->address_class_type_flags);
732 fprintf_unfiltered (file,
733 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
734 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
735 fprintf_unfiltered (file,
736 "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
737 (long) current_gdbarch->address_class_type_flags_to_name);
738 #ifdef ADDRESS_TO_POINTER
739 fprintf_unfiltered (file,
740 "gdbarch_dump: %s # %s\n",
741 "ADDRESS_TO_POINTER(type, buf, addr)",
742 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
744 fprintf_unfiltered (file,
745 "gdbarch_dump: address_to_pointer = <0x%lx>\n",
746 (long) current_gdbarch->address_to_pointer);
747 fprintf_unfiltered (file,
748 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
749 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
750 fprintf_unfiltered (file,
751 "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
752 (long) current_gdbarch->adjust_breakpoint_address);
753 #ifdef BELIEVE_PCC_PROMOTION
754 fprintf_unfiltered (file,
755 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
756 XSTRING (BELIEVE_PCC_PROMOTION));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: believe_pcc_promotion = %s\n",
760 paddr_d (current_gdbarch->believe_pcc_promotion));
761 #ifdef TARGET_ARCHITECTURE
762 fprintf_unfiltered (file,
763 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
764 XSTRING (TARGET_ARCHITECTURE));
766 fprintf_unfiltered (file,
767 "gdbarch_dump: bfd_arch_info = %s\n",
768 TARGET_ARCHITECTURE->printable_name);
769 #ifdef TARGET_BFD_VMA_BIT
770 fprintf_unfiltered (file,
771 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
772 XSTRING (TARGET_BFD_VMA_BIT));
774 fprintf_unfiltered (file,
775 "gdbarch_dump: bfd_vma_bit = %s\n",
776 paddr_d (current_gdbarch->bfd_vma_bit));
777 #ifdef BREAKPOINT_FROM_PC
778 fprintf_unfiltered (file,
779 "gdbarch_dump: %s # %s\n",
780 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
781 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
783 fprintf_unfiltered (file,
784 "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
785 (long) current_gdbarch->breakpoint_from_pc);
786 #ifdef TARGET_BYTE_ORDER
787 fprintf_unfiltered (file,
788 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
789 XSTRING (TARGET_BYTE_ORDER));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: byte_order = %s\n",
793 paddr_d (current_gdbarch->byte_order));
794 #ifdef CALL_DUMMY_LOCATION
795 fprintf_unfiltered (file,
796 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
797 XSTRING (CALL_DUMMY_LOCATION));
799 fprintf_unfiltered (file,
800 "gdbarch_dump: call_dummy_location = %s\n",
801 paddr_d (current_gdbarch->call_dummy_location));
802 #ifdef CANNOT_FETCH_REGISTER
803 fprintf_unfiltered (file,
804 "gdbarch_dump: %s # %s\n",
805 "CANNOT_FETCH_REGISTER(regnum)",
806 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
810 (long) current_gdbarch->cannot_fetch_register);
811 #ifdef CANNOT_STEP_BREAKPOINT
812 fprintf_unfiltered (file,
813 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
814 XSTRING (CANNOT_STEP_BREAKPOINT));
816 fprintf_unfiltered (file,
817 "gdbarch_dump: cannot_step_breakpoint = %s\n",
818 paddr_d (current_gdbarch->cannot_step_breakpoint));
819 #ifdef CANNOT_STORE_REGISTER
820 fprintf_unfiltered (file,
821 "gdbarch_dump: %s # %s\n",
822 "CANNOT_STORE_REGISTER(regnum)",
823 XSTRING (CANNOT_STORE_REGISTER (regnum)));
825 fprintf_unfiltered (file,
826 "gdbarch_dump: cannot_store_register = <0x%lx>\n",
827 (long) current_gdbarch->cannot_store_register);
828 #ifdef TARGET_CHAR_SIGNED
829 fprintf_unfiltered (file,
830 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
831 XSTRING (TARGET_CHAR_SIGNED));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: char_signed = %s\n",
835 paddr_d (current_gdbarch->char_signed));
836 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
837 fprintf_unfiltered (file,
838 "gdbarch_dump: %s # %s\n",
839 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
840 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
844 (long) current_gdbarch->coff_make_msymbol_special);
845 fprintf_unfiltered (file,
846 "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
847 (long) current_gdbarch->construct_inferior_arguments);
848 fprintf_unfiltered (file,
849 "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
850 (long) current_gdbarch->convert_from_func_ptr_addr);
851 #ifdef CONVERT_REGISTER_P
852 fprintf_unfiltered (file,
853 "gdbarch_dump: %s # %s\n",
854 "CONVERT_REGISTER_P(regnum, type)",
855 XSTRING (CONVERT_REGISTER_P (regnum, type)));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: convert_register_p = <0x%lx>\n",
859 (long) current_gdbarch->convert_register_p);
860 #ifdef DECR_PC_AFTER_BREAK
861 fprintf_unfiltered (file,
862 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
863 XSTRING (DECR_PC_AFTER_BREAK));
865 fprintf_unfiltered (file,
866 "gdbarch_dump: decr_pc_after_break = 0x%s\n",
867 paddr_nz (current_gdbarch->decr_pc_after_break));
868 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
869 fprintf_unfiltered (file,
870 "gdbarch_dump: %s # %s\n",
871 "DEPRECATED_DO_REGISTERS_INFO_P()",
872 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
874 fprintf_unfiltered (file,
875 "gdbarch_dump: gdbarch_deprecated_do_registers_info_p() = %d\n",
876 gdbarch_deprecated_do_registers_info_p (current_gdbarch));
877 #ifdef DEPRECATED_DO_REGISTERS_INFO
878 fprintf_unfiltered (file,
879 "gdbarch_dump: %s # %s\n",
880 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
881 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
883 fprintf_unfiltered (file,
884 "gdbarch_dump: deprecated_do_registers_info = <0x%lx>\n",
885 (long) current_gdbarch->deprecated_do_registers_info);
886 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
887 fprintf_unfiltered (file,
888 "gdbarch_dump: %s # %s\n",
889 "DEPRECATED_DUMMY_WRITE_SP_P()",
890 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
892 fprintf_unfiltered (file,
893 "gdbarch_dump: gdbarch_deprecated_dummy_write_sp_p() = %d\n",
894 gdbarch_deprecated_dummy_write_sp_p (current_gdbarch));
895 #ifdef DEPRECATED_DUMMY_WRITE_SP
896 fprintf_unfiltered (file,
897 "gdbarch_dump: %s # %s\n",
898 "DEPRECATED_DUMMY_WRITE_SP(val)",
899 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
901 fprintf_unfiltered (file,
902 "gdbarch_dump: deprecated_dummy_write_sp = <0x%lx>\n",
903 (long) current_gdbarch->deprecated_dummy_write_sp);
904 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
905 fprintf_unfiltered (file,
906 "gdbarch_dump: %s # %s\n",
907 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
908 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
910 fprintf_unfiltered (file,
911 "gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n",
912 (long) current_gdbarch->deprecated_extract_return_value);
913 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
914 fprintf_unfiltered (file,
915 "gdbarch_dump: %s # %s\n",
916 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
917 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
919 fprintf_unfiltered (file,
920 "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
921 gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch));
922 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
923 fprintf_unfiltered (file,
924 "gdbarch_dump: %s # %s\n",
925 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
926 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
928 fprintf_unfiltered (file,
929 "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
930 (long) current_gdbarch->deprecated_extract_struct_value_address);
931 #ifdef DEPRECATED_FP_REGNUM
932 fprintf_unfiltered (file,
933 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
934 XSTRING (DEPRECATED_FP_REGNUM));
936 fprintf_unfiltered (file,
937 "gdbarch_dump: deprecated_fp_regnum = %s\n",
938 paddr_d (current_gdbarch->deprecated_fp_regnum));
939 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
940 fprintf_unfiltered (file,
941 "gdbarch_dump: %s # %s\n",
942 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
943 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
945 fprintf_unfiltered (file,
946 "gdbarch_dump: gdbarch_deprecated_frame_args_address_p() = %d\n",
947 gdbarch_deprecated_frame_args_address_p (current_gdbarch));
948 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
949 fprintf_unfiltered (file,
950 "gdbarch_dump: %s # %s\n",
951 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
952 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
954 fprintf_unfiltered (file,
955 "gdbarch_dump: deprecated_frame_args_address = <0x%lx>\n",
956 (long) current_gdbarch->deprecated_frame_args_address);
957 #ifdef DEPRECATED_FRAME_CHAIN_P
958 fprintf_unfiltered (file,
959 "gdbarch_dump: %s # %s\n",
960 "DEPRECATED_FRAME_CHAIN_P()",
961 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
963 fprintf_unfiltered (file,
964 "gdbarch_dump: gdbarch_deprecated_frame_chain_p() = %d\n",
965 gdbarch_deprecated_frame_chain_p (current_gdbarch));
966 #ifdef DEPRECATED_FRAME_CHAIN
967 fprintf_unfiltered (file,
968 "gdbarch_dump: %s # %s\n",
969 "DEPRECATED_FRAME_CHAIN(frame)",
970 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
972 fprintf_unfiltered (file,
973 "gdbarch_dump: deprecated_frame_chain = <0x%lx>\n",
974 (long) current_gdbarch->deprecated_frame_chain);
975 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
976 fprintf_unfiltered (file,
977 "gdbarch_dump: %s # %s\n",
978 "DEPRECATED_FRAME_CHAIN_VALID_P()",
979 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
981 fprintf_unfiltered (file,
982 "gdbarch_dump: gdbarch_deprecated_frame_chain_valid_p() = %d\n",
983 gdbarch_deprecated_frame_chain_valid_p (current_gdbarch));
984 #ifdef DEPRECATED_FRAME_CHAIN_VALID
985 fprintf_unfiltered (file,
986 "gdbarch_dump: %s # %s\n",
987 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
988 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
990 fprintf_unfiltered (file,
991 "gdbarch_dump: deprecated_frame_chain_valid = <0x%lx>\n",
992 (long) current_gdbarch->deprecated_frame_chain_valid);
993 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
994 fprintf_unfiltered (file,
995 "gdbarch_dump: %s # %s\n",
996 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
997 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
999 fprintf_unfiltered (file,
1000 "gdbarch_dump: gdbarch_deprecated_frame_init_saved_regs_p() = %d\n",
1001 gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch));
1002 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1003 fprintf_unfiltered (file,
1004 "gdbarch_dump: %s # %s\n",
1005 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1006 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1008 fprintf_unfiltered (file,
1009 "gdbarch_dump: deprecated_frame_init_saved_regs = <0x%lx>\n",
1010 (long) current_gdbarch->deprecated_frame_init_saved_regs);
1011 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: %s # %s\n",
1014 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1015 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: gdbarch_deprecated_frame_locals_address_p() = %d\n",
1019 gdbarch_deprecated_frame_locals_address_p (current_gdbarch));
1020 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: %s # %s\n",
1023 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1024 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: deprecated_frame_locals_address = <0x%lx>\n",
1028 (long) current_gdbarch->deprecated_frame_locals_address);
1029 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: %s # %s\n",
1032 "DEPRECATED_FRAME_SAVED_PC_P()",
1033 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: gdbarch_deprecated_frame_saved_pc_p() = %d\n",
1037 gdbarch_deprecated_frame_saved_pc_p (current_gdbarch));
1038 #ifdef DEPRECATED_FRAME_SAVED_PC
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: %s # %s\n",
1041 "DEPRECATED_FRAME_SAVED_PC(fi)",
1042 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: deprecated_frame_saved_pc = <0x%lx>\n",
1046 (long) current_gdbarch->deprecated_frame_saved_pc);
1047 #ifdef DEPRECATED_FUNCTION_START_OFFSET
1048 fprintf_unfiltered (file,
1049 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
1050 XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
1054 paddr_nz (current_gdbarch->deprecated_function_start_offset));
1055 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: %s # %s\n",
1058 "DEPRECATED_GET_SAVED_REGISTER_P()",
1059 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: gdbarch_deprecated_get_saved_register_p() = %d\n",
1063 gdbarch_deprecated_get_saved_register_p (current_gdbarch));
1064 #ifdef DEPRECATED_GET_SAVED_REGISTER
1065 fprintf_unfiltered (file,
1066 "gdbarch_dump: %s # %s\n",
1067 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1068 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: deprecated_get_saved_register = <0x%lx>\n",
1072 (long) current_gdbarch->deprecated_get_saved_register);
1073 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1074 fprintf_unfiltered (file,
1075 "gdbarch_dump: %s # %s\n",
1076 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1077 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: gdbarch_deprecated_init_extra_frame_info_p() = %d\n",
1081 gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch));
1082 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: %s # %s\n",
1085 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1086 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: deprecated_init_extra_frame_info = <0x%lx>\n",
1090 (long) current_gdbarch->deprecated_init_extra_frame_info);
1091 #ifdef DEPRECATED_INIT_FRAME_PC_P
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: %s # %s\n",
1094 "DEPRECATED_INIT_FRAME_PC_P()",
1095 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: gdbarch_deprecated_init_frame_pc_p() = %d\n",
1099 gdbarch_deprecated_init_frame_pc_p (current_gdbarch));
1100 #ifdef DEPRECATED_INIT_FRAME_PC
1101 fprintf_unfiltered (file,
1102 "gdbarch_dump: %s # %s\n",
1103 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1104 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: deprecated_init_frame_pc = <0x%lx>\n",
1108 (long) current_gdbarch->deprecated_init_frame_pc);
1109 #ifdef DEPRECATED_POP_FRAME_P
1110 fprintf_unfiltered (file,
1111 "gdbarch_dump: %s # %s\n",
1112 "DEPRECATED_POP_FRAME_P()",
1113 XSTRING (DEPRECATED_POP_FRAME_P ()));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: gdbarch_deprecated_pop_frame_p() = %d\n",
1117 gdbarch_deprecated_pop_frame_p (current_gdbarch));
1118 #ifdef DEPRECATED_POP_FRAME
1119 fprintf_unfiltered (file,
1120 "gdbarch_dump: %s # %s\n",
1121 "DEPRECATED_POP_FRAME(-)",
1122 XSTRING (DEPRECATED_POP_FRAME (-)));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: deprecated_pop_frame = <0x%lx>\n",
1126 (long) current_gdbarch->deprecated_pop_frame);
1127 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1128 fprintf_unfiltered (file,
1129 "gdbarch_dump: %s # %s\n",
1130 "DEPRECATED_PUSH_ARGUMENTS_P()",
1131 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: gdbarch_deprecated_push_arguments_p() = %d\n",
1135 gdbarch_deprecated_push_arguments_p (current_gdbarch));
1136 #ifdef DEPRECATED_PUSH_ARGUMENTS
1137 fprintf_unfiltered (file,
1138 "gdbarch_dump: %s # %s\n",
1139 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1140 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: deprecated_push_arguments = <0x%lx>\n",
1144 (long) current_gdbarch->deprecated_push_arguments);
1145 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1146 fprintf_unfiltered (file,
1147 "gdbarch_dump: %s # %s\n",
1148 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1149 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: gdbarch_deprecated_push_return_address_p() = %d\n",
1153 gdbarch_deprecated_push_return_address_p (current_gdbarch));
1154 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: %s # %s\n",
1157 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1158 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: deprecated_push_return_address = <0x%lx>\n",
1162 (long) current_gdbarch->deprecated_push_return_address);
1163 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: %s # %s\n",
1166 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1167 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
1171 gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
1172 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1173 fprintf_unfiltered (file,
1174 "gdbarch_dump: %s # %s\n",
1175 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1176 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
1180 (long) current_gdbarch->deprecated_reg_struct_has_addr);
1181 #ifdef DEPRECATED_REGISTER_BYTE_P
1182 fprintf_unfiltered (file,
1183 "gdbarch_dump: %s # %s\n",
1184 "DEPRECATED_REGISTER_BYTE_P()",
1185 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: gdbarch_deprecated_register_byte_p() = %d\n",
1189 gdbarch_deprecated_register_byte_p (current_gdbarch));
1190 #ifdef DEPRECATED_REGISTER_BYTE
1191 fprintf_unfiltered (file,
1192 "gdbarch_dump: %s # %s\n",
1193 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1194 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: deprecated_register_byte = <0x%lx>\n",
1198 (long) current_gdbarch->deprecated_register_byte);
1199 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1200 fprintf_unfiltered (file,
1201 "gdbarch_dump: %s # %s\n",
1202 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1203 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: gdbarch_deprecated_register_raw_size_p() = %d\n",
1207 gdbarch_deprecated_register_raw_size_p (current_gdbarch));
1208 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1209 fprintf_unfiltered (file,
1210 "gdbarch_dump: %s # %s\n",
1211 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1212 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: deprecated_register_raw_size = <0x%lx>\n",
1216 (long) current_gdbarch->deprecated_register_raw_size);
1217 #ifdef DEPRECATED_REGISTER_SIZE
1218 fprintf_unfiltered (file,
1219 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1220 XSTRING (DEPRECATED_REGISTER_SIZE));
1222 fprintf_unfiltered (file,
1223 "gdbarch_dump: deprecated_register_size = %s\n",
1224 paddr_d (current_gdbarch->deprecated_register_size));
1225 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: %s # %s\n",
1228 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1229 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: gdbarch_deprecated_register_virtual_size_p() = %d\n",
1233 gdbarch_deprecated_register_virtual_size_p (current_gdbarch));
1234 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: %s # %s\n",
1237 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1238 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1240 fprintf_unfiltered (file,
1241 "gdbarch_dump: deprecated_register_virtual_size = <0x%lx>\n",
1242 (long) current_gdbarch->deprecated_register_virtual_size);
1243 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: %s # %s\n",
1246 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1247 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: gdbarch_deprecated_register_virtual_type_p() = %d\n",
1251 gdbarch_deprecated_register_virtual_type_p (current_gdbarch));
1252 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: %s # %s\n",
1255 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1256 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: deprecated_register_virtual_type = <0x%lx>\n",
1260 (long) current_gdbarch->deprecated_register_virtual_type);
1261 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: %s # %s\n",
1264 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1265 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1267 fprintf_unfiltered (file,
1268 "gdbarch_dump: gdbarch_deprecated_save_dummy_frame_tos_p() = %d\n",
1269 gdbarch_deprecated_save_dummy_frame_tos_p (current_gdbarch));
1270 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: %s # %s\n",
1273 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1274 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1276 fprintf_unfiltered (file,
1277 "gdbarch_dump: deprecated_save_dummy_frame_tos = <0x%lx>\n",
1278 (long) current_gdbarch->deprecated_save_dummy_frame_tos);
1279 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: %s # %s\n",
1282 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1283 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1285 fprintf_unfiltered (file,
1286 "gdbarch_dump: gdbarch_deprecated_saved_pc_after_call_p() = %d\n",
1287 gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch));
1288 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: %s # %s\n",
1291 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1292 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: deprecated_saved_pc_after_call = <0x%lx>\n",
1296 (long) current_gdbarch->deprecated_saved_pc_after_call);
1297 #ifdef DEPRECATED_STACK_ALIGN_P
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: %s # %s\n",
1300 "DEPRECATED_STACK_ALIGN_P()",
1301 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
1305 gdbarch_deprecated_stack_align_p (current_gdbarch));
1306 #ifdef DEPRECATED_STACK_ALIGN
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: %s # %s\n",
1309 "DEPRECATED_STACK_ALIGN(sp)",
1310 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1312 fprintf_unfiltered (file,
1313 "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
1314 (long) current_gdbarch->deprecated_stack_align);
1315 #ifdef DEPRECATED_STORE_RETURN_VALUE
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: %s # %s\n",
1318 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1319 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: deprecated_store_return_value = <0x%lx>\n",
1323 (long) current_gdbarch->deprecated_store_return_value);
1324 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: %s # %s\n",
1327 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1328 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
1332 gdbarch_deprecated_store_struct_return_p (current_gdbarch));
1333 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: %s # %s\n",
1336 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1337 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1339 fprintf_unfiltered (file,
1340 "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
1341 (long) current_gdbarch->deprecated_store_struct_return);
1342 #ifdef DEPRECATED_TARGET_READ_FP_P
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: %s # %s\n",
1345 "DEPRECATED_TARGET_READ_FP_P()",
1346 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: gdbarch_deprecated_target_read_fp_p() = %d\n",
1350 gdbarch_deprecated_target_read_fp_p (current_gdbarch));
1351 #ifdef DEPRECATED_TARGET_READ_FP
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: %s # %s\n",
1354 "DEPRECATED_TARGET_READ_FP()",
1355 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: deprecated_target_read_fp = <0x%lx>\n",
1359 (long) current_gdbarch->deprecated_target_read_fp);
1360 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: %s # %s\n",
1363 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
1364 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
1368 (long) current_gdbarch->deprecated_use_struct_convention);
1369 #ifdef TARGET_DOUBLE_BIT
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1372 XSTRING (TARGET_DOUBLE_BIT));
1374 fprintf_unfiltered (file,
1375 "gdbarch_dump: double_bit = %s\n",
1376 paddr_d (current_gdbarch->double_bit));
1377 #ifdef TARGET_DOUBLE_FORMAT
1378 fprintf_unfiltered (file,
1379 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1380 XSTRING (TARGET_DOUBLE_FORMAT));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: double_format = %s\n",
1384 (TARGET_DOUBLE_FORMAT)->name);
1385 #ifdef DWARF2_REG_TO_REGNUM
1386 fprintf_unfiltered (file,
1387 "gdbarch_dump: %s # %s\n",
1388 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1389 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
1393 (long) current_gdbarch->dwarf2_reg_to_regnum);
1394 #ifdef DWARF_REG_TO_REGNUM
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: %s # %s\n",
1397 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1398 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
1402 (long) current_gdbarch->dwarf_reg_to_regnum);
1403 #ifdef ECOFF_REG_TO_REGNUM
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: %s # %s\n",
1406 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1407 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
1411 (long) current_gdbarch->ecoff_reg_to_regnum);
1412 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1413 fprintf_unfiltered (file,
1414 "gdbarch_dump: %s # %s\n",
1415 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1416 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
1420 (long) current_gdbarch->elf_make_msymbol_special);
1421 #ifdef EXTRACT_RETURN_VALUE
1422 fprintf_unfiltered (file,
1423 "gdbarch_dump: %s # %s\n",
1424 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1425 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: extract_return_value = <0x%lx>\n",
1429 (long) current_gdbarch->extract_return_value);
1430 #ifdef FETCH_POINTER_ARGUMENT_P
1431 fprintf_unfiltered (file,
1432 "gdbarch_dump: %s # %s\n",
1433 "FETCH_POINTER_ARGUMENT_P()",
1434 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1438 gdbarch_fetch_pointer_argument_p (current_gdbarch));
1439 #ifdef FETCH_POINTER_ARGUMENT
1440 fprintf_unfiltered (file,
1441 "gdbarch_dump: %s # %s\n",
1442 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1443 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
1447 (long) current_gdbarch->fetch_pointer_argument);
1448 #ifdef TARGET_FLOAT_BIT
1449 fprintf_unfiltered (file,
1450 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1451 XSTRING (TARGET_FLOAT_BIT));
1453 fprintf_unfiltered (file,
1454 "gdbarch_dump: float_bit = %s\n",
1455 paddr_d (current_gdbarch->float_bit));
1456 #ifdef TARGET_FLOAT_FORMAT
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1459 XSTRING (TARGET_FLOAT_FORMAT));
1461 fprintf_unfiltered (file,
1462 "gdbarch_dump: float_format = %s\n",
1463 (TARGET_FLOAT_FORMAT)->name);
1465 fprintf_unfiltered (file,
1466 "gdbarch_dump: FP0_REGNUM # %s\n",
1467 XSTRING (FP0_REGNUM));
1469 fprintf_unfiltered (file,
1470 "gdbarch_dump: fp0_regnum = %s\n",
1471 paddr_d (current_gdbarch->fp0_regnum));
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1474 gdbarch_frame_align_p (current_gdbarch));
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: frame_align = <0x%lx>\n",
1477 (long) current_gdbarch->frame_align);
1478 #ifdef FRAME_ARGS_SKIP
1479 fprintf_unfiltered (file,
1480 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1481 XSTRING (FRAME_ARGS_SKIP));
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: frame_args_skip = 0x%s\n",
1485 paddr_nz (current_gdbarch->frame_args_skip));
1486 #ifdef FRAME_NUM_ARGS_P
1487 fprintf_unfiltered (file,
1488 "gdbarch_dump: %s # %s\n",
1489 "FRAME_NUM_ARGS_P()",
1490 XSTRING (FRAME_NUM_ARGS_P ()));
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1494 gdbarch_frame_num_args_p (current_gdbarch));
1495 #ifdef FRAME_NUM_ARGS
1496 fprintf_unfiltered (file,
1497 "gdbarch_dump: %s # %s\n",
1498 "FRAME_NUM_ARGS(frame)",
1499 XSTRING (FRAME_NUM_ARGS (frame)));
1501 fprintf_unfiltered (file,
1502 "gdbarch_dump: frame_num_args = <0x%lx>\n",
1503 (long) current_gdbarch->frame_num_args);
1504 #ifdef FRAME_RED_ZONE_SIZE
1505 fprintf_unfiltered (file,
1506 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1507 XSTRING (FRAME_RED_ZONE_SIZE));
1509 fprintf_unfiltered (file,
1510 "gdbarch_dump: frame_red_zone_size = %s\n",
1511 paddr_d (current_gdbarch->frame_red_zone_size));
1512 #ifdef GET_LONGJMP_TARGET_P
1513 fprintf_unfiltered (file,
1514 "gdbarch_dump: %s # %s\n",
1515 "GET_LONGJMP_TARGET_P()",
1516 XSTRING (GET_LONGJMP_TARGET_P ()));
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1520 gdbarch_get_longjmp_target_p (current_gdbarch));
1521 #ifdef GET_LONGJMP_TARGET
1522 fprintf_unfiltered (file,
1523 "gdbarch_dump: %s # %s\n",
1524 "GET_LONGJMP_TARGET(pc)",
1525 XSTRING (GET_LONGJMP_TARGET (pc)));
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
1529 (long) current_gdbarch->get_longjmp_target);
1530 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1533 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1535 fprintf_unfiltered (file,
1536 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1537 paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
1538 fprintf_unfiltered (file,
1539 "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
1540 (long) current_gdbarch->in_function_epilogue_p);
1541 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: %s # %s\n",
1544 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1545 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1547 fprintf_unfiltered (file,
1548 "gdbarch_dump: in_solib_call_trampoline = <0x%lx>\n",
1549 (long) current_gdbarch->in_solib_call_trampoline);
1550 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: %s # %s\n",
1553 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1554 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
1558 (long) current_gdbarch->in_solib_return_trampoline);
1560 fprintf_unfiltered (file,
1561 "gdbarch_dump: %s # %s\n",
1562 "INNER_THAN(lhs, rhs)",
1563 XSTRING (INNER_THAN (lhs, rhs)));
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: inner_than = <0x%lx>\n",
1567 (long) current_gdbarch->inner_than);
1568 #ifdef TARGET_INT_BIT
1569 fprintf_unfiltered (file,
1570 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1571 XSTRING (TARGET_INT_BIT));
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: int_bit = %s\n",
1575 paddr_d (current_gdbarch->int_bit));
1576 #ifdef INTEGER_TO_ADDRESS_P
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: %s # %s\n",
1579 "INTEGER_TO_ADDRESS_P()",
1580 XSTRING (INTEGER_TO_ADDRESS_P ()));
1582 fprintf_unfiltered (file,
1583 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1584 gdbarch_integer_to_address_p (current_gdbarch));
1585 #ifdef INTEGER_TO_ADDRESS
1586 fprintf_unfiltered (file,
1587 "gdbarch_dump: %s # %s\n",
1588 "INTEGER_TO_ADDRESS(type, buf)",
1589 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1591 fprintf_unfiltered (file,
1592 "gdbarch_dump: integer_to_address = <0x%lx>\n",
1593 (long) current_gdbarch->integer_to_address);
1594 #ifdef TARGET_LONG_BIT
1595 fprintf_unfiltered (file,
1596 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1597 XSTRING (TARGET_LONG_BIT));
1599 fprintf_unfiltered (file,
1600 "gdbarch_dump: long_bit = %s\n",
1601 paddr_d (current_gdbarch->long_bit));
1602 #ifdef TARGET_LONG_DOUBLE_BIT
1603 fprintf_unfiltered (file,
1604 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1605 XSTRING (TARGET_LONG_DOUBLE_BIT));
1607 fprintf_unfiltered (file,
1608 "gdbarch_dump: long_double_bit = %s\n",
1609 paddr_d (current_gdbarch->long_double_bit));
1610 #ifdef TARGET_LONG_DOUBLE_FORMAT
1611 fprintf_unfiltered (file,
1612 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1613 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1615 fprintf_unfiltered (file,
1616 "gdbarch_dump: long_double_format = %s\n",
1617 (TARGET_LONG_DOUBLE_FORMAT)->name);
1618 #ifdef TARGET_LONG_LONG_BIT
1619 fprintf_unfiltered (file,
1620 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1621 XSTRING (TARGET_LONG_LONG_BIT));
1623 fprintf_unfiltered (file,
1624 "gdbarch_dump: long_long_bit = %s\n",
1625 paddr_d (current_gdbarch->long_long_bit));
1626 #ifdef MEMORY_INSERT_BREAKPOINT
1627 fprintf_unfiltered (file,
1628 "gdbarch_dump: %s # %s\n",
1629 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1630 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1632 fprintf_unfiltered (file,
1633 "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
1634 (long) current_gdbarch->memory_insert_breakpoint);
1635 #ifdef MEMORY_REMOVE_BREAKPOINT
1636 fprintf_unfiltered (file,
1637 "gdbarch_dump: %s # %s\n",
1638 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1639 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1641 fprintf_unfiltered (file,
1642 "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
1643 (long) current_gdbarch->memory_remove_breakpoint);
1644 #ifdef NAME_OF_MALLOC
1645 fprintf_unfiltered (file,
1646 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1647 XSTRING (NAME_OF_MALLOC));
1649 fprintf_unfiltered (file,
1650 "gdbarch_dump: name_of_malloc = %s\n",
1652 #ifdef NUM_PSEUDO_REGS
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1655 XSTRING (NUM_PSEUDO_REGS));
1657 fprintf_unfiltered (file,
1658 "gdbarch_dump: num_pseudo_regs = %s\n",
1659 paddr_d (current_gdbarch->num_pseudo_regs));
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: NUM_REGS # %s\n",
1663 XSTRING (NUM_REGS));
1665 fprintf_unfiltered (file,
1666 "gdbarch_dump: num_regs = %s\n",
1667 paddr_d (current_gdbarch->num_regs));
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: TARGET_OSABI # %s\n",
1671 XSTRING (TARGET_OSABI));
1673 fprintf_unfiltered (file,
1674 "gdbarch_dump: osabi = %s\n",
1675 paddr_d (current_gdbarch->osabi));
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: PC_REGNUM # %s\n",
1679 XSTRING (PC_REGNUM));
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: pc_regnum = %s\n",
1683 paddr_d (current_gdbarch->pc_regnum));
1684 #ifdef POINTER_TO_ADDRESS
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: %s # %s\n",
1687 "POINTER_TO_ADDRESS(type, buf)",
1688 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1690 fprintf_unfiltered (file,
1691 "gdbarch_dump: pointer_to_address = <0x%lx>\n",
1692 (long) current_gdbarch->pointer_to_address);
1693 fprintf_unfiltered (file,
1694 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1695 gdbarch_print_float_info_p (current_gdbarch));
1696 fprintf_unfiltered (file,
1697 "gdbarch_dump: print_float_info = <0x%lx>\n",
1698 (long) current_gdbarch->print_float_info);
1699 #ifdef TARGET_PRINT_INSN
1700 fprintf_unfiltered (file,
1701 "gdbarch_dump: %s # %s\n",
1702 "TARGET_PRINT_INSN(vma, info)",
1703 XSTRING (TARGET_PRINT_INSN (vma, info)));
1705 fprintf_unfiltered (file,
1706 "gdbarch_dump: print_insn = <0x%lx>\n",
1707 (long) current_gdbarch->print_insn);
1708 fprintf_unfiltered (file,
1709 "gdbarch_dump: print_registers_info = <0x%lx>\n",
1710 (long) current_gdbarch->print_registers_info);
1711 fprintf_unfiltered (file,
1712 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1713 gdbarch_print_vector_info_p (current_gdbarch));
1714 fprintf_unfiltered (file,
1715 "gdbarch_dump: print_vector_info = <0x%lx>\n",
1716 (long) current_gdbarch->print_vector_info);
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: PS_REGNUM # %s\n",
1720 XSTRING (PS_REGNUM));
1722 fprintf_unfiltered (file,
1723 "gdbarch_dump: ps_regnum = %s\n",
1724 paddr_d (current_gdbarch->ps_regnum));
1725 fprintf_unfiltered (file,
1726 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1727 gdbarch_pseudo_register_read_p (current_gdbarch));
1728 fprintf_unfiltered (file,
1729 "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
1730 (long) current_gdbarch->pseudo_register_read);
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1733 gdbarch_pseudo_register_write_p (current_gdbarch));
1734 fprintf_unfiltered (file,
1735 "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
1736 (long) current_gdbarch->pseudo_register_write);
1737 #ifdef TARGET_PTR_BIT
1738 fprintf_unfiltered (file,
1739 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1740 XSTRING (TARGET_PTR_BIT));
1742 fprintf_unfiltered (file,
1743 "gdbarch_dump: ptr_bit = %s\n",
1744 paddr_d (current_gdbarch->ptr_bit));
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1747 gdbarch_push_dummy_call_p (current_gdbarch));
1748 fprintf_unfiltered (file,
1749 "gdbarch_dump: push_dummy_call = <0x%lx>\n",
1750 (long) current_gdbarch->push_dummy_call);
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1753 gdbarch_push_dummy_code_p (current_gdbarch));
1754 fprintf_unfiltered (file,
1755 "gdbarch_dump: push_dummy_code = <0x%lx>\n",
1756 (long) current_gdbarch->push_dummy_code);
1757 #ifdef TARGET_READ_PC_P
1758 fprintf_unfiltered (file,
1759 "gdbarch_dump: %s # %s\n",
1760 "TARGET_READ_PC_P()",
1761 XSTRING (TARGET_READ_PC_P ()));
1763 fprintf_unfiltered (file,
1764 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1765 gdbarch_read_pc_p (current_gdbarch));
1766 #ifdef TARGET_READ_PC
1767 fprintf_unfiltered (file,
1768 "gdbarch_dump: %s # %s\n",
1769 "TARGET_READ_PC(ptid)",
1770 XSTRING (TARGET_READ_PC (ptid)));
1772 fprintf_unfiltered (file,
1773 "gdbarch_dump: read_pc = <0x%lx>\n",
1774 (long) current_gdbarch->read_pc);
1775 #ifdef TARGET_READ_SP_P
1776 fprintf_unfiltered (file,
1777 "gdbarch_dump: %s # %s\n",
1778 "TARGET_READ_SP_P()",
1779 XSTRING (TARGET_READ_SP_P ()));
1781 fprintf_unfiltered (file,
1782 "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
1783 gdbarch_read_sp_p (current_gdbarch));
1784 #ifdef TARGET_READ_SP
1785 fprintf_unfiltered (file,
1786 "gdbarch_dump: %s # %s\n",
1788 XSTRING (TARGET_READ_SP ()));
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: read_sp = <0x%lx>\n",
1792 (long) current_gdbarch->read_sp);
1793 #ifdef REGISTER_BYTES_OK_P
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: %s # %s\n",
1796 "REGISTER_BYTES_OK_P()",
1797 XSTRING (REGISTER_BYTES_OK_P ()));
1799 fprintf_unfiltered (file,
1800 "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
1801 gdbarch_register_bytes_ok_p (current_gdbarch));
1802 #ifdef REGISTER_BYTES_OK
1803 fprintf_unfiltered (file,
1804 "gdbarch_dump: %s # %s\n",
1805 "REGISTER_BYTES_OK(nr_bytes)",
1806 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1808 fprintf_unfiltered (file,
1809 "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
1810 (long) current_gdbarch->register_bytes_ok);
1811 #ifdef REGISTER_NAME
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: %s # %s\n",
1814 "REGISTER_NAME(regnr)",
1815 XSTRING (REGISTER_NAME (regnr)));
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: register_name = <0x%lx>\n",
1819 (long) current_gdbarch->register_name);
1820 fprintf_unfiltered (file,
1821 "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
1822 (long) current_gdbarch->register_reggroup_p);
1823 #ifdef REGISTER_SIM_REGNO
1824 fprintf_unfiltered (file,
1825 "gdbarch_dump: %s # %s\n",
1826 "REGISTER_SIM_REGNO(reg_nr)",
1827 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1829 fprintf_unfiltered (file,
1830 "gdbarch_dump: register_sim_regno = <0x%lx>\n",
1831 (long) current_gdbarch->register_sim_regno);
1832 #ifdef REGISTER_TO_VALUE
1833 fprintf_unfiltered (file,
1834 "gdbarch_dump: %s # %s\n",
1835 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1836 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1838 fprintf_unfiltered (file,
1839 "gdbarch_dump: register_to_value = <0x%lx>\n",
1840 (long) current_gdbarch->register_to_value);
1841 fprintf_unfiltered (file,
1842 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1843 gdbarch_register_type_p (current_gdbarch));
1844 fprintf_unfiltered (file,
1845 "gdbarch_dump: register_type = <0x%lx>\n",
1846 (long) current_gdbarch->register_type);
1847 fprintf_unfiltered (file,
1848 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1849 gdbarch_regset_from_core_section_p (current_gdbarch));
1850 fprintf_unfiltered (file,
1851 "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
1852 (long) current_gdbarch->regset_from_core_section);
1853 fprintf_unfiltered (file,
1854 "gdbarch_dump: remote_translate_xfer_address = <0x%lx>\n",
1855 (long) current_gdbarch->remote_translate_xfer_address);
1856 fprintf_unfiltered (file,
1857 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1858 gdbarch_return_value_p (current_gdbarch));
1859 fprintf_unfiltered (file,
1860 "gdbarch_dump: return_value = <0x%lx>\n",
1861 (long) current_gdbarch->return_value);
1862 #ifdef SDB_REG_TO_REGNUM
1863 fprintf_unfiltered (file,
1864 "gdbarch_dump: %s # %s\n",
1865 "SDB_REG_TO_REGNUM(sdb_regnr)",
1866 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1868 fprintf_unfiltered (file,
1869 "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
1870 (long) current_gdbarch->sdb_reg_to_regnum);
1871 #ifdef TARGET_SHORT_BIT
1872 fprintf_unfiltered (file,
1873 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1874 XSTRING (TARGET_SHORT_BIT));
1876 fprintf_unfiltered (file,
1877 "gdbarch_dump: short_bit = %s\n",
1878 paddr_d (current_gdbarch->short_bit));
1879 #ifdef SKIP_PROLOGUE
1880 fprintf_unfiltered (file,
1881 "gdbarch_dump: %s # %s\n",
1882 "SKIP_PROLOGUE(ip)",
1883 XSTRING (SKIP_PROLOGUE (ip)));
1885 fprintf_unfiltered (file,
1886 "gdbarch_dump: skip_prologue = <0x%lx>\n",
1887 (long) current_gdbarch->skip_prologue);
1888 fprintf_unfiltered (file,
1889 "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
1890 (long) current_gdbarch->skip_solib_resolver);
1891 #ifdef SKIP_TRAMPOLINE_CODE
1892 fprintf_unfiltered (file,
1893 "gdbarch_dump: %s # %s\n",
1894 "SKIP_TRAMPOLINE_CODE(pc)",
1895 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1897 fprintf_unfiltered (file,
1898 "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1899 (long) current_gdbarch->skip_trampoline_code);
1900 #ifdef SMASH_TEXT_ADDRESS
1901 fprintf_unfiltered (file,
1902 "gdbarch_dump: %s # %s\n",
1903 "SMASH_TEXT_ADDRESS(addr)",
1904 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: smash_text_address = <0x%lx>\n",
1908 (long) current_gdbarch->smash_text_address);
1909 #ifdef SOFTWARE_SINGLE_STEP_P
1910 fprintf_unfiltered (file,
1911 "gdbarch_dump: %s # %s\n",
1912 "SOFTWARE_SINGLE_STEP_P()",
1913 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1915 fprintf_unfiltered (file,
1916 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1917 gdbarch_software_single_step_p (current_gdbarch));
1918 #ifdef SOFTWARE_SINGLE_STEP
1919 fprintf_unfiltered (file,
1920 "gdbarch_dump: %s # %s\n",
1921 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1922 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1924 fprintf_unfiltered (file,
1925 "gdbarch_dump: software_single_step = <0x%lx>\n",
1926 (long) current_gdbarch->software_single_step);
1928 fprintf_unfiltered (file,
1929 "gdbarch_dump: SP_REGNUM # %s\n",
1930 XSTRING (SP_REGNUM));
1932 fprintf_unfiltered (file,
1933 "gdbarch_dump: sp_regnum = %s\n",
1934 paddr_d (current_gdbarch->sp_regnum));
1935 #ifdef STAB_REG_TO_REGNUM
1936 fprintf_unfiltered (file,
1937 "gdbarch_dump: %s # %s\n",
1938 "STAB_REG_TO_REGNUM(stab_regnr)",
1939 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1941 fprintf_unfiltered (file,
1942 "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1943 (long) current_gdbarch->stab_reg_to_regnum);
1944 fprintf_unfiltered (file,
1945 "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
1946 (long) current_gdbarch->stabs_argument_has_addr);
1947 #ifdef STORE_RETURN_VALUE
1948 fprintf_unfiltered (file,
1949 "gdbarch_dump: %s # %s\n",
1950 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1951 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: store_return_value = <0x%lx>\n",
1955 (long) current_gdbarch->store_return_value);
1956 fprintf_unfiltered (file,
1957 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
1958 gdbarch_unwind_dummy_id_p (current_gdbarch));
1959 fprintf_unfiltered (file,
1960 "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
1961 (long) current_gdbarch->unwind_dummy_id);
1962 fprintf_unfiltered (file,
1963 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1964 gdbarch_unwind_pc_p (current_gdbarch));
1965 fprintf_unfiltered (file,
1966 "gdbarch_dump: unwind_pc = <0x%lx>\n",
1967 (long) current_gdbarch->unwind_pc);
1968 fprintf_unfiltered (file,
1969 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1970 gdbarch_unwind_sp_p (current_gdbarch));
1971 fprintf_unfiltered (file,
1972 "gdbarch_dump: unwind_sp = <0x%lx>\n",
1973 (long) current_gdbarch->unwind_sp);
1974 #ifdef VALUE_TO_REGISTER
1975 fprintf_unfiltered (file,
1976 "gdbarch_dump: %s # %s\n",
1977 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
1978 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
1980 fprintf_unfiltered (file,
1981 "gdbarch_dump: value_to_register = <0x%lx>\n",
1982 (long) current_gdbarch->value_to_register);
1983 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1984 fprintf_unfiltered (file,
1985 "gdbarch_dump: %s # %s\n",
1986 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1987 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1991 (long) current_gdbarch->virtual_frame_pointer);
1992 #ifdef TARGET_WRITE_PC
1993 fprintf_unfiltered (file,
1994 "gdbarch_dump: %s # %s\n",
1995 "TARGET_WRITE_PC(val, ptid)",
1996 XSTRING (TARGET_WRITE_PC (val, ptid)));
1998 fprintf_unfiltered (file,
1999 "gdbarch_dump: write_pc = <0x%lx>\n",
2000 (long) current_gdbarch->write_pc);
2001 if (current_gdbarch->dump_tdep != NULL)
2002 current_gdbarch->dump_tdep (current_gdbarch, file);
2005 struct gdbarch_tdep *
2006 gdbarch_tdep (struct gdbarch *gdbarch)
2008 if (gdbarch_debug >= 2)
2009 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2010 return gdbarch->tdep;
2014 const struct bfd_arch_info *
2015 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2017 gdb_assert (gdbarch != NULL);
2018 if (gdbarch_debug >= 2)
2019 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2020 return gdbarch->bfd_arch_info;
2024 gdbarch_byte_order (struct gdbarch *gdbarch)
2026 gdb_assert (gdbarch != NULL);
2027 if (gdbarch_debug >= 2)
2028 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2029 return gdbarch->byte_order;
2033 gdbarch_osabi (struct gdbarch *gdbarch)
2035 gdb_assert (gdbarch != NULL);
2036 if (gdbarch_debug >= 2)
2037 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2038 return gdbarch->osabi;
2042 gdbarch_short_bit (struct gdbarch *gdbarch)
2044 gdb_assert (gdbarch != NULL);
2045 /* Skip verify of short_bit, invalid_p == 0 */
2046 if (gdbarch_debug >= 2)
2047 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2048 return gdbarch->short_bit;
2052 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2055 gdbarch->short_bit = short_bit;
2059 gdbarch_int_bit (struct gdbarch *gdbarch)
2061 gdb_assert (gdbarch != NULL);
2062 /* Skip verify of int_bit, invalid_p == 0 */
2063 if (gdbarch_debug >= 2)
2064 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2065 return gdbarch->int_bit;
2069 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2072 gdbarch->int_bit = int_bit;
2076 gdbarch_long_bit (struct gdbarch *gdbarch)
2078 gdb_assert (gdbarch != NULL);
2079 /* Skip verify of long_bit, invalid_p == 0 */
2080 if (gdbarch_debug >= 2)
2081 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2082 return gdbarch->long_bit;
2086 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2089 gdbarch->long_bit = long_bit;
2093 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2095 gdb_assert (gdbarch != NULL);
2096 /* Skip verify of long_long_bit, invalid_p == 0 */
2097 if (gdbarch_debug >= 2)
2098 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2099 return gdbarch->long_long_bit;
2103 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2106 gdbarch->long_long_bit = long_long_bit;
2110 gdbarch_float_bit (struct gdbarch *gdbarch)
2112 gdb_assert (gdbarch != NULL);
2113 /* Skip verify of float_bit, invalid_p == 0 */
2114 if (gdbarch_debug >= 2)
2115 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2116 return gdbarch->float_bit;
2120 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2123 gdbarch->float_bit = float_bit;
2127 gdbarch_double_bit (struct gdbarch *gdbarch)
2129 gdb_assert (gdbarch != NULL);
2130 /* Skip verify of double_bit, invalid_p == 0 */
2131 if (gdbarch_debug >= 2)
2132 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2133 return gdbarch->double_bit;
2137 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2140 gdbarch->double_bit = double_bit;
2144 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2146 gdb_assert (gdbarch != NULL);
2147 /* Skip verify of long_double_bit, invalid_p == 0 */
2148 if (gdbarch_debug >= 2)
2149 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2150 return gdbarch->long_double_bit;
2154 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2155 int long_double_bit)
2157 gdbarch->long_double_bit = long_double_bit;
2161 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2163 gdb_assert (gdbarch != NULL);
2164 /* Skip verify of ptr_bit, invalid_p == 0 */
2165 if (gdbarch_debug >= 2)
2166 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2167 return gdbarch->ptr_bit;
2171 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2174 gdbarch->ptr_bit = ptr_bit;
2178 gdbarch_addr_bit (struct gdbarch *gdbarch)
2180 gdb_assert (gdbarch != NULL);
2181 /* Check variable changed from pre-default. */
2182 gdb_assert (gdbarch->addr_bit != 0);
2183 if (gdbarch_debug >= 2)
2184 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2185 return gdbarch->addr_bit;
2189 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2192 gdbarch->addr_bit = addr_bit;
2196 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2198 gdb_assert (gdbarch != NULL);
2199 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2200 if (gdbarch_debug >= 2)
2201 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2202 return gdbarch->bfd_vma_bit;
2206 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2209 gdbarch->bfd_vma_bit = bfd_vma_bit;
2213 gdbarch_char_signed (struct gdbarch *gdbarch)
2215 gdb_assert (gdbarch != NULL);
2216 /* Check variable changed from pre-default. */
2217 gdb_assert (gdbarch->char_signed != -1);
2218 if (gdbarch_debug >= 2)
2219 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2220 return gdbarch->char_signed;
2224 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2227 gdbarch->char_signed = char_signed;
2231 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2233 gdb_assert (gdbarch != NULL);
2234 return gdbarch->read_pc != NULL;
2238 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2240 gdb_assert (gdbarch != NULL);
2241 gdb_assert (gdbarch->read_pc != NULL);
2242 if (gdbarch_debug >= 2)
2243 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2244 return gdbarch->read_pc (ptid);
2248 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2249 gdbarch_read_pc_ftype read_pc)
2251 gdbarch->read_pc = read_pc;
2255 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2257 gdb_assert (gdbarch != NULL);
2258 gdb_assert (gdbarch->write_pc != NULL);
2259 if (gdbarch_debug >= 2)
2260 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2261 gdbarch->write_pc (val, ptid);
2265 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2266 gdbarch_write_pc_ftype write_pc)
2268 gdbarch->write_pc = write_pc;
2272 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2274 gdb_assert (gdbarch != NULL);
2275 return gdbarch->read_sp != NULL;
2279 gdbarch_read_sp (struct gdbarch *gdbarch)
2281 gdb_assert (gdbarch != NULL);
2282 gdb_assert (gdbarch->read_sp != NULL);
2283 if (gdbarch_debug >= 2)
2284 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2285 return gdbarch->read_sp ();
2289 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2290 gdbarch_read_sp_ftype read_sp)
2292 gdbarch->read_sp = read_sp;
2296 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2298 gdb_assert (gdbarch != NULL);
2299 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2300 if (gdbarch_debug >= 2)
2301 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2302 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2306 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2307 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2309 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2313 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2315 gdb_assert (gdbarch != NULL);
2316 return gdbarch->pseudo_register_read != NULL;
2320 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2322 gdb_assert (gdbarch != NULL);
2323 gdb_assert (gdbarch->pseudo_register_read != NULL);
2324 if (gdbarch_debug >= 2)
2325 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2326 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2330 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2331 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2333 gdbarch->pseudo_register_read = pseudo_register_read;
2337 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2339 gdb_assert (gdbarch != NULL);
2340 return gdbarch->pseudo_register_write != NULL;
2344 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2346 gdb_assert (gdbarch != NULL);
2347 gdb_assert (gdbarch->pseudo_register_write != NULL);
2348 if (gdbarch_debug >= 2)
2349 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2350 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2354 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2355 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2357 gdbarch->pseudo_register_write = pseudo_register_write;
2361 gdbarch_num_regs (struct gdbarch *gdbarch)
2363 gdb_assert (gdbarch != NULL);
2364 /* Check variable changed from pre-default. */
2365 gdb_assert (gdbarch->num_regs != -1);
2366 if (gdbarch_debug >= 2)
2367 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2368 return gdbarch->num_regs;
2372 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2375 gdbarch->num_regs = num_regs;
2379 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2381 gdb_assert (gdbarch != NULL);
2382 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2383 if (gdbarch_debug >= 2)
2384 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2385 return gdbarch->num_pseudo_regs;
2389 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2390 int num_pseudo_regs)
2392 gdbarch->num_pseudo_regs = num_pseudo_regs;
2396 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2398 gdb_assert (gdbarch != NULL);
2399 /* Skip verify of sp_regnum, invalid_p == 0 */
2400 if (gdbarch_debug >= 2)
2401 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2402 return gdbarch->sp_regnum;
2406 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2409 gdbarch->sp_regnum = sp_regnum;
2413 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2415 gdb_assert (gdbarch != NULL);
2416 /* Skip verify of pc_regnum, invalid_p == 0 */
2417 if (gdbarch_debug >= 2)
2418 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2419 return gdbarch->pc_regnum;
2423 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2426 gdbarch->pc_regnum = pc_regnum;
2430 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2432 gdb_assert (gdbarch != NULL);
2433 /* Skip verify of ps_regnum, invalid_p == 0 */
2434 if (gdbarch_debug >= 2)
2435 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2436 return gdbarch->ps_regnum;
2440 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2443 gdbarch->ps_regnum = ps_regnum;
2447 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2449 gdb_assert (gdbarch != NULL);
2450 /* Skip verify of fp0_regnum, invalid_p == 0 */
2451 if (gdbarch_debug >= 2)
2452 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2453 return gdbarch->fp0_regnum;
2457 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2460 gdbarch->fp0_regnum = fp0_regnum;
2464 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2466 gdb_assert (gdbarch != NULL);
2467 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2468 if (gdbarch_debug >= 2)
2469 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2470 return gdbarch->stab_reg_to_regnum (stab_regnr);
2474 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2475 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2477 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2481 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2483 gdb_assert (gdbarch != NULL);
2484 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2485 if (gdbarch_debug >= 2)
2486 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2487 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2491 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2492 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2494 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2498 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2500 gdb_assert (gdbarch != NULL);
2501 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2502 if (gdbarch_debug >= 2)
2503 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2504 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2508 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2509 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2511 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2515 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2517 gdb_assert (gdbarch != NULL);
2518 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2519 if (gdbarch_debug >= 2)
2520 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2521 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2525 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2526 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2528 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2532 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2534 gdb_assert (gdbarch != NULL);
2535 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2536 if (gdbarch_debug >= 2)
2537 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2538 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2542 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2543 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2545 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2549 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2551 gdb_assert (gdbarch != NULL);
2552 gdb_assert (gdbarch->register_name != NULL);
2553 if (gdbarch_debug >= 2)
2554 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2555 return gdbarch->register_name (regnr);
2559 set_gdbarch_register_name (struct gdbarch *gdbarch,
2560 gdbarch_register_name_ftype register_name)
2562 gdbarch->register_name = register_name;
2566 gdbarch_register_type_p (struct gdbarch *gdbarch)
2568 gdb_assert (gdbarch != NULL);
2569 return gdbarch->register_type != NULL;
2573 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2575 gdb_assert (gdbarch != NULL);
2576 gdb_assert (gdbarch->register_type != NULL);
2577 if (gdbarch_debug >= 2)
2578 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2579 return gdbarch->register_type (gdbarch, reg_nr);
2583 set_gdbarch_register_type (struct gdbarch *gdbarch,
2584 gdbarch_register_type_ftype register_type)
2586 gdbarch->register_type = register_type;
2590 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2592 gdb_assert (gdbarch != NULL);
2593 return gdbarch->deprecated_register_virtual_type != NULL;
2597 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2599 gdb_assert (gdbarch != NULL);
2600 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2601 if (gdbarch_debug >= 2)
2602 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2603 return gdbarch->deprecated_register_virtual_type (reg_nr);
2607 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2608 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2610 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2614 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2616 gdb_assert (gdbarch != NULL);
2617 return gdbarch->deprecated_register_byte != generic_register_byte;
2621 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2623 gdb_assert (gdbarch != NULL);
2624 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2625 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2626 if (gdbarch_debug >= 2)
2627 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2628 return gdbarch->deprecated_register_byte (reg_nr);
2632 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2633 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2635 gdbarch->deprecated_register_byte = deprecated_register_byte;
2639 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2641 gdb_assert (gdbarch != NULL);
2642 return gdbarch->deprecated_register_raw_size != generic_register_size;
2646 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2648 gdb_assert (gdbarch != NULL);
2649 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2650 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2651 if (gdbarch_debug >= 2)
2652 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2653 return gdbarch->deprecated_register_raw_size (reg_nr);
2657 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2658 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2660 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2664 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2666 gdb_assert (gdbarch != NULL);
2667 return gdbarch->deprecated_register_virtual_size != generic_register_size;
2671 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2673 gdb_assert (gdbarch != NULL);
2674 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
2675 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2676 if (gdbarch_debug >= 2)
2677 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
2678 return gdbarch->deprecated_register_virtual_size (reg_nr);
2682 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
2683 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
2685 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
2689 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2691 gdb_assert (gdbarch != NULL);
2692 return gdbarch->unwind_dummy_id != NULL;
2696 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2698 gdb_assert (gdbarch != NULL);
2699 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2700 if (gdbarch_debug >= 2)
2701 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2702 return gdbarch->unwind_dummy_id (gdbarch, info);
2706 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2707 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2709 gdbarch->unwind_dummy_id = unwind_dummy_id;
2713 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
2715 gdb_assert (gdbarch != NULL);
2716 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
2720 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
2722 gdb_assert (gdbarch != NULL);
2723 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
2724 if (gdbarch_debug >= 2)
2725 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
2726 gdbarch->deprecated_save_dummy_frame_tos (sp);
2730 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
2731 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
2733 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
2737 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2739 gdb_assert (gdbarch != NULL);
2740 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2741 if (gdbarch_debug >= 2)
2742 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2743 return gdbarch->deprecated_fp_regnum;
2747 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2748 int deprecated_fp_regnum)
2750 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2754 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2756 gdb_assert (gdbarch != NULL);
2757 return gdbarch->deprecated_target_read_fp != NULL;
2761 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2763 gdb_assert (gdbarch != NULL);
2764 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
2765 if (gdbarch_debug >= 2)
2766 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2767 return gdbarch->deprecated_target_read_fp ();
2771 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2772 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2774 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2778 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2780 gdb_assert (gdbarch != NULL);
2781 return gdbarch->push_dummy_call != NULL;
2785 gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2787 gdb_assert (gdbarch != NULL);
2788 gdb_assert (gdbarch->push_dummy_call != NULL);
2789 if (gdbarch_debug >= 2)
2790 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2791 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2795 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2796 gdbarch_push_dummy_call_ftype push_dummy_call)
2798 gdbarch->push_dummy_call = push_dummy_call;
2802 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
2804 gdb_assert (gdbarch != NULL);
2805 return gdbarch->deprecated_push_arguments != NULL;
2809 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2811 gdb_assert (gdbarch != NULL);
2812 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
2813 if (gdbarch_debug >= 2)
2814 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
2815 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
2819 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
2820 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
2822 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
2826 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
2828 gdb_assert (gdbarch != NULL);
2829 return gdbarch->deprecated_push_return_address != NULL;
2833 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
2835 gdb_assert (gdbarch != NULL);
2836 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
2837 if (gdbarch_debug >= 2)
2838 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
2839 return gdbarch->deprecated_push_return_address (pc, sp);
2843 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
2844 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
2846 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
2850 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
2852 gdb_assert (gdbarch != NULL);
2853 return gdbarch->deprecated_dummy_write_sp != NULL;
2857 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2859 gdb_assert (gdbarch != NULL);
2860 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
2861 if (gdbarch_debug >= 2)
2862 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
2863 gdbarch->deprecated_dummy_write_sp (val);
2867 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
2868 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
2870 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
2874 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
2876 gdb_assert (gdbarch != NULL);
2877 if (gdbarch_debug >= 2)
2878 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2879 return gdbarch->deprecated_register_size;
2883 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
2884 int deprecated_register_size)
2886 gdbarch->deprecated_register_size = deprecated_register_size;
2890 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2892 gdb_assert (gdbarch != NULL);
2893 /* Skip verify of call_dummy_location, invalid_p == 0 */
2894 if (gdbarch_debug >= 2)
2895 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2896 return gdbarch->call_dummy_location;
2900 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2901 int call_dummy_location)
2903 gdbarch->call_dummy_location = call_dummy_location;
2907 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2909 gdb_assert (gdbarch != NULL);
2910 return gdbarch->push_dummy_code != NULL;
2914 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)
2916 gdb_assert (gdbarch != NULL);
2917 gdb_assert (gdbarch->push_dummy_code != NULL);
2918 if (gdbarch_debug >= 2)
2919 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2920 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
2924 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2925 gdbarch_push_dummy_code_ftype push_dummy_code)
2927 gdbarch->push_dummy_code = push_dummy_code;
2931 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
2933 gdb_assert (gdbarch != NULL);
2934 return gdbarch->deprecated_do_registers_info != NULL;
2938 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2940 gdb_assert (gdbarch != NULL);
2941 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
2942 if (gdbarch_debug >= 2)
2943 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
2944 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
2948 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
2949 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
2951 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
2955 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2957 gdb_assert (gdbarch != NULL);
2958 gdb_assert (gdbarch->print_registers_info != NULL);
2959 if (gdbarch_debug >= 2)
2960 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2961 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2965 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2966 gdbarch_print_registers_info_ftype print_registers_info)
2968 gdbarch->print_registers_info = print_registers_info;
2972 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2974 gdb_assert (gdbarch != NULL);
2975 return gdbarch->print_float_info != NULL;
2979 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2981 gdb_assert (gdbarch != NULL);
2982 gdb_assert (gdbarch->print_float_info != NULL);
2983 if (gdbarch_debug >= 2)
2984 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2985 gdbarch->print_float_info (gdbarch, file, frame, args);
2989 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2990 gdbarch_print_float_info_ftype print_float_info)
2992 gdbarch->print_float_info = print_float_info;
2996 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2998 gdb_assert (gdbarch != NULL);
2999 return gdbarch->print_vector_info != NULL;
3003 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3005 gdb_assert (gdbarch != NULL);
3006 gdb_assert (gdbarch->print_vector_info != NULL);
3007 if (gdbarch_debug >= 2)
3008 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3009 gdbarch->print_vector_info (gdbarch, file, frame, args);
3013 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3014 gdbarch_print_vector_info_ftype print_vector_info)
3016 gdbarch->print_vector_info = print_vector_info;
3020 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3022 gdb_assert (gdbarch != NULL);
3023 gdb_assert (gdbarch->register_sim_regno != NULL);
3024 if (gdbarch_debug >= 2)
3025 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3026 return gdbarch->register_sim_regno (reg_nr);
3030 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3031 gdbarch_register_sim_regno_ftype register_sim_regno)
3033 gdbarch->register_sim_regno = register_sim_regno;
3037 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3039 gdb_assert (gdbarch != NULL);
3040 return gdbarch->register_bytes_ok != NULL;
3044 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3046 gdb_assert (gdbarch != NULL);
3047 gdb_assert (gdbarch->register_bytes_ok != NULL);
3048 if (gdbarch_debug >= 2)
3049 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3050 return gdbarch->register_bytes_ok (nr_bytes);
3054 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3055 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3057 gdbarch->register_bytes_ok = register_bytes_ok;
3061 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3063 gdb_assert (gdbarch != NULL);
3064 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3065 if (gdbarch_debug >= 2)
3066 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3067 return gdbarch->cannot_fetch_register (regnum);
3071 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3072 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3074 gdbarch->cannot_fetch_register = cannot_fetch_register;
3078 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3080 gdb_assert (gdbarch != NULL);
3081 gdb_assert (gdbarch->cannot_store_register != NULL);
3082 if (gdbarch_debug >= 2)
3083 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3084 return gdbarch->cannot_store_register (regnum);
3088 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3089 gdbarch_cannot_store_register_ftype cannot_store_register)
3091 gdbarch->cannot_store_register = cannot_store_register;
3095 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3097 gdb_assert (gdbarch != NULL);
3098 return gdbarch->get_longjmp_target != NULL;
3102 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3104 gdb_assert (gdbarch != NULL);
3105 gdb_assert (gdbarch->get_longjmp_target != NULL);
3106 if (gdbarch_debug >= 2)
3107 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3108 return gdbarch->get_longjmp_target (pc);
3112 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3113 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3115 gdbarch->get_longjmp_target = get_longjmp_target;
3119 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3121 gdb_assert (gdbarch != NULL);
3122 return gdbarch->deprecated_init_frame_pc != NULL;
3126 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3128 gdb_assert (gdbarch != NULL);
3129 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3130 if (gdbarch_debug >= 2)
3131 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3132 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3136 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3137 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3139 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3143 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3145 gdb_assert (gdbarch != NULL);
3146 if (gdbarch_debug >= 2)
3147 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3148 return gdbarch->believe_pcc_promotion;
3152 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3153 int believe_pcc_promotion)
3155 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3159 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3161 gdb_assert (gdbarch != NULL);
3162 return gdbarch->deprecated_get_saved_register != NULL;
3166 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)
3168 gdb_assert (gdbarch != NULL);
3169 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3170 if (gdbarch_debug >= 2)
3171 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3172 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3176 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3177 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3179 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3183 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3185 gdb_assert (gdbarch != NULL);
3186 gdb_assert (gdbarch->convert_register_p != NULL);
3187 if (gdbarch_debug >= 2)
3188 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3189 return gdbarch->convert_register_p (regnum, type);
3193 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3194 gdbarch_convert_register_p_ftype convert_register_p)
3196 gdbarch->convert_register_p = convert_register_p;
3200 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3202 gdb_assert (gdbarch != NULL);
3203 gdb_assert (gdbarch->register_to_value != NULL);
3204 if (gdbarch_debug >= 2)
3205 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3206 gdbarch->register_to_value (frame, regnum, type, buf);
3210 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3211 gdbarch_register_to_value_ftype register_to_value)
3213 gdbarch->register_to_value = register_to_value;
3217 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3219 gdb_assert (gdbarch != NULL);
3220 gdb_assert (gdbarch->value_to_register != NULL);
3221 if (gdbarch_debug >= 2)
3222 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3223 gdbarch->value_to_register (frame, regnum, type, buf);
3227 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3228 gdbarch_value_to_register_ftype value_to_register)
3230 gdbarch->value_to_register = value_to_register;
3234 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3236 gdb_assert (gdbarch != NULL);
3237 gdb_assert (gdbarch->pointer_to_address != NULL);
3238 if (gdbarch_debug >= 2)
3239 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3240 return gdbarch->pointer_to_address (type, buf);
3244 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3245 gdbarch_pointer_to_address_ftype pointer_to_address)
3247 gdbarch->pointer_to_address = pointer_to_address;
3251 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3253 gdb_assert (gdbarch != NULL);
3254 gdb_assert (gdbarch->address_to_pointer != NULL);
3255 if (gdbarch_debug >= 2)
3256 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3257 gdbarch->address_to_pointer (type, buf, addr);
3261 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3262 gdbarch_address_to_pointer_ftype address_to_pointer)
3264 gdbarch->address_to_pointer = address_to_pointer;
3268 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3270 gdb_assert (gdbarch != NULL);
3271 return gdbarch->integer_to_address != NULL;
3275 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3277 gdb_assert (gdbarch != NULL);
3278 gdb_assert (gdbarch->integer_to_address != NULL);
3279 if (gdbarch_debug >= 2)
3280 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3281 return gdbarch->integer_to_address (type, buf);
3285 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3286 gdbarch_integer_to_address_ftype integer_to_address)
3288 gdbarch->integer_to_address = integer_to_address;
3292 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3294 gdb_assert (gdbarch != NULL);
3295 return gdbarch->deprecated_pop_frame != NULL;
3299 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3301 gdb_assert (gdbarch != NULL);
3302 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3303 if (gdbarch_debug >= 2)
3304 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3305 gdbarch->deprecated_pop_frame ();
3309 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3310 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3312 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3316 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3318 gdb_assert (gdbarch != NULL);
3319 return gdbarch->deprecated_store_struct_return != NULL;
3323 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3325 gdb_assert (gdbarch != NULL);
3326 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3327 if (gdbarch_debug >= 2)
3328 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3329 gdbarch->deprecated_store_struct_return (addr, sp);
3333 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3334 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3336 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3340 gdbarch_return_value_p (struct gdbarch *gdbarch)
3342 gdb_assert (gdbarch != NULL);
3343 return gdbarch->return_value != legacy_return_value;
3346 enum return_value_convention
3347 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3349 gdb_assert (gdbarch != NULL);
3350 gdb_assert (gdbarch->return_value != NULL);
3351 /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
3352 if (gdbarch_debug >= 2)
3353 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3354 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3358 set_gdbarch_return_value (struct gdbarch *gdbarch,
3359 gdbarch_return_value_ftype return_value)
3361 gdbarch->return_value = return_value;
3365 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3367 gdb_assert (gdbarch != NULL);
3368 gdb_assert (gdbarch->extract_return_value != NULL);
3369 if (gdbarch_debug >= 2)
3370 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3371 gdbarch->extract_return_value (type, regcache, valbuf);
3375 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3376 gdbarch_extract_return_value_ftype extract_return_value)
3378 gdbarch->extract_return_value = extract_return_value;
3382 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3384 gdb_assert (gdbarch != NULL);
3385 gdb_assert (gdbarch->store_return_value != NULL);
3386 if (gdbarch_debug >= 2)
3387 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3388 gdbarch->store_return_value (type, regcache, valbuf);
3392 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3393 gdbarch_store_return_value_ftype store_return_value)
3395 gdbarch->store_return_value = store_return_value;
3399 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3401 gdb_assert (gdbarch != NULL);
3402 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
3403 if (gdbarch_debug >= 2)
3404 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3405 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3409 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3410 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3412 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3416 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3418 gdb_assert (gdbarch != NULL);
3419 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
3420 if (gdbarch_debug >= 2)
3421 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
3422 gdbarch->deprecated_store_return_value (type, valbuf);
3426 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
3427 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
3429 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
3433 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3435 gdb_assert (gdbarch != NULL);
3436 gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
3437 if (gdbarch_debug >= 2)
3438 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
3439 return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
3443 set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
3444 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
3446 gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
3450 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3452 gdb_assert (gdbarch != NULL);
3453 return gdbarch->deprecated_extract_struct_value_address != NULL;
3457 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
3459 gdb_assert (gdbarch != NULL);
3460 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
3461 if (gdbarch_debug >= 2)
3462 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
3463 return gdbarch->deprecated_extract_struct_value_address (regcache);
3467 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
3468 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
3470 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
3474 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
3476 gdb_assert (gdbarch != NULL);
3477 return gdbarch->deprecated_frame_init_saved_regs != NULL;
3481 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3483 gdb_assert (gdbarch != NULL);
3484 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
3485 if (gdbarch_debug >= 2)
3486 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
3487 gdbarch->deprecated_frame_init_saved_regs (frame);
3491 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
3492 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
3494 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
3498 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
3500 gdb_assert (gdbarch != NULL);
3501 return gdbarch->deprecated_init_extra_frame_info != NULL;
3505 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3507 gdb_assert (gdbarch != NULL);
3508 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
3509 if (gdbarch_debug >= 2)
3510 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
3511 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
3515 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
3516 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
3518 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
3522 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3524 gdb_assert (gdbarch != NULL);
3525 gdb_assert (gdbarch->skip_prologue != NULL);
3526 if (gdbarch_debug >= 2)
3527 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3528 return gdbarch->skip_prologue (ip);
3532 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3533 gdbarch_skip_prologue_ftype skip_prologue)
3535 gdbarch->skip_prologue = skip_prologue;
3539 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3541 gdb_assert (gdbarch != NULL);
3542 gdb_assert (gdbarch->inner_than != NULL);
3543 if (gdbarch_debug >= 2)
3544 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3545 return gdbarch->inner_than (lhs, rhs);
3549 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3550 gdbarch_inner_than_ftype inner_than)
3552 gdbarch->inner_than = inner_than;
3555 const unsigned char *
3556 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3558 gdb_assert (gdbarch != NULL);
3559 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
3560 if (gdbarch_debug >= 2)
3561 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3562 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3566 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3567 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3569 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3573 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
3575 gdb_assert (gdbarch != NULL);
3576 return gdbarch->adjust_breakpoint_address != NULL;
3580 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
3582 gdb_assert (gdbarch != NULL);
3583 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
3584 if (gdbarch_debug >= 2)
3585 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
3586 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
3590 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
3591 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
3593 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
3597 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3599 gdb_assert (gdbarch != NULL);
3600 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
3601 if (gdbarch_debug >= 2)
3602 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3603 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3607 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3608 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3610 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3614 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3616 gdb_assert (gdbarch != NULL);
3617 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
3618 if (gdbarch_debug >= 2)
3619 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3620 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3624 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3625 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3627 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3631 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3633 gdb_assert (gdbarch != NULL);
3634 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3635 if (gdbarch_debug >= 2)
3636 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3637 return gdbarch->decr_pc_after_break;
3641 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3642 CORE_ADDR decr_pc_after_break)
3644 gdbarch->decr_pc_after_break = decr_pc_after_break;
3648 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
3650 gdb_assert (gdbarch != NULL);
3651 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
3652 if (gdbarch_debug >= 2)
3653 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
3654 return gdbarch->deprecated_function_start_offset;
3658 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
3659 CORE_ADDR deprecated_function_start_offset)
3661 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
3665 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)
3667 gdb_assert (gdbarch != NULL);
3668 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
3669 if (gdbarch_debug >= 2)
3670 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3671 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
3675 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3676 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3678 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3682 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3684 gdb_assert (gdbarch != NULL);
3685 /* Skip verify of frame_args_skip, invalid_p == 0 */
3686 if (gdbarch_debug >= 2)
3687 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3688 return gdbarch->frame_args_skip;
3692 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3693 CORE_ADDR frame_args_skip)
3695 gdbarch->frame_args_skip = frame_args_skip;
3699 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
3701 gdb_assert (gdbarch != NULL);
3702 return gdbarch->deprecated_frame_chain != NULL;
3706 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3708 gdb_assert (gdbarch != NULL);
3709 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
3710 if (gdbarch_debug >= 2)
3711 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
3712 return gdbarch->deprecated_frame_chain (frame);
3716 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
3717 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
3719 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
3723 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
3725 gdb_assert (gdbarch != NULL);
3726 return gdbarch->deprecated_frame_chain_valid != NULL;
3730 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3732 gdb_assert (gdbarch != NULL);
3733 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
3734 if (gdbarch_debug >= 2)
3735 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
3736 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
3740 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
3741 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
3743 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
3747 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
3749 gdb_assert (gdbarch != NULL);
3750 return gdbarch->deprecated_frame_saved_pc != NULL;
3754 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3756 gdb_assert (gdbarch != NULL);
3757 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
3758 if (gdbarch_debug >= 2)
3759 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
3760 return gdbarch->deprecated_frame_saved_pc (fi);
3764 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
3765 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
3767 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
3771 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3773 gdb_assert (gdbarch != NULL);
3774 return gdbarch->unwind_pc != NULL;
3778 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3780 gdb_assert (gdbarch != NULL);
3781 gdb_assert (gdbarch->unwind_pc != NULL);
3782 if (gdbarch_debug >= 2)
3783 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3784 return gdbarch->unwind_pc (gdbarch, next_frame);
3788 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3789 gdbarch_unwind_pc_ftype unwind_pc)
3791 gdbarch->unwind_pc = unwind_pc;
3795 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3797 gdb_assert (gdbarch != NULL);
3798 return gdbarch->unwind_sp != NULL;
3802 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3804 gdb_assert (gdbarch != NULL);
3805 gdb_assert (gdbarch->unwind_sp != NULL);
3806 if (gdbarch_debug >= 2)
3807 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3808 return gdbarch->unwind_sp (gdbarch, next_frame);
3812 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3813 gdbarch_unwind_sp_ftype unwind_sp)
3815 gdbarch->unwind_sp = unwind_sp;
3819 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
3821 gdb_assert (gdbarch != NULL);
3822 return gdbarch->deprecated_frame_args_address != get_frame_base;
3826 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3828 gdb_assert (gdbarch != NULL);
3829 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
3830 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
3831 if (gdbarch_debug >= 2)
3832 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
3833 return gdbarch->deprecated_frame_args_address (fi);
3837 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
3838 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
3840 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
3844 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
3846 gdb_assert (gdbarch != NULL);
3847 return gdbarch->deprecated_frame_locals_address != get_frame_base;
3851 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3853 gdb_assert (gdbarch != NULL);
3854 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
3855 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
3856 if (gdbarch_debug >= 2)
3857 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
3858 return gdbarch->deprecated_frame_locals_address (fi);
3862 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
3863 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
3865 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
3869 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
3871 gdb_assert (gdbarch != NULL);
3872 return gdbarch->deprecated_saved_pc_after_call != NULL;
3876 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
3878 gdb_assert (gdbarch != NULL);
3879 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
3880 if (gdbarch_debug >= 2)
3881 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
3882 return gdbarch->deprecated_saved_pc_after_call (frame);
3886 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
3887 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
3889 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
3893 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3895 gdb_assert (gdbarch != NULL);
3896 return gdbarch->frame_num_args != NULL;
3900 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3902 gdb_assert (gdbarch != NULL);
3903 gdb_assert (gdbarch->frame_num_args != NULL);
3904 if (gdbarch_debug >= 2)
3905 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3906 return gdbarch->frame_num_args (frame);
3910 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3911 gdbarch_frame_num_args_ftype frame_num_args)
3913 gdbarch->frame_num_args = frame_num_args;
3917 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
3919 gdb_assert (gdbarch != NULL);
3920 return gdbarch->deprecated_stack_align != NULL;
3924 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3926 gdb_assert (gdbarch != NULL);
3927 gdb_assert (gdbarch->deprecated_stack_align != NULL);
3928 if (gdbarch_debug >= 2)
3929 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
3930 return gdbarch->deprecated_stack_align (sp);
3934 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
3935 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
3937 gdbarch->deprecated_stack_align = deprecated_stack_align;
3941 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3943 gdb_assert (gdbarch != NULL);
3944 return gdbarch->frame_align != NULL;
3948 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3950 gdb_assert (gdbarch != NULL);
3951 gdb_assert (gdbarch->frame_align != NULL);
3952 if (gdbarch_debug >= 2)
3953 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3954 return gdbarch->frame_align (gdbarch, address);
3958 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3959 gdbarch_frame_align_ftype frame_align)
3961 gdbarch->frame_align = frame_align;
3965 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3967 gdb_assert (gdbarch != NULL);
3968 return gdbarch->deprecated_reg_struct_has_addr != NULL;
3972 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3974 gdb_assert (gdbarch != NULL);
3975 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
3976 if (gdbarch_debug >= 2)
3977 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
3978 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
3982 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
3983 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
3985 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
3989 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3991 gdb_assert (gdbarch != NULL);
3992 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3993 if (gdbarch_debug >= 2)
3994 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3995 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3999 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4000 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4002 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4006 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4008 gdb_assert (gdbarch != NULL);
4009 if (gdbarch_debug >= 2)
4010 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4011 return gdbarch->frame_red_zone_size;
4015 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4016 int frame_red_zone_size)
4018 gdbarch->frame_red_zone_size = frame_red_zone_size;
4021 const struct floatformat *
4022 gdbarch_float_format (struct gdbarch *gdbarch)
4024 gdb_assert (gdbarch != NULL);
4025 if (gdbarch_debug >= 2)
4026 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4027 return gdbarch->float_format;
4031 set_gdbarch_float_format (struct gdbarch *gdbarch,
4032 const struct floatformat * float_format)
4034 gdbarch->float_format = float_format;
4037 const struct floatformat *
4038 gdbarch_double_format (struct gdbarch *gdbarch)
4040 gdb_assert (gdbarch != NULL);
4041 if (gdbarch_debug >= 2)
4042 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4043 return gdbarch->double_format;
4047 set_gdbarch_double_format (struct gdbarch *gdbarch,
4048 const struct floatformat * double_format)
4050 gdbarch->double_format = double_format;
4053 const struct floatformat *
4054 gdbarch_long_double_format (struct gdbarch *gdbarch)
4056 gdb_assert (gdbarch != NULL);
4057 if (gdbarch_debug >= 2)
4058 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4059 return gdbarch->long_double_format;
4063 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4064 const struct floatformat * long_double_format)
4066 gdbarch->long_double_format = long_double_format;
4070 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4072 gdb_assert (gdbarch != NULL);
4073 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4074 if (gdbarch_debug >= 2)
4075 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4076 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4080 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4081 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4083 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4087 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4089 gdb_assert (gdbarch != NULL);
4090 gdb_assert (gdbarch->addr_bits_remove != NULL);
4091 if (gdbarch_debug >= 2)
4092 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4093 return gdbarch->addr_bits_remove (addr);
4097 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4098 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4100 gdbarch->addr_bits_remove = addr_bits_remove;
4104 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4106 gdb_assert (gdbarch != NULL);
4107 gdb_assert (gdbarch->smash_text_address != NULL);
4108 if (gdbarch_debug >= 2)
4109 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4110 return gdbarch->smash_text_address (addr);
4114 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4115 gdbarch_smash_text_address_ftype smash_text_address)
4117 gdbarch->smash_text_address = smash_text_address;
4121 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4123 gdb_assert (gdbarch != NULL);
4124 return gdbarch->software_single_step != NULL;
4128 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4130 gdb_assert (gdbarch != NULL);
4131 gdb_assert (gdbarch->software_single_step != NULL);
4132 if (gdbarch_debug >= 2)
4133 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4134 gdbarch->software_single_step (sig, insert_breakpoints_p);
4138 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4139 gdbarch_software_single_step_ftype software_single_step)
4141 gdbarch->software_single_step = software_single_step;
4145 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4147 gdb_assert (gdbarch != NULL);
4148 gdb_assert (gdbarch->print_insn != NULL);
4149 if (gdbarch_debug >= 2)
4150 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4151 return gdbarch->print_insn (vma, info);
4155 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4156 gdbarch_print_insn_ftype print_insn)
4158 gdbarch->print_insn = print_insn;
4162 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4164 gdb_assert (gdbarch != NULL);
4165 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4166 if (gdbarch_debug >= 2)
4167 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4168 return gdbarch->skip_trampoline_code (pc);
4172 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4173 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4175 gdbarch->skip_trampoline_code = skip_trampoline_code;
4179 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4181 gdb_assert (gdbarch != NULL);
4182 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4183 if (gdbarch_debug >= 2)
4184 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4185 return gdbarch->skip_solib_resolver (gdbarch, pc);
4189 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4190 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4192 gdbarch->skip_solib_resolver = skip_solib_resolver;
4196 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4198 gdb_assert (gdbarch != NULL);
4199 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4200 if (gdbarch_debug >= 2)
4201 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4202 return gdbarch->in_solib_call_trampoline (pc, name);
4206 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4207 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4209 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4213 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4215 gdb_assert (gdbarch != NULL);
4216 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4217 if (gdbarch_debug >= 2)
4218 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4219 return gdbarch->in_solib_return_trampoline (pc, name);
4223 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4224 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4226 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4230 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4232 gdb_assert (gdbarch != NULL);
4233 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4234 if (gdbarch_debug >= 2)
4235 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4236 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4240 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4241 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4243 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4247 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4249 gdb_assert (gdbarch != NULL);
4250 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4251 if (gdbarch_debug >= 2)
4252 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4253 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4257 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4258 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4260 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4264 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4266 gdb_assert (gdbarch != NULL);
4267 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4268 if (gdbarch_debug >= 2)
4269 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4270 gdbarch->elf_make_msymbol_special (sym, msym);
4274 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4275 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4277 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4281 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4283 gdb_assert (gdbarch != NULL);
4284 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4285 if (gdbarch_debug >= 2)
4286 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4287 gdbarch->coff_make_msymbol_special (val, msym);
4291 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4292 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4294 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4298 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4300 gdb_assert (gdbarch != NULL);
4301 /* Skip verify of name_of_malloc, invalid_p == 0 */
4302 if (gdbarch_debug >= 2)
4303 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4304 return gdbarch->name_of_malloc;
4308 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4309 const char * name_of_malloc)
4311 gdbarch->name_of_malloc = name_of_malloc;
4315 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4317 gdb_assert (gdbarch != NULL);
4318 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4319 if (gdbarch_debug >= 2)
4320 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4321 return gdbarch->cannot_step_breakpoint;
4325 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4326 int cannot_step_breakpoint)
4328 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4332 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4334 gdb_assert (gdbarch != NULL);
4335 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4336 if (gdbarch_debug >= 2)
4337 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4338 return gdbarch->have_nonsteppable_watchpoint;
4342 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4343 int have_nonsteppable_watchpoint)
4345 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4349 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4351 gdb_assert (gdbarch != NULL);
4352 return gdbarch->address_class_type_flags != NULL;
4356 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
4358 gdb_assert (gdbarch != NULL);
4359 gdb_assert (gdbarch->address_class_type_flags != NULL);
4360 if (gdbarch_debug >= 2)
4361 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
4362 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
4366 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4367 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4369 gdbarch->address_class_type_flags = address_class_type_flags;
4373 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4375 gdb_assert (gdbarch != NULL);
4376 return gdbarch->address_class_type_flags_to_name != NULL;
4380 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
4382 gdb_assert (gdbarch != NULL);
4383 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
4384 if (gdbarch_debug >= 2)
4385 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
4386 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
4390 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
4391 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
4393 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
4397 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
4399 gdb_assert (gdbarch != NULL);
4400 return gdbarch->address_class_name_to_type_flags != NULL;
4404 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
4406 gdb_assert (gdbarch != NULL);
4407 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
4408 if (gdbarch_debug >= 2)
4409 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
4410 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
4414 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
4415 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
4417 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
4421 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
4423 gdb_assert (gdbarch != NULL);
4424 gdb_assert (gdbarch->register_reggroup_p != NULL);
4425 if (gdbarch_debug >= 2)
4426 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
4427 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
4431 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
4432 gdbarch_register_reggroup_p_ftype register_reggroup_p)
4434 gdbarch->register_reggroup_p = register_reggroup_p;
4438 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
4440 gdb_assert (gdbarch != NULL);
4441 return gdbarch->fetch_pointer_argument != NULL;
4445 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
4447 gdb_assert (gdbarch != NULL);
4448 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
4449 if (gdbarch_debug >= 2)
4450 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
4451 return gdbarch->fetch_pointer_argument (frame, argi, type);
4455 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
4456 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
4458 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
4462 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
4464 gdb_assert (gdbarch != NULL);
4465 return gdbarch->regset_from_core_section != NULL;
4468 const struct regset *
4469 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
4471 gdb_assert (gdbarch != NULL);
4472 gdb_assert (gdbarch->regset_from_core_section != NULL);
4473 if (gdbarch_debug >= 2)
4474 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
4475 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
4479 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
4480 gdbarch_regset_from_core_section_ftype regset_from_core_section)
4482 gdbarch->regset_from_core_section = regset_from_core_section;
4486 /* Keep a registry of per-architecture data-pointers required by GDB
4493 gdbarch_data_pre_init_ftype *pre_init;
4494 gdbarch_data_post_init_ftype *post_init;
4497 struct gdbarch_data_registration
4499 struct gdbarch_data *data;
4500 struct gdbarch_data_registration *next;
4503 struct gdbarch_data_registry
4506 struct gdbarch_data_registration *registrations;
4509 struct gdbarch_data_registry gdbarch_data_registry =
4514 static struct gdbarch_data *
4515 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4516 gdbarch_data_post_init_ftype *post_init)
4518 struct gdbarch_data_registration **curr;
4519 /* Append the new registraration. */
4520 for (curr = &gdbarch_data_registry.registrations;
4522 curr = &(*curr)->next);
4523 (*curr) = XMALLOC (struct gdbarch_data_registration);
4524 (*curr)->next = NULL;
4525 (*curr)->data = XMALLOC (struct gdbarch_data);
4526 (*curr)->data->index = gdbarch_data_registry.nr++;
4527 (*curr)->data->pre_init = pre_init;
4528 (*curr)->data->post_init = post_init;
4529 (*curr)->data->init_p = 1;
4530 return (*curr)->data;
4533 struct gdbarch_data *
4534 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4536 return gdbarch_data_register (pre_init, NULL);
4539 struct gdbarch_data *
4540 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4542 return gdbarch_data_register (NULL, post_init);
4545 /* Create/delete the gdbarch data vector. */
4548 alloc_gdbarch_data (struct gdbarch *gdbarch)
4550 gdb_assert (gdbarch->data == NULL);
4551 gdbarch->nr_data = gdbarch_data_registry.nr;
4552 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4555 /* Initialize the current value of the specified per-architecture
4559 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4560 struct gdbarch_data *data,
4563 gdb_assert (data->index < gdbarch->nr_data);
4564 gdb_assert (gdbarch->data[data->index] == NULL);
4565 gdb_assert (data->pre_init == NULL);
4566 gdbarch->data[data->index] = pointer;
4569 /* Return the current value of the specified per-architecture
4573 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4575 gdb_assert (data->index < gdbarch->nr_data);
4576 if (gdbarch->data[data->index] == NULL)
4578 /* The data-pointer isn't initialized, call init() to get a
4580 if (data->pre_init != NULL)
4581 /* Mid architecture creation: pass just the obstack, and not
4582 the entire architecture, as that way it isn't possible for
4583 pre-init code to refer to undefined architecture
4585 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4586 else if (gdbarch->initialized_p
4587 && data->post_init != NULL)
4588 /* Post architecture creation: pass the entire architecture
4589 (as all fields are valid), but be careful to also detect
4590 recursive references. */
4592 gdb_assert (data->init_p);
4594 gdbarch->data[data->index] = data->post_init (gdbarch);
4598 /* The architecture initialization hasn't completed - punt -
4599 hope that the caller knows what they are doing. Once
4600 deprecated_set_gdbarch_data has been initialized, this can be
4601 changed to an internal error. */
4603 gdb_assert (gdbarch->data[data->index] != NULL);
4605 return gdbarch->data[data->index];
4610 /* Keep a registry of swapped data required by GDB modules. */
4615 struct gdbarch_swap_registration *source;
4616 struct gdbarch_swap *next;
4619 struct gdbarch_swap_registration
4622 unsigned long sizeof_data;
4623 gdbarch_swap_ftype *init;
4624 struct gdbarch_swap_registration *next;
4627 struct gdbarch_swap_registry
4630 struct gdbarch_swap_registration *registrations;
4633 struct gdbarch_swap_registry gdbarch_swap_registry =
4639 deprecated_register_gdbarch_swap (void *data,
4640 unsigned long sizeof_data,
4641 gdbarch_swap_ftype *init)
4643 struct gdbarch_swap_registration **rego;
4644 for (rego = &gdbarch_swap_registry.registrations;
4646 rego = &(*rego)->next);
4647 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4648 (*rego)->next = NULL;
4649 (*rego)->init = init;
4650 (*rego)->data = data;
4651 (*rego)->sizeof_data = sizeof_data;
4655 current_gdbarch_swap_init_hack (void)
4657 struct gdbarch_swap_registration *rego;
4658 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
4659 for (rego = gdbarch_swap_registry.registrations;
4663 if (rego->data != NULL)
4665 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
4666 struct gdbarch_swap);
4667 (*curr)->source = rego;
4668 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
4670 (*curr)->next = NULL;
4671 curr = &(*curr)->next;
4673 if (rego->init != NULL)
4678 static struct gdbarch *
4679 current_gdbarch_swap_out_hack (void)
4681 struct gdbarch *old_gdbarch = current_gdbarch;
4682 struct gdbarch_swap *curr;
4684 gdb_assert (old_gdbarch != NULL);
4685 for (curr = old_gdbarch->swap;
4689 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4690 memset (curr->source->data, 0, curr->source->sizeof_data);
4692 current_gdbarch = NULL;
4697 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
4699 struct gdbarch_swap *curr;
4701 gdb_assert (current_gdbarch == NULL);
4702 for (curr = new_gdbarch->swap;
4705 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4706 current_gdbarch = new_gdbarch;
4710 /* Keep a registry of the architectures known by GDB. */
4712 struct gdbarch_registration
4714 enum bfd_architecture bfd_architecture;
4715 gdbarch_init_ftype *init;
4716 gdbarch_dump_tdep_ftype *dump_tdep;
4717 struct gdbarch_list *arches;
4718 struct gdbarch_registration *next;
4721 static struct gdbarch_registration *gdbarch_registry = NULL;
4724 append_name (const char ***buf, int *nr, const char *name)
4726 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4732 gdbarch_printable_names (void)
4734 /* Accumulate a list of names based on the registed list of
4736 enum bfd_architecture a;
4738 const char **arches = NULL;
4739 struct gdbarch_registration *rego;
4740 for (rego = gdbarch_registry;
4744 const struct bfd_arch_info *ap;
4745 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4747 internal_error (__FILE__, __LINE__,
4748 "gdbarch_architecture_names: multi-arch unknown");
4751 append_name (&arches, &nr_arches, ap->printable_name);
4756 append_name (&arches, &nr_arches, NULL);
4762 gdbarch_register (enum bfd_architecture bfd_architecture,
4763 gdbarch_init_ftype *init,
4764 gdbarch_dump_tdep_ftype *dump_tdep)
4766 struct gdbarch_registration **curr;
4767 const struct bfd_arch_info *bfd_arch_info;
4768 /* Check that BFD recognizes this architecture */
4769 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4770 if (bfd_arch_info == NULL)
4772 internal_error (__FILE__, __LINE__,
4773 "gdbarch: Attempt to register unknown architecture (%d)",
4776 /* Check that we haven't seen this architecture before */
4777 for (curr = &gdbarch_registry;
4779 curr = &(*curr)->next)
4781 if (bfd_architecture == (*curr)->bfd_architecture)
4782 internal_error (__FILE__, __LINE__,
4783 "gdbarch: Duplicate registraration of architecture (%s)",
4784 bfd_arch_info->printable_name);
4788 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
4789 bfd_arch_info->printable_name,
4792 (*curr) = XMALLOC (struct gdbarch_registration);
4793 (*curr)->bfd_architecture = bfd_architecture;
4794 (*curr)->init = init;
4795 (*curr)->dump_tdep = dump_tdep;
4796 (*curr)->arches = NULL;
4797 (*curr)->next = NULL;
4801 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4802 gdbarch_init_ftype *init)
4804 gdbarch_register (bfd_architecture, init, NULL);
4808 /* Look for an architecture using gdbarch_info. Base search on only
4809 BFD_ARCH_INFO and BYTE_ORDER. */
4811 struct gdbarch_list *
4812 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4813 const struct gdbarch_info *info)
4815 for (; arches != NULL; arches = arches->next)
4817 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4819 if (info->byte_order != arches->gdbarch->byte_order)
4821 if (info->osabi != arches->gdbarch->osabi)
4829 /* Find an architecture that matches the specified INFO. Create a new
4830 architecture if needed. Return that new architecture. Assumes
4831 that there is no current architecture. */
4833 static struct gdbarch *
4834 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
4836 struct gdbarch *new_gdbarch;
4837 struct gdbarch_registration *rego;
4839 /* The existing architecture has been swapped out - all this code
4840 works from a clean slate. */
4841 gdb_assert (current_gdbarch == NULL);
4843 /* Fill in missing parts of the INFO struct using a number of
4844 sources: "set ..."; INFOabfd supplied; and the existing
4846 gdbarch_info_fill (old_gdbarch, &info);
4848 /* Must have found some sort of architecture. */
4849 gdb_assert (info.bfd_arch_info != NULL);
4853 fprintf_unfiltered (gdb_stdlog,
4854 "find_arch_by_info: info.bfd_arch_info %s\n",
4855 (info.bfd_arch_info != NULL
4856 ? info.bfd_arch_info->printable_name
4858 fprintf_unfiltered (gdb_stdlog,
4859 "find_arch_by_info: info.byte_order %d (%s)\n",
4861 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4862 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4864 fprintf_unfiltered (gdb_stdlog,
4865 "find_arch_by_info: info.osabi %d (%s)\n",
4866 info.osabi, gdbarch_osabi_name (info.osabi));
4867 fprintf_unfiltered (gdb_stdlog,
4868 "find_arch_by_info: info.abfd 0x%lx\n",
4870 fprintf_unfiltered (gdb_stdlog,
4871 "find_arch_by_info: info.tdep_info 0x%lx\n",
4872 (long) info.tdep_info);
4875 /* Find the tdep code that knows about this architecture. */
4876 for (rego = gdbarch_registry;
4879 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4884 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4885 "No matching architecture\n");
4889 /* Ask the tdep code for an architecture that matches "info". */
4890 new_gdbarch = rego->init (info, rego->arches);
4892 /* Did the tdep code like it? No. Reject the change and revert to
4893 the old architecture. */
4894 if (new_gdbarch == NULL)
4897 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4898 "Target rejected architecture\n");
4902 /* Is this a pre-existing architecture (as determined by already
4903 being initialized)? Move it to the front of the architecture
4904 list (keeping the list sorted Most Recently Used). */
4905 if (new_gdbarch->initialized_p)
4907 struct gdbarch_list **list;
4908 struct gdbarch_list *this;
4910 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4911 "Previous architecture 0x%08lx (%s) selected\n",
4913 new_gdbarch->bfd_arch_info->printable_name);
4914 /* Find the existing arch in the list. */
4915 for (list = ®o->arches;
4916 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4917 list = &(*list)->next);
4918 /* It had better be in the list of architectures. */
4919 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4922 (*list) = this->next;
4923 /* Insert THIS at the front. */
4924 this->next = rego->arches;
4925 rego->arches = this;
4930 /* It's a new architecture. */
4932 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4933 "New architecture 0x%08lx (%s) selected\n",
4935 new_gdbarch->bfd_arch_info->printable_name);
4937 /* Insert the new architecture into the front of the architecture
4938 list (keep the list sorted Most Recently Used). */
4940 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4941 this->next = rego->arches;
4942 this->gdbarch = new_gdbarch;
4943 rego->arches = this;
4946 /* Check that the newly installed architecture is valid. Plug in
4947 any post init values. */
4948 new_gdbarch->dump_tdep = rego->dump_tdep;
4949 verify_gdbarch (new_gdbarch);
4950 new_gdbarch->initialized_p = 1;
4952 /* Initialize any per-architecture swap areas. This phase requires
4953 a valid global CURRENT_GDBARCH. Set it momentarially, and then
4954 swap the entire architecture out. */
4955 current_gdbarch = new_gdbarch;
4956 current_gdbarch_swap_init_hack ();
4957 current_gdbarch_swap_out_hack ();
4960 gdbarch_dump (new_gdbarch, gdb_stdlog);
4966 gdbarch_find_by_info (struct gdbarch_info info)
4968 /* Save the previously selected architecture, setting the global to
4969 NULL. This stops things like gdbarch->init() trying to use the
4970 previous architecture's configuration. The previous architecture
4971 may not even be of the same architecture family. The most recent
4972 architecture of the same family is found at the head of the
4973 rego->arches list. */
4974 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
4976 /* Find the specified architecture. */
4977 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
4979 /* Restore the existing architecture. */
4980 gdb_assert (current_gdbarch == NULL);
4981 current_gdbarch_swap_in_hack (old_gdbarch);
4986 /* Make the specified architecture current, swapping the existing one
4990 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
4992 gdb_assert (new_gdbarch != NULL);
4993 gdb_assert (current_gdbarch != NULL);
4994 gdb_assert (new_gdbarch->initialized_p);
4995 current_gdbarch_swap_out_hack ();
4996 current_gdbarch_swap_in_hack (new_gdbarch);
4997 architecture_changed_event ();
5000 extern void _initialize_gdbarch (void);
5003 _initialize_gdbarch (void)
5005 struct cmd_list_element *c;
5007 deprecated_add_show_from_set
5008 (add_set_cmd ("arch",
5011 (char *)&gdbarch_debug,
5012 "Set architecture debugging.\n\
5013 When non-zero, architecture debugging is enabled.", &setdebuglist),
5015 c = add_set_cmd ("archdebug",
5018 (char *)&gdbarch_debug,
5019 "Set architecture debugging.\n\
5020 When non-zero, architecture debugging is enabled.", &setlist);
5022 deprecate_cmd (c, "set debug arch");
5023 deprecate_cmd (deprecated_add_show_from_set (c, &showlist), "show debug arch");